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

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 14 13:44:19 PDT 2019


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` isn't a sub-class of `CallExpr`. So that's another obvious omission in the `CallGraph`.

Might it be that you have it locally but forgot to include in the patch? It also fails a couple more unrelated tests when i add it because it affects analysis order.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65453/new/

https://reviews.llvm.org/D65453





More information about the cfe-commits mailing list