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