diff options
Diffstat (limited to 'compilerplugins/clang/mergeclasses.cxx')
-rw-r--r-- | compilerplugins/clang/mergeclasses.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compilerplugins/clang/mergeclasses.cxx b/compilerplugins/clang/mergeclasses.cxx index b6fccfe9418f..a6c1722206ff 100644 --- a/compilerplugins/clang/mergeclasses.cxx +++ b/compilerplugins/clang/mergeclasses.cxx @@ -120,11 +120,12 @@ bool MergeClasses::VisitCXXConstructExpr( const CXXConstructExpr* pCXXConstructE if (ignoreLocation(pCXXConstructExpr)) { return true; } - const CXXConstructorDecl* pCXXConstructorDecl = pCXXConstructExpr->getConstructor(); - const CXXRecordDecl* pParentCXXRecordDecl = pCXXConstructorDecl->getParent(); - if (ignoreLocation(pParentCXXRecordDecl)) { + // ignore calls when a sub-class is constructing it's superclass + if (pCXXConstructExpr->getConstructionKind() != CXXConstructExpr::ConstructionKind::CK_Complete) { return true; } + const CXXConstructorDecl* pCXXConstructorDecl = pCXXConstructExpr->getConstructor(); + const CXXRecordDecl* pParentCXXRecordDecl = pCXXConstructorDecl->getParent(); std::string s = pParentCXXRecordDecl->getQualifiedNameAsString(); addToInstantiatedSet(s); return true; |