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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to