@@ -1571,8 +1571,7 @@ FunctionTemplate* Parser::WalkFunctionTemplate(const clang::FunctionTemplateDecl
15711571 if (auto MD = dyn_cast<CXXMethodDecl>(TemplatedDecl))
15721572 Function = WalkMethodCXX (MD);
15731573 else
1574- Function = WalkFunction (TemplatedDecl, /* IsDependent=*/ true ,
1575- /* AddToNamespace=*/ false );
1574+ Function = WalkFunction (TemplatedDecl, /* AddToNamespace=*/ false );
15761575
15771576 FT = new FunctionTemplate ();
15781577 HandleDeclaration (TD, FT);
@@ -3157,12 +3156,11 @@ void Parser::MarkValidity(Function* F)
31573156 c->getSema ().getDiagnostics ().setClient (existingClient, false );
31583157}
31593158
3160- void Parser::WalkFunction (const clang::FunctionDecl* FD, Function* F,
3161- bool IsDependent)
3159+ void Parser::WalkFunction (const clang::FunctionDecl* FD, Function* F)
31623160{
31633161 using namespace clang ;
31643162
3165- assert (FD->getBuiltinID () == 0 );
3163+ assert (FD->getBuiltinID () == 0 );
31663164 auto FT = FD->getType ()->getAs <clang::FunctionType>();
31673165
31683166 auto NS = GetNamespace (FD);
@@ -3206,7 +3204,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
32063204 HandlePreprocessedEntities (F, FTL.getParensRange (), MacroLocation::FunctionParameters);
32073205 }
32083206 }
3209-
3207+
32103208 auto ReturnType = FD->getReturnType ();
32113209 if (FD->isExternallyVisible ())
32123210 CompleteIfSpecializationType (ReturnType);
@@ -3232,7 +3230,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
32323230 if (FTL)
32333231 {
32343232 auto FTInfo = FTL.castAs <FunctionTypeLoc>();
3235- assert (!FTInfo.isNull ());
3233+ assert (!FTInfo.isNull ());
32363234
32373235 ParamStartLoc = FTInfo.getLParenLoc ();
32383236 ResultLoc = FTInfo.getReturnLoc ().getBeginLoc ();
@@ -3283,7 +3281,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
32833281 const CXXMethodDecl* MD;
32843282 if (FD->isDependentContext () ||
32853283 ((MD = dyn_cast<CXXMethodDecl>(FD)) && !MD->isStatic () &&
3286- !HasLayout (cast<CXXRecordDecl>(MD->getDeclContext ()))) ||
3284+ !HasLayout (cast<CXXRecordDecl>(MD->getDeclContext ()))) ||
32873285 !CanCheckCodeGenInfo (c->getSema (), FD->getReturnType ().getTypePtr ()) ||
32883286 std::any_of (FD->parameters ().begin (), FD->parameters ().end (),
32893287 [this ](auto * P) { return !CanCheckCodeGenInfo (c->getSema (), P->getType ().getTypePtr ()); }))
@@ -3307,8 +3305,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
33073305 F->qualifiedType = GetQualifiedType (FD->getType (), &FTL);
33083306}
33093307
3310- Function* Parser::WalkFunction (const clang::FunctionDecl* FD, bool IsDependent,
3311- bool AddToNamespace)
3308+ Function* Parser::WalkFunction (const clang::FunctionDecl* FD, bool AddToNamespace)
33123309{
33133310 using namespace clang ;
33143311
@@ -3328,7 +3325,7 @@ Function* Parser::WalkFunction(const clang::FunctionDecl* FD, bool IsDependent,
33283325 if (AddToNamespace)
33293326 NS->Functions .push_back (F);
33303327
3331- WalkFunction (FD, F, IsDependent );
3328+ WalkFunction (FD, F);
33323329
33333330 return F;
33343331}
0 commit comments