diff options
author | Hans Wennborg <hans@hanshq.net> | 2011-12-02 19:22:15 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2011-12-02 19:22:15 +0000 |
commit | 70f7213d2cf81b2dba91ec939e44f07c975e684e (patch) | |
tree | e5a5631a3e31b83df77f4b04bce499b8fd49fce6 /clang/lib/Sema/SemaChecking.cpp | |
parent | 541392832f742f9a79bb0179d515a79924b2c71a (diff) | |
download | bcm5719-llvm-70f7213d2cf81b2dba91ec939e44f07c975e684e.tar.gz bcm5719-llvm-70f7213d2cf81b2dba91ec939e44f07c975e684e.zip |
Make conversion specifier warning refer to typedef if possible.
For example, the warning for printf("%zu", 42.0);
changes from "conversion specifies type 'unsigned long'" to "conversion
specifies type 'size_t' (aka 'unsigned long')"
llvm-svn: 145697
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 0d640a8c123..c0d6702b589 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -2206,7 +2206,7 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier // Now type check the data expression that matches the // format specifier. const Expr *Ex = getDataArg(argIndex); - const analyze_printf::ArgTypeResult &ATR = FS.getArgType(S.Context); + const analyze_printf::ArgTypeResult &ATR = FS.getArgType(S); if (ATR.isValid() && !ATR.matchesType(S.Context, Ex->getType())) { // Check if we didn't match because of an implicit cast from a 'char' // or 'short' to an 'int'. This is done because printf is a varargs |