summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-04-27 01:43:38 +0000
committerJohn McCall <rjmccall@apple.com>2010-04-27 01:43:38 +0000
commit1e67dd6b2f6acd5e49551579335bce5d9c501dc9 (patch)
tree18fdeb90742ed76ba088bb7770779023e7239f27 /clang/lib/Sema/SemaExpr.cpp
parent2408e32096b3219cce1dc58c7b38d299b267b9e8 (diff)
downloadbcm5719-llvm-1e67dd6b2f6acd5e49551579335bce5d9c501dc9.tar.gz
bcm5719-llvm-1e67dd6b2f6acd5e49551579335bce5d9c501dc9.zip
Improve the diagnostic you get when making a qualified member access
with a qualifier referencing a different type. llvm-svn: 102409
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 3cfe53c65a3..088ca96edd6 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -2499,11 +2499,8 @@ static void DiagnoseQualifiedMemberReference(Sema &SemaRef,
if (!BaseExpr)
return DiagnoseInstanceReference(SemaRef, SS, R);
- // FIXME: this is an exceedingly lame diagnostic for some of the more
- // complicated cases here.
- DeclContext *DC = R.getRepresentativeDecl()->getDeclContext();
- SemaRef.Diag(R.getNameLoc(), diag::err_not_direct_base_or_virtual)
- << SS.getRange() << DC << BaseType;
+ SemaRef.Diag(R.getNameLoc(), diag::err_qualified_member_of_unrelated)
+ << SS.getRange() << R.getRepresentativeDecl() << BaseType;
}
// Check whether the declarations we found through a nested-name
OpenPOWER on IntegriCloud