diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-01-08 05:28:46 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-01-08 05:28:46 +0000 |
commit | 65197b4b0c55bb74af0450230d61ee9461223721 (patch) | |
tree | 201f419c8802d9946cd8f61566814961dc7544a5 /lib/Sema/SemaChecking.cpp | |
parent | bd18d4584aae0ed6f7111ef5713784cf29fe663f (diff) |
Add semantic checking that the "thousands grouping"
prefix in a printf format string is matched
with the appropriate conversion specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 75b30fcb76..0ca1ce52ab 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -1491,6 +1491,8 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier } // Check each flag does not conflict with any other component. + if (!FS.hasValidThousandsGroupingPrefix()) + HandleFlag(FS, FS.hasThousandsGrouping(), startSpecifier, specifierLen); if (!FS.hasValidLeadingZeros()) HandleFlag(FS, FS.hasLeadingZeros(), startSpecifier, specifierLen); if (!FS.hasValidPlusPrefix()) |