diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-09-08 04:00:12 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-09-08 04:00:12 +0000 |
commit | 8be066e6733364cd34f25c4f7b7344f72aa23369 (patch) | |
tree | 0831a6c6016ee62155c9ed3bc1e1a61d27b2e7db /include/clang/Analysis | |
parent | bbb6bb4952b77e57b842b4d3096848123ae690e7 (diff) |
Format strings: suggest %lld instead of %qd and %Ld with -Wformat-non-iso.
As a corollary to the previous commit, even when an extension is
available, we can still offer a fixit to the standard modifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163453 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis')
-rw-r--r-- | include/clang/Analysis/Analyses/FormatString.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Analysis/Analyses/FormatString.h b/include/clang/Analysis/Analyses/FormatString.h index c69f17a928..0579265db4 100644 --- a/include/clang/Analysis/Analyses/FormatString.h +++ b/include/clang/Analysis/Analyses/FormatString.h @@ -118,7 +118,7 @@ public: cArg, dArg, iArg, - IntArgBeg = cArg, IntArgEnd = iArg, + IntArgBeg = dArg, IntArgEnd = iArg, oArg, uArg, @@ -191,7 +191,9 @@ public: return EndScanList ? EndScanList - Position : 1; } + bool isIntArg() const { return kind >= IntArgBeg && kind <= IntArgEnd; } bool isUIntArg() const { return kind >= UIntArgBeg && kind <= UIntArgEnd; } + bool isAnyIntArg() const { return kind >= IntArgBeg && kind <= UIntArgEnd; } const char *toString() const; bool isPrintfKind() const { return IsPrintf; } @@ -382,7 +384,6 @@ public: : ConversionSpecifier(true, pos, k) {} bool isObjCArg() const { return kind >= ObjCBeg && kind <= ObjCEnd; } - bool isIntArg() const { return kind >= IntArgBeg && kind <= IntArgEnd; } bool isDoubleArg() const { return kind >= DoubleArgBeg && kind <= DoubleArgEnd; } unsigned getLength() const { |