Fix a crash when referencing static data members.

llvm-svn: 80835
This commit is contained in:
Anders Carlsson 2009-09-02 21:01:21 +00:00
parent e93b4b8fe1
commit 8943e2b8a0
2 changed files with 9 additions and 1 deletions

View File

@ -542,7 +542,7 @@ public:
if (isa<TranslationUnitDecl>(Ctx) || isa<NamespaceDecl>(Ctx) )
return true;
}
if (isStaticDataMember() && isOutOfLine())
if (isStaticDataMember())
return true;
return false;

View File

@ -0,0 +1,8 @@
// RUN: clang-cc -emit-llvm -o - %s
struct S {
static int i;
};
void f() {
int a = S::i;
}