current context. Previously, if there was a variable called "self" available, the expression parser assumed it was inside a method. But class methods in Objective-C also take a "self" parameter, of DWARF type "id". We now detect this properly, and only assume we're in an instance method if "self" is a pointer to an Objective-C object. llvm-svn: 136784
24 lines
419 B
Objective-C
24 lines
419 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
@interface Foo : NSObject
|
|
+(void) doSomethingWithString: (NSString *) string;
|
|
-(void) doSomethingWithNothing;
|
|
@end
|
|
|
|
@implementation Foo
|
|
+(void) doSomethingWithString: (NSString *) string
|
|
{
|
|
NSLog (@"String is: %@.", string); // Set breakpoint here.
|
|
}
|
|
|
|
-(void) doSomethingWithNothing
|
|
{
|
|
}
|
|
@end
|
|
|
|
int main()
|
|
{
|
|
[Foo doSomethingWithString: @"Some string I have in mind."];
|
|
return 0;
|
|
}
|