Mercurial > hg > CbC > CbC_llvm
view clang/test/SemaObjCXX/missing-lhs-gun-extension.mm @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 |
parents | 1d019706d866 |
children |
line wrap: on
line source
// 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; }