[all-commits] [llvm/llvm-project] 4d5dad: [analyzer] Fix null pointer deref in CastValueChecker
vabridgers via All-commits
all-commits at lists.llvm.org
Thu Jun 9 14:00:16 PDT 2022
Branch: refs/heads/release/14.x
Home: https://github.com/llvm/llvm-project
Commit: 4d5dad43b2ebd81247ba1355383301495a7398c9
https://github.com/llvm/llvm-project/commit/4d5dad43b2ebd81247ba1355383301495a7398c9
Author: Vince Bridgers <vince.a.bridgers at gmail.com>
Date: 2022-06-09 (Thu, 09 Jun 2022)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
M clang/test/Analysis/cast-value-notes.cpp
M clang/test/Analysis/cast-value-state-dump.cpp
Log Message:
-----------
[analyzer] Fix null pointer deref in CastValueChecker
A crash was seen in CastValueChecker due to a null pointer dereference.
The fix uses QualType::getAsString to avoid the null dereference
when a CXXRecordDecl cannot be obtained. A small reproducer is added,
and cast value notes LITs are updated for the new debug messages.
Reviewed By: steakhal
Differential Revision: https://reviews.llvm.org/D127105
(cherry picked from commit c7fa4e8a8bc41e52cc49a27e0495d67d730fa167)
More information about the All-commits
mailing list