riccibruno added a comment.

> Added a test which exposes a new problem that this patch incidentally solves 
> (see `N_conflicting_namespace_alias`). Because of the using directive `using 
> namespace M;`, the namespace alias `i` for the namespace `Q` is found in the 
> redeclaration lookup. Before this patch, since `getAsSingle` used internally 
> `getUnderlyingDecl()`, `PrevDecl` was for the `NamespaceDecl` for `Q`, and 
> not for the `VarDecl` for `Q::i`. Then the declaration for the enumerator `i` 
> was mistakenly rejected since `Q` is in the same scope.

I meant in the above "[...] `PrevDecl` was the `NamespaceDecl` for `Q`, and not 
the `NamespaceAliasDecl` for `M::i`"


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60956/new/

https://reviews.llvm.org/D60956



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to