https://github.com/JeewoongKim created https://github.com/llvm/llvm-project/pull/224798
Added a regression test for #132614. The original fuzzer reproducer no longer crashes on `main`. This adds coverage for the friend function declaration path, which is not covered by the existing test in `class.friend/p6.cpp`. Tested `clang/test/CXX/class/class.friend/p6.cpp` locally. >From 76ded6058eeff10094227be17d7d508c18083348 Mon Sep 17 00:00:00 2001 From: Jeewoong Kim <[email protected]> Date: Sat, 19 Sep 2026 12:44:23 +0900 Subject: [PATCH] [clang][Sema] Add regression test for invalid friend declaration --- clang/test/CXX/class/class.friend/p6.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/test/CXX/class/class.friend/p6.cpp b/clang/test/CXX/class/class.friend/p6.cpp index a96dd8a3d4e4a..2152c87e38ef6 100644 --- a/clang/test/CXX/class/class.friend/p6.cpp +++ b/clang/test/CXX/class/class.friend/p6.cpp @@ -20,4 +20,5 @@ class A { friend thread_local class G; // expected-error {{'thread_local' is invalid in friend declarations}} #endif friend register enum; // expected-error {{expected identifier or '{'}} expected-error {{'register' is invalid in friend declarations}} + friend static unknown foo(); // expected-error {{unknown type name 'unknown'}} expected-error {{'static' is invalid in friend declarations}} }; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
