github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- 
clang-tools-extra/clang-doc/Serialize.cpp 
clang/include/clang/AST/ASTNodeTraverser.h clang/include/clang/AST/DeclFriend.h 
clang/include/clang/AST/DeclTemplate.h clang/include/clang/AST/JSONNodeDumper.h 
clang/include/clang/AST/RecursiveASTVisitor.h 
clang/include/clang/AST/TextNodeDumper.h clang/include/clang/Sema/Sema.h 
clang/include/clang/Sema/Template.h 
clang/include/clang/Sema/TemplateDeduction.h 
clang/include/clang/Serialization/ASTBitCodes.h clang/lib/AST/ASTImporter.cpp 
clang/lib/AST/ASTStructuralEquivalence.cpp clang/lib/AST/DeclFriend.cpp 
clang/lib/AST/DeclPrinter.cpp clang/lib/AST/DeclTemplate.cpp 
clang/lib/AST/JSONNodeDumper.cpp clang/lib/AST/ODRHash.cpp 
clang/lib/AST/TextNodeDumper.cpp clang/lib/Index/IndexDecl.cpp 
clang/lib/Parse/ParseDeclCXX.cpp clang/lib/Sema/Sema.cpp 
clang/lib/Sema/SemaAccess.cpp clang/lib/Sema/SemaCodeComplete.cpp 
clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/SemaDecl.cpp 
clang/lib/Sema/SemaDeclCXX.cpp clang/lib/Sema/SemaExceptionSpec.cpp 
clang/lib/Sema/SemaOverload.cpp clang/lib/Sema/SemaTemplate.cpp 
clang/lib/Sema/SemaTemplateDeduction.cpp 
clang/lib/Sema/SemaTemplateDeductionGuide.cpp 
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp 
clang/lib/Serialization/ASTReaderDecl.cpp 
clang/lib/Serialization/ASTWriterDecl.cpp 
clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp 
clang/test/CXX/drs/cwg18xx.cpp clang/test/CXX/drs/cwg19xx.cpp 
clang/test/CXX/drs/cwg28xx.cpp clang/test/CXX/drs/cwg6xx.cpp 
clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp 
clang/test/CXX/temp/temp.decls/temp.friend/p5.cpp 
clang/test/Modules/odr_hash.cpp clang/test/Parser/cxx2c-variadic-friends.cpp 
clang/test/SemaCXX/cxx2c-variadic-friends.cpp 
clang/test/SemaCXX/many-template-parameter-lists.cpp 
clang/test/SemaTemplate/GH71595.cpp 
clang/test/SemaTemplate/concepts-friends.cpp clang/test/SemaTemplate/ctad.cpp 
clang/test/SemaTemplate/friend-template.cpp 
clang/test/SemaTemplate/nested-template.cpp clang/tools/libclang/CIndex.cpp 
clang/tools/libclang/CursorVisitor.h clang/unittests/AST/DeclTest.cpp 
clang/unittests/AST/StructuralEquivalenceTest.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/include/clang/AST/DeclFriend.h 
b/clang/include/clang/AST/DeclFriend.h
index 1f8c21026..83ec52e6d 100644
--- a/clang/include/clang/AST/DeclFriend.h
+++ b/clang/include/clang/AST/DeclFriend.h
@@ -126,9 +126,7 @@ public:
     return Friend.dyn_cast<TypeSourceInfo*>();
   }
 
-  unsigned getFriendTypeNumTemplateParameterLists() const {
-    return NumTPLists;
-  }
+  unsigned getFriendTypeNumTemplateParameterLists() const { return NumTPLists; 
}
 
   TemplateParameterList *getFriendTypeTemplateParameterList(unsigned N) const {
     return getTrailingObjects(NumTPLists)[N];
@@ -136,14 +134,10 @@ public:
 
   /// If this friend declaration doesn't name a type, return the inner
   /// declaration.
-  NamedDecl *getFriendDecl() const {
-    return Friend.dyn_cast<NamedDecl *>();
-  }
+  NamedDecl *getFriendDecl() const { return Friend.dyn_cast<NamedDecl *>(); }
 
   /// Retrieves the location of the 'friend' keyword.
-  SourceLocation getFriendLoc() const {
-    return FriendLoc;
-  }
+  SourceLocation getFriendLoc() const { return FriendLoc; }
 
   /// Retrieves the location of the '...', if present.
   SourceLocation getEllipsisLoc() const { return EllipsisLoc; }
@@ -180,9 +174,7 @@ public:
   }
 
   /// Determines if this friend kind is unsupported.
