Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1 | // 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: |
| 4 | void 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 | |
| 14 | int main(int argc, const char *argv[]) { |
| 15 | foo(1); |
| 16 | return 0; |
| 17 | } |