[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)
Henrik G. Olsson via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 17:04:11 PDT 2024
================
@@ -789,7 +791,7 @@ AST_MATCHER_P(CallExpr, hasUnsafePrintfStringArg,
if (!FristParmTy->isPointerType())
return false; // possibly some user-defined printf function
- QualType FirstPteTy = (cast<PointerType>(FristParmTy))->getPointeeType();
+ QualType FirstPteTy = FristParmTy->getAs<PointerType>()->getPointeeType();
----------------
hnrklssn wrote:
Nit: FristParmTy -> FirstParmTy
https://github.com/llvm/llvm-project/pull/109496
More information about the cfe-commits
mailing list