================
@@ -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:
Right, the user can figure out a way to write the attribute in a suitable way.
I have changed the diagnostic message to include the attribute parameters as
well like:
```
diagnostic behavior may be improved by adding the 'format(printf, X, Y)'
attribute to the declaration of 'foo'
```
so even if there is no fixit, the full suggested attribute is still shown.
https://github.com/llvm/llvm-project/pull/166738
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits