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 = ConstructedType->getDestructo
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:
cl
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:
https://github.com/intel/llvm/commit/971fecdc316930c0c1c79283d1094ee4c4ca
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.
Reposito
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` is
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 mai
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 ma
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
__
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
cfe
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
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
11 matches
Mail list logo