This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Introduce a convenience method for getting a CallEvent from an arbitrary Stmt
ClosedPublic

Authored by george.karpenkov on Jan 3 2019, 3:43 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ added inline comments.Jan 9 2019, 12:20 PM
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
1141–1148 ↗(On Diff #180167)

We should explain that these two functions are radically different. Namely, in getCaller() the location context argument is the callee context (from which the call site can be derived), while in getCall() it is the caller context (from which the call site cannot be derived). We should probably reflect this in function names as well, because getCaller() is already a pretty uninformative name.

Still, it should be possible to re-use getCall() in getCaller().

NoQ accepted this revision.Jan 11 2019, 3:26 PM

Thx! Yeah, i guess the calling convention is kinda reasonable as long as comments are in place.

This revision is now accepted and ready to land.Jan 11 2019, 3:26 PM
This revision was automatically updated to reflect the committed changes.