Open MitalAshok opened 3 weeks ago
@llvm/issue-subscribers-clang-frontend
Author: Mital Ashok (MitalAshok)
This looks wrong but this is not my area.
CC @rjmccall @zygoloid
Yes, GCC is right. This was a core issue resolution from a few years back as I recall.
With Itanium name mangling, this currently prints (clang trunk: https://godbolt.org/z/45d9dsfz9)
When it is expected to print (and does print with GCC):
This also applies to mangling of function/variable names if they physically appear in the second time the namespace is opened outside. Seems like the scope isn't calculated properly (it should be the same as if it was
namespace inline_namespace::extended_outside {
)Relevant standard quote: https://eel.is/c++draft/namespace.def.general#2