================
@@ -5416,15 +5416,18 @@ Sema::GetMissingFormatAttributes(Stmt *Body, const 
FunctionDecl *FDecl) {
     // If child expression is function, check if it is format function.
     // If it is, check if parent function misses format attributes.
 
+    unsigned int ChildFunctionFormatArgumentIndexOffset =
+        checkIfMethodHasImplicitObjectParameter(ChildFunction) ? 2 : 1;
+
+    if (!ChildFunction->hasAttr<FormatAttr>())
----------------
budimirarandjelovichtec wrote:

This check was added because there is llvm::any_of later and one pointer can 
only be assigned inside llvm::any_of. This pointer is later called if format 
attribute was caught. This change prevents throwing error that unitialized 
value was used.

https://github.com/llvm/llvm-project/pull/106649
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to