[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 1 05:45:06 PDT 2020
balazske marked 12 inline comments as done.
balazske added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/cert/SignalHandlerCheck.cpp:95
+ std::deque<std::pair<const FunctionDecl *, const Expr *>> CalledFunctions{
+ {HandlerDecl, HandlerExpr}};
+
----------------
baloghadamsoftware wrote:
> Do we really need to store `FunctionDecl` in the map? The whole code would be much simpler if you only store the call expression and the retrieve the callee declaration once at the beginning of the loop body. Beside simplicity this would also reduce the memory footprint and surely not increase the execution time.
The code was changed to store only the `CallExpr`. The first item is not a function call but the reference to function in the `signal` call, so it needs special handling.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87449/new/
https://reviews.llvm.org/D87449
More information about the cfe-commits
mailing list