-  bool isUnsupportedFriend() const {
-    return UnsupportedFriend;
-  }
+  bool isUnsupportedFriend() const { return UnsupportedFriend; }
   void setUnsupportedFriend(bool Unsupported) {
     UnsupportedFriend = Unsupported;
   }
diff --git a/clang/include/clang/AST/DeclTemplate.h 
b/clang/include/clang/AST/DeclTemplate.h
index ed1a51724..ec553257e 100644
--- a/clang/include/clang/AST/DeclTemplate.h
+++ b/clang/include/clang/AST/DeclTemplate.h
@@ -2468,7 +2468,7 @@ class FriendTemplateDecl : public Decl {
   virtual void anchor();
 
 public:
-  using FriendUnion = llvm::PointerUnion<NamedDecl *,TypeSourceInfo *>;
+  using FriendUnion = llvm::PointerUnion<NamedDecl *, TypeSourceInfo *>;
 
 private:
   // The number of template parameters;  always non-zero.
@@ -2505,29 +2505,23 @@ public:
   /// a dependent member type of a templated type), return that
   /// type;  otherwise return null.
   TypeSourceInfo *getFriendType() const {
-    return Friend.dyn_cast<TypeSourceInfo*>();
+    return Friend.dyn_cast<TypeSourceInfo *>();
   }
 
   /// If this friend declaration names a templated function (or
   /// a member function of a templated type), return that type;
   /// otherwise return null.
-  NamedDecl *getFriendDecl() const {
-    return Friend.dyn_cast<NamedDecl*>();
-  }
+  NamedDecl *getFriendDecl() const { return Friend.dyn_cast<NamedDecl *>(); }
 
   /// Retrieves the location of the 'friend' keyword.
-  SourceLocation getFriendLoc() const {
-    return FriendLoc;
-  }
+  SourceLocation getFriendLoc() const { return FriendLoc; }
 
   TemplateParameterList *getTemplateParameterList(unsigned i) const {
     assert(i <= NumParams);
     return Params[i];
   }
 
-  unsigned getNumTemplateParameters() const {
-    return NumParams;
-  }
+  unsigned getNumTemplateParameters() const { return NumParams; }
 
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Decl *D) { return classofKind(D->getKind()); }
diff --git a/clang/include/clang/Sema/Template.h 
b/clang/include/clang/Sema/Template.h
index a3340d2f4..d40ae9af7 100644
--- a/clang/include/clang/Sema/Template.h
+++ b/clang/include/clang/Sema/Template.h
@@ -721,7 +721,7 @@ enum class TemplateSubstitutionKind : char {
 
     // Helper functions for instantiating methods.
     TypeSourceInfo *SubstFunctionType(FunctionDecl *D,
-                             SmallVectorImpl<ParmVarDecl *> &Params);
+                                      SmallVectorImpl<ParmVarDecl *> &Params);
     bool InitFunctionInstantiation(FunctionDecl *New, FunctionDecl *Tmpl);
     bool InitMethodInstantiation(CXXMethodDecl *New, CXXMethodDecl *Tmpl);
 
