Files
llvm-project/clang/test/CodeGenCXX/static-local-in-local-class.cpp
Fariborz Jahanian 3fef72f0ba Local static variables must be available module-wise
as they are accessible in static methods in a class
local to the same function. Fixes PR6769.

llvm-svn: 101756
2010-04-18 21:01:23 +00:00

22 lines
259 B
C++

// RUN: %clang_cc1 -emit-llvm -o %t %s
// PR6769
struct X {
static void f();
};
void X::f() {
static int *i;
{
struct Y {
static void g() {
i = new int();
*i = 100;
(*i) = (*i) +1;
}
};
(void)Y::g();
}
(void)i;
}