[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 1 17:17:40 PST 2020


Szelethus created this revision.
Szelethus added reviewers: NoQ, xazax.hun, baloghadamsoftware, dcoughlin, rnkovacs, balazske, martong.
Szelethus added a project: clang.
Herald added subscribers: cfe-commits, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity.
Szelethus added a parent revision: D75431: [analyzer][NFC] Merge checkNewAllocator's paramaters into CXXAllocatorCall.

Exactly what it says on the tin! This is clearly not the end of the road in this direction, the parameters could be merged far more with the use of `CallEvent` or a better value type in the `CallDescriptionMap`, but this was shockingly difficult enough on its own. I expect that simplifying the file further will be far easier moving forward.

The end goal is to research how we could create a more mature checker interaction infrastructure for more complicated C++ modeling, and I'm pretty sure that being able successfully split up our giants is the first step in this direction.

Also... as to why I added so much `LLVM_UNREACHABLE` annotations, I'll provide the following image:

F11463946: image.png <https://reviews.llvm.org/F11463946>

One could explain why this restroom looks like this -- but you could guess what the horrifying story must have been :^)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75432

Files:
  clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75432.247534.patch
Type: text/x-patch
Size: 39223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200302/79be1403/attachment-0001.bin>


More information about the cfe-commits mailing list