[clang] [Clang] [Parser] Improve diagnostic for `friend concept` (PR #105121)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 20 13:09:00 PDT 2024


================
@@ -3139,6 +3139,19 @@ Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(
     return Actions.BuildDeclaratorGroup(Decls);
   }
 
+  // Befriending a concept is invalid and would already fail if
+  // we did nothing here, but this allows us to issue a more
+  // helpful diagnostic.
+  if (Tok.is(tok::kw_concept)) {
----------------
shafik wrote:

Could we get a standard reference for a befriending a concept being invalid. 

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


More information about the cfe-commits mailing list