[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

Krystian Stasiowski via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 10:07:49 PST 2024


================
@@ -17534,79 +17534,6 @@ Decl *Sema::BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc,
   return Decl;
 }
 
-/// Perform semantic analysis of the given friend type declaration.
-///
-/// \returns A friend declaration that.
-FriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart,
----------------
sdkrystian wrote:

@cor3ntin We call `CheckFriendTypeDecl` from two places: `Sema::ActOnFriendTypeDecl`, and `TemplateDeclInsantiator::VisitFriendDecl`. However, the only thing that `CheckFriendTypeDecl` does during instantiation is call `FriendDecl::Create` -- the other checks are only done when initially parsing the declaration.  


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


More information about the cfe-commits mailing list