forked from OSchip/llvm-project
Fix a crash when referencing static data members.
llvm-svn: 80835
This commit is contained in:
parent
e93b4b8fe1
commit
8943e2b8a0
|
@ -542,7 +542,7 @@ public:
|
|||
if (isa<TranslationUnitDecl>(Ctx) || isa<NamespaceDecl>(Ctx) )
|
||||
return true;
|
||||
}
|
||||
if (isStaticDataMember() && isOutOfLine())
|
||||
if (isStaticDataMember())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// RUN: clang-cc -emit-llvm -o - %s
|
||||
struct S {
|
||||
static int i;
|
||||
};
|
||||
|
||||
void f() {
|
||||
int a = S::i;
|
||||
}
|
Loading…
Reference in New Issue