Changeset View
Changeset View
Standalone View
Standalone View
lib/Sema/SemaDecl.cpp
Context not available. | |||||
// See if this is a redefinition. If 'will have body' is already set, then | // See if this is a redefinition. If 'will have body' is already set, then | ||||
// these checks were already performed when it was set. | // these checks were already performed when it was set. | ||||
if (!FD->willHaveBody() && !FD->isLateTemplateParsed()) { | if (!isa<CXXDeductionGuideDecl>(FD) && !FD->willHaveBody() && | ||||
!FD->isLateTemplateParsed()) { | |||||
CheckForFunctionRedefinition(FD, nullptr, SkipBody); | CheckForFunctionRedefinition(FD, nullptr, SkipBody); | ||||
// If we're skipping the body, we're done. Don't enter the scope. | // If we're skipping the body, we're done. Don't enter the scope. | ||||
Context not available. | |||||
// Mark this function as "will have a body eventually". This lets users to | // Mark this function as "will have a body eventually". This lets users to | ||||
// call e.g. isInlineDefinitionExternallyVisible while we're still parsing | // call e.g. isInlineDefinitionExternallyVisible while we're still parsing | ||||
// this function. | // this function. | ||||
FD->setWillHaveBody(); | if (!isa<CXXDeductionGuideDecl>(FD)) | ||||
FD->setWillHaveBody(); | |||||
// If we are instantiating a generic lambda call operator, push | // If we are instantiating a generic lambda call operator, push | ||||
// a LambdaScopeInfo onto the function stack. But use the information | // a LambdaScopeInfo onto the function stack. But use the information | ||||
Context not available. | |||||
if (FD) { | if (FD) { | ||||
FD->setBody(Body); | FD->setBody(Body); | ||||
FD->setWillHaveBody(false); | if (!isa<CXXDeductionGuideDecl>(FD)) | ||||
FD->setWillHaveBody(false); | |||||
if (getLangOpts().CPlusPlus14) { | if (getLangOpts().CPlusPlus14) { | ||||
if (!FD->isInvalidDecl() && Body && !FD->isDependentContext() && | if (!FD->isInvalidDecl() && Body && !FD->isDependentContext() && | ||||
Context not available. |