summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-02 19:59:55 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-02 19:59:55 +0000
commit1a49e9dc877a5eec5312baa1d3ce1e34b13e61d9 (patch)
tree35a242681d2ad500056f52232e5c84197b94fdfb /clang/lib
parent9732915bf93208de19a8550871b592b49a50c181 (diff)
downloadbcm5719-llvm-1a49e9dc877a5eec5312baa1d3ce1e34b13e61d9.tar.gz
bcm5719-llvm-1a49e9dc877a5eec5312baa1d3ce1e34b13e61d9.zip
Recognize that EnumConstantDecls can be found by lookup and are not instance
members. Fixes PR5667. llvm-svn: 90341
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 01c77966244..8e1e0afaa64 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -733,6 +733,9 @@ static bool IsProvablyNotDerivedFrom(Sema &SemaRef,
}
static bool IsInstanceMember(NamedDecl *D) {
+ if (isa<EnumConstantDecl>(D))
+ return false;
+
assert(isa<CXXRecordDecl>(D->getDeclContext()) &&
"checking whether non-member is instance member");
OpenPOWER on IntegriCloud