summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
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