diff --git a/clang/lib/AST/ASTStructuralEquivalence.cpp 
b/clang/lib/AST/ASTStructuralEquivalence.cpp
index d8bbfbe5d..870a342b9 100644
--- a/clang/lib/AST/ASTStructuralEquivalence.cpp
+++ b/clang/lib/AST/ASTStructuralEquivalence.cpp
@@ -2436,7 +2436,7 @@ static bool 
IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
                                      FriendDecl *D1, FriendDecl *D2) {
   if ((D1->getFriendType() && D2->getFriendDecl()) ||
       (D1->getFriendDecl() && D2->getFriendType())) {
-      return false;
+    return false;
   }
   if (D1->getFriendType() && D2->getFriendType())
     return IsStructurallyEquivalent(Context,
diff --git a/clang/lib/AST/DeclFriend.cpp b/clang/lib/AST/DeclFriend.cpp
index 6bfc2eb62..c4916d9a9 100644
--- a/clang/lib/AST/DeclFriend.cpp
+++ b/clang/lib/AST/DeclFriend.cpp
@@ -27,7 +27,7 @@ void FriendDecl::anchor() {}
 
 FriendDecl *FriendDecl::getNextFriendSlowCase() {
   return cast_or_null<FriendDecl>(
-                           
NextFriend.get(getASTContext().getExternalSource()));
+      NextFriend.get(getASTContext().getExternalSource()));
 }
 
 FriendDecl *
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 4be3e977b..ecce33411 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -894,19 +894,15 @@ void DeclPrinter::VisitFriendDecl(FriendDecl *D) {
       printTemplateParameters(D->getFriendTypeTemplateParameterList(i));
     Out << "friend ";
     Out << TSI->getType().getAsString(Policy);
-  }
-  else if (FunctionDecl *FD =
-      dyn_cast<FunctionDecl>(D->getFriendDecl())) {
+  } else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D->getFriendDecl())) {
     Out << "friend ";
     VisitFunctionDecl(FD);
-  }
-  else if (FunctionTemplateDecl *FTD =
-           dyn_cast<FunctionTemplateDecl>(D->getFriendDecl())) {
+  } else if (FunctionTemplateDecl *FTD =
+                 dyn_cast<FunctionTemplateDecl>(D->getFriendDecl())) {
     Out << "friend ";
     VisitFunctionTemplateDecl(FTD);
-  }
-  else if (ClassTemplateDecl *CTD =
-           dyn_cast<ClassTemplateDecl>(D->getFriendDecl())) {
+  } else if (ClassTemplateDecl *CTD =
+                 dyn_cast<ClassTemplateDecl>(D->getFriendDecl())) {
     Out << "friend ";
     VisitRedeclarableTemplateDecl(CTD);
   }
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 0f291900d..89c0fdf09 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1188,7 +1188,7 @@ static bool IsRecordFullyDefined(const CXXRecordDecl *RD,
     } else {
       // Friend functions are available through the NamedDecl of FriendDecl.
       if (const FunctionDecl *FD =
-          dyn_cast<FunctionDecl>((*I)->getFriendDecl()))
+              dyn_cast<FunctionDecl>((*I)->getFriendDecl()))
         Complete = FD->isDefined();
       else
         // This is a template friend, give up.
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp
index 9b4f59613..4c09fedbf 100644
--- a/clang/lib/Sema/SemaAccess.cpp
+++ b/clang/lib/Sema/SemaAccess.cpp
@@ -272,7 +272,6 @@ private:
   mutable const CXXRecordDecl *InstanceContext;
   const CXXRecordDecl *DeclaringClass;
 };
-
 }
 
 /// Checks whether one class might instantiate to the other.
