diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-23 20:03:04 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-23 20:03:04 +0000 |
commit | cc1b82be17a8a100857cd1830d8704a8531f11d9 (patch) | |
tree | ccc4dc4c82dc38f73977a98d9309d0f269c9692e /clang/lib | |
parent | f3c8f532d2c998e6f93a9f30cbfca9e94f16ff3c (diff) | |
download | bcm5719-llvm-cc1b82be17a8a100857cd1830d8704a8531f11d9.tar.gz bcm5719-llvm-cc1b82be17a8a100857cd1830d8704a8531f11d9.zip |
Fix filtering of prior declarations when checking for a tag redeclaration to
map to the redecl context for both decls, not just one of them, and to properly
check that the decl contexts are equivalent.
llvm-svn: 270482
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 9c442a61ce2..81460418ca4 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -12338,7 +12338,8 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, LookupResult::Filter F = Previous.makeFilter(); while (F.hasNext()) { NamedDecl *ND = F.next(); - if (ND->getDeclContext()->getRedeclContext() != SearchDC) + if (!ND->getDeclContext()->getRedeclContext()->Equals( + SearchDC->getRedeclContext())) F.erase(); } F.done(); |