mirror of https://github.com/microsoft/clang.git
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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247477 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3f5b84ccd3
commit
b5fc9f2496
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue