[all-commits] [llvm/llvm-project] dcc201: [clang-tidy] UseDefaultMemberInitCheck::checkDefau...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Wed Jan 12 07:36:15 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dcc20143e170b912aa0831dbedb5c1de07958012
https://github.com/llvm/llvm-project/commit/dcc20143e170b912aa0831dbedb5c1de07958012
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-01-12 (Wed, 12 Jan 2022)
Changed paths:
M clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
Log Message:
-----------
[clang-tidy] UseDefaultMemberInitCheck::checkDefaultInit - Use cast<> instead of dyn_cast<> to avoid dereference of nullptr
The pointer is always dereferenced immediately below, so assert the cast is correct instead of returning nullptr
Commit: 497a4b26c487a9640847c485f9b0c36c110a8545
https://github.com/llvm/llvm-project/commit/497a4b26c487a9640847c485f9b0c36c110a8545
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-01-12 (Wed, 12 Jan 2022)
Changed paths:
M clang/lib/CodeGen/CGBuiltin.cpp
Log Message:
-----------
CGBuiltin - Use castAs<> instead of getAs<> to avoid dereference of nullptr
The pointer is always dereferenced immediately below, so assert the cast is correct instead of returning nullptr
Compare: https://github.com/llvm/llvm-project/compare/968be05b8fdc...497a4b26c487
More information about the All-commits
mailing list