[all-commits] [llvm/llvm-project] 5e2748: [clang][sema] TryStaticCast - use castAs<> instead...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Sat Feb 12 03:14:57 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5e27487fc992cece0d703f0bd83480381764b77b
https://github.com/llvm/llvm-project/commit/5e27487fc992cece0d703f0bd83480381764b77b
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-02-12 (Sat, 12 Feb 2022)
Changed paths:
M clang/lib/Sema/SemaCast.cpp
Log Message:
-----------
[clang][sema] TryStaticCast - use castAs<> instead of getAs<> to avoid dereference of nullptr
The pointer is referenced immediately, so assert the cast is correct instead of returning nullptr
More information about the All-commits
mailing list