teak-llvm/clang/test/SemaCXX/lookup-member.cpp
Richard Smith fc805cad14 PR24030, PR24033: Consistently check whether a new declaration conflicts with
an existing using shadow declaration if they define entities of the same kind
in different namespaces.

We'd previously check this consistently if the using-declaration came after the
other declaration, but not if it came before.

llvm-svn: 241428
2015-07-06 04:43:58 +00:00

14 lines
313 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
namespace A {
class String; // expected-note {{target of using declaration}}
};
using A::String; // expected-note {{using declaration}}
class String; // expected-error {{conflicts with target of using declaration}}
// rdar://8603569
union value {
char *String;
};