aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/AST/CXXInheritance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/CXXInheritance.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/AST/CXXInheritance.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/lib/AST/CXXInheritance.cpp b/contrib/llvm-project/clang/lib/AST/CXXInheritance.cpp
index 1abbe8139ae9..25de2a20a7f3 100644
--- a/contrib/llvm-project/clang/lib/AST/CXXInheritance.cpp
+++ b/contrib/llvm-project/clang/lib/AST/CXXInheritance.cpp
@@ -80,7 +80,8 @@ bool CXXRecordDecl::isDerivedFrom(const CXXRecordDecl *Base,
const CXXRecordDecl *BaseDecl = Base->getCanonicalDecl();
return lookupInBases(
[BaseDecl](const CXXBaseSpecifier *Specifier, CXXBasePath &Path) {
- return FindBaseClass(Specifier, Path, BaseDecl);
+ return Specifier->getType()->getAsRecordDecl() &&
+ FindBaseClass(Specifier, Path, BaseDecl);
},
Paths);
}