@@ -284,8 +283,10 @@ static bool MightInstantiateTo(const CXXRecordDecl *From,
 
   const DeclContext *FromDC = From->getDeclContext()->getPrimaryContext();
   const DeclContext *ToDC = To->getDeclContext()->getPrimaryContext();
-  if (FromDC == ToDC) return true;
-  if (FromDC->isFileContext() || ToDC->isFileContext()) return false;
+  if (FromDC == ToDC)
+    return true;
+  if (FromDC->isFileContext() || ToDC->isFileContext())
+    return false;
 
   // Be conservative.
   return true;
@@ -343,7 +344,6 @@ static AccessResult IsDerivedFromInclusive(const 
CXXRecordDecl *Derived,
   return OnFailure;
 }
 
-
 static bool MightInstantiateTo(Sema &S, DeclContext *Context,
                                DeclContext *Friend) {
   if (Friend == Context)
@@ -364,7 +364,8 @@ static bool MightInstantiateTo(Sema &S, DeclContext 
*Context,
 
 // Asks whether the type in 'context' can ever instantiate to the type
 // in 'friend'.
-static bool MightInstantiateTo(Sema &S, CanQualType Context, CanQualType 
Friend) {
+static bool MightInstantiateTo(Sema &S, CanQualType Context,
+                               CanQualType Friend) {
   if (Friend == Context)
     return true;
 
@@ -375,23 +376,20 @@ static bool MightInstantiateTo(Sema &S, CanQualType 
Context, CanQualType Friend)
   return true;
 }
 
-static bool MightInstantiateTo(Sema &S,
-                               FunctionDecl *Context,
+static bool MightInstantiateTo(Sema &S, FunctionDecl *Context,
                                FunctionDecl *Friend) {
   if (Context->getDeclName() != Friend->getDeclName())
     return false;
 
-  if (!MightInstantiateTo(S,
-                          Context->getDeclContext(),
+  if (!MightInstantiateTo(S, Context->getDeclContext(),
                           Friend->getDeclContext()))
     return false;
 
-  CanQual<FunctionProtoType> FriendTy
-    = S.Context.getCanonicalType(Friend->getType())
-         ->getAs<FunctionProtoType>();
-  CanQual<FunctionProtoType> ContextTy
-    = S.Context.getCanonicalType(Context->getType())
-         ->getAs<FunctionProtoType>();
+  CanQual<FunctionProtoType> FriendTy =
+      
S.Context.getCanonicalType(Friend->getType())->getAs<FunctionProtoType>();
+  CanQual<FunctionProtoType> ContextTy =
+      S.Context.getCanonicalType(Context->getType())
+          ->getAs<FunctionProtoType>();
 
   // There isn't any way that I know of to add qualifiers
   // during instantiation.
@@ -413,11 +411,9 @@ static bool MightInstantiateTo(Sema &S,
   return true;
 }
 
-static bool MightInstantiateTo(Sema &S,
-                               FunctionTemplateDecl *Context,
+static bool MightInstantiateTo(Sema &S, FunctionTemplateDecl *Context,
                                FunctionTemplateDecl *Friend) {
-  return MightInstantiateTo(S,
-                            Context->getTemplatedDecl(),
+  return MightInstantiateTo(S, Context->getTemplatedDecl(),
                             Friend->getTemplatedDecl());
 }
 
@@ -492,8 +488,7 @@ static AccessResult MatchesFriend(Sema &S,
 
     // If the class's context can't instantiate to the friend's
     // context, it can't be a dependent match.
-    if (!MightInstantiateTo(S, CTD->getDeclContext(),
-                            Friend->getDeclContext()))
+    if (!MightInstantiateTo(S, CTD->getDeclContext(), 
Friend->getDeclContext()))
       continue;
 
     // Otherwise, it's a dependent match.
@@ -565,8 +560,8 @@ static AccessResult MatchesFriend(Sema &S,
   if (TypeSourceInfo *T = FriendD->getFriendType())
     return MatchesFriend(S, EC, T->getType()->getCanonicalTypeUnqualified());
 
-  NamedDecl *Friend
-    = cast<NamedDecl>(FriendD->getFriendDecl()->getCanonicalDecl());
+  NamedDecl *Friend =
+      cast<NamedDecl>(FriendD->getFriendDecl()->getCanonicalDecl());
 
   // FIXME: declarations with dependent or templated scope.
 
@@ -583,8 +578,7 @@ static AccessResult MatchesFriend(Sema &S,
   return MatchesFriend(S, EC, cast<FunctionDecl>(Friend));
 }
 
-static AccessResult GetFriendKind(Sema &S,
-                                  const EffectiveContext &EC,
+static AccessResult GetFriendKind(Sema &S, const EffectiveContext &EC,
                                   const CXXRecordDecl *Class) {
   AccessResult OnFailure = AR_inaccessible;
 
@@ -624,10 +618,10 @@ struct ProtectedFriendContext {
   ProtectedFriendContext(Sema &S, const EffectiveContext &EC,
                          const CXXRecordDecl *InstanceContext,
                          const CXXRecordDecl *NamingClass)
-    : S(S), EC(EC), NamingClass(NamingClass),
-      CheckDependent(InstanceContext->isDependentContext() ||
-                     NamingClass->isDependentContext()),
-      EverDependent(false) {}
+      : S(S), EC(EC), NamingClass(NamingClass),
+        CheckDependent(InstanceContext->isDependentContext() ||
+                       NamingClass->isDependentContext()),
+        EverDependent(false) {}
 
   /// Check classes in the current path for friendship, starting at
   /// the given index.
@@ -731,7 +725,8 @@ static AccessResult GetProtectedFriendKind(Sema &S, const 
EffectiveContext &EC,
   // If we don't have an instance context, our constraints give us
   // that NamingClass <= P <= NamingClass, i.e. P == NamingClass.
   // This is just the usual friendship check.
-  if (!InstanceContext) return GetFriendKind(S, EC, NamingClass);
+  if (!InstanceContext)
+    return GetFriendKind(S, EC, NamingClass);
 
   ProtectedFriendContext PRC(S, EC, InstanceContext, NamingClass);
   if (PRC.findFriendship(InstanceContext)) return AR_accessible;
@@ -739,8 +734,7 @@ static AccessResult GetProtectedFriendKind(Sema &S, const 
EffectiveContext &EC,
   return AR_inaccessible;
 }
 
-static AccessResult HasAccess(Sema &S,
-                              const EffectiveContext &EC,
+static AccessResult HasAccess(Sema &S, const EffectiveContext &EC,
                               const CXXRecordDecl *NamingClass,
                               AccessSpecifier Access,
                               const AccessTarget &Target) {
@@ -1327,8 +1321,7 @@ static bool IsMicrosoftUsingDeclarationAccessBug(Sema& S,
 
 /// Determines whether the accessed entity is accessible.  Public members
 /// have been weeded out by this point.
-static AccessResult IsAccessible(Sema &S,
-                                 const EffectiveContext &EC,
+static AccessResult IsAccessible(Sema &S, const EffectiveContext &EC,
                                  AccessTarget &Entity) {
   // Determine the actual naming class.
   const CXXRecordDecl *NamingClass = Entity.getEffectiveNamingClass();
@@ -1423,8 +1416,7 @@ static void DelayDependentAccess(Sema &S,
 }
 
 /// Checks access to an entity from the given effective context.
-static AccessResult CheckEffectiveAccess(Sema &S,
-                                         const EffectiveContext &EC,
+static AccessResult CheckEffectiveAccess(Sema &S, const EffectiveContext &EC,
                                          SourceLocation Loc,
                                          AccessTarget &Entity) {
   assert(Entity.getAccess() != AS_public && "called for public access!");
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 5c425a176..21006923b 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -18159,7 +18159,8 @@ DeclResult Sema::ActOnTemplatedFriendTag(
     }
   }
 
-  if (Invalid) return true;
+  if (Invalid)
+    return true;
 
   bool isAllExplicitSpecializations =
       llvm::all_of(TempParamLists, [](const TemplateParameterList *List) {
@@ -18189,8 +18190,8 @@ DeclResult Sema::ActOnTemplatedFriendTag(
     }
 
     TypeSourceInfo *TSI = nullptr;
-    ElaboratedTypeKeyword Keyword
-      = TypeWithKeyword::getKeywordForTagTypeKind(Kind);
+    ElaboratedTypeKeyword Keyword =
+        TypeWithKeyword::getKeywordForTagTypeKind(Kind);
     QualType T = CheckTypenameType(Keyword, TagLoc, QualifierLoc, *Name,
                                    NameLoc, &TSI, /*DeducedTSTContext=*/true);
     if (T.isNull())
@@ -18228,7 +18229,7 @@ DeclResult Sema::ActOnTemplatedFriendTag(
   //   template <class T> class A<T>::B;
   // FIXME: we don't support these right now.
   Diag(NameLoc, diag::warn_template_qualified_friend_unsupported)
-    << SS.getScopeRep() << SS.getRange() << cast<CXXRecordDecl>(CurContext);
+      << SS.getScopeRep() << SS.getRange() << cast<CXXRecordDecl>(CurContext);
   ElaboratedTypeKeyword ETK = TypeWithKeyword::getKeywordForTagTypeKind(Kind);
   QualType T = Context.getDependentNameType(ETK, SS.getScopeRep(), Name);
   TypeSourceInfo *TSI = Context.CreateTypeSourceInfo(T);
@@ -18535,11 +18536,11 @@ NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, 
Declarator &D,
              diag::warn_cxx98_compat_friend_is_member :
              diag::err_friend_is_member);
 
-  //   - There's a scope specifier that does not match any template
-  //     parameter lists, in which case we use some arbitrary context,
-  //     create a method or method template, and wait for instantiation.
-  //   - There's a scope specifier that does match some template
-  //     parameter lists, which we don't handle right now.
+    //   - There's a scope specifier that does not match any template
+    //     parameter lists, in which case we use some arbitrary context,
+    //     create a method or method template, and wait for instantiation.
+    //   - There's a scope specifier that does match some template
+    //     parameter lists, which we don't handle right now.
   } else {
     DC = CurContext;
     assert(isa<CXXRecordDecl>(DC) && "friend declaration not in class?");
@@ -18613,16 +18614,16 @@ NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, 
Declarator &D,
       PushOnScopeChains(ND, EnclosingScope, /*AddToContext=*/ false);
   }
 
-  FriendDecl *FrD = FriendDecl::Create(Context, CurContext,
-                                       D.getIdentifierLoc(), ND,
-                                       DS.getFriendSpecLoc());
+  FriendDecl *FrD = FriendDecl::Create(
+      Context, CurContext, D.getIdentifierLoc(), ND, DS.getFriendSpecLoc());
   FrD->setAccess(AS_public);
   CurContext->addDecl(FrD);
 
   if (ND->isInvalidDecl()) {
     FrD->setInvalidDecl();
   } else {
-    if (DC->isRecord()) CheckFriendAccess(ND);
+    if (DC->isRecord())
+      CheckFriendAccess(ND);
 
     FunctionDecl *FD;
     if (FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(ND))
@@ -18681,8 +18682,8 @@ NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, 
Declarator &D,
     // Mark templated-scope function declarations as unsupported.
     if (!FD->getTemplateParameterLists().empty() && SS.isValid()) {
       Diag(FD->getLocation(), diag::warn_template_qualified_friend_unsupported)
-        << SS.getScopeRep() << SS.getRange()
-        << cast<CXXRecordDecl>(CurContext);
+          << SS.getScopeRep() << SS.getRange()
+          << cast<CXXRecordDecl>(CurContext);
       FrD->setUnsupportedFriend(true);
     }
   }
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp 
b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 79d106168..d614253ce 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -4774,10 +4774,8 @@ Decl 
*TemplateDeclInstantiator::VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *D)
 Decl *TemplateDeclInstantiator::VisitFriendTemplateDecl(FriendTemplateDecl *D) 
{
   // FIXME: We need to be able to instantiate FriendTemplateDecls.
   unsigned DiagID = SemaRef.getDiagnostics().getCustomDiagID(
-                                               DiagnosticsEngine::Error,
-                                               "cannot instantiate %0 yet");
-  SemaRef.Diag(D->getLocation(), DiagID)
-    << D->getDeclKindName();
+      DiagnosticsEngine::Error, "cannot instantiate %0 yet");
+  SemaRef.Diag(D->getLocation(), DiagID) << D->getDeclKindName();
 
   return nullptr;
 }
@@ -5166,9 +5164,8 @@ 
TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(
   return InstPartialSpec;
 }
 
-TypeSourceInfo*
-TemplateDeclInstantiator::SubstFunctionType(FunctionDecl *D,
-                              SmallVectorImpl<ParmVarDecl *> &Params) {
+TypeSourceInfo *TemplateDeclInstantiator::SubstFunctionType(
+    FunctionDecl *D, SmallVectorImpl<ParmVarDecl *> &Params) {
   TypeSourceInfo *OldTInfo = D->getTypeSourceInfo();
   assert(OldTInfo && "substituting function without type source info");
   assert(Params.empty() && "parameter vector is non-empty at start");

``````````

</details>


https://github.com/llvm/llvm-project/pull/216549
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to