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 | 2868a736f88e50063264c41e3cd87c927c0c7ab8 (patch) | |
tree | 4c36b9148d5a8788780c04d2828adf4bbc872d66 /llvm/lib/Object/IRObjectFile.cpp | |
parent | 854d6d0a586b1c328deebf65657ba925af039aed (diff) | |
download | bcm5719-llvm-2868a736f88e50063264c41e3cd87c927c0c7ab8.tar.gz bcm5719-llvm-2868a736f88e50063264c41e3cd87c927c0c7ab8.zip |
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.
llvm-svn: 202461
Diffstat (limited to 'llvm/lib/Object/IRObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions