Home | History | Annotate | Download | only in Analysis
      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.
      9 char &test1_aux();
     10 char *test1() {
     11   return &test1_aux();
     12 }
     13 
     14 // Test test1_aux() evaluates to char &.
     15 char 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 
     24 char* Test1_harness(Test1 *p) {
     25   return &[p foo];
     26 }
     27 
     28 char Test1_harness_b(Test1 *p) {
     29   return [p foo];
     30 }
     31 
     32