[clang] [Sema] Add original GH192264 reproducer as a section-conflict regression test (PR #202276)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 8 00:25:56 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: lijinpei-amd
<details>
<summary>Changes</summary>
Follow up of https://github.com/llvm/llvm-project/pull/200873
---
Full diff: https://github.com/llvm/llvm-project/pull/202276.diff
1 Files Affected:
- (modified) clang/test/SemaCXX/attr-section.cpp (+8)
``````````diff
diff --git a/clang/test/SemaCXX/attr-section.cpp b/clang/test/SemaCXX/attr-section.cpp
index 95d4fc53ebe6c..f8ac9131f06ff 100644
--- a/clang/test/SemaCXX/attr-section.cpp
+++ b/clang/test/SemaCXX/attr-section.cpp
@@ -84,3 +84,11 @@ auto lambda = [](int val) __attribute__((section("lambda_op_pragma"))) { return
#pragma clang section bss="lambda_op_pragma" // expected-error {{this causes a section type conflict with 'operator()'}}
#pragma clang section bss=""
} // namespace lambda_call_operator_pragma
+
+// original: https://github.com/llvm/llvm-project/issues/192264
+namespace GH192264_original {
+struct S {};
+using F = decltype([](auto val) // expected-note {{declared here}}
+__attribute__((section("gh192264"))) const S s{}; // expected-error {{expected body of lambda expression}}
+__attribute__((section("gh192264"))) int i{}; // expected-error {{'i' causes a section type conflict with 'operator()'}}
+} // namespace GH192264_original
``````````
</details>
https://github.com/llvm/llvm-project/pull/202276
More information about the cfe-commits
mailing list