[PATCH] D62926: [analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 6 21:01:26 PDT 2019
NoQ added a comment.
Aha, nice, that's much cleaner! Indeed, we have to skip the construct-expression, which is going to be on our way to the program point of new-expression which corresponds to calling the allocator, despite being nested within the new-expression. An annoying corner-case.
I'd like to have a test in which the constructor is //inlined//. I suspect that we'll have to skip the whole inlined call in this case, and it'll be a lot of various program points. We'll most likely have to consult location contexts to skip everything within the constructor's stack frame.
In the test cases that you've updated the constructor isn't inlined because it's an array-new operator and we don't bother inlining 10 default constructors (@Szelethus: a nice application of data flow analysis might be to find out if the default constructor always initializes the structure in the same way, say all nulls, so we could evaluate one constructor and default-bind it to the whole array in this case; @baloghadamsoftware: this in turn reminds me that i still need to do something about D22374 <https://reviews.llvm.org/D22374>).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62926/new/
https://reviews.llvm.org/D62926
More information about the cfe-commits
mailing list