reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
3163 if (New->getFriendObjectKind()) { 3164 Diag(New->getLocation(), diag::err_using_decl_friend); 3173 if (checkUsingShadowRedecl<FunctionDecl>(*this, Shadow, New)) 3177 Diag(New->getLocation(), diag::err_redefinition_different_kind) 3178 << New->getDeclName(); 3179 notePreviousDefinition(OldD, New->getLocation()); 3190 Diag(New->getLocation(), diag::err_builtin_redeclare) << Old->getDeclName(); 3199 getNoteDiagForInvalidRedeclaration(Old, New); 3205 if (!isa<CXXMethodDecl>(New) && !isa<CXXMethodDecl>(Old) && 3206 New->getStorageClass() == SC_Static && 3208 !New->getTemplateSpecializationInfo() && 3211 Diag(New->getLocation(), diag::ext_static_non_static) << New; 3211 Diag(New->getLocation(), diag::ext_static_non_static) << New; 3214 Diag(New->getLocation(), diag::err_static_non_static) << New; 3214 Diag(New->getLocation(), diag::err_static_non_static) << New; 3220 if (New->hasAttr<InternalLinkageAttr>() && 3222 Diag(New->getLocation(), diag::err_internal_linkage_redeclaration) 3223 << New->getDeclName(); 3224 notePreviousDefinition(Old, New->getLocation()); 3225 New->dropAttr<InternalLinkageAttr>(); 3228 if (CheckRedeclarationModuleOwnership(New, Old)) 3233 if (OldOvl != New->hasAttr<OverloadableAttr>() && !Old->isImplicit()) { 3234 Diag(New->getLocation(), diag::err_attribute_overloadable_mismatch) 3235 << New << OldOvl; 3260 New->addAttr(OverloadableAttr::CreateImplicit(Context)); 3262 New->dropAttr<OverloadableAttr>(); 3280 QualType NewQType = Context.getCanonicalType(New->getType()); 3292 bool NewCCExplicit = getCallingConvAttributedType(New->getType()); 3298 } else if (New->getBuiltinID()) { 3302 Diag(New->getLocation(), diag::warn_cconv_unsupported) 3310 Diag(New->getLocation(), diag::err_cconv_change) 3332 Diag(New->getLocation(), diag::err_regparm_mismatch) 3346 Diag(New->getLocation(), diag::err_function_attribute_mismatch) 3360 New->getAttr<AnyX86NoCallerSavedRegistersAttr>(); 3361 Diag(New->getLocation(), diag::err_function_attribute_mismatch) << Attr; 3371 const FunctionType *AdjustedType = New->getType()->getAs<FunctionType>(); 3373 New->setType(QualType(AdjustedType, 0)); 3374 NewQType = Context.getCanonicalType(New->getType()); 3379 if (!Old->isInlined() && New->isInlined() && 3380 !New->hasAttr<GNUInlineAttr>() && 3383 !Old->isDefined() && !New->isThisDeclarationADefinition()) 3389 if (New->hasAttr<GNUInlineAttr>() && 3396 if (Old->getNumParams() > 0 && Old->getNumParams() == New->getNumParams() && 3397 !hasIdenticalPassObjectSizeAttrs(Old, New)) { 3398 Diag(New->getLocation(), diag::err_different_pass_object_size_params) 3399 << New->getDeclName(); 3415 if (CheckEquivalentExceptionSpec(Old, New)) 3418 NewQType = Context.getCanonicalType(New->getType()); 3426 QualType NewDeclaredReturnType = New->getDeclaredReturnType(); 3428 canFullyTypeCheckRedeclaration(New, Old, NewDeclaredReturnType, 3436 if (New->isCXXClassMember() && New->isOutOfLine()) 3436 if (New->isCXXClassMember() && New->isOutOfLine()) 3437 Diag(New->getLocation(), diag::err_member_def_does_not_match_ret_type) 3438 << New << New->getReturnTypeSourceRange(); 3438 << New << New->getReturnTypeSourceRange(); 3440 Diag(New->getLocation(), diag::err_ovl_diff_return_type) 3441 << New->getReturnTypeSourceRange(); 3457 New->setType( 3458 SubstAutoType(New->getType(), 3469 CXXMethodDecl *NewMethod = dyn_cast<CXXMethodDecl>(New); 3488 Diag(New->getLocation(), diag::err_ovl_static_nonstatic_member); 3508 Diag(New->getLocation(), NewDiag); 3510 Diag(New->getLocation(), diag::err_member_redeclared_in_instantiation) 3511 << New << New->getType(); 3511 << New << New->getType(); 3527 << New << getSpecialMember(OldMethod); 3542 const CXX11NoReturnAttr *NRA = New->getAttr<CXX11NoReturnAttr>(); 3553 const CarriesDependencyAttr *CDA = New->getAttr<CarriesDependencyAttr>(); 3576 if (haveIncompatibleLanguageLinkages(Old, New)) { 3585 if (New->getFriendObjectKind() != Decl::FOK_None) { 3586 Diag(New->getLocation(), diag::ext_retained_language_linkage) << New; 3586 Diag(New->getLocation(), diag::ext_retained_language_linkage) << New; 3589 Diag(New->getLocation(), diag::err_different_language_linkage) << New; 3589 Diag(New->getLocation(), diag::err_different_language_linkage) << New; 3601 return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld); 3606 if (!canFullyTypeCheckRedeclaration(New, Old, NewQType, OldQType)) 3628 New->setType(NewQType); 3629 New->setHasInheritedPrototype(); 3634 ParmVarDecl *Param = ParmVarDecl::Create(Context, New, SourceLocation(), 3643 New->setParams(Params); 3646 return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld); 3661 Old->hasPrototype() && !New->hasPrototype() && 3662 New->getType()->getAs<FunctionProtoType>() && 3663 Old->getNumParams() == New->getNumParams()) { 3669 = New->getType()->getAs<FunctionProtoType>(); 3678 ParmVarDecl *NewParm = New->getParamDecl(Idx); 3705 New->setType(Context.getFunctionType(MergedReturn, ArgTypes, 3707 return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld); 3723 Diag(New->getLocation(), diag::warn_redecl_library_builtin) << New; 3723 Diag(New->getLocation(), diag::warn_redecl_library_builtin) << New; 3735 if (!New->getLexicalDeclContext()->isFunctionOrMethod()) 3736 New->getIdentifier()->revertBuiltin(); 3744 Diag(New->getLocation(), diag::err_conflicting_types) << New->getDeclName(); 3744 Diag(New->getLocation(), diag::err_conflicting_types) << New->getDeclName();