[PATCH] D153033: [NFC][CLANG] Fix potential null pointer dereference bugs

2023-06-15 Thread Aaron Puchert via Phabricator via cfe-commits
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() << "<>"; +return; + } dumpVarDefinitionName(*i);

[PATCH] D153033: [NFC][CLANG] Fix potential null pointer dereference bugs

2023-06-15 Thread Soumi Manna via Phabricator via cfe-commits
Manna updated this revision to Diff 531773. Manna added a comment. Update patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153033/new/ https://reviews.llvm.org/D153033 Files: clang/lib/AST/ASTContext.cpp clang/lib/AST/MicrosoftMangle.cpp clang/lib/Analysis/ThreadSafety.cpp

[PATCH] D153033: [NFC][CLANG] Fix potential null pointer dereference bugs

2023-06-15 Thread Soumi Manna via Phabricator via cfe-commits
Manna updated this revision to Diff 531766. Manna added a comment. Fix build error CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153033/new/ https://reviews.llvm.org/D153033 Files: clang/lib/AST/ASTContext.cpp clang/lib/AST/MicrosoftMangle.cpp clang/lib/Analysis/ThreadSafety.cpp

[PATCH] D153033: [NFC][CLANG] Fix potential null pointer dereference bugs

2023-06-15 Thread Soumi Manna via Phabricator via cfe-commits
Manna created this revision. Manna added a reviewer: erichkeane. Herald added a reviewer: NoQ. Herald added a project: All. Manna requested review of this revision. Herald added a project: clang. This patch uses castAs instead of getAs which will assert if the type doesn't match and adds nullptr