diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-02-28 01:36:39 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-02-28 01:36:39 +0000 |
| commit | 93fe566800e0a636442b4b61247c57b08de952c5 (patch) | |
| tree | 02998c0b8933f906c490d302d2e0308cc104b755 /lib/CodeGen/CodeGenFunction.cpp | |
| parent | ea890c87c825a3cc4b00f0fb81e1c6a40eb53f5a (diff) | |
| download | clang-93fe566800e0a636442b4b61247c57b08de952c5.tar.gz clang-93fe566800e0a636442b4b61247c57b08de952c5.tar.bz2 clang-93fe566800e0a636442b4b61247c57b08de952c5.tar.xz | |
Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as:
const char *format = "%s";
std::experimental::string_view view = "foo";
printf(format, view);
In this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
