brintos

brintos / llvm-project-archived public Read only

0
0
Text · 587 B · 0d3189c Raw
18 lines · cpp
1// RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -x c++ -std=c++11 -triple %itanium_abi_triple -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s -main-file-name lambda.cpp | FileCheck %s2 3// CHECK-LABEL: _Z3fooi:4void foo(int i) { // CHECK: File 0, [[@LINE]]:17 -> {{[0-9]+}}:2 = #05  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 = 012}13 14int main(int argc, const char *argv[]) {15  foo(1);16  return 0;17}18