[all-commits] [llvm/llvm-project] 7562f3: InvalidPtrChecker - don't dereference a dyn_cast<>...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Wed Oct 20 10:07:33 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7562f3df89066ab92a816dc23005c45fd642bdf9
https://github.com/llvm/llvm-project/commit/7562f3df89066ab92a816dc23005c45fd642bdf9
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2021-10-20 (Wed, 20 Oct 2021)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp
Log Message:
-----------
InvalidPtrChecker - don't dereference a dyn_cast<> - use cast<> instead.
Avoid dereferencing a nullptr returned by dyn_cast<>, by using cast<> instead which asserts that the cast is valid.
More information about the All-commits
mailing list