================
@@ -7093,9 +7105,143 @@ bool Sema::CheckFormatString(const FormatMatchesAttr
*Format,
return false;
}
+static bool CheckMissingFormatAttribute(
+ Sema *S, ArrayRef<const Expr *> Args, Sema::FormatArgumentPassingKind APK,
+ StringLiteral *ReferenceFormatString, unsigned FormatIdx,
+ unsigned FirstDataArg, FormatStringType FormatType, unsigned
CallerParamIdx,
+ SourceLocation Loc) {
+ if (S->getDiagnostics().isIgnored(diag::warn_missing_format_attribute,
+ SourceLocation()))
----------------
apple-fcloutier wrote:
This needs to use an appropriate source location, or else the check will pass
if the diagnostic is enabled on the command line but disabled by a `#pragma gcc
diagnostic ignored` region. Isn't `Loc` the source location of the call?
https://github.com/llvm/llvm-project/pull/166738
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits