brintos

brintos / llvm-project-archived public Read only

0
0
Text · 496 B · d750c4c Raw
16 lines · cpp
1// RUN: %clang_cc1 %s -triple %itanium_abi_triple -O1 -disable-llvm-passes -emit-llvm -o - | FileCheck %s2 3// Test the attributes for the lambda function contains 'optnone' as result of4// the _Pragma("clang optimize off").5 6_Pragma("clang optimize off")7 8void foo(int p) {9  auto lambda = [&p]() { ++p; };10  lambda();11  // CHECK: define {{.*}} @"_ZZ3fooiENK3$_0clEv"({{.*}}) #[[LAMBDA_ATR:[0-9]+]]12}13 14_Pragma("clang optimize on")15 16// CHECK: attributes #[[LAMBDA_ATR]] = { {{.*}} optnone {{.*}} }