jcsxky added a comment.

In D156693#4603537 <https://reviews.llvm.org/D156693#4603537>, @balazske wrote:

> My concern was related to nested namespaces or nested classes with friend 
> declarations that are equivalent and differ only in the nesting level. It may 
> be possible to construct code where a declaration at an inner (nested) level 
> is found to be equivalent with a similar looking class at an outer level. But 
> I now do not have time to look for an example to test it, and I am not fully 
> familiar with exact rules of friend declarations, so I accept this fix.



- The same declcontext will make the template class and friend template class 
in the same namespace.
- Namespace will not change the depth of template class parameter. So, the 
equvalence will not be changed whether ignore the depth or not.
- Declcontext of friend tempalte class is outer namespace (if exists), So, 
classes in this declcontext are equvalent with identical name.

According the the conclusion above, the nested namespace or nested class will 
not affect the equvalence of the two classes (as far as I concerned).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156693

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

Reply via email to