aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/sizeof-interface.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/sizeof-interface.m')
-rw-r--r--test/SemaObjC/sizeof-interface.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaObjC/sizeof-interface.m b/test/SemaObjC/sizeof-interface.m
index 75d7daafbbcc..140a980311e4 100644
--- a/test/SemaObjC/sizeof-interface.m
+++ b/test/SemaObjC/sizeof-interface.m
@@ -77,3 +77,14 @@ int bar(I0 *P) {
}
@end
+
+@interface Foo @end
+
+int foo()
+{
+ Foo *f;
+
+ // Both of these crash clang nicely
+ ++f; // expected-error {{arithmetic on pointer to interface 'Foo', which is not a constant size in non-fragile ABI}}
+ --f; // expected-error {{arithmetic on pointer to interface 'Foo', which is not a constant size in non-fragile ABI}}
+}