Author: Jeewoong Kim Date: 2026-10-23T15:03:57Z New Revision: a0f0b01f54253244ee585b85476834c80f40b717
URL: https://github.com/llvm/llvm-project/commit/a0f0b01f54253244ee585b85476834c80f40b717 DIFF: https://github.com/llvm/llvm-project/commit/a0f0b01f54253244ee585b85476834c80f40b717.diff LOG: [clang][Sema] Add regression test for invalid friend declaration (#224798) This adds regression coverage for the friend function declaration path, which is not covered by the existing test in `class.friend/p6.cpp`. Fixes #132614. Added: Modified: clang/test/CXX/class/class.friend/p6.cpp Removed: ################################################################################ diff --git a/clang/test/CXX/class/class.friend/p6.cpp b/clang/test/CXX/class/class.friend/p6.cpp index a96dd8a3d4e4a8..2152c87e38ef65 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
