blob: fb018e6b477c53592e8442fe9c4729e81e714221 [file] [log] [blame]
Stephen Hines0e2c34f2015-03-23 12:09:02 -07001// RUN: %clang_cc1 -x c++ -std=c++11 -triple %itanium_abi_triple -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s -main-file-name lambda.cpp | FileCheck %s
2
3// CHECK-LABEL: _Z3fooi:
4void foo(int i) { // CHECK: File 0, [[@LINE]]:17 -> {{[0-9]+}}:2 = #0
5 auto f = [](int x) {
6 return x + 1;
7 };
8
9 f(i);
10 // Make sure the zero region after the return doesn't escape the lambda.
11 // CHECK-NOT: File 0, {{[0-9:]+}} -> [[@LINE+1]]:2 = 0
12}
13
14int main(int argc, const char *argv[]) {
15 foo(1);
16 return 0;
17}