================
@@ -7061,6 +7140,16 @@ bool Sema::CheckFormatArguments(ArrayRef<const Expr *>
Args,
SourceMgr.isInSystemMacro(FormatLoc))
return false;
+ const LangOptions &LO = getLangOpts();
+ if (CallerParamIdx && (LO.GNUMode || LO.C23 || LO.CPlusPlus11))
----------------
vvuksanovic wrote:
> You should warn in all cases and use the language mode only to decide whether
> to offer a fixit.
I'm not sure if the warning that suggests adding an attribute makes sense if
there isn't a portable way to actually add the attribute.
https://github.com/llvm/llvm-project/pull/166738
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits