diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-05-15 21:27:30 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-05-15 21:27:30 +0000 |
| commit | 7bfd70549268e99138b8397c7725056ce7ba7655 (patch) | |
| tree | 65a507cd03f969354403e2e24329b2b111c43efc /clang/test | |
| parent | 651d0bf9dc6165cad9767ef77fdfdb8c169d60a4 (diff) | |
| download | bcm5719-llvm-7bfd70549268e99138b8397c7725056ce7ba7655.tar.gz bcm5719-llvm-7bfd70549268e99138b8397c7725056ce7ba7655.zip | |
Don't produce a redundant "auto type is incompatible with C++98" on every lambda with no explicit return type.
We already warned about the lambda, and we don't have a source location for the imagined "auto" anyway.
llvm-svn: 332401
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaCXX/cxx98-compat.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx98-compat.cpp b/clang/test/SemaCXX/cxx98-compat.cpp index 33516f70687..ed2666036a1 100644 --- a/clang/test/SemaCXX/cxx98-compat.cpp +++ b/clang/test/SemaCXX/cxx98-compat.cpp @@ -47,6 +47,8 @@ namespace TemplateParsing { void Lambda() { []{}(); // expected-warning {{lambda expressions are incompatible with C++98}} + // Don't warn about implicit "-> auto" here. + [](){}(); // expected-warning {{lambda expressions are incompatible with C++98}} } struct Ctor { |

