aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM! This should probably have a release note as well. ================ Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3896-3908 + // If the kind is strftime, FirstArg must be 0 because strftime does not use + // any variadic arguments. S.Diag(AL.getLoc(), diag::err_format_strftime_third_parameter) << FirstArgExpr->getSourceRange(); return; + } else if (isFunctionOrMethodVariadic(D)) { + // Else, if the function is variadic, then FirstArg must be 0 or the "position" ---------------- Given that we know what value we want to see there, should we emit a FixIt in these cases to adjust the format arg to the right value? (Can be done in a follow-up if you feel like doing it, I don't insist.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137603/new/ https://reviews.llvm.org/D137603 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits