diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-27 16:26:47 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-27 16:26:47 +0000 |
commit | c8fd2dae17a0fc631a07ab7b66c9d3ebe90a0cc6 (patch) | |
tree | 84157d0e02c00f1046aab67d7ef1ca0d73f4f433 /lib/Sema/SemaDecl.cpp | |
parent | a6a292b4dc47da42b2fc0662af7fe278c9e9fb33 (diff) |
When checking the redeclaration context of a typedef that refers to a
tag of the same name, compare the lookup contexts rather than the
actual contexts. Fixes PR6923.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index d9696d9ed5..fcee68d474 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -5029,7 +5029,8 @@ Sema::DeclPtrTy Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, if (const TagType *TT = TD->getUnderlyingType()->getAs<TagType>()) { TagDecl *Tag = TT->getDecl(); if (Tag->getDeclName() == Name && - Tag->getDeclContext()->Equals(TD->getDeclContext())) { + Tag->getDeclContext()->getLookupContext() + ->Equals(TD->getDeclContext()->getLookupContext())) { PrevDecl = Tag; Previous.clear(); Previous.addDecl(Tag); |