[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / pragma-msvc-optimize.c
blob17ba40de0a304df5b447eaabffc9256856e95e37
1 // RUN: %clang_cc1 -O2 -emit-llvm -fms-extensions -o - %s | FileCheck %s
3 #pragma optimize("", off)
5 // CHECK: define{{.*}} void @f0(){{.*}} #[[OPTNONE:[0-9]+]]
6 void f0() {}
8 // CHECK: define{{.*}} void @f1(){{.*}} #[[OPTNONE]]
9 void f1() {}
11 #pragma optimize("", on)
13 // CHECK: define{{.*}} void @f2(){{.*}} #[[NO_OPTNONE:[0-9]+]]
14 void f2() {}
16 // CHECK: define{{.*}} void @f3(){{.*}} #[[NO_OPTNONE]]
17 void f3() {}
19 // CHECK: attributes #[[OPTNONE]] = {{{.*}}optnone{{.*}}}
20 // CHECK-NOT: attributes #[[NO_OPTNONE]] = {{{.*}}optnone{{.*}}}