1 // RUN: %clang_cc1 %s -triple %itanium_abi_triple -O1 -disable-llvm-passes -emit-llvm -o - | FileCheck %s
3 // Test the attributes for the lambda function contains 'optnone' as result of
4 // the _Pragma("clang optimize off").
6 _Pragma("clang optimize off")
9 auto lambda
= [&p
]() { ++p
; };
11 // CHECK: define {{.*}} @"_ZZ3fooiENK3$_0clEv"({{.*}}) #[[LAMBDA_ATR:[0-9]+]]
14 _Pragma("clang optimize on")
16 // CHECK: attributes #[[LAMBDA_ATR]] = { {{.*}} optnone {{.*}} }