1*c109102eSJustin Bogner // 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*c109102eSJustin Bogner 3*c109102eSJustin Bogner // CHECK-LABEL: _Z3fooi: 4*c109102eSJustin Bogner void foo(int i) { // CHECK: File 0, [[@LINE]]:17 -> {{[0-9]+}}:2 = #0 5*c109102eSJustin Bogner auto f = [](int x) { 6*c109102eSJustin Bogner return x + 1; 7*c109102eSJustin Bogner }; 8*c109102eSJustin Bogner 9*c109102eSJustin Bogner f(i); 10*c109102eSJustin Bogner // Make sure the zero region after the return doesn't escape the lambda. 11*c109102eSJustin Bogner // CHECK-NOT: File 0, {{[0-9:]+}} -> [[@LINE+1]]:2 = 0 12*c109102eSJustin Bogner } 13*c109102eSJustin Bogner 14*c109102eSJustin Bogner int main(int argc, const char *argv[]) { 15*c109102eSJustin Bogner foo(1); 16*c109102eSJustin Bogner return 0; 17*c109102eSJustin Bogner } 18