1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -triple i386-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -analyzer-store=region %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc// Note that the target triple is important for this test case. It specifies that we use the 4*f4a2713aSLionel Sambuc// fragile Objective-C ABI. 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc@interface Foo { 7*f4a2713aSLionel Sambuc int x; 8*f4a2713aSLionel Sambuc} 9*f4a2713aSLionel Sambuc@end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@implementation Foo 12*f4a2713aSLionel Sambucstatic Foo* bar(Foo *p) { 13*f4a2713aSLionel Sambuc if (p->x) 14*f4a2713aSLionel Sambuc return ++p; // This is only valid for the fragile ABI. 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc return p; 17*f4a2713aSLionel Sambuc} 18*f4a2713aSLionel Sambuc@end 19