================
@@ -2161,11 +2161,10 @@ class UnsafeLibcFunctionCallGadget : public 
WarningGadget {
     //  printf, atoi, we consider it safe:
     if (CE->getNumArgs() == 1 && isNullTermPointer(CE->getArg(0), Ctx))
       return false;
-    auto isSingleStringLiteralArg = false;
-    if (CE->getNumArgs() == 1) {
-      isSingleStringLiteralArg =
-          isa<clang::StringLiteral>(CE->getArg(0)->IgnoreParenImpCasts());
-    }
+
+    const bool isSingleStringLiteralArg =
----------------
fmayer wrote:

IMO this const is a bit overkill because the only use is right below, but up to 
you

https://github.com/llvm/llvm-project/pull/177514
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to