23 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s2// expected-no-diagnostics3 4@interface NSDictionary5- (id)objectForKeyedSubscript:(id)key;6- (void)setObject:(id)object forKeyedSubscript:(id)key;7- (int &) random;8@end9 10@class NSString;11 12template <class T, class U = T> T tfoo(U x) { return x; }13 14void func() {15 NSDictionary* foo;16 NSString* result = foo[@"bar"] ? : foo[@"baz"];17 18 int (*fn)(int) = (&tfoo<int> ?: 0);19 20 int x = 0;21 const int &y = foo.random ?: x;22}23