Douglas Gregor | a602a15 | 2015-10-01 20:20:47 +0000 | [diff] [blame] | 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 | ||||
9 | void 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 | } |