diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-26 22:59:39 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-26 22:59:39 +0000 |
commit | c67b03260dbf4127e09b03302ff844a24e41394f (patch) | |
tree | 1ff01785612582e7f1b799aa8d34288994d36841 /lib/Sema/SemaDeclCXX.cpp | |
parent | cfd8ea930a119dc8a1e9a343d2a5cfe142b3d964 (diff) |
Compare namespaces properly when looking for redeclarations of
namespace aliases. Fixes PR6341.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 1b4710e3d0..b5dc730522 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -3736,8 +3736,10 @@ Sema::DeclPtrTy Sema::ActOnNamespaceAliasDef(Scope *S, if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) { // We already have an alias with the same name that points to the same // namespace, so don't create a new one. + // FIXME: At some point, we'll want to create the (redundant) + // declaration to maintain better source information. if (!R.isAmbiguous() && !R.empty() && - AD->getNamespace() == getNamespaceDecl(R.getFoundDecl())) + AD->getNamespace()->Equals(getNamespaceDecl(R.getFoundDecl()))) return DeclPtrTy(); } |