1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
2 // RUN: %clang_analyze_cc1 -analyzer-checker=core -verify -fobjc-arc %s
4 #if __has_feature(objc_arc)
5 // expected-no-diagnostics
11 void simpleStrongPointerValue(void) {
14 #if !__has_feature(objc_arc)
15 // expected-warning@-2{{Branch condition evaluates to a garbage value}}
19 void simpleArray(void) {
20 SomeClass *vlaArray[5];
23 #if !__has_feature(objc_arc)
24 // expected-warning@-2{{Branch condition evaluates to a garbage value}}
28 void variableLengthArray(void) {
30 SomeClass * vlaArray[count];
33 #if !__has_feature(objc_arc)
34 // expected-warning@-2{{Branch condition evaluates to a garbage value}}
38 void variableLengthArrayWithExplicitStrongAttribute(void) {
40 __attribute__((objc_ownership(strong))) SomeClass * vlaArray[count];
43 #if !__has_feature(objc_arc)
44 // expected-warning@-2{{Branch condition evaluates to a garbage value}}