Debian Codegraph @

clang/test/SemaObjCXX/missing-lhs-gun-extension.mm

raw
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2 // expected-no-diagnostics
3
4 @interface NSDictionary
5 - (id)objectForKeyedSubscript:(id)key;
6 - (void)setObject:(id)object forKeyedSubscript:(id)key;
7 - (int &) random;
8 @end
9
10 @class NSString;
11
12 template <class T, class U = T> T tfoo(U x) { return x; }
13
14 void 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 }