[all-commits] [llvm/llvm-project] 982a87: [CLANG] Fix potential null pointer dereference bugs
smanna12 via All-commits
all-commits at lists.llvm.org
Thu Jun 22 13:00:49 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 982a87ab74d8d050ae56164fcead7cf19038b077
https://github.com/llvm/llvm-project/commit/982a87ab74d8d050ae56164fcead7cf19038b077
Author: Manna, Soumi <soumi.manna at intel.com>
Date: 2023-06-22 (Thu, 22 Jun 2023)
Changed paths:
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/MicrosoftMangle.cpp
M clang/lib/Analysis/ThreadSafety.cpp
M clang/lib/Sema/SemaExpr.cpp
M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
Log Message:
-----------
[CLANG] Fix potential null pointer dereference bugs
This patch uses castAs instead of getAs which will assert if the type doesn't match and adds nullptr check if needed.
Also this patch improves the codes and passes I.getData() instead of doing a lookup in dumpVarDefinitionName()
since we're iterating over the same map in LocalVariableMap::dumpContex().
Reviewed By: aaron.ballman, aaronpuchert
Differential Revision: https://reviews.llvm.org/D153033
More information about the All-commits
mailing list