Let selector-expr-lvalue.mm actually test something.

I accidentally introduced a bug locally, and noticed that none of the tests
caught it. No longer!

llvm-svn: 247477
This commit is contained in:
Nico Weber 2015-09-11 21:24:40 +00:00
parent 7239a32975
commit b833fd982d
1 changed files with 15 additions and 8 deletions

View File

@ -1,16 +1,23 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s
// PR7390
@interface NSObject {}
- (void)respondsToSelector:(const SEL&)s : (SEL*)s1;
- (void) setPriority:(int)p;
// CHECK: @[[setprioname:[^ ]*]] = {{.*}}"setPriority:
// CHECK-NEXT: @[[setpriosel:[^ ]*]] = {{.*}}getelementptr{{.*}}[[setprioname]]
@interface NSObject
- (void)respondsToSelector:(const SEL &)s ps:(SEL *)s1;
- (void)setPriority:(int)p;
- (void)Meth;
@end
@implementation NSObject
@implementation NSObject
// CHECK-LABEL: define internal void @"\01-[NSObject Meth]"(
- (void)Meth {
[self respondsToSelector:@selector(setPriority:) : &@selector(setPriority:)];
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8**, i8**)*){{.*}}, i8** @[[setpriosel]])
[self respondsToSelector:@selector(setPriority:) ps:&@selector(setPriority:)];
}
- (void)setPriority:(int)p {
}
- (void)respondsToSelector:(const SEL &)s ps:(SEL *)s1 {
}
- (void) setPriority:(int)p{}
- (void)respondsToSelector:(const SEL&)s : (SEL*)s1 {}
@end