forked from OSchip/llvm-project
[clang-tidy] Fix ParentVirtualCallCheck for old MSVS compilers
llvm-svn: 329999
This commit is contained in:
parent
f6b29caa5b
commit
258d607b9f
|
@ -28,11 +28,12 @@ static bool isParentOf(const CXXRecordDecl &Parent,
|
|||
const CXXRecordDecl &ThisClass) {
|
||||
if (Parent.getCanonicalDecl() == ThisClass.getCanonicalDecl())
|
||||
return true;
|
||||
const CXXRecordDecl *ParentCanonicalDecl = Parent.getCanonicalDecl();
|
||||
return ThisClass.bases_end() !=
|
||||
llvm::find_if(ThisClass.bases(), [=](const CXXBaseSpecifier &Base) {
|
||||
auto *BaseDecl = Base.getType()->getAsCXXRecordDecl();
|
||||
assert(BaseDecl);
|
||||
return Parent.getCanonicalDecl() == BaseDecl->getCanonicalDecl();
|
||||
return ParentCanonicalDecl == BaseDecl->getCanonicalDecl();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue