[clang] [Clang] Prevent potential null pointer dereferences (PR #117176)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 21 16:22:30 PST 2024
================
@@ -627,7 +627,7 @@ class Analyzer {
IsNoexcept = isNoexcept(FD);
} else if (auto *BD = dyn_cast<BlockDecl>(D)) {
if (auto *TSI = BD->getSignatureAsWritten()) {
- auto *FPT = TSI->getType()->getAs<FunctionProtoType>();
+ auto *FPT = TSI->getType()->castAs<FunctionProtoType>();
----------------
Sirraide wrote:
Right, I think what I was remembering then is that we might sometimes end up w/ prototypeless functions in the analysis code, but we just don’t do much w/ them.
https://github.com/llvm/llvm-project/pull/117176
More information about the cfe-commits
mailing list