[PATCH] D47290: [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on Darwin
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat May 26 11:47:13 PDT 2018
aaron.ballman added a comment.
This is relaxing `-Wformat` and making users instead write `-Wformat-pedantic` to get the strong guarantees, which is the opposite of what I thought the consensus was. Have I misunderstood something?
================
Comment at: include/clang/Analysis/Analyses/FormatString.h:263-265
+ ArgType(Kind k = UnknownTy, const char *n = nullptr) : K(k), Name(n) {}
+ ArgType(QualType t, const char *n = nullptr) : K(SpecificTy), T(t), Name(n) {}
+ ArgType(CanQualType t) : K(SpecificTy), T(t) {}
----------------
If we're going to update this, can you fix the parameter names to be in line with the coding conventions?
================
Comment at: lib/Sema/SemaChecking.cpp:6597-6599
+ const analyze_printf::ArgType::MatchKind match =
+ AT.matchesType(S.Context, ExprTy);
+ bool pedantic = match == analyze_printf::ArgType::NoMatchPedantic;
----------------
These identifiers also need some love to match the coding conventions. Happens elsewhere in this patch as well.
Repository:
rC Clang
https://reviews.llvm.org/D47290
More information about the cfe-commits
mailing list