Issue 98199
Summary missing diagnostic for reopening an ambiguous namespace
Labels new issue
Assignees
Reporter zygoloid
    ```c++
namespace internal {
  void Bar() {}
}  // namespace internal

inline namespace stay_away {
namespace internal {}  // namespace internal
}  // namespace stay_away

namespace internal {
   void Bar() {}
}
```

The final reopening of namespace `internal` should be invalid: lookup for the name `internal` is ambiguous. But clang accepts this and instead creates a second `::internal` namespace (a third `internal` namespace overall), and treats the two `Bar`s as being unrelated. (Ultimately this fails in IR generation due to a mangled name collision.)

Presumably we're incorrectly suppressing diagnostics in the lookup for the name `internal`.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to