summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/objcxx11-messaging-and-lambda.mm
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser/objcxx11-messaging-and-lambda.mm')
-rw-r--r--clang/test/Parser/objcxx11-messaging-and-lambda.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Parser/objcxx11-messaging-and-lambda.mm b/clang/test/Parser/objcxx11-messaging-and-lambda.mm
new file mode 100644
index 00000000000..002f3e9c710
--- /dev/null
+++ b/clang/test/Parser/objcxx11-messaging-and-lambda.mm
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+
+#define OBJCLASS(name) // expected-note {{macro 'OBJCLASS' defined here}}
+
+class NSMutableData;
+
+NSMutableData *test() { // expected-note {{to match this '{'}}
+ NSMutableData *data = [[[OBJCLASS(NSMutableDataOBJCLASS( alloc] init] autorelease]; // expected-error {{unterminated function-like macro invocation}} \
+ // expected-error {{expected ';' at end of declaration}}
+ return data;
+} // expected-error {{expected expression}} expected-error {{expected '}'}}
OpenPOWER on IntegriCloud