[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thanks! This looks very useful. Comment at: clang/lib/Analysis/CallGraph.cpp:97-102 +const auto *ConstructedType = Ctor->getParent(); +if (ConstructedType->hasUserDeclaredDestructor()) { + CXXDestructorDecl *Dtor =

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-15 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel updated this revision to Diff 215462. jcranmer-intel added a comment. I've rolled the relevant call graph analysis changes from the prior commit into this updated patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65453/new/ https://reviews.llvm.org/D65453 Files:

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-14 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel added a comment. Okay, I see the issue now. I originally developed this patch on a fork with a whole lot of extra changes, and that fork included some extra modifications to the callgraph that I had missed:

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/CallGraph.cpp:93 void VisitCXXConstructExpr(CXXConstructExpr *E) { CXXConstructorDecl *Ctor = E->getConstructor(); Yes, there it is. Where does it come from? I don't have it in master.

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. For me `ddd()` doesn't call `c::c()`. I can fix it by adding the following code: void VisitCXXConstructExpr(CXXConstructExpr *CE) { addCalledDecl(CE->getConstructor()); VisitChildren(CE); } I don't see why it would work without that code, as `CXXConstructExpr`

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-14 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel added a comment. The test has been passing for me. What error are you seeing? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65453/new/ https://reviews.llvm.org/D65453 ___ cfe-commits

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, the patch doesn't pass its own test for me, could you double-check? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65453/new/ https://reviews.llvm.org/D65453 ___ cfe-commits

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-09 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel added a comment. No, I do not have commit access, so if you could commit it, it would be greatly appreciated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65453/new/ https://reviews.llvm.org/D65453

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Do you have commit access or should i commit this for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65453/new/ https://reviews.llvm.org/D65453 ___ cfe-commits mailing list

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-08-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ edited reviewers, added: NoQ; removed: dergachev.a. NoQ added a comment. This will slightly skew Static Analyzer exploration order, not necessarily in a good way, as default arguments and (sometimes) default initializers are not modeled properly. But this doesn't

[PATCH] D65453: Improve the accuracy of the Clang call graph analysis

2019-07-30 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel created this revision. jcranmer-intel added a reviewer: dcoughlin. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch improves Clang call graph analysis by adding in expressions that are not found in regular function bodies, such as default arguments