[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / static-mutable.cpp
blob6d51f241d163a992143667e5e6618144c6830618
1 // RUN: %clang_cc1 %s -triple=i686-linux-gnu -emit-llvm -o - | FileCheck %s
3 struct S {
4 mutable int n;
5 };
6 int f() {
7 // The purpose of this test is to ensure that this variable is a global
8 // not a constant.
9 // CHECK: @_ZZ1fvE1s = internal global {{.*}} { i32 12 }
10 static const S s = { 12 };
11 return ++s.n;