[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 5 13:30:12 PST 2018
JonasToth added a comment.
Hi Sam,
this patch "broke" `ExprMutAnalyzer`, at least it creates an assertion failure that seems harmless. Your thought on it would be great!
The assertion in: `ASTMatchFinder.cpp +680` is triggered in the Analysis to figure out if something is mutated, because `Parents` is empty and the traversal scope is the TU itself, but the node is a `CXXConstructoDecl`. This does not happen for alle cases though, please take a look at this reproducer: https://godbolt.org/z/0yOq2I
Only for the Lambda-Case problems occur. If I `#if 0` the assertion out the issue goes away, and the real world code that triggered this behaviour is not bothered, too.
I am really puzzled why this issue occurs, but as you implemented the restrictions it would like to hear your opinion on the issue. If you want to reproduce yourself I am of course happy to help, but
https://github.com/JonasToth/clang/blob/fix_crash/unittests/Analysis/ExprMutationAnalyzerTest.cpp#L1134 is probably the easiest way to do so (just add this to trunk and run `check-clang-unit`).
Thank you for the time!
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54309/new/
https://reviews.llvm.org/D54309
More information about the cfe-commits
mailing list