summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-01-31 07:04:33 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-01-31 07:04:33 +0000
commitb85cd7c312aecd9f6837e69a47e12d98f3307530 (patch)
tree7abcddcdd6bdee39bc2c77498946580215d7ea1a /clang/lib
parent8322b426a56db0ecaf99c565746ed04448cd29b1 (diff)
downloadbcm5719-llvm-b85cd7c312aecd9f6837e69a47e12d98f3307530.tar.gz
bcm5719-llvm-b85cd7c312aecd9f6837e69a47e12d98f3307530.zip
Error for use of field from anonymous struct or union should say "invalid use of nonstatic data member"
not "call to non-static member function without an object argument". llvm-svn: 124576
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 2429c75880e..4a0f2299dbd 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1154,7 +1154,7 @@ static void DiagnoseInstanceReference(Sema &SemaRef,
SourceRange Range(Loc);
if (SS.isSet()) Range.setBegin(SS.getRange().getBegin());
- if (R.getAsSingle<FieldDecl>()) {
+ if (R.getAsSingle<FieldDecl>() || R.getAsSingle<IndirectFieldDecl>()) {
if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(SemaRef.CurContext)) {
if (MD->isStatic()) {
// "invalid use of member 'x' in static member function"
OpenPOWER on IntegriCloud