aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/c2x-attributes.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/c2x-attributes.m')
-rw-r--r--test/Parser/c2x-attributes.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Parser/c2x-attributes.m b/test/Parser/c2x-attributes.m
new file mode 100644
index 000000000000..f4610416cddc
--- /dev/null
+++ b/test/Parser/c2x-attributes.m
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// expected-no-diagnostics
+
+enum __attribute__((deprecated)) E1 : int; // ok
+enum [[deprecated]] E2 : int;
+
+@interface Base
+@end
+
+@interface S : Base
+- (void) bar;
+@end
+
+@interface T : Base
+- (S *) foo;
+@end
+
+
+void f(T *t) {
+ [[]][[t foo] bar];
+}