xref: /aosp_15_r20/external/clang/test/SemaObjCXX/cxx1y-lambda.mm (revision 67e74705e28f6214e480b399dd47ea732279e315)
1// RUN: %clang_cc1 -std=c++1y -Wno-unused-value -fsyntax-only -verify -fobjc-arc %s
2
3// expected-no-diagnostics
4__attribute__((objc_root_class))
5@interface NSString
6@end
7
8// rdar://problem/22344904
9void testResultTypeDeduction(int i) {
10  auto x = [i] {
11    switch (i) {
12    case 0:
13      return @"foo";
14
15    default:
16      return @"bar";
17    }
18  };
19}
20