summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-09-13 02:11:03 +0000
committerJordan Rose <jordan_rose@apple.com>2012-09-13 02:11:03 +0000
commit510260c2bffb9212cdaeace66020ed8dd6f421ca (patch)
treec91f6779f3c90458d0add82f96a537b2bcd65e4c /clang/lib/Sema/SemaChecking.cpp
parent6a465cd8efbe4ac9a1d789eb5d51e771197ecb74 (diff)
downloadbcm5719-llvm-510260c2bffb9212cdaeace66020ed8dd6f421ca.tar.gz
bcm5719-llvm-510260c2bffb9212cdaeace66020ed8dd6f421ca.zip
Format strings: %D, %U, and %O are valid on Darwin (same as %d, %u, %o).
These will warn under -Wformat-non-iso, and will still be rejected outright on other platforms. <rdar://problem/12061922> llvm-svn: 163771
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index dd1f9e109ba..2ae1d6ee918 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -3020,7 +3020,8 @@ void Sema::CheckFormatString(const StringLiteral *FExpr,
inFunctionCall, CallType);
if (!analyze_format_string::ParsePrintfString(H, Str, Str + StrLen,
- getLangOpts()))
+ getLangOpts(),
+ Context.getTargetInfo()))
H.DoneProcessing();
} else if (Type == FST_Scanf) {
CheckScanfHandler H(*this, FExpr, OrigFormatExpr, firstDataArg, numDataArgs,
@@ -3028,7 +3029,8 @@ void Sema::CheckFormatString(const StringLiteral *FExpr,
inFunctionCall, CallType);
if (!analyze_format_string::ParseScanfString(H, Str, Str + StrLen,
- getLangOpts()))
+ getLangOpts(),
+ Context.getTargetInfo()))
H.DoneProcessing();
} // TODO: handle other formats
}
OpenPOWER on IntegriCloud