This is an archive of the discontinued LLVM Phabricator instance.

Extend AnyCall to handle callable declarations without the call expressions
ClosedPublic

Authored by george.karpenkov on Jan 28 2019, 11:13 AM.

Details

Summary

That weakens inner invariants, but allows the class to be more generic, allowing usage in situations where the call expression is not known (or should not matter).

Diff Detail

Event Timeline

rjmccall added inline comments.Jan 28 2019, 12:45 PM
clang/include/clang/Analysis/AnyCall.h
23

"An instance of this class corresponds to a call. It may be a syntactically-concrete call, done as part of evaluating an expression, or it may be an abstract callee with no associated expression."

93

Destructors and constructors are subclasses of FunctionDecl and must be either checked for here or asserted against.

168

"its" and "asymmetry", and consider spelling out "asymmetry with the function and method cases above".

george.karpenkov marked 3 inline comments as done.
rjmccall accepted this revision.Jan 28 2019, 7:30 PM

Thanks, LGTM.

This revision is now accepted and ready to land.Jan 28 2019, 7:30 PM
This revision was automatically updated to reflect the committed changes.