[PATCH] D15636: Reduce false positives in printf/scanf format checker
Andy Gibbs via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 22 08:55:18 PST 2016
AndyG added inline comments.
================
Comment at: lib/Sema/SemaChecking.cpp:3905
@@ -3822,14 +3904,3 @@
CoveredArgs.flip();
- signed notCoveredArg = CoveredArgs.find_first();
- if (notCoveredArg >= 0) {
- assert((unsigned)notCoveredArg < NumDataArgs);
- if (const Expr *E = getDataArg((unsigned) notCoveredArg)) {
- SourceLocation Loc = E->getLocStart();
- if (!S.getSourceManager().isInSystemMacro(Loc)) {
- EmitFormatDiagnostic(S.PDiag(diag::warn_printf_data_arg_not_used),
- Loc, /*IsStringLocation*/false,
- getFormatStringRange());
- }
- }
- }
+ UncoveredArg.Update(CoveredArgs.find_first(), FExpr);
}
----------------
Rather than `FExpr`, I think this should be `OrigFormatExpr`?
http://reviews.llvm.org/D15636
More information about the cfe-commits
mailing list