diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-04-30 18:03:21 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-04-30 18:03:21 +0000 |
commit | 21866c3267a258c928f6c00be9004468a569bd84 (patch) | |
tree | 55b7324c01e5ff64aa4701ac6b2a8153045c611b /clang/test/SemaCXX/using-decl-1.cpp | |
parent | 307625c97451a773118f4180dda9bdb662b208d4 (diff) | |
download | bcm5719-llvm-21866c3267a258c928f6c00be9004468a569bd84.tar.gz bcm5719-llvm-21866c3267a258c928f6c00be9004468a569bd84.zip |
When typo-correcting a member using-declaration, only consider members of base classes.
llvm-svn: 207680
Diffstat (limited to 'clang/test/SemaCXX/using-decl-1.cpp')
-rw-r--r-- | clang/test/SemaCXX/using-decl-1.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/test/SemaCXX/using-decl-1.cpp b/clang/test/SemaCXX/using-decl-1.cpp index d5e793bbb5a..2ce0b109086 100644 --- a/clang/test/SemaCXX/using-decl-1.cpp +++ b/clang/test/SemaCXX/using-decl-1.cpp @@ -207,7 +207,7 @@ struct Y : S { using S::S; // expected-error {{no member named 'S' in 'S'}} }; -// [namespace.udecl] Para3: In a using-declaration used as a member-declaration, +// [namespace.udecl]p3: In a using-declaration used as a member-declaration, // the nested-name-specifier shall name a base class of the class being defined. // If such a using-declaration names a constructor, the nested-name-specifier // shall name a direct base class of the class being defined; @@ -216,14 +216,11 @@ struct Y : S { struct PR19171_B { }; // expected-note {{'PR19171_B' declared here}} struct PR19171_C : PR19171_B { }; struct PR19171_D : PR19171_C { - using PR19171_B::PR19171_C; // expected-error{{no member named 'PR19171_C' in 'PR19171_B'; did you mean 'PR19171_B'?}} + using PR19171_B::PR19171_C; // expected-error{{no member named 'PR19171_C' in 'PR19171_B'; did you mean 'PR19171_B'?}} }; -// FIXME: Typo correction should only consider member of base classes struct PR19171_E { }; -struct PR19171_EE { int EE; }; // expected-note {{'PR19171_EE::EE' declared here}} \ - // expected-note {{target of using declaration}} +struct PR19171_EE { int EE; }; struct PR19171_F : PR19171_E { - using PR19171_E::EE; // expected-error{{no member named 'EE' in 'PR19171_E'; did you mean 'PR19171_EE::EE'?}} \ - // expected-error{{using declaration refers into 'PR19171_E::', which is not a base class of 'PR19171_F'}} + using PR19171_E::EE; // expected-error-re{{no member named 'EE' in 'PR19171_E'{{$}}}} }; |