[clang] [Clang] Preserve namespace identity for inline namespace redeclarations (PR #233862)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 21 03:20:19 PDT 2026
================
@@ -0,0 +1,39 @@
+// RUN: %clang_cc1 -std=c++11 -ast-dump %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -std=c++11 -include-pch %t -ast-dump-all -x c++ /dev/null | FileCheck %s
+
+namespace reopen {
+// CHECK: NamespaceDecl [[V1:0x[^ ]+]] {{.*}} v1 inline
+inline namespace v1 {
+// CHECK: NamespaceDecl [[NS:0x[^ ]+]] {{.*}} ns
+namespace ns {
+struct Y;
+}
----------------
Endilll wrote:
```suggestion
} // namespace ns
```
Can you do this for every names you're closing, or maybe indent every nested namespace. At the moment all the tests in this PR are quite hard to read.
https://github.com/llvm/llvm-project/pull/233862
More information about the cfe-commits
mailing list