]> granicus.if.org Git - clang/commitdiff
Use DiagnoseMissingMember for UsingDecls.
authorAnders Carlsson <andersca@mac.com>
Sun, 30 Aug 2009 00:58:45 +0000 (00:58 +0000)
committerAnders Carlsson <andersca@mac.com>
Sun, 30 Aug 2009 00:58:45 +0000 (00:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80470 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/missing-members.cpp

index 1aac43c1692fc0fe095bdca1a795ba9cf703a9dd..c729b6a7c75a6baad22fa662758c0c8e1dce34ca 100644 (file)
@@ -2189,7 +2189,7 @@ NamedDecl *Sema::BuildUsingDeclaration(SourceLocation UsingLoc,
                                        Name, LookupOrdinaryName);
   
   if (!R) {
-    Diag(IdentLoc, diag::err_typecheck_no_member_deprecated) << Name << SS.getRange();
+    DiagnoseMissingMember(IdentLoc, Name, NNS, SS.getRange());
     return 0;
   }
 
index a7372266c36097e513bcbe4b8804258681d58733..9df5b049f7e4b3063e5238b78e85581bb6cc477a 100644 (file)
@@ -18,3 +18,9 @@ int A::B::C::i = 10; // expected-error {{class 'A::B::C' has no member named 'i'
 int A::B::S::i = 10; // expected-error {{struct 'A::B::S' has no member named 'i'}}
 int A::B::U::i = 10; // expected-error {{union 'A::B::U' has no member named 'i'}}
 
+using A::B::D; // expected-error {{namespace 'A::B' has no member named 'D'}}
+
+struct S : A::B::C { 
+  using A::B::C::f; // expected-error {{class 'A::B::C' has no member named 'f'}}
+  
+};