misc-ps-region-store.mm revision c4d2c9074be6eb2091086eddd6c8f052f3b245c8
1// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,core.experimental -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s 2// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,core.experimental -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s 3 4//===------------------------------------------------------------------------------------------===// 5// This files tests our path-sensitive handling of Objective-c++ files. 6//===------------------------------------------------------------------------------------------===// 7 8// Test basic handling of references. 9char &test1_aux(); 10char *test1() { 11 return &test1_aux(); 12} 13 14// Test test1_aux() evaluates to char &. 15char test1_as_rvalue() { 16 return test1_aux(); 17} 18 19// Test basic handling of references with Objective-C classes. 20@interface Test1 21- (char&) foo; 22@end 23 24char* Test1_harness(Test1 *p) { 25 return &[p foo]; 26} 27 28char Test1_harness_b(Test1 *p) { 29 return [p foo]; 30} 31 32