diff options
author | Hans Wennborg <hans@hanshq.net> | 2011-12-15 10:25:47 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2011-12-15 10:25:47 +0000 |
commit | 23926bd2d78ca1898e8565039b6de06d329eeb9e (patch) | |
tree | 1f918189aff3cb758c6e432c89bf997e392a5f53 /clang/lib/Sema/SemaChecking.cpp | |
parent | adba86d63c1d5c93cc559291499d63dbc19baeb5 (diff) | |
download | bcm5719-llvm-23926bd2d78ca1898e8565039b6de06d329eeb9e.tar.gz bcm5719-llvm-23926bd2d78ca1898e8565039b6de06d329eeb9e.zip |
Support the 'a' length modifier in scanf format strings as a C90
extension.
This fixes gcc.dg/format/c90-scanf-3.c and ext-4.c (test for excess
errors).
llvm-svn: 146649
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index ebdc8321f70..c8f2d05e0d4 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -2442,7 +2442,8 @@ void Sema::CheckFormatString(const StringLiteral *FExpr, Str, HasVAListArg, TheCall, format_idx, inFunctionCall); - if (!analyze_format_string::ParsePrintfString(H, Str, Str + StrLen)) + if (!analyze_format_string::ParsePrintfString(H, Str, Str + StrLen, + getLangOptions())) H.DoneProcessing(); } else { @@ -2451,7 +2452,8 @@ void Sema::CheckFormatString(const StringLiteral *FExpr, Str, HasVAListArg, TheCall, format_idx, inFunctionCall); - if (!analyze_format_string::ParseScanfString(H, Str, Str + StrLen)) + if (!analyze_format_string::ParseScanfString(H, Str, Str + StrLen, + getLangOptions())) H.DoneProcessing(); } } |