Exactly what it says on the tin! The included testfile demonstrates why this is important -- for C++ dynamic memory operators, we don't always recognize custom, or even standard-specified new/delete operators as CXXAllocatorCall or CXXDeallocatorCall.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Wonderful tests!
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h | ||
---|---|---|
202 | Maybe make a static StringRef getKindAsString(Kind); in the base class and defer to it instead so that they all were in one place near the enum itself? (i'm not sure it's actually better) | |
clang/test/Analysis/Inputs/system-header-simulator-cxx.h | ||
971–998 | Does it need to be guarded with #if __cplusplus >= ... then? |
clang/test/Analysis/Inputs/system-header-simulator-cxx.h | ||
---|---|---|
971–998 | It wasn't guarded before, so I don't think so? |
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h | ||
---|---|---|
202 | Well, each of these kinds are tied to a CallEvent class, so this made sense when I wrote it. I think these approaches are equivalent, so I'll stick with this one if you don't mind :) |
Maybe make a static StringRef getKindAsString(Kind); in the base class and defer to it instead so that they all were in one place near the enum itself?
(i'm not sure it's actually better)