[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjC / conditional-expr-5.m
blobb1f7e5996947391fdfc283c63a01d519fd9edf1d
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2 // expected-no-diagnostics
4 @interface PBXBuildSettingsDictionary
6   int i;
8 @end
10 @interface XCConditionalBuildSettingsDictionary : PBXBuildSettingsDictionary
13 @end
15 @implementation PBXBuildSettingsDictionary
17 - (XCConditionalBuildSettingsDictionary *)conditionalDictionaryForConditionSet
19   return i ? self : (id)0;
22 - (XCConditionalBuildSettingsDictionary *)conditionalDictionaryForConditionSet2
24   return i ? (id)0 : self;
26 @end