xref: /llvm-project/clang/test/SemaObjCXX/cxx1y-lambda.mm (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
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
8void testResultTypeDeduction(int i) {
9  auto x = [i] {
10    switch (i) {
11    case 0:
12      return @"foo";
13
14    default:
15      return @"bar";
16    }
17  };
18}
19