diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-04 01:28:01 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-04 01:28:01 +0000 |
| commit | 33c33c3e86684d12adbea4f7b216b2c05abd0ac8 (patch) | |
| tree | 510b18dc7e81a35fe47f5c07b0d695007e780fec /clang/test | |
| parent | 56ca3a9ad9d935c83d0bd36e9b371d25298594b4 (diff) | |
| download | bcm5719-llvm-33c33c3e86684d12adbea4f7b216b2c05abd0ac8.tar.gz bcm5719-llvm-33c33c3e86684d12adbea4f7b216b2c05abd0ac8.zip | |
PR31846: Don't replace 'auto' type with a template parameter type in a generic lambda
until after we've checked whether 'auto' is valid in the current language mode.
llvm-svn: 294078
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaCXX/auto-cxx0x.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/auto-cxx0x.cpp b/clang/test/SemaCXX/auto-cxx0x.cpp index c37b1386b3a..074a01bb839 100644 --- a/clang/test/SemaCXX/auto-cxx0x.cpp +++ b/clang/test/SemaCXX/auto-cxx0x.cpp @@ -8,3 +8,10 @@ void f() { typedef auto PR25449(); // expected-error {{'auto' not allowed in typedef}} thread_local auto x; // expected-error {{requires an initializer}} + +void g() { + [](auto){}(0); +#if __cplusplus == 201103L + // expected-error@-2 {{'auto' not allowed in lambda parameter}} +#endif +} |

