diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-08-24 22:24:51 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-08-24 22:24:51 +0000 |
commit | 5f0c066062af99e6d147cafa99acdf016ea3afa4 (patch) | |
tree | f240becce2be7121e2167113cfcf06a12739bb2b /clang/lib/Sema/SemaChecking.cpp | |
parent | e0fd5a9299d96568023d0685e1232cc8c03b325f (diff) | |
download | bcm5719-llvm-5f0c066062af99e6d147cafa99acdf016ea3afa4.tar.gz bcm5719-llvm-5f0c066062af99e6d147cafa99acdf016ea3afa4.zip |
Fix printf format string checking for '%lc' (which expects a wint_t or compatible argument). Fixes PR 7981.
llvm-svn: 111978
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 6148faaf905..61d209f6832 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -1595,6 +1595,9 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier llvm::raw_svector_ostream os(buf); fixedFS.toString(os); + // FIXME: getRepresentativeType() perhaps should return a string + // instead of a QualType to better handle when the representative + // type is 'wint_t' (which is defined in the system headers). S.Diag(getLocationOfByte(CS.getStart()), diag::warn_printf_conversion_argument_type_mismatch) << ATR.getRepresentativeType(S.Context) << Ex->getType() |