summaryrefslogtreecommitdiff
path: root/test/SemaObjC/super.m
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-11-19 15:54:23 +0000
committerSteve Naroff <snaroff@apple.com>2008-11-19 15:54:23 +0000
commit5cb93b8bf009c4b0ae09b71ba85f54b2a7ea8022 (patch)
tree94dac43df0a39c26d55980ad047066292ea716f8 /test/SemaObjC/super.m
parent74253736184c0717a0649922551bf9d8b6815651 (diff)
downloadclang-5cb93b8bf009c4b0ae09b71ba85f54b2a7ea8022.tar.gz
Fix <rdar://problem/6150376> [sema] crash on invalid message send.
The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/super.m')
-rw-r--r--test/SemaObjC/super.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaObjC/super.m b/test/SemaObjC/super.m
index 46b8b4a097..243b84c353 100644
--- a/test/SemaObjC/super.m
+++ b/test/SemaObjC/super.m
@@ -23,3 +23,17 @@
[super cMethod]; // expected-warning{{method '+cMethod' not found (return type defaults to 'id')}}
}
@end
+
+@interface XX
+- m;
+@end
+
+void f(id super) {
+ [super m];
+}
+void f0(int super) {
+ [super m]; // expected-error{{bad receiver type 'int'}}
+}
+void f1(int puper) {
+ [super m]; // expected-error{{use of undeclared identifier 'super'}}
+}