[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 5 09:32:50 PDT 2021
NoQ added a comment.
> It does make sense to split these in two, but I'm not so sure about `evalCall`.
`evalCall` should work great for this purpose but definitely not in this checker. Also this checker would still exercise its `checkPostCall` so it would still need to be silenced even if `evalCall` is implemented.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp:234
+ ObjRegion =
+ dyn_cast_or_null<TypedValueRegion>(Call.getArgSVal(0).getAsRegion());
}
----------------
This will crash if someone overloads `std::data` with 0 arguments because your `CallDescription`s don't require a specific number of arguments. (They're not allowed to do that, yes, but we're still not allowed to crash.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99260/new/
https://reviews.llvm.org/D99260
More information about the cfe-commits
mailing list