aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenObjC/arc-compound-stmt.m
blob: c31c359686343b35b35189e9fc55f79a72b080d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -o - %s

typedef unsigned long NSUInteger;

@interface NSString
- (NSString *)stringByAppendingString:(NSString *)aString;
- (NSString *)substringFromIndex:(NSUInteger)from;
@end

@interface MyClass
- (void)inst;
@end

@implementation MyClass

- (void)inst;
{
    NSString *propName;

    NSString *capitalPropName = ({
        NSString *cap;
        if (propName)
            cap = [cap stringByAppendingString:[propName substringFromIndex:1]];
        cap;
    });
}

@end