• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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