[cfe-commits] r80470 - in /cfe/trunk: lib/Sema/SemaDeclCXX.cpp test/SemaCXX/missing-members.cpp
Anders Carlsson
andersca at mac.com
Sat Aug 29 17:58:46 PDT 2009
Author: andersca
Date: Sat Aug 29 19:58:45 2009
New Revision: 80470
URL: http://llvm.org/viewvc/llvm-project?rev=80470&view=rev
Log:
Use DiagnoseMissingMember for UsingDecls.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/test/SemaCXX/missing-members.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=80470&r1=80469&r2=80470&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sat Aug 29 19:58:45 2009
@@ -2189,7 +2189,7 @@
Name, LookupOrdinaryName);
if (!R) {
- Diag(IdentLoc, diag::err_typecheck_no_member_deprecated) << Name << SS.getRange();
+ DiagnoseMissingMember(IdentLoc, Name, NNS, SS.getRange());
return 0;
}
Modified: cfe/trunk/test/SemaCXX/missing-members.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/missing-members.cpp?rev=80470&r1=80469&r2=80470&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/missing-members.cpp (original)
+++ cfe/trunk/test/SemaCXX/missing-members.cpp Sat Aug 29 19:58:45 2009
@@ -18,3 +18,9 @@
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'}}
+
+};
More information about the cfe-commits
mailing list