This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Make getDerefExpr() skip cleanups.
ClosedPublic

Authored by NoQ on Jun 14 2018, 6:51 PM.

Details

Summary

ExprWithCleanups that cleans up function arguments (or any other stuff) at the end of the full-expression may break AST pattern-matching for figuring out that a null pointer was produced by the inlined function during trackNullOrUndefValue(). Because this expression doesn't do anything, skip it during getDerefExpr().

Diff Detail

Event Timeline

NoQ created this revision.Jun 14 2018, 6:51 PM
NoQ added a comment.Jun 14 2018, 6:53 PM

This is supposed to suppress a few Inlined-Defensive-Checks-related false positives that accidentally spiked up during my testing of copy elision.

test/Analysis/inlining/inline-defensive-checks.cpp
93

what is the argument doing?

george.karpenkov accepted this revision.Jun 15 2018, 9:40 AM
This revision is now accepted and ready to land.Jun 15 2018, 9:40 AM
NoQ added inline comments.Jun 15 2018, 12:19 PM
test/Analysis/inlining/inline-defensive-checks.cpp
93

Causing cleanups (:

This revision was automatically updated to reflect the committed changes.