reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/Sema/SemaDecl.cpp
 3161   if (!Old) {
 3175       OldD = Old = cast<FunctionDecl>(Shadow->getTargetDecl());
 3185   if (Old->isInvalidDecl())
 3189   if (!getASTContext().canBuiltinBeRedeclared(Old)) {
 3190     Diag(New->getLocation(), diag::err_builtin_redeclare) << Old->getDeclName();
 3191     Diag(Old->getLocation(), diag::note_previous_builtin_declaration)
 3192         << Old << Old->getType();
 3192         << Old << Old->getType();
 3199       getNoteDiagForInvalidRedeclaration(Old, New);
 3205   if (!isa<CXXMethodDecl>(New) && !isa<CXXMethodDecl>(Old) &&
 3207       Old->hasExternalFormalLinkage() &&
 3209       !canRedefineFunction(Old, getLangOpts())) {
 3221       !Old->hasAttr<InternalLinkageAttr>()) {
 3224     notePreviousDefinition(Old, New->getLocation());
 3228   if (CheckRedeclarationModuleOwnership(New, Old))
 3232     bool OldOvl = Old->hasAttr<OverloadableAttr>();
 3233     if (OldOvl != New->hasAttr<OverloadableAttr>() && !Old->isImplicit()) {
 3243       const Decl *DiagOld = Old;
 3245         auto OldIter = llvm::find_if(Old->redecls(), [](const Decl *D) {
 3251         DiagOld = OldIter == Old->redecls_end() ? nullptr : *OldIter;
 3279   QualType OldQType = Context.getCanonicalType(Old->getType());
 3288     FunctionDecl *First = Old->getFirstDecl();
 3379   if (!Old->isInlined() && New->isInlined() &&
 3382       Old->isUsed(false) &&
 3383       !Old->isDefined() && !New->isThisDeclarationADefinition())
 3384     UndefinedButUsed.insert(std::make_pair(Old->getCanonicalDecl(),
 3390       Old->isInlined() && !Old->hasAttr<GNUInlineAttr>()) {
 3390       Old->isInlined() && !Old->hasAttr<GNUInlineAttr>()) {
 3391     UndefinedButUsed.erase(Old->getCanonicalDecl());
 3396   if (Old->getNumParams() > 0 && Old->getNumParams() == New->getNumParams() &&
 3396   if (Old->getNumParams() > 0 && Old->getNumParams() == New->getNumParams() &&
 3397       !hasIdenticalPassObjectSizeAttrs(Old, New)) {
 3400     Diag(OldLocation, PrevDiag) << Old << Old->getType();
 3400     Diag(OldLocation, PrevDiag) << Old << Old->getType();
 3415     if (CheckEquivalentExceptionSpec(Old, New))
 3417     OldQType = Context.getCanonicalType(Old->getType());
 3425     QualType OldDeclaredReturnType = Old->getDeclaredReturnType();
 3428         canFullyTypeCheckRedeclaration(New, Old, NewDeclaredReturnType,
 3442         Diag(OldLocation, PrevDiag) << Old << Old->getType()
 3442         Diag(OldLocation, PrevDiag) << Old << Old->getType()
 3443                                     << Old->getReturnTypeSourceRange();
 3455       AutoType *OldAT = Old->getReturnType()->getContainedAutoType();
 3468     const CXXMethodDecl *OldMethod = dyn_cast<CXXMethodDecl>(Old);
 3489           Diag(OldLocation, PrevDiag) << Old << Old->getType();
 3489           Diag(OldLocation, PrevDiag) << Old << Old->getType();
 3513         Diag(OldLocation, PrevDiag) << Old << Old->getType();
 3513         Diag(OldLocation, PrevDiag) << Old << Old->getType();
 3543     if (NRA && !Old->hasAttr<CXX11NoReturnAttr>()) {
 3545       Diag(Old->getFirstDecl()->getLocation(),
 3554     if (CDA && !Old->hasAttr<CarriesDependencyAttr>()) {
 3557       Diag(Old->getFirstDecl()->getLocation(),
 3576     if (haveIncompatibleLanguageLinkages(Old, New)) {
 3601       return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld);
 3606     if (!canFullyTypeCheckRedeclaration(New, Old, NewQType, OldQType))
 3646     return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld);
 3661       Old->hasPrototype() && !New->hasPrototype() &&
 3663       Old->getNumParams() == New->getNumParams()) {
 3667       = Old->getType()->getAs<FunctionProtoType>();
 3675     for (unsigned Idx = 0, End = Old->getNumParams();
 3677       ParmVarDecl *OldParm = Old->getParamDecl(Idx);
 3707       return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld);
 3719   if (Old->isImplicit() && (BuiltinID = Old->getBuiltinID())) {
 3719   if (Old->isImplicit() && (BuiltinID = Old->getBuiltinID())) {
 3725         << Old << Old->getType();
 3725         << Old << Old->getType();
 3745   Diag(OldLocation, PrevDiag) << Old << Old->getType();
 3745   Diag(OldLocation, PrevDiag) << Old << Old->getType();