[clang] [Sema] Fix assertion crash on section conflict with a non-identifier decl (PR #200873)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 01:11:17 PDT 2026


================
@@ -69,3 +69,18 @@ __attribute__((section("non_trivial_ctor"))) const t1 v1; // expected-note {{dec
 extern const t1 v2;
 __attribute__((section("non_trivial_ctor"))) const t1 v2{3}; // expected-error {{'v2' causes a section type conflict with 'v1'}}
 } // namespace non_trivial_ctor
+
+// Check that a section conflict with a decl whose name is not a simple
+// identifier (here, a lambda's call operator) is diagnosed without crashing.
+namespace lambda_call_operator {
----------------
cor3ntin wrote:

```suggestion
namespace GH192264 {
```

https://github.com/llvm/llvm-project/pull/200873


More information about the cfe-commits mailing list