[PATCH] D81315: [analyzer][Draft] [Prototype] warning for default constructed unique pointer dereferences
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 10 02:43:03 PDT 2020
NoQ added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:233
+ return false;
+ if (MethodDec->getDeclName().isIdentifier()) {
+ return ResetMethods.count(MethodDec->getName().lower());
----------------
vsavchenko wrote:
> I'm not sure about it myself, but can `DeclName` be `isEmpty()`? If yes, it is a potential null-pointer dereference. Again, I don't know it for a fact, but I think it should be checked.
NOTE: 👏 Call 👏 Description 👏 Map 👏
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81315/new/
https://reviews.llvm.org/D81315
More information about the cfe-commits
mailing list