aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/Analyses
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-03-09 10:10:54 +0000
committerHans Wennborg <hans@hanshq.net>2012-03-09 10:10:54 +0000
commitf85626453123f9691bcef13cff963f556e209c27 (patch)
tree857081a693269f18da82d7715e2464c994c0ac42 /include/clang/Analysis/Analyses
parentef9f29804fa8932282a17b414ef0dde2ea4eec03 (diff)
-Wformat-non-iso: warn about positional arguments (pr12017)
This renames the -Wformat-non-standard flag to -Wformat-non-iso, rewords the current warnings a bit (pointing out that a format string is not supported by ISO C rather than being "non standard"), and adds a warning about positional arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/Analyses')
-rw-r--r--include/clang/Analysis/Analyses/FormatString.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/clang/Analysis/Analyses/FormatString.h b/include/clang/Analysis/Analyses/FormatString.h
index 9dc8f8878d..9ec27ce91d 100644
--- a/include/clang/Analysis/Analyses/FormatString.h
+++ b/include/clang/Analysis/Analyses/FormatString.h
@@ -306,9 +306,9 @@ protected:
LengthModifier LM;
OptionalAmount FieldWidth;
ConversionSpecifier CS;
- /// Positional arguments, an IEEE extension:
- /// IEEE Std 1003.1, 2004 Edition
- /// http://www.opengroup.org/onlinepubs/009695399/functions/printf.html
+ /// Positional arguments, an IEEE extension:
+ /// IEEE Std 1003.1, 2004 Edition
+ /// http://www.opengroup.org/onlinepubs/009695399/functions/printf.html
bool UsesPositionalArg;
unsigned argIndex;
public:
@@ -598,6 +598,8 @@ public:
virtual void HandleNullChar(const char *nullCharacter) {}
+ virtual void HandlePosition(const char *startPos, unsigned posLen) {}
+
virtual void HandleInvalidPosition(const char *startPos, unsigned posLen,
PositionContext p) {}