summaryrefslogtreecommitdiff
path: root/clang/test/Parser/objc-messaging-neg-1.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser/objc-messaging-neg-1.m')
-rw-r--r--clang/test/Parser/objc-messaging-neg-1.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Parser/objc-messaging-neg-1.m b/clang/test/Parser/objc-messaging-neg-1.m
new file mode 100644
index 0000000..bb496e9
--- /dev/null
+++ b/clang/test/Parser/objc-messaging-neg-1.m
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+@interface A
++(void) foo:(int) a;
+@end
+
+int main() {
+ id a;
+ [a bla:0 6:7]; // expected-error {{expected ']'}}
+ [A foo bar]; // expected-error {{expected ':'}}
+ [A foo bar bar1]; // expected-error {{expected ':'}}
+ [] {}; // expected-error {{expected expression}}
+}