History log of /external/clang/test/SemaCXX/printf-cstr.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ddcfbc9ad1817f545610999d655ac6c28d4c0c12 19-Jul-2012 Jordan Rose <jordan_rose@apple.com> For varargs, diagnose passing ObjC objects by value like other non-POD types.

While we still want to consider this a hard error (non-POD variadic args are
normally a DefaultError warning), delaying the diagnostic allows us to give
better error messages, which also match the usual non-POD errors more closely.

In addition, this change improves the diagnostic messages for format string
argument type mismatches by passing down the type of the callee, so we can
say "variadic method" or "variadic function" appropriately.

<rdar://problem/11825593>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/printf-cstr.cpp
831421f24057b93ea28bc92d8bd6290631a43caf 25-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Unrevert r158887, reverted in r158949, along with a fix for the bug which
resulted in it being reverted. A test for that bug was added in r158950.

Original comment:

If an object (such as a std::string) with an appropriate c_str() member function
is passed to a variadic function in a position where a format string indicates
that c_str()'s return type is desired, provide a note suggesting that the user
may have intended to call the c_str() member.

Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
move it to SemaChecking in order to facilitate this. Factor the call checking
out of function call checking and block call checking, and extend it to cover
constructor calls too.

Patch by Sam Panzer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/printf-cstr.cpp
4e294eea2c8a8965e24682ed9da8944969830813 22-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Revert r158887. This fixes pr13168.

Revert "If an object (such as a std::string) with an appropriate c_str() member function"

This reverts commit 7d96f6106bfbd85b1af06f34fdbf2834aad0e47e.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/printf-cstr.cpp
7d96f6106bfbd85b1af06f34fdbf2834aad0e47e 21-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> If an object (such as a std::string) with an appropriate c_str() member function
is passed to a variadic function in a position where a format string indicates
that c_str()'s return type is desired, provide a note suggesting that the user
may have intended to call the c_str() member.

Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
move it to SemaChecking in order to facilitate this. Factor the call checking
out of function call checking and block call checking, and extend it to cover
constructor calls too.

Patch by Sam Panzer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/printf-cstr.cpp