brintos

brintos / llvm-project-archived public Read only

0
0
Text · 450 B · 64cdc2c Raw
30 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s2// expected-no-diagnostics3 4@interface Foo5@end6 7@implementation Foo8- (id)test {9        id bar;10    Class cl;11    Foo *f;12 13    (void)((bar!= 0) ? bar : 0);14    (void)((cl != 0) ? cl : 0);15    (void)((f != 0) ? 0 : f);16    return (0 == 1) ? 0 : bar;17}18@end19 20@class A;21 22void multilevel() {23  A **p;24  const A **q;25 26  using T = decltype(true ? q : p);27  using T = const A * const *;28}29 30