diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-07 02:48:43 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-07 02:48:43 +0000 |
commit | 17a9b9e3ee75f5dbb4819cc8ebf40eec8015f84a (patch) | |
tree | f9563f0b64d98952b69ecc122350c3c00b62e4db /lib/AST/DeclBase.cpp | |
parent | efb4aebfb01b1b6830bb7a926cb474a1631a1f27 (diff) |
When determining whether a variable is a file-scoped variable, check
out its lookup context (to see through linkage
specifications). Addresses <rdar://problem/6477142>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index cf612c2f3c..f14dc3c717 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -567,8 +567,8 @@ DeclContext::lookup(ASTContext &Context, DeclarationName Name) const { return const_cast<DeclContext*>(this)->lookup(Context, Name); } -DeclContext *DeclContext::getLookupContext() { - DeclContext *Ctx = this; +const DeclContext *DeclContext::getLookupContext() const { + const DeclContext *Ctx = this; while (Ctx->isTransparentContext()) Ctx = Ctx->getParent(); return Ctx; |