diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-09 19:01:51 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-09 19:01:51 +0000 |
commit | 950435c15e413c55859f8af78d2c6e603743b42f (patch) | |
tree | 4519ae7edf1c363b5e0c2d68ae123098983b9c9c /test/Parser/cxx0x-lambda-expressions.cpp | |
parent | 5960f4aeac9760198c80e05d70d8dadb1db0ff0e (diff) |
In 'delete []', the '[]' never starts a lambda. Update a FIXME with a standard reference and add a test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx0x-lambda-expressions.cpp')
-rw-r--r-- | test/Parser/cxx0x-lambda-expressions.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Parser/cxx0x-lambda-expressions.cpp b/test/Parser/cxx0x-lambda-expressions.cpp index 9c71941421..7e9d4751e6 100644 --- a/test/Parser/cxx0x-lambda-expressions.cpp +++ b/test/Parser/cxx0x-lambda-expressions.cpp @@ -40,4 +40,11 @@ class C { int a5[3] = { []{return 0;}() }; int a6[1] = {[this] = 1 }; // expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'C *'}} } + + void delete_lambda(int *p) { + delete [] p; + delete [] (int*) { new int }; // ok, compound-literal, not lambda + delete [] { return new int; } (); // expected-error{{expected expression}} + delete [&] { return new int; } (); // ok, lambda + } }; |