[PATCH] D153033: [NFC][CLANG] Fix potential null pointer dereference bugs
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 15 16:43:50 PDT 2023
aaronpuchert added inline comments.
================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:505-511
const unsigned *i = C.lookup(D);
llvm::errs() << " -> ";
+ if (!i) {
+ llvm::errs() << "<<NULL>>";
+ return;
+ }
dumpVarDefinitionName(*i);
----------------
Can't we just take `I.getData()` instead of doing a lookup? After all we're iterating over the same map.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153033/new/
https://reviews.llvm.org/D153033
More information about the cfe-commits
mailing list