minix/external/bsd/llvm/dist/clang/test/SemaObjCXX/missing-lhs-gun-extension.mm
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

23 lines
496 B
Text

// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
// expected-no-diagnostics
// rdar://13749180
@interface NSDictionary
- (id)objectForKeyedSubscript:(id)key;
- (void)setObject:(id)object forKeyedSubscript:(id)key;
- (int &) random;
@end
@class NSString;
template <class T, class U = T> T tfoo(U x) { return x; }
void func() {
NSDictionary* foo;
NSString* result = foo[@"bar"] ? : foo[@"baz"];
int (*fn)(int) = (&tfoo<int> ?: 0);
int x = 0;
const int &y = foo.random ?: x;
}