misc-ps-region-store.mm revision 38ac4f504bf8ed514520b5a82be538bdb0860687
1// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s 2// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -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