diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-18 22:01:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-18 22:01:46 +0000 |
commit | 4eeaec46f7de16898a2feb440d064cd1eac1dc2f (patch) | |
tree | 518568cd030a335b88c9251b9a588a9caadc4972 /clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp | |
parent | d8a9e375582fea89906d89f7fca4cbf0b240346f (diff) | |
download | bcm5719-llvm-4eeaec46f7de16898a2feb440d064cd1eac1dc2f.tar.gz bcm5719-llvm-4eeaec46f7de16898a2feb440d064cd1eac1dc2f.zip |
Fix name hiding and redeclaration checking for dependent local
using-declarations.
llvm-svn: 290072
Diffstat (limited to 'clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp')
-rw-r--r-- | clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp b/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp index 8f6638e6943..0ea4eeb1e9b 100644 --- a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp +++ b/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp @@ -87,12 +87,12 @@ namespace PR21933 { extern int a(); // expected-error {{different kind of symbol}} a(); - extern int b(); - using T::b; + extern int b(); // expected-note {{previous}} + using T::b; // expected-error {{different kind of symbol}} b(); - using T::c; - using U::c; + using T::c; // expected-note {{previous}} + using U::c; // expected-error-re {{redefinition of 'c'{{$}}}} c(); } @@ -101,29 +101,28 @@ namespace PR21933 { typedef struct {} Xt; // expected-error {{different kind of symbol}} (void)Xt; - using T::Xs; // expected-note {{candidate}} - struct Xs {}; // expected-note {{candidate}} - // FIXME: This is wrong, the using declaration hides the type. - Xs xs; // expected-error {{ambiguous}} + using T::Xs; // expected-note {{hidden by}} + struct Xs {}; + (void)Xs; + Xs xs; // expected-error {{must use 'struct'}} - using T::Xe; // expected-note {{candidate}} - enum Xe {}; // expected-note {{candidate}} - // FIXME: This is wrong, the using declaration hides the type. - Xe xe; // expected-error {{ambiguous}} + using T::Xe; // expected-note {{hidden by}} + enum Xe {}; + (void)Xe; + Xe xe; // expected-error {{must use 'enum'}} typedef struct {} Yt; // expected-note {{candidate}} using T::Yt; // eypected-error {{different kind of symbol}} expected-note {{candidate}} Yt yt; // expected-error {{ambiguous}} - struct Ys {}; // expected-note {{candidate}} - using T::Ys; // expected-note {{candidate}} - // FIXME: This is wrong, the using declaration hides the type. - Ys ys; // expected-error {{ambiguous}} + struct Ys {}; + using T::Ys; // expected-note {{hidden by}} + (void)Ys; + Ys ys; // expected-error {{must use 'struct'}} - enum Ye {}; // expected-note {{candidate}} - using T::Ye; // expected-note {{candidate}} - // FIXME: This is wrong, the using declaration hides the type. - Ye ye; // expected-error {{ambiguous}} + enum Ye {}; + using T::Ye; // expected-note {{hidden by}} + Ye ye; // expected-error {{must use 'enum'}} } template<typename T> void type() { |