1 // RUN: %clang_analyze_cc1 -triple i386-apple-darwin9 -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s
2 // RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9 -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s
3 // expected-no-diagnostics
5 //===------------------------------------------------------------------------------------------===//
6 // This files tests our path-sensitive handling of Objective-c++ files.
7 //===------------------------------------------------------------------------------------------===//
9 // Test basic handling of references.
15 // Test test1_aux() evaluates to char &.
16 char test1_as_rvalue() {
20 // Test basic handling of references with Objective-C classes.
25 char* Test1_harness(Test1 *p) {
29 char Test1_harness_b(Test1 *p) {
33 // Basic test of C++ references with Objective-C pointers.
34 @interface RDar10569024
35 @property(readonly) int x;
38 typedef RDar10569024* RDar10569024Ref;
40 void rdar10569024_aux(RDar10569024Ref o);
42 int rdar10569024(id p, id collection) {
43 for (id elem in collection) {
44 const RDar10569024Ref &o = (RDar10569024Ref) elem;
45 rdar10569024_aux(o); // no-warning
46 return o.x; // no-warning