[clang-tools-extra] [clang-tidy] Only expand <inttypes.h> macros in modernize-use-std-format/print (PR #97911)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 7 06:58:07 PDT 2024
================
@@ -208,11 +208,22 @@ FormatStringConverter::FormatStringConverter(ASTContext *ContextIn,
assert(ArgsOffset <= NumArgs);
FormatExpr = llvm::dyn_cast<StringLiteral>(
Args[FormatArgOffset]->IgnoreImplicitAsWritten());
+
if (!FormatExpr || !FormatExpr->isOrdinary()) {
// Function must have a narrow string literal as its first argument.
conversionNotPossible("first argument is not a narrow string literal");
return;
}
+
+ if (const auto MaybeMacroName =
----------------
EugeneZelenko wrote:
Please do not use `auto` unless type is explicitly stated in same statement or iterator.
https://github.com/llvm/llvm-project/pull/97911
More information about the cfe-commits
mailing list