[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 3 04:11:20 PST 2020


Charusso added a comment.

I wish for a third map, something like `ReallocationMap`. Other than that it is a great direction, I love it. Thanks!



================
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:355
+  template <bool ShouldFreeOnFail>
+  void checkRealloc(CheckerContext &C, const CallExpr *CE,
+                    ProgramStateRef State) const;
----------------
balazske wrote:
> The `CHECK_FN` could be used even here?
> ```
> template <bool ShouldFreeOnFail>
> CHECK_FN(checkRealloc)
> ```
I think about the opposite, passing around arguments by templates is not cool. They meant to be arguments.

This type of callback simply could be a third `CallDescriptionMap` for future profeness.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68165/new/

https://reviews.llvm.org/D68165





More information about the cfe-commits mailing list