Bots, Bureaucrats, Interface administrators, smwadministrator, smwcurator, smweditor, Administrators
2,557
edits
Timo.stripf (talk | contribs) No edit summary |
Timo.stripf (talk | contribs) No edit summary |
||
Line 103: | Line 103: | ||
[h]=gb, | [h]=gb, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{zb, | [k]={{zb,1359,"/// getCharAndSizeSlow - Peek a single \'character\' from the specified buffer,\n/// get its size, and return it. This is tricky in several cases:\n/// 1. If currently at the start of a trigraph, we warn about the trigraph,\n/// then either return the trigraph (skipping 3 chars) or the \'?\',\n/// depending on whether trigraphs are enabled or not.\n/// 2. If this is an escaped newline (potentially with whitespace between\n/// the backslash and newline), implicitly skip the newline and return\n/// the char after it.\n///\n/// This handles the slow/uncommon case of the getCharAndSize method. Here we\n/// know that we can accumulate into Size, and that we have already incremented\n/// Ptr by Size bytes.\n///\n/// NOTE: When this method is updated, getCharAndSizeSlowNoWarn (below) should\n/// be updated to match.\nchar Lexer::getCharAndSizeSlow(const char *Ptr, unsigned &Size, Token *Tok) {\n Slash:\n // See if we have optional whitespace characters between the slash and\n // newline.\n if (unsigned EscapedNewLineSize = getEscapedNewLineSize(Ptr)) {\n // Warn if there was whitespace between the backslash and newline.\n if (Ptr[0] != \'\\n\' && Ptr[0] != \'\\r\' && Tok && !isLexingRawMode())\n Diag(Ptr, diag::backslash_newline_space);"},{zb,2511,"/// We have just read the // characters from input. Skip until we find the\n/// newline character that terminates the comment. Then update BufferPtr and\n/// return.\n///\n/// If we\'re in KeepCommentMode or any CommentHandler has inserted\n/// some tokens, this will store the first token and return true.\nbool Lexer::SkipLineComment(Token &Result, const char *CurPtr, bool &TokAtPhysicalStartOfLine) {\n while (true) {\n if (C != 0) {\n // If there was space between the backslash and newline, warn about it.\n if (HasSpace && !isLexingRawMode())\n Diag(EscapePtr, diag::backslash_newline_space);"},{zb,2699,"/// isBlockCommentEndOfEscapedNewLine - Return true if the specified newline\n/// character (either \\\\n or \\\\r) is part of an escaped newline sequence. Issue\n/// a diagnostic if so. We know that the newline is inside of a block comment.\nstatic bool isEndOfBlockCommentWithEscapedNewLine(const char *CurPtr, Lexer *L, bool Trigraphs) {\n // If there was space between the backslash and newline, warn about it.\n if (SpacePos && !L->isLexingRawMode())\n L->Diag(SpacePos, diag::backslash_newline_space);"}} | ||
}, | }, | ||
["err_32_bit_builtin_64_bit_tgt"]={ | ["err_32_bit_builtin_64_bit_tgt"]={ | ||
Line 115: | Line 115: | ||
[h]=o, | [h]=o, | ||
[d]={"51738f834ed9",1524773686,"[X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit..."}, | [d]={"51738f834ed9",1524773686,"[X86] Make __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 only available on 32-bit..."}, | ||
[k]={{s, | [k]={{s,5982,"bool Sema::CheckX86BuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n if (TT.getArch() != llvm::Triple::x86 && isX86_32Builtin(BuiltinID))\n return Diag(TheCall->getCallee()->getBeginLoc(), diag::err_32_bit_builtin_64_bit_tgt);"}} | ||
}, | }, | ||
["err_64_bit_builtin_32_bit_tgt"]={ | ["err_64_bit_builtin_32_bit_tgt"]={ | ||
Line 127: | Line 127: | ||
[h]=o, | [h]=o, | ||
[d]={"239eec732ebf",1428623896,"Add Clang support for remaining integer divide and permute instructions from ISA 2.06"}, | [d]={"239eec732ebf",1428623896,"Add Clang support for remaining integer divide and permute instructions from ISA 2.06"}, | ||
[k]={{s, | [k]={{s,4249,"bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n if (isPPC_64Builtin(BuiltinID) && !IsTarget64Bit)\n return Diag(TheCall->getBeginLoc(), diag::err_64_bit_builtin_32_bit_tgt) << TheCall->getSourceRange();"}} | ||
}, | }, | ||
["err__Pragma_malformed"]={ | ["err__Pragma_malformed"]={ | ||
Line 139: | Line 139: | ||
[h]=gb, | [h]=gb, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{Ib, | [k]={{Ib,219,"/// Handle_Pragma - Read a _Pragma directive, slice it up, process it, then\n/// return the first token after the directive. The _Pragma token has just\n/// been read into \'Tok\'.\nvoid Preprocessor::Handle_Pragma(Token &Tok) {\n if (Tok.isNot(tok::l_paren)) {\n Diag(PragmaLoc, diag::err__Pragma_malformed);"},{Ib,226,"/// Handle_Pragma - Read a _Pragma directive, slice it up, process it, then\n/// return the first token after the directive. The _Pragma token has just\n/// been read into \'Tok\'.\nvoid Preprocessor::Handle_Pragma(Token &Tok) {\n if (!tok::isStringLiteral(Tok.getKind())) {\n Diag(PragmaLoc, diag::err__Pragma_malformed);"},{Ib,254,"/// Handle_Pragma - Read a _Pragma directive, slice it up, process it, then\n/// return the first token after the directive. The _Pragma token has just\n/// been read into \'Tok\'.\nvoid Preprocessor::Handle_Pragma(Token &Tok) {\n if (Tok.isNot(tok::r_paren)) {\n Diag(PragmaLoc, diag::err__Pragma_malformed);"},{Ib,270,"/// Handle_Pragma - Read a _Pragma directive, slice it up, process it, then\n/// return the first token after the directive. The _Pragma token has just\n/// been read into \'Tok\'.\nvoid Preprocessor::Handle_Pragma(Token &Tok) {\n if (Invalid) {\n Diag(PragmaLoc, diag::err__Pragma_malformed);"},{Ib,370,"/// HandleMicrosoft__pragma - Like Handle_Pragma except the pragma text\n/// is not enclosed within a string literal.\nvoid Preprocessor::HandleMicrosoft__pragma(Token &Tok) {\n if (Tok.isNot(tok::l_paren)) {\n Diag(PragmaLoc, diag::err__Pragma_malformed);"}} | ||
}, | }, | ||
["err_abi_tag_on_redeclaration"]={ | ["err_abi_tag_on_redeclaration"]={ | ||
Line 151: | Line 151: | ||
[h]=o, | [h]=o, | ||
[d]={"bf17ecf59a9b",1457537453,"[GCC] PR23529 Sema part of attrbute abi_tag support"}, | [d]={"bf17ecf59a9b",1457537453,"[GCC] PR23529 Sema part of attrbute abi_tag support"}, | ||
[k]={{q, | [k]={{q,3263,"/// mergeDeclAttributes - Copy attributes from the Old decl to the New one.\nvoid Sema::mergeDeclAttributes(NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK) {\n // Re-declaration cannot add abi_tag\'s.\n if (const auto *NewAbiTagAttr = New->getAttr<AbiTagAttr>()) {\n if (const auto *OldAbiTagAttr = Old->getAttr<AbiTagAttr>()) {\n } else {\n Diag(NewAbiTagAttr->getLocation(), diag::err_abi_tag_on_redeclaration);"}} | ||
}, | }, | ||
["err_abstract_type_in_decl"]={ | ["err_abstract_type_in_decl"]={ | ||
Line 163: | Line 163: | ||
[h]=o, | [h]=o, | ||
[d]={"576cc6f725a8",1237753097,"Disallow abstract types where appropriate."}, | [d]={"576cc6f725a8",1237753097,"Disallow abstract types where appropriate."}, | ||
[k]={{s, | [k]={{s,16642,"/// CheckParmsForFunctionDef - Check that the parameters of the given\n/// function are appropriate for the definition of a function. This\n/// takes care of any checks that cannot be performed on the\n/// declaration itself, e.g., that the types of each of the function\n/// parameters are complete.\nbool Sema::CheckParmsForFunctionDef(ArrayRef<ParmVarDecl *> Parameters, bool CheckParameterNames) {\n for (ParmVarDecl *Param : Parameters) {\n if (!Param->isInvalidDecl() && (RequireCompleteType(Param->getLocation(), Param->getType(), diag::err_typecheck_decl_incomplete_type) || RequireNonAbstractType(Param->getBeginLoc(), Param->getOriginalType(), diag::err_abstract_type_in_decl, AbstractParamType))) {"},{q,13209,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n if (!VDecl->getType()->isDependentType()) {\n if (RequireNonAbstractType(VDecl->getLocation(), VDecl->getType(), diag::err_abstract_type_in_decl, AbstractVariableType))"},{q,13643,"/// ActOnInitializerError - Given that there was an error parsing an\n/// initializer for the given declaration, try to at least re-establish\n/// invariants such as whether a variable\'s type is either dependent or\n/// complete.\nvoid Sema::ActOnInitializerError(Decl *D) {\n if (RequireNonAbstractType(VD->getLocation(), Ty, diag::err_abstract_type_in_decl, AbstractVariableType)) {"},{q,13776,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n case VarDecl::DeclarationOnly:\n if (!Type->isDependentType() && !Var->isInvalidDecl() && RequireNonAbstractType(Var->getLocation(), Type, diag::err_abstract_type_in_decl, AbstractVariableType))"},{q,13868,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n if (RequireNonAbstractType(Var->getLocation(), Type, diag::err_abstract_type_in_decl, AbstractVariableType)) {"},{q,15350,"Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, SkipBodyInfo *SkipBody, FnBodyKind BodyKind) {\n if (!ResultType->isDependentType() && !ResultType->isVoidType() && !FD->isInvalidDecl() && BodyKind != FnBodyKind::Delete && (RequireCompleteType(FD->getLocation(), ResultType, diag::err_func_def_incomplete_result) || RequireNonAbstractType(FD->getLocation(), FD->getReturnType(), diag::err_abstract_type_in_decl, AbstractReturnType)))"},{q,18166,"/// Build a new FieldDecl and check its well-formedness.\n///\n/// This routine builds a new FieldDecl given the fields name, type,\n/// record, etc. \\p PrevDecl should refer to any previous declaration\n/// with the same name and in the same scope as the field to be\n/// created.\n///\n/// \\returns a new FieldDecl.\n///\n/// \\todo The Declarator argument is a hack. It will be removed once\nFieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D) {\n if (!InvalidDecl && RequireNonAbstractType(Loc, T, diag::err_abstract_type_in_decl, AbstractFieldType))"},{q,18876,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n if (FDTy->isFunctionType()) {\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n } else if (!FDTy->isDependentType() && RequireCompleteSizedType(FD->getLocation(), FD->getType(), diag::err_field_incomplete_or_sizeless)) {\n } else if (const RecordType *FDTTy = FDTy->getAs<RecordType>()) {\n if (isa<ObjCContainerDecl>(EnclosingDecl) && RequireNonAbstractType(FD->getLocation(), FD->getType(), diag::err_abstract_type_in_decl, AbstractIvarType)) {"},{v,6098,"#include \"clang/AST/TypeLocNodes.def\"\n CheckPolymorphic(PointerTypeLoc) CheckPolymorphic(ReferenceTypeLoc) CheckPolymorphic(MemberPointerTypeLoc) CheckPolymorphic(BlockPointerTypeLoc) CheckPolymorphic(AtomicTypeLoc)\n // It matched; do some magic.\n // FIXME: These should be at most warnings. See P0929R2, CWG1640, CWG1646.\n if (Sel == Sema::AbstractArrayType) {\n } else {\n Info.S.Diag(Ctx->getLocation(), diag::err_abstract_type_in_decl) << Sel << T << TL.getSourceRange();"},{v,16661,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n if (!Invalid && !ExDeclType->isDependentType() && RequireNonAbstractType(Loc, ExDeclType, diag::err_abstract_type_in_decl, AbstractVariableType))"},{P,1326,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n if (!Ivar) {\n if (RequireNonAbstractType(PropertyIvarLoc, PropertyIvarType, diag::err_abstract_type_in_decl, AbstractSynthesizedIvarType)) {"}} | ||
}, | }, | ||
["err_access"]={ | ["err_access"]={ | ||
Line 175: | Line 175: | ||
[h]=o, | [h]=o, | ||
[d]={qb,1268716967,sb}, | [d]={qb,1268716967,sb}, | ||
[k]={{S, | [k]={{S,1568,"Sema::AccessResult Sema::CheckUnresolvedLookupAccess(UnresolvedLookupExpr *E, DeclAccessPair Found) {\n Entity.setDiag(diag::err_access) << E->getSourceRange();"},{S,1587,"/// Perform access-control checking on a previously-unresolved member\n/// access which has now been resolved to a member.\nSema::AccessResult Sema::CheckUnresolvedMemberAccess(UnresolvedMemberExpr *E, DeclAccessPair Found) {\n Entity.setDiag(diag::err_access) << E->getSourceRange();"},{S,1741,"/// Checks access to an overloaded operator new or delete.\nSema::AccessResult Sema::CheckAllocationAccess(SourceLocation OpLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair Found, bool Diagnose) {\n if (Diagnose)\n Entity.setDiag(diag::err_access) << PlacementRange;"},{S,1790,"Sema::AccessResult Sema::CheckMemberOperatorAccess(SourceLocation OpLoc, Expr *ObjectExpr, const SourceRange &Range, DeclAccessPair Found) {\n Entity.setDiag(diag::err_access) << ObjectExpr->getSourceRange() << Range;"},{S,1863,"Sema::AccessResult Sema::CheckAddressOfMemberAccess(Expr *OvlExpr, DeclAccessPair Found) {\n Entity.setDiag(diag::err_access) << Ovl->getSourceRange();"},{S,1920,"/// Checks access to all the declarations in the given result set.\nvoid Sema::CheckLookupAccess(const LookupResult &R) {\n for (LookupResult::iterator I = R.begin(), E = R.end(); I != E; ++I) {\n if (I.getAccess() != AS_public) {\n Entity.setDiag(diag::err_access);"}} | ||
}, | }, | ||
["err_access_base_ctor"]={ | ["err_access_base_ctor"]={ | ||
Line 187: | Line 187: | ||
[h]=o, | [h]=o, | ||
[d]={"80f00ff95d3b",1305054494,"Re-do R131114 without breaking code."}, | [d]={"80f00ff95d3b",1305054494,"Re-do R131114 without breaking code."}, | ||
[k]={{S, | [k]={{S,1660,"/// Checks access to a constructor.\nSema::AccessResult Sema::CheckConstructorAccess(SourceLocation UseLoc, CXXConstructorDecl *Constructor, DeclAccessPair Found, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp) {\n case InitializedEntity::EK_Base:\n PD = PDiag(diag::err_access_base_ctor);"}} | ||
}, | }, | ||
["err_access_ctor"]={ | ["err_access_ctor"]={ | ||
Line 199: | Line 199: | ||
[h]=o, | [h]=o, | ||
[d]={qb,1268716967,sb}, | [d]={qb,1268716967,sb}, | ||
[k]={{S, | [k]={{S,1655,"/// Checks access to a constructor.\nSema::AccessResult Sema::CheckConstructorAccess(SourceLocation UseLoc, CXXConstructorDecl *Constructor, DeclAccessPair Found, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp) {\n default:\n PD = PDiag(IsCopyBindingRefToTemp ? diag::ext_rvalue_to_reference_access_ctor : diag::err_access_ctor);"}} | ||
}, | }, | ||
["err_access_decl"]={ | ["err_access_decl"]={ | ||
Line 211: | Line 211: | ||
[h]=o, | [h]=o, | ||
[d]={"f026b600992d",1371089537,"In C++11, promote access declaration diagnostic from warning to error. There"}, | [d]={"f026b600992d",1371089537,"In C++11, promote access declaration diagnostic from warning to error. There"}, | ||
[k]={{v, | [k]={{v,12068,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n // Warn about access declarations.\n if (UsingLoc.isInvalid()) {\n Diag(Name.getBeginLoc(), getLangOpts().CPlusPlus11 ? diag::err_access_decl : diag::warn_access_decl_deprecated) << FixItHint::CreateInsertion(SS.getRange().getBegin(), \"using \");"}} | ||
}, | }, | ||
["err_access_dtor"]={ | ["err_access_dtor"]={ | ||
Line 223: | Line 223: | ||
[h]=o, | [h]=o, | ||
[d]={"fa7781384ebb",1296575411,"Implement access checking for the \"delete\" operator. Fixes PR9050,"}, | [d]={"fa7781384ebb",1296575411,"Implement access checking for the \"delete\" operator. Fixes PR9050,"}, | ||
[k]={{x, | [k]={{x,3775,"/// ActOnCXXDelete - Parsed a C++ \'delete\' expression (C++ 5.3.5), as in:\n/// @code ::delete ptr; @endcode\n/// or\n/// @code delete [] ptr; @endcode\nExprResult Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *ExE) {\n if (!Ex.get()->isTypeDependent()) {\n if (PointeeRD) {\n if (CXXDestructorDecl *Dtor = LookupDestructor(PointeeRD)) {\n CheckDestructorAccess(Ex.get()->getExprLoc(), Dtor, PDiag(diag::err_access_dtor) << PointeeElem);"}} | ||
}, | }, | ||
["err_access_dtor_base"]={ | ["err_access_dtor_base"]={ | ||
Line 235: | Line 235: | ||
[h]=o, | [h]=o, | ||
[d]={qb,1268716967,sb}, | [d]={qb,1268716967,sb}, | ||
[k]={{v, | [k]={{v,5847,"void Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location, CXXRecordDecl *ClassDecl) {\n // Bases.\n for (const auto &Base : ClassDecl->bases()) {\n CheckDestructorAccess(Base.getBeginLoc(), Dtor, PDiag(diag::err_access_dtor_base) << Base.getType() << Base.getSourceRange(), Context.getTypeDeclType(ClassDecl));"}} | ||
}, | }, | ||
["err_access_dtor_exception"]={ | ["err_access_dtor_exception"]={ | ||
Line 247: | Line 247: | ||
[h]=o, | [h]=o, | ||
[d]={"442612c2853f",1278542113,"Do not use CXXZeroValueInitExpr for class types. Instead, use"}, | [d]={"442612c2853f",1278542113,"Do not use CXXZeroValueInitExpr for class types. Instead, use"}, | ||
[k]={{x, | [k]={{x,1033,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // If the class has a destructor, we must be able to call it.\n if (!RD->hasIrrelevantDestructor()) {\n if (CXXDestructorDecl *Destructor = LookupDestructor(RD)) {\n CheckDestructorAccess(E->getExprLoc(), Destructor, PDiag(diag::err_access_dtor_exception) << Ty);"}} | ||
}, | }, | ||
["err_access_dtor_field"]={ | ["err_access_dtor_field"]={ | ||
Line 259: | Line 259: | ||
[h]=o, | [h]=o, | ||
[d]={qb,1268716967,sb}, | [d]={qb,1268716967,sb}, | ||
[k]={{v, | [k]={{v,5797,"void Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location, CXXRecordDecl *ClassDecl) {\n // Non-static data members.\n for (auto *Field : ClassDecl->fields()) {\n CheckDestructorAccess(Field->getLocation(), Dtor, PDiag(diag::err_access_dtor_field) << Field->getDeclName() << FieldType);"}} | ||
}, | }, | ||
["err_access_dtor_ivar"]={ | ["err_access_dtor_ivar"]={ | ||
Line 271: | Line 271: | ||
[h]=o, | [h]=o, | ||
[d]={"527786ea3a6a",1274322262,"Various small fixes for construction/destruction of Objective-C++"}, | [d]={"527786ea3a6a",1274322262,"Various small fixes for construction/destruction of Objective-C++"}, | ||
[k]={{v, | [k]={{v,18491,"/// SetIvarInitializers - This routine builds initialization ASTs for the\n/// Objective-C implementation whose ivars need be initialized.\nvoid Sema::SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation) {\n if (ObjCInterfaceDecl *OID = ObjCImplementation->getClassInterface()) {\n for (unsigned i = 0; i < ivars.size(); i++) {\n // Be sure that the destructor is accessible and is marked as referenced.\n if (const RecordType *RecordTy = Context.getBaseElementType(Field->getType())->getAs<RecordType>()) {\n if (CXXDestructorDecl *Destructor = LookupDestructor(RD)) {\n CheckDestructorAccess(Field->getLocation(), Destructor, PDiag(diag::err_access_dtor_ivar) << Context.getBaseElementType(Field->getType()));"}} | ||
}, | }, | ||
["err_access_dtor_temp"]={ | ["err_access_dtor_temp"]={ | ||
Line 283: | Line 283: | ||
[h]=o, | [h]=o, | ||
[d]={"8e36d53e34be",1270600906,"Check access for the implicit calls to destructors that occur when we"}, | [d]={"8e36d53e34be",1270600906,"Check access for the implicit calls to destructors that occur when we"}, | ||
[k]={{x, | [k]={{x,7334,"ExprResult Sema::MaybeBindToTemporary(Expr *E) {\n if (Destructor) {\n CheckDestructorAccess(E->getExprLoc(), Destructor, PDiag(diag::err_access_dtor_temp) << E->getType());"},{x,7505,"/// Process the expression contained within a decltype. For such expressions,\n/// certain semantic checks on temporaries are delayed until this point, and\n/// are omitted for the \'topmost\' call in the decltype expression. If the\n/// topmost call bound a temporary, strip that temporary off the expression.\nExprResult Sema::ActOnDecltypeExpression(Expr *E) {\n // Now all relevant types are complete, check the destructors are accessible\n // and non-deleted, and annotate them on the temporaries.\n for (unsigned I = 0, N = ExprEvalContexts.back().DelayedDecltypeBinds.size(); I != N; ++I) {\n CheckDestructorAccess(Bind->getExprLoc(), Destructor, PDiag(diag::err_access_dtor_temp) << Bind->getType());"},{E,1932,"/// Check if the type of a class element has an accessible destructor, and marks\n/// it referenced. Returns true if we shouldn\'t form a reference to the\n/// destructor.\n///\n/// Aggregate initialization requires a class element\'s destructor be\n/// accessible per 11.6.1 [dcl.init.aggr]:\n///\n/// The destructor for each element of class type is potentially invoked\n/// (15.4 [class.dtor]) from the context where the aggregate initialization\n/// occurs.\nstatic bool checkDestructorReference(QualType ElementType, SourceLocation Loc, Sema &SemaRef) {\n SemaRef.CheckDestructorAccess(Loc, Destructor, SemaRef.PDiag(diag::err_access_dtor_temp) << ElementType);"},{E,8929,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n for (step_iterator Step = step_begin(), StepEnd = step_end(); Step != StepEnd; ++Step) {\n case SK_UserConversion: {\n if (shouldBindAsTemporary(Entity))\n else if (CreatedObject && shouldDestroyEntity(Entity)) {\n if (const RecordType *Record = T->getAs<RecordType>()) {\n S.CheckDestructorAccess(CurInit.get()->getBeginLoc(), Destructor, S.PDiag(diag::err_access_dtor_temp) << T);"}} | ||
}, | }, | ||
["err_access_dtor_var"]={ | ["err_access_dtor_var"]={ | ||
Line 295: | Line 295: | ||
[h]=o, | [h]=o, | ||
[d]={qb,1268716967,sb}, | [d]={qb,1268716967,sb}, | ||
[k]={{v, | [k]={{v,15869,"void Sema::FinalizeVarWithDestructor(VarDecl *VD, const RecordType *Record) {\n // If this is an array, we\'ll require the destructor during initialization, so\n // we can skip over this. We still want to emit exit-time destructor warnings\n // though.\n if (!VD->getType()->isArrayType()) {\n CheckDestructorAccess(VD->getLocation(), Destructor, PDiag(diag::err_access_dtor_var) << VD->getDeclName() << VD->getType());"}} | ||
}, | }, | ||
["err_access_dtor_vbase"]={ | ["err_access_dtor_vbase"]={ | ||
Line 307: | Line 307: | ||
[h]=o, | [h]=o, | ||
[d]={qb,1268716967,sb}, | [d]={qb,1268716967,sb}, | ||
[k]={{v, | [k]={{v,5885,"void Sema::MarkVirtualBaseDestructorsReferenced(SourceLocation Location, CXXRecordDecl *ClassDecl, llvm::SmallPtrSetImpl<const RecordType *> *DirectVirtualBases) {\n // Virtual bases.\n for (const auto &VBase : ClassDecl->vbases()) {\n if (CheckDestructorAccess(ClassDecl->getLocation(), Dtor, PDiag(diag::err_access_dtor_vbase) << Context.getTypeDeclType(ClassDecl) << VBase.getType(), Context.getTypeDeclType(ClassDecl)) == AR_accessible) {"},{v,5891,"void Sema::MarkVirtualBaseDestructorsReferenced(SourceLocation Location, CXXRecordDecl *ClassDecl, llvm::SmallPtrSetImpl<const RecordType *> *DirectVirtualBases) {\n // Virtual bases.\n for (const auto &VBase : ClassDecl->vbases()) {\n if (CheckDestructorAccess(ClassDecl->getLocation(), Dtor, PDiag(diag::err_access_dtor_vbase) << Context.getTypeDeclType(ClassDecl) << VBase.getType(), Context.getTypeDeclType(ClassDecl)) == AR_accessible) {\n CheckDerivedToBaseConversion(Context.getTypeDeclType(ClassDecl), VBase.getType(), diag::err_access_dtor_vbase, 0, ClassDecl->getLocation(), SourceRange(), DeclarationName(), nullptr);"}} | ||
}, | }, | ||
["err_access_field_ctor"]={ | ["err_access_field_ctor"]={ | ||
Line 319: | Line 319: | ||
[h]=o, | [h]=o, | ||
[d]={"80f00ff95d3b",1305054494,"Re-do R131114 without breaking code."}, | [d]={"80f00ff95d3b",1305054494,"Re-do R131114 without breaking code."}, | ||
[k]={{S, | [k]={{S,1668,"/// Checks access to a constructor.\nSema::AccessResult Sema::CheckConstructorAccess(SourceLocation UseLoc, CXXConstructorDecl *Constructor, DeclAccessPair Found, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp) {\n case InitializedEntity::EK_ParenAggInitMember: {\n PD = PDiag(diag::err_access_field_ctor);"}} | ||
}, | }, | ||
["err_access_friend_function"]={ | ["err_access_friend_function"]={ | ||
Line 331: | Line 331: | ||
[h]=o, | [h]=o, | ||
[d]={"a0a96895501e",1344568535,"Check access to friend declarations. There\'s a number of different"}, | [d]={"a0a96895501e",1344568535,"Check access to friend declarations. There\'s a number of different"}, | ||
[k]={{S, | [k]={{S,1836,"/// Checks access to the target of a friend declaration.\nSema::AccessResult Sema::CheckFriendAccess(NamedDecl *target) {\n entity.setDiag(diag::err_access_friend_function) << (method->getQualifier() ? method->getQualifierLoc().getSourceRange() : method->getNameInfo().getSourceRange());"}} | ||
}, | }, | ||
["err_access_lambda_capture"]={ | ["err_access_lambda_capture"]={ | ||
Line 343: | Line 343: | ||
[h]="Lambda Issue", | [h]="Lambda Issue", | ||
[d]={"19666fb1aa7d",1329325046,"Introduce a new initialization entity for lambda captures, and"}, | [d]={"19666fb1aa7d",1329325046,"Introduce a new initialization entity for lambda captures, and"}, | ||
[k]={{S, | [k]={{S,1675,"/// Checks access to a constructor.\nSema::AccessResult Sema::CheckConstructorAccess(SourceLocation UseLoc, CXXConstructorDecl *Constructor, DeclAccessPair Found, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp) {\n case InitializedEntity::EK_LambdaCapture: {\n PD = PDiag(diag::err_access_lambda_capture);"}} | ||
}, | }, | ||
["err_access_specifier_interface"]={ | ["err_access_specifier_interface"]={ | ||
Line 355: | Line 355: | ||
[h]=B, | [h]=B, | ||
[d]={"db632ac004ae",1348558359,"Fix for r163013 regression and further __interface enhancement."}, | [d]={"db632ac004ae",1348558359,"Fix for r163013 regression and further __interface enhancement."}, | ||
[k]={{K, | [k]={{K,3403,"Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclarationWithPragmas(AccessSpecifier &AS, ParsedAttributes &AccessAttrs, DeclSpec::TST TagType, Decl *TagDecl) {\n case tok::kw_protected: {\n // The Microsoft extension __interface does not permit non-public\n // access specifiers.\n if (TagType == DeclSpec::TST_interface && AS != AS_public) {\n Diag(ASLoc, diag::err_access_specifier_interface) << (AS == AS_protected);"}} | ||
}, | }, | ||
["err_addr_ovl_ambiguous"]={ | ["err_addr_ovl_ambiguous"]={ | ||
Line 367: | Line 367: | ||
[h]=o, | [h]=o, | ||
[d]={"b257e4fff8a9",1247096032,"Implement the simple form of overload resolution used when taking the"}, | [d]={"b257e4fff8a9",1247096032,"Implement the simple form of overload resolution used when taking the"}, | ||
[k]={{Q, | [k]={{Q,12563,"// A helper class to help with address of function resolution\n// - allows us to avoid passing around all those ugly parameters\nclass AddressOfFunctionResolver {\n void EliminateAllExceptMostSpecializedTemplate() {\n UnresolvedSetIterator Result = S.getMostSpecialized(MatchesCopy.begin(), MatchesCopy.end(), FailedCandidates, SourceExpr->getBeginLoc(), S.PDiag(), S.PDiag(diag::err_addr_ovl_ambiguous) << Matches[0].second->getDeclName(), S.PDiag(diag::note_ovl_candidate) << (unsigned)oc_function << (unsigned)ocs_described_template, Complain, TargetFunctionType);"},{Q,12651,"// A helper class to help with address of function resolution\n// - allows us to avoid passing around all those ugly parameters\nclass AddressOfFunctionResolver {\n void ComplainMultipleMatchesFound() const {\n S.Diag(OvlExpr->getBeginLoc(), diag::err_addr_ovl_ambiguous) << OvlExpr->getName() << OvlExpr->getSourceRange();"},{Q,12905,"/// Given an expression that refers to an overloaded function, try to\n/// resolve that overloaded function expression down to a single function.\n///\n/// This routine can only resolve template-ids that refer to a single function\n/// template, where that template-id refers to a single template whose template\n/// arguments are either provided by the template-id or have defaults,\n/// as described in C++0x [temp.arg.explicit]p3.\n///\n/// If no template-ids are found, no diagnostics are emitted and NULL is\n/// returned.\nFunctionDecl *Sema::ResolveSingleFunctionTemplateSpecialization(OverloadExpr *ovl, bool Complain, DeclAccessPair *FoundResult, TemplateSpecCandidateSet *FailedTSC) {\n for (UnresolvedSetIterator I = ovl->decls_begin(), E = ovl->decls_end(); I != E; ++I) {\n // Multiple matches; we can\'t resolve to a single declaration.\n if (Matched) {\n if (Complain) {\n Diag(ovl->getExprLoc(), diag::err_addr_ovl_ambiguous) << ovl->getName();"}} | ||
}, | }, | ||
["err_addr_ovl_no_qualifier"]={ | ["err_addr_ovl_no_qualifier"]={ | ||
Line 379: | Line 379: | ||
[h]=o, | [h]=o, | ||
[d]={"24d189484b44",1282690359,"When trying to resolve the address of an overloaded expression,"}, | [d]={"24d189484b44",1282690359,"When trying to resolve the address of an overloaded expression,"}, | ||
[k]={{Q, | [k]={{Q,12630,"// A helper class to help with address of function resolution\n// - allows us to avoid passing around all those ugly parameters\nclass AddressOfFunctionResolver {\n void ComplainIsInvalidFormOfPointerToMemberFunction() const {\n S.Diag(OvlExpr->getNameLoc(), diag::err_addr_ovl_no_qualifier) << TargetType << OvlExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_addr_ovl_no_viable"]={ | ["err_addr_ovl_no_viable"]={ | ||
Line 391: | Line 391: | ||
[h]=o, | [h]=o, | ||
[d]={"064fdb2fe844",1271286681,"Always diagnose and complain about problems in"}, | [d]={"064fdb2fe844",1271286681,"Always diagnose and complain about problems in"}, | ||
[k]={{Q, | [k]={{Q,12599,"// A helper class to help with address of function resolution\n// - allows us to avoid passing around all those ugly parameters\nclass AddressOfFunctionResolver {\n void ComplainNoMatchesFound() const {\n S.Diag(OvlExpr->getBeginLoc(), diag::err_addr_ovl_no_viable) << OvlExpr->getName() << TargetFunctionType << OvlExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_addr_ovl_not_func_ptrref"]={ | ["err_addr_ovl_not_func_ptrref"]={ | ||
Line 403: | Line 403: | ||
[h]=o, | [h]=o, | ||
[d]={"064fdb2fe844",1271286681,"Always diagnose and complain about problems in"}, | [d]={"064fdb2fe844",1271286681,"Always diagnose and complain about problems in"}, | ||
[k]={{Q, | [k]={{Q,12645,"// A helper class to help with address of function resolution\n// - allows us to avoid passing around all those ugly parameters\nclass AddressOfFunctionResolver {\n void ComplainOfInvalidConversion() const { S.Diag(OvlExpr->getBeginLoc(), diag::err_addr_ovl_not_func_ptrref) << OvlExpr->getName() << TargetType; }"}} | ||
}, | }, | ||
["err_address_of_function_with_pass_object_size_params"]={ | ["err_address_of_function_with_pass_object_size_params"]={ | ||
Line 415: | Line 415: | ||
[h]=o, | [h]=o, | ||
[d]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang."}, | [d]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang."}, | ||
[k]={{Q, | [k]={{Q,10609,"/// Returns true if we can take the address of the function.\n///\n/// \\param Complain - If true, we\'ll emit a diagnostic\n/// \\param InOverloadResolution - For the purposes of emitting a diagnostic, are\n/// we in overload resolution?\n/// \\param Loc - The location of the statement we\'re complaining about. Ignored\n/// if we\'re not complaining, or if we\'re in overload resolution.\nstatic bool checkAddressOfFunctionIsAvailable(Sema &S, const FunctionDecl *FD, bool Complain, bool InOverloadResolution, SourceLocation Loc) {\n if (Complain) {\n if (InOverloadResolution)\n else\n S.Diag(Loc, diag::err_address_of_function_with_pass_object_size_params) << FD << ParamNo;"}} | ||
}, | }, | ||
["err_address_of_label_outside_fn"]={ | ["err_address_of_label_outside_fn"]={ | ||
Line 427: | Line 427: | ||
[h]=B, | [h]=B, | ||
[d]={"9ba479bd2c2c",1298063799,"fix rdar://9024687, a crash on invalid that we used to silently ignore."}, | [d]={"9ba479bd2c2c",1298063799,"fix rdar://9024687, a crash on invalid that we used to silently ignore."}, | ||
[k]={{kb, | [k]={{kb,1460,"#include \"clang/Basic/TransformTypeTraits.def\"\n case tok::ampamp: { // unary-expression: \'&&\' identifier\n if (getCurScope()->getFnParent() == nullptr)\n return ExprError(Diag(Tok, diag::err_address_of_label_outside_fn));"}} | ||
}, | }, | ||
["err_address_space_mismatch_templ_inst"]={ | ["err_address_space_mismatch_templ_inst"]={ | ||
Line 450: | Line 450: | ||
[h]=o, | [h]=o, | ||
[d]={"39d1a0973db9",1302896780,"Forbid the use of C++ new/delete to allocate/free objects within an"}, | [d]={"39d1a0973db9",1302896780,"Forbid the use of C++ new/delete to allocate/free objects within an"}, | ||
[k]={{x, | [k]={{x,3677,"/// ActOnCXXDelete - Parsed a C++ \'delete\' expression (C++ 5.3.5), as in:\n/// @code ::delete ptr; @endcode\n/// or\n/// @code delete [] ptr; @endcode\nExprResult Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *ExE) {\n if (!Ex.get()->isTypeDependent()) {\n if (Pointee.getAddressSpace() != LangAS::Default && !getLangOpts().OpenCLCPlusPlus)\n return Diag(Ex.get()->getBeginLoc(), diag::err_address_space_qualified_delete) << Pointee.getUnqualifiedType() << Pointee.getQualifiers().getAddressSpaceAttributePrintValue();"}} | ||
}, | }, | ||
["err_address_space_qualified_new"]={ | ["err_address_space_qualified_new"]={ | ||
Line 462: | Line 462: | ||
[h]=o, | [h]=o, | ||
[d]={"39d1a0973db9",1302896780,"Forbid the use of C++ new/delete to allocate/free objects within an"}, | [d]={"39d1a0973db9",1302896780,"Forbid the use of C++ new/delete to allocate/free objects within an"}, | ||
[k]={{x, | [k]={{x,2475,"/// Checks that a type is suitable as the allocated type\n/// in a new-expression.\nbool Sema::CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R) {\n // C++ 5.3.4p1: \"[The] type shall be a complete object type, but not an\n // abstract class type or array thereof.\n if (AllocType->isFunctionType())\n else if (AllocType->isReferenceType())\n else if (!AllocType->isDependentType() && RequireCompleteSizedType(Loc, AllocType, diag::err_new_incomplete_or_sizeless_type, R))\n else if (RequireNonAbstractType(Loc, AllocType, diag::err_allocation_of_abstract_type))\n else if (AllocType->isVariablyModifiedType())\n else if (AllocType.getAddressSpace() != LangAS::Default && !getLangOpts().OpenCLCPlusPlus)\n return Diag(Loc, diag::err_address_space_qualified_new) << AllocType.getUnqualifiedType() << AllocType.getQualifiers().getAddressSpaceAttributePrintValue();"}} | ||
}, | }, | ||
["err_addrof_function_constraints_not_satisfied"]={ | ["err_addrof_function_constraints_not_satisfied"]={ | ||
Line 474: | Line 474: | ||
[h]=o, | [h]=o, | ||
[d]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension."}, | [d]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension."}, | ||
[k]={{Q, | [k]={{Q,10587,"/// Returns true if we can take the address of the function.\n///\n/// \\param Complain - If true, we\'ll emit a diagnostic\n/// \\param InOverloadResolution - For the purposes of emitting a diagnostic, are\n/// we in overload resolution?\n/// \\param Loc - The location of the statement we\'re complaining about. Ignored\n/// if we\'re not complaining, or if we\'re in overload resolution.\nstatic bool checkAddressOfFunctionIsAvailable(Sema &S, const FunctionDecl *FD, bool Complain, bool InOverloadResolution, SourceLocation Loc) {\n if (FD->getTrailingRequiresClause()) {\n if (!Satisfaction.IsSatisfied) {\n if (Complain) {\n if (InOverloadResolution) {\n } else\n S.Diag(Loc, diag::err_addrof_function_constraints_not_satisfied) << FD;"}} | ||
}, | }, | ||
["err_addrof_function_disabled_by_enable_if_attr"]={ | ["err_addrof_function_disabled_by_enable_if_attr"]={ | ||
Line 486: | Line 486: | ||
[h]=o, | [h]=o, | ||
[d]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang."}, | [d]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang."}, | ||
[k]={{Q, | [k]={{Q,10563,"/// Returns true if we can take the address of the function.\n///\n/// \\param Complain - If true, we\'ll emit a diagnostic\n/// \\param InOverloadResolution - For the purposes of emitting a diagnostic, are\n/// we in overload resolution?\n/// \\param Loc - The location of the statement we\'re complaining about. Ignored\n/// if we\'re not complaining, or if we\'re in overload resolution.\nstatic bool checkAddressOfFunctionIsAvailable(Sema &S, const FunctionDecl *FD, bool Complain, bool InOverloadResolution, SourceLocation Loc) {\n if (!isFunctionAlwaysEnabled(S.Context, FD)) {\n if (Complain) {\n if (InOverloadResolution)\n else\n S.Diag(Loc, diag::err_addrof_function_disabled_by_enable_if_attr) << FD;"}} | ||
}, | }, | ||
["err_aix_attr_unsupported_tls_model"]={ | ["err_aix_attr_unsupported_tls_model"]={ | ||
Line 498: | Line 498: | ||
[h]=o, | [h]=o, | ||
[d]={Lb,1615397021,Kb}, | [d]={Lb,1615397021,Kb}, | ||
[k]={{p, | [k]={{p,2044,"static void handleTLSModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.Context.getTargetInfo().getTriple().isOSAIX() && Model != \"global-dynamic\" && Model != \"local-exec\") {\n S.Diag(LiteralLoc, diag::err_aix_attr_unsupported_tls_model) << Model;"}} | ||
}, | }, | ||
["err_aix_unsupported_tls_model"]={ | ["err_aix_unsupported_tls_model"]={ | ||
Line 510: | Line 510: | ||
[h]=a, | [h]=a, | ||
[d]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths."}, | [d]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths."}, | ||
[k]={{O, | [k]={{O,1892,"#include \"clang/Driver/Options.inc\"\n if (Arg *A = Args.getLastArg(OPT_ftlsmodel_EQ)) {\n if (T.isOSAIX()) {\n if (Name != \"global-dynamic\" && Name != \"local-exec\")\n Diags.Report(diag::err_aix_unsupported_tls_model) << Name;"}} | ||
}, | }, | ||
["err_alias_after_tentative"]={ | ["err_alias_after_tentative"]={ | ||
Line 522: | Line 522: | ||
[h]=o, | [h]=o, | ||
[d]={"d53ffa0a70d8",1382477943,"Treat aliases as definitions."}, | [d]={"d53ffa0a70d8",1382477943,"Treat aliases as definitions."}, | ||
[k]={{q, | [k]={{q,3041,"/// checkNewAttributesAfterDef - If we already have a definition, check that\n/// there are no new attributes in this declaration.\nstatic void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {\n for (unsigned I = 0, E = NewAttributes.size(); I != E;) {\n if (isa<AliasAttr>(NewAttribute) || isa<IFuncAttr>(NewAttribute)) {\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(New)) {\n } else {\n unsigned Diag = cast<VarDecl>(Def)->isThisDeclarationADefinition() == VarDecl::TentativeDefinition ? diag::err_alias_after_tentative : diag::err_redefinition;"}} | ||
}, | }, | ||
["err_alias_declaration_not_identifier"]={ | ["err_alias_declaration_not_identifier"]={ | ||
Line 534: | Line 534: | ||
[h]=B, | [h]=B, | ||
[d]={"dda56e4b4a9c",1302877477,"Support for C++11 (non-template) alias declarations."}, | [d]={"dda56e4b4a9c",1302877477,"Support for C++11 (non-template) alias declarations."}, | ||
[k]={{K, | [k]={{K,905,"Decl *Parser::ParseAliasDeclarationAfterDeclarator(const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, UsingDeclarator &D, SourceLocation &DeclEnd, AccessSpecifier AS, ParsedAttributes &Attrs, Decl **OwnedType) {\n // Name must be an identifier.\n if (D.Name.getKind() != UnqualifiedIdKind::IK_Identifier) {\n Diag(D.Name.StartLocation, diag::err_alias_declaration_not_identifier);"},{K,910,"Decl *Parser::ParseAliasDeclarationAfterDeclarator(const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, UsingDeclarator &D, SourceLocation &DeclEnd, AccessSpecifier AS, ParsedAttributes &Attrs, Decl **OwnedType) {\n // Name must be an identifier.\n if (D.Name.getKind() != UnqualifiedIdKind::IK_Identifier) {\n } else if (D.TypenameLoc.isValid())\n Diag(D.TypenameLoc, diag::err_alias_declaration_not_identifier) << FixItHint::CreateRemoval(SourceRange(D.TypenameLoc, D.SS.isNotEmpty() ? D.SS.getEndLoc() : D.TypenameLoc));"},{K,915,"Decl *Parser::ParseAliasDeclarationAfterDeclarator(const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, UsingDeclarator &D, SourceLocation &DeclEnd, AccessSpecifier AS, ParsedAttributes &Attrs, Decl **OwnedType) {\n // Name must be an identifier.\n if (D.Name.getKind() != UnqualifiedIdKind::IK_Identifier) {\n } else if (D.TypenameLoc.isValid())\n else if (D.SS.isNotEmpty())\n Diag(D.SS.getBeginLoc(), diag::err_alias_declaration_not_identifier) << FixItHint::CreateRemoval(D.SS.getRange());"}} | ||
}, | }, | ||
["err_alias_declaration_pack_expansion"]={ | ["err_alias_declaration_pack_expansion"]={ | ||
Line 546: | Line 546: | ||
[h]=B, | [h]=B, | ||
[d]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations."}, | [d]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations."}, | ||
[k]={{K, | [k]={{K,918,"Decl *Parser::ParseAliasDeclarationAfterDeclarator(const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, UsingDeclarator &D, SourceLocation &DeclEnd, AccessSpecifier AS, ParsedAttributes &Attrs, Decl **OwnedType) {\n if (D.EllipsisLoc.isValid())\n Diag(D.EllipsisLoc, diag::err_alias_declaration_pack_expansion) << FixItHint::CreateRemoval(SourceRange(D.EllipsisLoc));"}} | ||
}, | }, | ||
["err_alias_declaration_specialization"]={ | ["err_alias_declaration_specialization"]={ | ||
Line 558: | Line 558: | ||
[h]=B, | [h]=B, | ||
[d]={"3f1b5d077b7e",1304632627,"Implement support for C++0x alias templates."}, | [d]={"3f1b5d077b7e",1304632627,"Implement support for C++0x alias templates."}, | ||
[k]={{K, | [k]={{K,897,"Decl *Parser::ParseAliasDeclarationAfterDeclarator(const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, UsingDeclarator &D, SourceLocation &DeclEnd, AccessSpecifier AS, ParsedAttributes &Attrs, Decl **OwnedType) {\n if (SpecKind != -1) {\n Diag(Range.getBegin(), diag::err_alias_declaration_specialization) << SpecKind << Range;"}} | ||
}, | }, | ||
["err_alias_is_definition"]={ | ["err_alias_is_definition"]={ | ||
Line 570: | Line 570: | ||
[h]=o, | [h]=o, | ||
[d]={"2dc814664385",1421658028,"Sema: Variable definitions cannot be __attribute__((alias))"}, | [d]={"2dc814664385",1421658028,"Sema: Variable definitions cannot be __attribute__((alias))"}, | ||
[k]={{q, | [k]={{q,6968,"static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) {\n if (auto *VD = dyn_cast<VarDecl>(&ND)) {\n if (VD->hasInit()) {\n if (const auto *Attr = VD->getAttr<AliasAttr>()) {\n S.Diag(Attr->getLocation(), diag::err_alias_is_definition) << VD << 0;"},{q,15265,"Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, SkipBodyInfo *SkipBody, FnBodyKind BodyKind) {\n // Check for defining attributes before the check for redefinition.\n if (const auto *Attr = FD->getAttr<AliasAttr>()) {\n Diag(Attr->getLocation(), diag::err_alias_is_definition) << FD << 0;"},{q,15270,"Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, SkipBodyInfo *SkipBody, FnBodyKind BodyKind) {\n if (const auto *Attr = FD->getAttr<IFuncAttr>()) {\n Diag(Attr->getLocation(), diag::err_alias_is_definition) << FD << 1;"},{p,1980,"static void handleIFuncAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (FD->isThisDeclarationADefinition()) {\n S.Diag(AL.getLoc(), diag::err_alias_is_definition) << FD << 1;"},{p,2003,"static void handleAliasAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Aliases should be on declarations, not definitions.\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n if (FD->isThisDeclarationADefinition()) {\n S.Diag(AL.getLoc(), diag::err_alias_is_definition) << FD << 0;"},{p,2009,"static void handleAliasAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Aliases should be on declarations, not definitions.\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n } else {\n if (VD->isThisDeclarationADefinition() && VD->isExternallyVisible()) {\n S.Diag(AL.getLoc(), diag::err_alias_is_definition) << VD << 0;"},{p,7662,"static void handleWebAssemblyExportNameAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (FD->isThisDeclarationADefinition()) {\n S.Diag(D->getLocation(), diag::err_alias_is_definition) << FD << 0;"}} | ||
}, | }, | ||
["err_alias_not_supported_on_darwin"]={ | ["err_alias_not_supported_on_darwin"]={ | ||
Line 582: | Line 582: | ||
[h]=o, | [h]=o, | ||
[d]={"0017c5fa92ad",1291735403,"Fix PR8720 by printing an error message with a substring that the gcc testsuite searches for."}, | [d]={"0017c5fa92ad",1291735403,"Fix PR8720 by printing an error message with a substring that the gcc testsuite searches for."}, | ||
[k]={{p, | [k]={{p,1993,"static void handleAliasAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.Context.getTargetInfo().getTriple().isOSDarwin()) {\n S.Diag(AL.getLoc(), diag::err_alias_not_supported_on_darwin);"}} | ||
}, | }, | ||
["err_alias_not_supported_on_nvptx"]={ | ["err_alias_not_supported_on_nvptx"]={ | ||
Line 594: | Line 594: | ||
[h]=o, | [h]=o, | ||
[d]={"a8f0254bc1a4",1453584490,"[CUDA] Reject the alias attribute in CUDA device code."}, | [d]={"a8f0254bc1a4",1453584490,"[CUDA] Reject the alias attribute in CUDA device code."}, | ||
[k]={{p, | [k]={{p,1997,"static void handleAliasAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.Context.getTargetInfo().getTriple().isNVPTX()) {\n S.Diag(AL.getLoc(), diag::err_alias_not_supported_on_nvptx);"}} | ||
}, | }, | ||
["err_alias_template_extra_headers"]={ | ["err_alias_template_extra_headers"]={ | ||
Line 606: | Line 606: | ||
[h]=o, | [h]=o, | ||
[d]={"3f1b5d077b7e",1304632627,"Implement support for C++0x alias templates."}, | [d]={"3f1b5d077b7e",1304632627,"Implement support for C++0x alias templates."}, | ||
[k]={{v, | [k]={{v,13299,"Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS, MultiTemplateParamsArg TemplateParamLists, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec) {\n if (TemplateParamLists.size()) {\n if (TemplateParamLists.size() != 1) {\n Diag(UsingLoc, diag::err_alias_template_extra_headers) << SourceRange(TemplateParamLists[1]->getTemplateLoc(), TemplateParamLists[TemplateParamLists.size() - 1]->getRAngleLoc());"}} | ||
}, | }, | ||
["err_alias_to_undefined"]={ | ["err_alias_to_undefined"]={ | ||
Line 618: | Line 618: | ||
[h]=a, | [h]=a, | ||
[d]={"0fad0d772433",1382449866,"This patch causes clang to reject alias attributes that point to undefined"}, | [d]={"0fad0d772433",1382449866,"This patch causes clang to reject alias attributes that point to undefined"}, | ||
[k]={{"clang/lib/CodeGen/CodeGenModule.cpp", | [k]={{"clang/lib/CodeGen/CodeGenModule.cpp",578,"static bool checkAliasedGlobal(DiagnosticsEngine &Diags, SourceLocation Location, bool IsIFunc, const llvm::GlobalValue *Alias, const llvm::GlobalValue *&GV, const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames, SourceRange AliasRange) {\n if (GV->isDeclaration()) {\n Diags.Report(Location, diag::err_alias_to_undefined) << IsIFunc << IsIFunc;"},{"clang/lib/CodeGen/CodeGenModule.cpp",602,"static bool checkAliasedGlobal(DiagnosticsEngine &Diags, SourceLocation Location, bool IsIFunc, const llvm::GlobalValue *Alias, const llvm::GlobalValue *&GV, const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames, SourceRange AliasRange) {\n if (IsIFunc) {\n if (!F) {\n Diags.Report(Location, diag::err_alias_to_undefined) << IsIFunc << IsIFunc;"}} | ||
}, | }, | ||
["err_align_value_attribute_argument_not_int"]={ | ["err_align_value_attribute_argument_not_int"]={ | ||
Line 630: | Line 630: | ||
[h]=o, | [h]=o, | ||
[d]={"1b0d24e03abf",1412284885,"Initial support for the align_value attribute"}, | [d]={"1b0d24e03abf",1412284885,"Initial support for the align_value attribute"}, | ||
[k]={{p, | [k]={{p,4331,"void Sema::AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E) {\n if (!E->isValueDependent()) {\n ExprResult ICE = VerifyIntegerConstantExpression(E, &Alignment, diag::err_align_value_attribute_argument_not_int);"}} | ||
}, | }, | ||
["err_alignas_attribute_wrong_decl_type"]={ | ["err_alignas_attribute_wrong_decl_type"]={ | ||
Line 642: | Line 642: | ||
[h]=o, | [h]=o, | ||
[d]={"1dba27cd4942",1359450129,"Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas."}, | [d]={"1dba27cd4942",1359450129,"Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas."}, | ||
[k]={{p, | [k]={{p,4435,"/// Perform checking of type validity\n///\n/// C++11 [dcl.align]p1:\n/// An alignment-specifier may be applied to a variable or to a class\n/// data member, but it shall not be applied to a bit-field, a function\n/// parameter, the formal parameter of a catch clause, or a variable\n/// declared with the register storage class specifier. An\n/// alignment-specifier may also be applied to the declaration of a class\n/// or enumeration type.\n/// CWG 2354:\n/// CWG agreed to remove permission for alignas to be applied to\n/// enumerations.\n/// C11 6.7.5/2:\n/// An alignment attribute shall not be specified in a declaration of\n/// a typedef, or a bit-field, or a function, or a parameter, or an\n/// object declared with the register storage-class specifier.\nstatic bool validateAlignasAppliedType(Sema &S, Decl *D, const AlignedAttr &Attr, SourceLocation AttrLoc) {\n if (DiagKind != -1) {\n return S.Diag(AttrLoc, diag::err_alignas_attribute_wrong_decl_type) << &Attr << DiagKind;"}} | ||
}, | }, | ||
["err_alignas_mismatch"]={ | ["err_alignas_mismatch"]={ | ||
Line 654: | Line 654: | ||
[h]=o, | [h]=o, | ||
[d]={"bc8caaf05f09",1361508939,"Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of"}, | [d]={"bc8caaf05f09",1361508939,"Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of"}, | ||
[k]={{q, | [k]={{q,2841,"/// Merge alignment attributes from \\p Old to \\p New, taking into account the\n/// special semantics of C11\'s _Alignas specifier and C++11\'s alignas attribute.\n///\n/// \\return \\c true if any attributes were added to \\p New.\nstatic bool mergeAlignedAttrs(Sema &S, NamedDecl *New, Decl *Old) {\n if (OldAlignasAttr && NewAlignasAttr && OldAlign != NewAlign) {\n if (OldAlign != NewAlign) {\n S.Diag(NewAlignasAttr->getLocation(), diag::err_alignas_mismatch) << (unsigned)S.Context.toCharUnitsFromBits(OldAlign).getQuantity() << (unsigned)S.Context.toCharUnitsFromBits(NewAlign).getQuantity();"}} | ||
}, | }, | ||
["err_alignas_missing_on_definition"]={ | ["err_alignas_missing_on_definition"]={ | ||
Line 666: | Line 666: | ||
[h]=o, | [h]=o, | ||
[d]={"bc8caaf05f09",1361508939,"Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of"}, | [d]={"bc8caaf05f09",1361508939,"Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of"}, | ||
[k]={{q, | [k]={{q,2857,"/// Merge alignment attributes from \\p Old to \\p New, taking into account the\n/// special semantics of C11\'s _Alignas specifier and C++11\'s alignas attribute.\n///\n/// \\return \\c true if any attributes were added to \\p New.\nstatic bool mergeAlignedAttrs(Sema &S, NamedDecl *New, Decl *Old) {\n if (OldAlignasAttr && !NewAlignasAttr && isAttributeTargetADefinition(New)) {\n S.Diag(New->getLocation(), diag::err_alignas_missing_on_definition) << OldAlignasAttr;"},{q,3085,"/// checkNewAttributesAfterDef - If we already have a definition, check that\n/// there are no new attributes in this declaration.\nstatic void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {\n for (unsigned I = 0, E = NewAttributes.size(); I != E;) {\n if (isa<C11NoReturnAttr>(NewAttribute)) {\n } else if (isa<UuidAttr>(NewAttribute)) {\n } else if (const AlignedAttr *AA = dyn_cast<AlignedAttr>(NewAttribute)) {\n if (AA->isAlignas()) {\n S.Diag(Def->getLocation(), diag::err_alignas_missing_on_definition) << AA;"}} | ||
}, | }, | ||
["err_alignas_underaligned"]={ | ["err_alignas_underaligned"]={ | ||
Line 678: | Line 678: | ||
[h]=o, | [h]=o, | ||
[d]={"848e1f19605a",1359706328,"Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign."}, | [d]={"848e1f19605a",1359706328,"Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign."}, | ||
[k]={{p, | [k]={{p,4616,"void Sema::CheckAlignasUnderalignment(Decl *D) {\n if (Align && DiagTy->isSizelessType()) {\n } else if (AlignasAttr && Align) {\n if (NaturalAlign > RequestedAlign)\n Diag(AlignasAttr->getLocation(), diag::err_alignas_underaligned) << DiagTy << (unsigned)NaturalAlign.getQuantity();"}} | ||
}, | }, | ||
["err_aligned_allocation_unavailable"]={ | ["err_aligned_allocation_unavailable"]={ | ||
Line 690: | Line 690: | ||
[h]=o, | [h]=o, | ||
[d]={"e5015abf185b",1533337957,"[Preprocessor] Allow libc++ to detect when aligned allocation is unavailable."}, | [d]={"e5015abf185b",1533337957,"[Preprocessor] Allow libc++ to detect when aligned allocation is unavailable."}, | ||
[k]={{x, | [k]={{x,1968,"// Emit a diagnostic if an aligned allocation/deallocation function that is not\n// implemented in the standard library is selected.\nvoid Sema::diagnoseUnavailableAlignedAllocation(const FunctionDecl &FD, SourceLocation Loc) {\n if (isUnavailableAlignedAllocationFunction(FD)) {\n Diag(Loc, diag::err_aligned_allocation_unavailable) << IsDelete << FD.getType().getAsString() << OSName << OSVersion.getAsString() << OSVersion.empty();"}} | ||
}, | }, | ||
["err_aligned_attribute_argument_not_int"]={ | ["err_aligned_attribute_argument_not_int"]={ | ||
Line 702: | Line 702: | ||
[h]=o, | [h]=o, | ||
[d]={"e2b3744890f6",1336171132,"Move Sema::VerifyIntegerConstantExpression() and"}, | [d]={"e2b3744890f6",1336171132,"Move Sema::VerifyIntegerConstantExpression() and"}, | ||
[k]={{p, | [k]={{p,4473,"void Sema::AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion) {\n ExprResult ICE = VerifyIntegerConstantExpression(E, &Alignment, diag::err_aligned_attribute_argument_not_int);"}} | ||
}, | }, | ||
["err_alignment_dependent_typedef_name"]={ | ["err_alignment_dependent_typedef_name"]={ | ||
Line 714: | Line 714: | ||
[h]=o, | [h]=o, | ||
[d]={"26a1e0ef760a",1428374229,"[Sema] Don\'t permit dependent alignments on non-dependent typedef-names"}, | [d]={"26a1e0ef760a",1428374229,"[Sema] Don\'t permit dependent alignments on non-dependent typedef-names"}, | ||
[k]={{p, | [k]={{p,4457,"void Sema::AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion) {\n if (E->isValueDependent()) {\n // We can\'t support a dependent alignment on a non-dependent type,\n // because we have no way to model that a type is \"alignment-dependent\"\n // but not dependent in any other way.\n if (const auto *TND = dyn_cast<TypedefNameDecl>(D)) {\n if (!TND->getUnderlyingType()->isDependentType()) {\n Diag(AttrLoc, diag::err_alignment_dependent_typedef_name) << E->getSourceRange();"},{p,4547,"void Sema::AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, TypeSourceInfo *TS, bool IsPackExpansion) {\n if (TS->getType()->isDependentType()) {\n // We can\'t support a dependent alignment on a non-dependent type,\n // because we have no way to model that a type is \"type-dependent\"\n // but not dependent in any other way.\n if (const auto *TND = dyn_cast<TypedefNameDecl>(D)) {\n if (!TND->getUnderlyingType()->isDependentType()) {\n Diag(AttrLoc, diag::err_alignment_dependent_typedef_name) << TS->getTypeLoc().getSourceRange();"}} | ||
}, | }, | ||
["err_alignment_not_power_of_two"]={ | ["err_alignment_not_power_of_two"]={ | ||
Line 726: | Line 726: | ||
[h]=o, | [h]=o, | ||
[d]={"bcc06085a894",1410130694,"Add __builtin_assume and __builtin_assume_aligned using @llvm.assume."}, | [d]={"bcc06085a894",1410130694,"Add __builtin_assume and __builtin_assume_aligned using @llvm.assume."}, | ||
[k]={{s, | [k]={{s,339,"/// Check that the value argument for __builtin_is_aligned(value, alignment) and\n/// __builtin_aligned_{up,down}(value, alignment) is an integer or a pointer\n/// type (but not a function pointer) and that the alignment is a power-of-two.\nstatic bool SemaBuiltinAlignment(Sema &S, CallExpr *TheCall, unsigned ID) {\n // We can\'t check validity of alignment if it is value dependent.\n if (!AlignOp->isValueDependent() && AlignOp->EvaluateAsInt(AlignResult, S.Context, Expr::SE_AllowSideEffects)) {\n if (!AlignValue.isPowerOf2()) {\n S.Diag(AlignOp->getExprLoc(), diag::err_alignment_not_power_of_two);"},{s,8631,"/// Handle __builtin_alloca_with_align. This is declared\n/// as (size_t, size_t) where the second size_t must be a power of 2 greater\n/// than 8.\nbool Sema::SemaBuiltinAllocaWithAlign(CallExpr *TheCall) {\n // We can\'t check the value of a dependent argument.\n if (!Arg->isTypeDependent() && !Arg->isValueDependent()) {\n if (!Result.isPowerOf2())\n return Diag(TheCall->getBeginLoc(), diag::err_alignment_not_power_of_two) << Arg->getSourceRange();"},{s,8674,"/// Handle __builtin_assume_aligned. This is declared\n/// as (const void*, size_t, ...) and can take one optional constant int arg.\nbool Sema::SemaBuiltinAssumeAligned(CallExpr *TheCall) {\n // We can\'t check the value of a dependent argument.\n if (!SecondArg->isValueDependent()) {\n if (!Result.isPowerOf2())\n return Diag(TheCall->getBeginLoc(), diag::err_alignment_not_power_of_two) << SecondArg->getSourceRange();"},{p,1711,"void Sema::AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE) {\n if (!E->isValueDependent()) {\n if (!I->isPowerOf2()) {\n Diag(AttrLoc, diag::err_alignment_not_power_of_two) << E->getSourceRange();"},{p,4336,"void Sema::AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E) {\n if (!E->isValueDependent()) {\n if (!Alignment.isPowerOf2()) {\n Diag(AttrLoc, diag::err_alignment_not_power_of_two) << E->getSourceRange();"},{p,4494,"void Sema::AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion) {\n // C++11 [dcl.align]p2:\n // -- if the constant expression evaluates to zero, the alignment\n // specifier shall have no effect\n // C11 6.7.5p6:\n // An alignment specification of zero has no effect.\n if (!(TmpAttr.isAlignas() && !Alignment)) {\n if (!llvm::isPowerOf2_64(AlignVal)) {\n Diag(AttrLoc, diag::err_alignment_not_power_of_two) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_alignment_too_big"]={ | ["err_alignment_too_big"]={ | ||
Line 738: | Line 738: | ||
[h]=o, | [h]=o, | ||
[d]={"5116993f8ea7",1477892268,"Add support for __builtin_alloca_with_align"}, | [d]={"5116993f8ea7",1477892268,"Add support for __builtin_alloca_with_align"}, | ||
[k]={{s, | [k]={{s,334,"/// Check that the value argument for __builtin_is_aligned(value, alignment) and\n/// __builtin_aligned_{up,down}(value, alignment) is an integer or a pointer\n/// type (but not a function pointer) and that the alignment is a power-of-two.\nstatic bool SemaBuiltinAlignment(Sema &S, CallExpr *TheCall, unsigned ID) {\n // We can\'t check validity of alignment if it is value dependent.\n if (!AlignOp->isValueDependent() && AlignOp->EvaluateAsInt(AlignResult, S.Context, Expr::SE_AllowSideEffects)) {\n if (llvm::APSInt::compareValues(AlignValue, MaxValue) > 0) {\n S.Diag(AlignOp->getExprLoc(), diag::err_alignment_too_big) << toString(MaxValue, 10);"},{s,8639,"/// Handle __builtin_alloca_with_align. This is declared\n/// as (size_t, size_t) where the second size_t must be a power of 2 greater\n/// than 8.\nbool Sema::SemaBuiltinAllocaWithAlign(CallExpr *TheCall) {\n // We can\'t check the value of a dependent argument.\n if (!Arg->isTypeDependent() && !Arg->isValueDependent()) {\n if (Result > std::numeric_limits<int32_t>::max())\n return Diag(TheCall->getBeginLoc(), diag::err_alignment_too_big) << std::numeric_limits<int32_t>::max() << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_alignment_too_small"]={ | ["err_alignment_too_small"]={ | ||
Line 750: | Line 750: | ||
[h]=o, | [h]=o, | ||
[d]={"5116993f8ea7",1477892268,"Add support for __builtin_alloca_with_align"}, | [d]={"5116993f8ea7",1477892268,"Add support for __builtin_alloca_with_align"}, | ||
[k]={{s, | [k]={{s,330,"/// Check that the value argument for __builtin_is_aligned(value, alignment) and\n/// __builtin_aligned_{up,down}(value, alignment) is an integer or a pointer\n/// type (but not a function pointer) and that the alignment is a power-of-two.\nstatic bool SemaBuiltinAlignment(Sema &S, CallExpr *TheCall, unsigned ID) {\n // We can\'t check validity of alignment if it is value dependent.\n if (!AlignOp->isValueDependent() && AlignOp->EvaluateAsInt(AlignResult, S.Context, Expr::SE_AllowSideEffects)) {\n if (AlignValue < 1) {\n S.Diag(AlignOp->getExprLoc(), diag::err_alignment_too_small) << 1;"},{s,8635,"/// Handle __builtin_alloca_with_align. This is declared\n/// as (size_t, size_t) where the second size_t must be a power of 2 greater\n/// than 8.\nbool Sema::SemaBuiltinAllocaWithAlign(CallExpr *TheCall) {\n // We can\'t check the value of a dependent argument.\n if (!Arg->isTypeDependent() && !Arg->isValueDependent()) {\n if (Result < Context.getCharWidth())\n return Diag(TheCall->getBeginLoc(), diag::err_alignment_too_small) << (unsigned)Context.getCharWidth() << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_alignof_member_of_incomplete_type"]={ | ["err_alignof_member_of_incomplete_type"]={ | ||
Line 762: | Line 762: | ||
[h]=o, | [h]=o, | ||
[d]={"768439eb2e7e",1367826034,"Require the containing type to be complete when we see"}, | [d]={"768439eb2e7e",1367826034,"Require the containing type to be complete when we see"}, | ||
[k]={{y, | [k]={{y,4687,"static bool CheckAlignOfExpr(Sema &S, Expr *E, UnaryExprOrTypeTrait ExprKind) {\n // If it\'s a field, require the containing struct to have a\n // complete definition so that we can compute the layout.\n //\n // This can happen in C++11 onwards, either by naming the member\n // in a way that is not transformed into a member access expression\n // (in an unevaluated operand, for instance), or by naming the member\n // in a trailing-return-type.\n //\n // For the record, since __alignof__ on expressions is a GCC\n // extension, GCC seems to permit this but always gives the\n // nonsensical answer 0.\n //\n // We don\'t really need the layout here --- we could instead just\n // directly check for all the appropriate alignment-lowing\n // attributes --- but that would require duplicating a lot of\n // logic that just isn\'t worth duplicating for such a marginal\n // use-case.\n if (FieldDecl *FD = dyn_cast_or_null<FieldDecl>(D)) {\n // Fast path this check, since we at least know the record has a\n // definition if we can find a member of it.\n if (!FD->getParent()->isCompleteDefinition()) {\n S.Diag(E->getExprLoc(), diag::err_alignof_member_of_incomplete_type) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_allocation_of_abstract_type"]={ | ["err_allocation_of_abstract_type"]={ | ||
Line 774: | Line 774: | ||
[h]=o, | [h]=o, | ||
[d]={"0d5ca29b7836",1237830550,"It\'s an error to try to allocate an abstract object using new."}, | [d]={"0d5ca29b7836",1237830550,"It\'s an error to try to allocate an abstract object using new."}, | ||
[k]={{w, | [k]={{w,1885,"/// TryStaticImplicitCast - Tests whether a conversion according to C++ 5.2.9p2\n/// is valid:\n///\n/// An expression e can be explicitly converted to a type T using a\n/// @c static_cast if the declaration \"T t(e);\" is well-formed [...].\nTryCastResult TryStaticImplicitCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, Sema::CheckedConversionKind CCK, SourceRange OpRange, unsigned &msg, CastKind &Kind, bool ListInitialization) {\n if (DestType->isRecordType()) {\n if (Self.RequireCompleteType(OpRange.getBegin(), DestType, diag::err_bad_cast_incomplete) || Self.RequireNonAbstractType(OpRange.getBegin(), DestType, diag::err_allocation_of_abstract_type)) {"},{x,2468,"/// Checks that a type is suitable as the allocated type\n/// in a new-expression.\nbool Sema::CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R) {\n else if (RequireNonAbstractType(Loc, AllocType, diag::err_allocation_of_abstract_type))"},{x,4120,"static ExprResult BuildCXXCastArgument(Sema &S, SourceLocation CastLoc, QualType Ty, CastKind Kind, CXXMethodDecl *Method, DeclAccessPair FoundDecl, bool HadMultipleCandidates, Expr *From) {\n case CK_ConstructorConversion: {\n if (S.RequireNonAbstractType(CastLoc, Ty, diag::err_allocation_of_abstract_type))"},{E,8719,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // C++ [class.abstract]p2:\n // no objects of an abstract class can be created except as subobjects\n // of a class derived from it\n auto checkAbstractType = [&](QualType T) -> bool {\n return S.RequireNonAbstractType(Kind.getLocation(), T, diag::err_allocation_of_abstract_type);"}} | ||
}, | }, | ||
["err_altivec_empty_initializer"]={ | ["err_altivec_empty_initializer"]={ | ||
Line 786: | Line 786: | ||
[h]=o, | [h]=o, | ||
[d]={"a96114ed087b",1249840544,"AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);"}, | [d]={"a96114ed087b",1249840544,"AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);"}, | ||
[k]={{y, | [k]={{y,8445,"ExprResult Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr) {\n if ((getLangOpts().AltiVec || getLangOpts().ZVector || getLangOpts().OpenCL) && castType->isVectorType() && (PE || PLE)) {\n if (PLE && PLE->getNumExprs() == 0) {\n Diag(PLE->getExprLoc(), diag::err_altivec_empty_initializer);"}} | ||
}, | }, | ||
["err_ambiguous_base_to_derived_cast"]={ | ["err_ambiguous_base_to_derived_cast"]={ | ||
Line 798: | Line 798: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,1714,"/// TryStaticDowncast - Common functionality of TryStaticReferenceDowncast and\n/// TryStaticPointerDowncast. Tests whether a static downcast from SrcType to\n/// DestType is possible and allowed.\nTryCastResult TryStaticDowncast(Sema &Self, CanQualType SrcType, CanQualType DestType, bool CStyle, SourceRange OpRange, QualType OrigSrcType, QualType OrigDestType, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath) {\n if (Paths.isAmbiguous(SrcType.getUnqualifiedType())) {\n Self.Diag(OpRange.getBegin(), diag::err_ambiguous_base_to_derived_cast) << QualType(SrcType).getUnqualifiedType() << QualType(DestType).getUnqualifiedType() << PathDisplayStr << OpRange;"}} | ||
}, | }, | ||
["err_ambiguous_delete_operand"]={ | ["err_ambiguous_delete_operand"]={ | ||
Line 810: | Line 810: | ||
[h]=o, | [h]=o, | ||
[d]={"c34c179f4bcd",1253035307,"Perform overload resolution when selecting a pointer conversion"}, | [d]={"c34c179f4bcd",1253035307,"Perform overload resolution when selecting a pointer conversion"}, | ||
[k]={{x, | [k]={{x,3646,"/// ActOnCXXDelete - Parsed a C++ \'delete\' expression (C++ 5.3.5), as in:\n/// @code ::delete ptr; @endcode\n/// or\n/// @code delete [] ptr; @endcode\nExprResult Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *ExE) {\n if (!Ex.get()->isTypeDependent()) {\n class DeleteConverter : public ContextualImplicitConverter {\n SemaDiagnosticBuilder diagnoseAmbiguous(Sema &S, SourceLocation Loc, QualType T) override { return S.Diag(Loc, diag::err_ambiguous_delete_operand) << T; }"}} | ||
}, | }, | ||
["err_ambiguous_derived_to_base_conv"]={ | ["err_ambiguous_derived_to_base_conv"]={ | ||
Line 822: | Line 822: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,3167,"bool Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath, bool IgnoreAccess) { return CheckDerivedToBaseConversion(Derived, Base, diag::err_upcast_to_inaccessible_base, diag::err_ambiguous_derived_to_base_conv, Loc, Range, DeclarationName(), BasePath, IgnoreAccess); }"},{Q,3147,"/// CheckPointerConversion - Check the pointer conversion from the\n/// expression From to the type ToType. This routine checks for\n/// ambiguous or inaccessible derived-to-base pointer\n/// conversions for which IsPointerConversion has already returned\n/// true. It returns true and produces a diagnostic if there was an\n/// error, or returns false otherwise.\nbool Sema::CheckPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose) {\n if (const PointerType *ToPtrType = ToType->getAs<PointerType>()) {\n if (const PointerType *FromPtrType = FromType->getAs<PointerType>()) {\n if (FromPointeeType->isRecordType() && ToPointeeType->isRecordType() && !Context.hasSameUnqualifiedType(FromPointeeType, ToPointeeType)) {\n if (Diagnose) {\n AmbiguousID = diag::err_ambiguous_derived_to_base_conv;"}} | ||
}, | }, | ||
["err_ambiguous_destructor"]={ | ["err_ambiguous_destructor"]={ | ||
Line 834: | Line 834: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{q, | [k]={{q,18540,"/// [class.dtor]p4:\n/// At the end of the definition of a class, overload resolution is\n/// performed among the prospective destructors declared in that class with\n/// an empty argument list to select the destructor for the class, also\n/// known as the selected destructor.\n///\n/// We do the overload resolution here, then mark the selected constructor in the AST.\n/// Later CXXRecordDecl::getDestructor() will return the selected constructor.\nstatic void ComputeSelectedDestructor(Sema &S, CXXRecordDecl *Record) {\n case OR_Ambiguous:\n Msg = diag::err_ambiguous_destructor;"}} | ||
}, | }, | ||
["err_ambiguous_inherited_constructor"]={ | ["err_ambiguous_inherited_constructor"]={ | ||
Line 846: | Line 846: | ||
[h]=o, | [h]=o, | ||
[d]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:"}, | [d]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:"}, | ||
[k]={{v, | [k]={{v,7302,"class Sema::InheritedConstructorInfo {\n InheritedConstructorInfo(Sema &S, SourceLocation UseLoc, ConstructorUsingShadowDecl *Shadow) : S(S), UseLoc(UseLoc) {\n // Find the set of such base class subobjects and check that there\'s a\n // unique constructed subobject.\n for (auto *D : Shadow->redecls()) {\n // [class.inhctor.init]p2:\n // If the constructor was inherited from multiple base class subobjects\n // of type B, the program is ill-formed.\n if (!ConstructedBase) {\n } else if (ConstructedBase != DConstructedBase && !Shadow->isInvalidDecl()) {\n if (!DiagnosedMultipleConstructedBases) {\n S.Diag(UseLoc, diag::err_ambiguous_inherited_constructor) << Shadow->getTargetDecl();"}} | ||
}, | }, | ||
["err_ambiguous_member_multiple_subobject_types"]={ | ["err_ambiguous_member_multiple_subobject_types"]={ | ||
Line 858: | Line 858: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{"clang/lib/Sema/SemaLookup.cpp", | [k]={{"clang/lib/Sema/SemaLookup.cpp",2812,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n case LookupResult::AmbiguousBaseSubobjectTypes: {\n Diag(NameLoc, diag::err_ambiguous_member_multiple_subobject_types) << Name << LookupRange;"}} | ||
}, | }, | ||
["err_ambiguous_member_multiple_subobjects"]={ | ["err_ambiguous_member_multiple_subobjects"]={ | ||
Line 870: | Line 870: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{"clang/lib/Sema/SemaLookup.cpp", | [k]={{"clang/lib/Sema/SemaLookup.cpp",2798,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n case LookupResult::AmbiguousBaseSubobjects: {\n Diag(NameLoc, diag::err_ambiguous_member_multiple_subobjects) << Name << SubobjectType << getAmbiguousPathsDisplayString(*Paths) << LookupRange;"}} | ||
}, | }, | ||
["err_ambiguous_memptr_conv"]={ | ["err_ambiguous_memptr_conv"]={ | ||
Line 882: | Line 882: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,1816,"/// TryStaticMemberPointerUpcast - Tests whether a conversion according to\n/// C++ 5.2.9p9 is valid:\n///\n/// An rvalue of type \"pointer to member of D of type cv1 T\" can be\n/// converted to an rvalue of type \"pointer to member of B of type cv2 T\",\n/// where B is a base class of D [...].\n///\nTryCastResult TryStaticMemberPointerUpcast(Sema &Self, ExprResult &SrcExpr, QualType SrcType, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath) {\n // B is a base of D. But is it an allowed base? If not, it\'s a hard error.\n if (Paths.isAmbiguous(Self.Context.getCanonicalType(DestClass))) {\n Self.Diag(OpRange.getBegin(), diag::err_ambiguous_memptr_conv) << 1 << SrcClass << DestClass << PathDisplayStr << OpRange;"},{Q,3278,"/// CheckMemberPointerConversion - Check the member pointer conversion from the\n/// expression From to the type ToType. This routine checks for ambiguous or\n/// virtual or inaccessible base-to-derived member pointer conversions\n/// for which IsMemberPointerConversion has already returned true. It returns\n/// true and produces a diagnostic if there was an error, or returns false\n/// otherwise.\nbool Sema::CheckMemberPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess) {\n if (Paths.isAmbiguous(Context.getCanonicalType(FromClass).getUnqualifiedType())) {\n Diag(From->getExprLoc(), diag::err_ambiguous_memptr_conv) << 0 << FromClass << ToClass << PathDisplayStr << From->getSourceRange();"}} | ||
}, | }, | ||
["err_ambiguous_reference"]={ | ["err_ambiguous_reference"]={ | ||
Line 894: | Line 894: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{"clang/lib/Sema/SemaLookup.cpp", | [k]={{"clang/lib/Sema/SemaLookup.cpp",2863,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n case LookupResult::AmbiguousReference: {\n Diag(NameLoc, diag::err_ambiguous_reference) << Name << LookupRange;"}} | ||
}, | }, | ||
["err_ambiguous_suitable_delete_member_function_found"]={ | ["err_ambiguous_suitable_delete_member_function_found"]={ | ||
Line 906: | Line 906: | ||
[h]=o, | [h]=o, | ||
[d]={"66a8759400a9",1280881886,"Look through using declarations when deciding whether to use an operator"}, | [d]={"66a8759400a9",1280881886,"Look through using declarations when deciding whether to use an operator"}, | ||
[k]={{x, | [k]={{x,3300,"bool Sema::FindDeallocationFunction(SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose, bool WantSize, bool WantAligned) {\n // We found multiple suitable operators; complain about the ambiguity.\n // FIXME: The standard doesn\'t say to do this; it appears that the intent\n // is that this should never happen.\n if (!Matches.empty()) {\n if (Diagnose) {\n Diag(StartLoc, diag::err_ambiguous_suitable_delete_member_function_found) << Name << RD;"}} | ||
}, | }, | ||
["err_ambiguous_tag_hiding"]={ | ["err_ambiguous_tag_hiding"]={ | ||
Line 918: | Line 918: | ||
[h]=o, | [h]=o, | ||
[d]={"6538c930503a",1255153699,"Qualified lookup through using declarations. Diagnose a new type of ambiguity."}, | [d]={"6538c930503a",1255153699,"Qualified lookup through using declarations. Diagnose a new type of ambiguity."}, | ||
[k]={{"clang/lib/Sema/SemaLookup.cpp", | [k]={{"clang/lib/Sema/SemaLookup.cpp",2838,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n case LookupResult::AmbiguousTagHiding: {\n Diag(NameLoc, diag::err_ambiguous_tag_hiding) << Name << LookupRange;"}} | ||
}, | }, | ||
["err_analyzer_checker_incompatible_analyzer_option"]={ | ["err_analyzer_checker_incompatible_analyzer_option"]={ | ||
Line 930: | Line 930: | ||
[h]=a, | [h]=a, | ||
[d]={tb,1534346725,rb}, | [d]={tb,1534346725,rb}, | ||
[k]={{"clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp", | [k]={{"clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp",1064,"bool ento::shouldRegisterContainerModeling(const CheckerManager &mgr) {\n if (!mgr.getAnalyzerOptions().ShouldAggressivelySimplifyBinaryOperation) {\n mgr.getASTContext().getDiagnostics().Report(diag::err_analyzer_checker_incompatible_analyzer_option) << \"aggressive-binary-operation-simplification\""}} | ||
}, | }, | ||
["err_analyzer_checker_option_invalid_input"]={ | ["err_analyzer_checker_option_invalid_input"]={ | ||
Line 942: | Line 942: | ||
[h]=a, | [h]=a, | ||
[d]={tb,1534346725,rb}, | [d]={tb,1534346725,rb}, | ||
[k]={{"clang/lib/StaticAnalyzer/Core/CheckerManager.cpp", | [k]={{"clang/lib/StaticAnalyzer/Core/CheckerManager.cpp",66,"void CheckerManager::reportInvalidCheckerOptionValue(const CheckerBase *C, StringRef OptionName, StringRef ExpectedValueDesc) const { getDiagnostics().Report(diag::err_analyzer_checker_option_invalid_input) << (llvm::Twine() + C->getTagDescription() + \":\" + OptionName).str() << ExpectedValueDesc; }"},{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",366,"/// Insert the checker/package option to AnalyzerOptions\' config table, and\n/// validate it, if the user supplied it on the command line.\nstatic void insertAndValidate(StringRef FullName, const CmdLineOption &Option, AnalyzerOptions &AnOpts, DiagnosticsEngine &Diags) {\n if (Option.OptionType == \"bool\") {\n if (SuppliedValue != \"true\" && SuppliedValue != \"false\") {\n if (AnOpts.ShouldEmitErrorsOnInvalidConfigValue) {\n Diags.Report(diag::err_analyzer_checker_option_invalid_input) << FullOption << \"a boolean value\";"},{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",380,"/// Insert the checker/package option to AnalyzerOptions\' config table, and\n/// validate it, if the user supplied it on the command line.\nstatic void insertAndValidate(StringRef FullName, const CmdLineOption &Option, AnalyzerOptions &AnOpts, DiagnosticsEngine &Diags) {\n if (Option.OptionType == \"int\") {\n if (HasFailed) {\n if (AnOpts.ShouldEmitErrorsOnInvalidConfigValue) {\n Diags.Report(diag::err_analyzer_checker_option_invalid_input) << FullOption << \"an integer value\";"}} | ||
}, | }, | ||
["err_analyzer_checker_option_unknown"]={ | ["err_analyzer_checker_option_unknown"]={ | ||
Line 954: | Line 954: | ||
[h]=a, | [h]=a, | ||
[d]={tb,1534346725,rb}, | [d]={tb,1534346725,rb}, | ||
[k]={{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp", | [k]={{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",484,"static void isOptionContainedIn(const CmdLineOptionList &OptionList, StringRef SuppliedChecker, StringRef SuppliedOption, const AnalyzerOptions &AnOpts, DiagnosticsEngine &Diags) {\n if (llvm::none_of(OptionList, SameOptName)) {\n Diags.Report(diag::err_analyzer_checker_option_unknown) << SuppliedChecker << SuppliedOption;"}} | ||
}, | }, | ||
["err_analyzer_config_invalid_input"]={ | ["err_analyzer_config_invalid_input"]={ | ||
Line 966: | Line 966: | ||
[h]=a, | [h]=a, | ||
[d]={tb,1534346725,rb}, | [d]={tb,1534346725,rb}, | ||
[k]={{O, | [k]={{O,1106,"static void initOption(AnalyzerOptions::ConfigTable &Config, DiagnosticsEngine *Diags, bool &OptionField, StringRef Name, bool DefaultVal) {\n if (!PossiblyInvalidVal) {\n if (Diags)\n Diags->Report(diag::err_analyzer_config_invalid_input) << Name << \"a boolean\";"},{O,1123,"static void initOption(AnalyzerOptions::ConfigTable &Config, DiagnosticsEngine *Diags, unsigned &OptionField, StringRef Name, unsigned DefaultVal) {\n if (Diags && HasFailed)\n Diags->Report(diag::err_analyzer_config_invalid_input) << Name << \"an unsigned\";"},{O,1181,"#include \"clang/StaticAnalyzer/Core/AnalyzerOptions.def\"\n if (AnOpts.ShouldTrackConditionsDebug && !AnOpts.ShouldTrackConditions)\n Diags->Report(diag::err_analyzer_config_invalid_input) << \"track-conditions-debug\""},{O,1185,"#include \"clang/StaticAnalyzer/Core/AnalyzerOptions.def\"\n if (!AnOpts.CTUDir.empty() && !llvm::sys::fs::is_directory(AnOpts.CTUDir))\n Diags->Report(diag::err_analyzer_config_invalid_input) << \"ctu-dir\""},{O,1190,"#include \"clang/StaticAnalyzer/Core/AnalyzerOptions.def\"\n if (!AnOpts.ModelPath.empty() && !llvm::sys::fs::is_directory(AnOpts.ModelPath))\n Diags->Report(diag::err_analyzer_config_invalid_input) << \"model-path\""}} | ||
}, | }, | ||
["err_analyzer_config_multiple_values"]={ | ["err_analyzer_config_multiple_values"]={ | ||
Line 978: | Line 978: | ||
[h]=a, | [h]=a, | ||
[d]={"fb5351eed39a",1346219700,"Add new -cc1 driver option -analyzer-config, which allows one to specify"}, | [d]={"fb5351eed39a",1346219700,"Add new -cc1 driver option -analyzer-config, which allows one to specify"}, | ||
[k]={{O, | [k]={{O,1045,"#include \"clang/StaticAnalyzer/Core/Analyses.def\"\n // Go through the analyzer configuration options.\n for (const auto *A : Args.filtered(OPT_analyzer_config)) {\n for (const auto &configVal : configVals) {\n if (val.contains(\'=\')) {\n Diags.Report(SourceLocation(), diag::err_analyzer_config_multiple_values) << configVal;"}} | ||
}, | }, | ||
["err_analyzer_config_no_value"]={ | ["err_analyzer_config_no_value"]={ | ||
Line 990: | Line 990: | ||
[h]=a, | [h]=a, | ||
[d]={"fb5351eed39a",1346219700,"Add new -cc1 driver option -analyzer-config, which allows one to specify"}, | [d]={"fb5351eed39a",1346219700,"Add new -cc1 driver option -analyzer-config, which allows one to specify"}, | ||
[k]={{O, | [k]={{O,1040,"#include \"clang/StaticAnalyzer/Core/Analyses.def\"\n // Go through the analyzer configuration options.\n for (const auto *A : Args.filtered(OPT_analyzer_config)) {\n for (const auto &configVal : configVals) {\n if (val.empty()) {\n Diags.Report(SourceLocation(), diag::err_analyzer_config_no_value) << configVal;"}} | ||
}, | }, | ||
["err_analyzer_config_unknown"]={ | ["err_analyzer_config_unknown"]={ | ||
Line 1,002: | Line 1,002: | ||
[h]=a, | [h]=a, | ||
[d]={tb,1534346725,rb}, | [d]={tb,1534346725,rb}, | ||
[k]={{O, | [k]={{O,1054,"#include \"clang/StaticAnalyzer/Core/Analyses.def\"\n // Go through the analyzer configuration options.\n for (const auto *A : Args.filtered(OPT_analyzer_config)) {\n for (const auto &configVal : configVals) {\n // TODO: Check checker options too, possibly in CheckerRegistry.\n // Leave unknown non-checker configs unclaimed.\n if (!key.contains(\":\") && Opts.isUnknownAnalyzerConfig(key)) {\n if (Opts.ShouldEmitErrorsOnInvalidConfigValue)\n Diags.Report(diag::err_analyzer_config_unknown) << key;"}} | ||
}, | }, | ||
["err_analyzer_not_built_with_z3"]={ | ["err_analyzer_not_built_with_z3"]={ | ||
Line 1,014: | Line 1,014: | ||
[h]=a, | [h]=a, | ||
[d]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths."}, | [d]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths."}, | ||
[k]={{O, | [k]={{O,960,"#ifndef LLVM_WITH_Z3\n if (Value == AnalysisConstraints::Z3ConstraintsModel) {\n Diags.Report(diag::err_analyzer_not_built_with_z3);"}} | ||
}, | }, | ||
["err_anon_bitfield_has_negative_width"]={ | ["err_anon_bitfield_has_negative_width"]={ | ||
Line 1,026: | Line 1,026: | ||
[h]=o, | [h]=o, | ||
[d]={"f9b00eb7dc88",1240248578,"clean up anonymous bitfield diagnostics, PR4017"}, | [d]={"f9b00eb7dc88",1240248578,"clean up anonymous bitfield diagnostics, PR4017"}, | ||
[k]={{q, | [k]={{q,17926,"// Note that FieldName may be null for anonymous bitfields.\nExprResult Sema::VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth) {\n if (Value.isSigned() && Value.isNegative()) {\n return Diag(FieldLoc, diag::err_anon_bitfield_has_negative_width) << toString(Value, 10);"}} | ||
}, | }, | ||
["err_anon_bitfield_member_init"]={ | ["err_anon_bitfield_member_init"]={ | ||
Line 1,038: | Line 1,038: | ||
[h]=B, | [h]=B, | ||
[d]={"2e204e23911b",1601401476,"[clang] Enable support for #pragma STDC FENV_ACCESS"}, | [d]={"2e204e23911b",1601401476,"[clang] Enable support for #pragma STDC FENV_ACCESS"}, | ||
[k]={{K, | [k]={{K,3021,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n while (true) {\n if (Tok.isOneOf(tok::equal, tok::l_brace) && PureSpecLoc.isInvalid()) {\n // DRXXXX: Anonymous bit-fields cannot have a brace-or-equal-initializer.\n if (BitfieldSize.isUsable() && !DeclaratorInfo.hasName()) {\n Diag(Tok, diag::err_anon_bitfield_member_init);"}} | ||
}, | }, | ||
["err_anon_bitfield_qualifiers"]={ | ["err_anon_bitfield_qualifiers"]={ | ||
Line 1,050: | Line 1,050: | ||
[h]=o, | [h]=o, | ||
[d]={"33e90d160b1b",1521320920,"Implement DR2229, which prohibits unnamed bit-fields from having qualifiers in C++."}, | [d]={"33e90d160b1b",1521320920,"Implement DR2229, which prohibits unnamed bit-fields from having qualifiers in C++."}, | ||
[k]={{q, | [k]={{q,18153,"/// Build a new FieldDecl and check its well-formedness.\n///\n/// This routine builds a new FieldDecl given the fields name, type,\n/// record, etc. \\p PrevDecl should refer to any previous declaration\n/// with the same name and in the same scope as the field to be\n/// created.\n///\n/// \\returns a new FieldDecl.\n///\n/// \\todo The Declarator argument is a hack. It will be removed once\nFieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D) {\n // Anonymous bit-fields cannot be cv-qualified (CWG 2229).\n if (!InvalidDecl && getLangOpts().CPlusPlus && !II && BitWidth && T.hasQualifiers()) {\n Diag(Loc, diag::err_anon_bitfield_qualifiers);"}} | ||
}, | }, | ||
["err_anon_type_definition"]={ | ["err_anon_type_definition"]={ | ||
Line 1,062: | Line 1,062: | ||
[h]=B, | [h]=B, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{K, | [k]={{K,1949,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (!Name && !TemplateId && (DS.getTypeSpecType() == DeclSpec::TST_error || TUK != Sema::TUK_Definition)) {\n if (DS.getTypeSpecType() != DeclSpec::TST_error) {\n Diag(StartLoc, diag::err_anon_type_definition) << DeclSpec::getSpecifierName(TagType, Policy);"}} | ||
}, | }, | ||
["err_anonymous_enum_bitfield"]={ | ["err_anonymous_enum_bitfield"]={ | ||
Line 1,074: | Line 1,074: | ||
[h]=B, | [h]=B, | ||
[d]={"c90e19810743",1588991058,"Fix parsing of enum-base to follow C++11 rules."}, | [d]={"c90e19810743",1588991058,"Fix parsing of enum-base to follow C++11 rules."}, | ||
[k]={{D, | [k]={{D,4919,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // Parse the fixed underlying type.\n if (Tok.is(tok::colon)) {\n if (CanBeBitfield && !isEnumBase(CanBeOpaqueEnumDeclaration)) {\n // Outside C++11, do not interpret the tokens as an enum-base if they do\n // not make sense as one. In C++11, it\'s an error if this happens.\n if (getLangOpts().CPlusPlus11)\n Diag(Tok.getLocation(), diag::err_anonymous_enum_bitfield);"}} | ||
}, | }, | ||
["err_anonymous_property"]={ | ["err_anonymous_property"]={ | ||
Line 1,086: | Line 1,086: | ||
[h]=o, | [h]=o, | ||
[d]={"5e77d76c953d",1366097310,"Basic support for Microsoft property declarations and"}, | [d]={"5e77d76c953d",1366097310,"Basic support for Microsoft property declarations and"}, | ||
[k]={{v, | [k]={{v,18817,"/// HandleMSProperty - Analyze a __delcspec(property) field of a C++ class.\n///\nMSPropertyDecl *Sema::HandleMSProperty(Scope *S, RecordDecl *Record, SourceLocation DeclStart, Declarator &D, Expr *BitWidth, InClassInitStyle InitStyle, AccessSpecifier AS, const ParsedAttr &MSPropertyAttr) {\n if (!II) {\n Diag(DeclStart, diag::err_anonymous_property);"}} | ||
}, | }, | ||
["err_anonymous_record_bad_member"]={ | ["err_anonymous_record_bad_member"]={ | ||
Line 1,098: | Line 1,098: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,5645,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (getLangOpts().CPlusPlus) {\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n } else if (Mem->isImplicit()) {\n } else if (isa<TagDecl>(Mem) && Mem->getDeclContext() != Record) {\n } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {\n } else if (isa<AccessSpecDecl>(Mem)) {\n } else if (isa<StaticAssertDecl>(Mem)) {\n } else {\n unsigned DK = diag::err_anonymous_record_bad_member;"}} | ||
}, | }, | ||
["err_anonymous_record_member_redecl"]={ | ["err_anonymous_record_member_redecl"]={ | ||
Line 1,110: | Line 1,110: | ||
[h]=o, | [h]=o, | ||
[d]={"da7b27ff0b98",1447738809,"[Sema] Combine similar diagnostics using %select. NFC"}, | [d]={"da7b27ff0b98",1447738809,"[Sema] Combine similar diagnostics using %select. NFC"}, | ||
[k]={{q, | [k]={{q,5358,"/// We are trying to inject an anonymous member into the given scope;\n/// check if there\'s an existing declaration that can\'t be overloaded.\n///\n/// \\return true if this is a forbidden redeclaration\nstatic bool CheckAnonMemberRedeclaration(Sema &SemaRef, Scope *S, DeclContext *Owner, DeclarationName Name, SourceLocation NameLoc, bool IsUnion) {\n SemaRef.Diag(NameLoc, diag::err_anonymous_record_member_redecl) << IsUnion << Name;"}} | ||
}, | }, | ||
["err_anonymous_record_nonpublic_member"]={ | ["err_anonymous_record_nonpublic_member"]={ | ||
Line 1,122: | Line 1,122: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,5598,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (getLangOpts().CPlusPlus) {\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n if (FD->getAccess() != AS_public) {\n Diag(FD->getLocation(), diag::err_anonymous_record_nonpublic_member) << Record->isUnion() << (FD->getAccess() == AS_protected);"}} | ||
}, | }, | ||
["err_anonymous_record_with_function"]={ | ["err_anonymous_record_with_function"]={ | ||
Line 1,134: | Line 1,134: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,5649,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (getLangOpts().CPlusPlus) {\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n } else if (Mem->isImplicit()) {\n } else if (isa<TagDecl>(Mem) && Mem->getDeclContext() != Record) {\n } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {\n } else if (isa<AccessSpecDecl>(Mem)) {\n } else if (isa<StaticAssertDecl>(Mem)) {\n } else {\n if (isa<TypeDecl>(Mem))\n else if (isa<FunctionDecl>(Mem))\n DK = diag::err_anonymous_record_with_function;"}} | ||
}, | }, | ||
["err_anonymous_record_with_static"]={ | ["err_anonymous_record_with_static"]={ | ||
Line 1,146: | Line 1,146: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,5651,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (getLangOpts().CPlusPlus) {\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n } else if (Mem->isImplicit()) {\n } else if (isa<TagDecl>(Mem) && Mem->getDeclContext() != Record) {\n } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {\n } else if (isa<AccessSpecDecl>(Mem)) {\n } else if (isa<StaticAssertDecl>(Mem)) {\n } else {\n if (isa<TypeDecl>(Mem))\n else if (isa<FunctionDecl>(Mem))\n else if (isa<VarDecl>(Mem))\n DK = diag::err_anonymous_record_with_static;"}} | ||
}, | }, | ||
["err_anonymous_record_with_type"]={ | ["err_anonymous_record_with_type"]={ | ||
Line 1,158: | Line 1,158: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,5626,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (getLangOpts().CPlusPlus) {\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n } else if (Mem->isImplicit()) {\n } else if (isa<TagDecl>(Mem) && Mem->getDeclContext() != Record) {\n } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {\n if (!MemRecord->isAnonymousStructOrUnion() && MemRecord->getDeclName()) {\n // Visual C++ allows type definition in anonymous struct or union.\n if (getLangOpts().MicrosoftExt)\n else {\n Diag(MemRecord->getLocation(), diag::err_anonymous_record_with_type) << Record->isUnion();"},{q,5647,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (getLangOpts().CPlusPlus) {\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n } else if (Mem->isImplicit()) {\n } else if (isa<TagDecl>(Mem) && Mem->getDeclContext() != Record) {\n } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {\n } else if (isa<AccessSpecDecl>(Mem)) {\n } else if (isa<StaticAssertDecl>(Mem)) {\n } else {\n if (isa<TypeDecl>(Mem))\n DK = diag::err_anonymous_record_with_type;"},{q,5655,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (getLangOpts().CPlusPlus) {\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n } else if (Mem->isImplicit()) {\n } else if (isa<TagDecl>(Mem) && Mem->getDeclContext() != Record) {\n } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {\n } else if (isa<AccessSpecDecl>(Mem)) {\n } else if (isa<StaticAssertDecl>(Mem)) {\n } else {\n if (getLangOpts().MicrosoftExt && DK == diag::err_anonymous_record_with_type)"}} | ||
}, | }, | ||
["err_anonymous_struct_not_member"]={ | ["err_anonymous_struct_not_member"]={ | ||
Line 1,170: | Line 1,170: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,5675,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (!Record->isUnion() && !Owner->isRecord()) {\n Diag(Record->getLocation(), diag::err_anonymous_struct_not_member) << getLangOpts().CPlusPlus;"}} | ||
}, | }, | ||
["err_anonymous_union_not_static"]={ | ["err_anonymous_union_not_static"]={ | ||
Line 1,182: | Line 1,182: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,5530,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (getLangOpts().CPlusPlus) {\n if (Record->isUnion()) {\n if (DS.getStorageClassSpec() != DeclSpec::SCS_static && (OwnerScope->isTranslationUnit() || (OwnerScope->isNamespace() && !cast<NamespaceDecl>(OwnerScope)->isAnonymousNamespace()))) {\n Diag(Record->getLocation(), diag::err_anonymous_union_not_static) << FixItHint::CreateInsertion(Record->getLocation(), \"static \");"}} | ||
}, | }, | ||
["err_anonymous_union_with_storage_spec"]={ | ["err_anonymous_union_with_storage_spec"]={ | ||
Line 1,194: | Line 1,194: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,5543,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n if (getLangOpts().CPlusPlus) {\n if (Record->isUnion()) {\n }\n // C++ [class.union]p6:\n // A storage class is not allowed in a declaration of an\n // anonymous union in a class scope.\n else if (DS.getStorageClassSpec() != DeclSpec::SCS_unspecified && isa<RecordDecl>(Owner)) {\n Diag(DS.getStorageClassSpecLoc(), diag::err_anonymous_union_with_storage_spec) << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());"}} | ||
}, | }, | ||
["err_anyx86_interrupt_attribute"]={ | ["err_anyx86_interrupt_attribute"]={ | ||
Line 1,206: | Line 1,206: | ||
[h]=o, | [h]=o, | ||
[d]={"d51e9933b6aa",1452830791,"[X86] Support \'interrupt\' attribute for x86"}, | [d]={"d51e9933b6aa",1452830791,"[X86] Support \'interrupt\' attribute for x86"}, | ||
[k]={{p, | [k]={{p,7536,"static void handleAnyX86InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Interrupt handler must have void return type.\n if (!getFunctionOrMethodResultType(D)->isVoidType()) {\n S.Diag(getFunctionOrMethodResultSourceRange(D).getBegin(), diag::err_anyx86_interrupt_attribute) << (S.Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86 ? 0 : 1) << 0;"},{p,7546,"static void handleAnyX86InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (NumParams < 1 || NumParams > 2) {\n S.Diag(D->getBeginLoc(), diag::err_anyx86_interrupt_attribute) << (S.Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86 ? 0 : 1) << 1;"},{p,7556,"static void handleAnyX86InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // The first argument must be a pointer.\n if (!getFunctionOrMethodParamType(D, 0)->isPointerType()) {\n S.Diag(getFunctionOrMethodParamRange(D, 0).getBegin(), diag::err_anyx86_interrupt_attribute) << (S.Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86 ? 0 : 1) << 2;"},{p,7572,"static void handleAnyX86InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (NumParams == 2 && (!getFunctionOrMethodParamType(D, 1)->isUnsignedIntegerType() || S.Context.getTypeSize(getFunctionOrMethodParamType(D, 1)) != TypeSize)) {\n S.Diag(getFunctionOrMethodParamRange(D, 1).getBegin(), diag::err_anyx86_interrupt_attribute) << (S.Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86 ? 0 : 1) << 3 << S.Context.getIntTypeForBitwidth(TypeSize, /*Signed=*/false);"}} | ||
}, | }, | ||
["err_anyx86_interrupt_called"]={ | ["err_anyx86_interrupt_called"]={ | ||
Line 1,218: | Line 1,218: | ||
[h]=o, | [h]=o, | ||
[d]={"d51e9933b6aa",1452830791,"[X86] Support \'interrupt\' attribute for x86"}, | [d]={"d51e9933b6aa",1452830791,"[X86] Support \'interrupt\' attribute for x86"}, | ||
[k]={{y, | [k]={{y,7356,"/// BuildResolvedCallExpr - Build a call to a resolved expression,\n/// i.e. an expression not of \\p OverloadTy. The expression should\n/// unary-convert to an expression of function-pointer or\n/// block-pointer type.\n///\n/// \\param NDecl the declaration being called, if available\nExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef<Expr *> Args, SourceLocation RParenLoc, Expr *Config, bool IsExecConfig, ADLCallKind UsesADL) {\n // Functions with \'interrupt\' attribute cannot be called directly.\n if (FDecl && FDecl->hasAttr<AnyX86InterruptAttr>()) {\n Diag(Fn->getExprLoc(), diag::err_anyx86_interrupt_called);"}} | ||
}, | }, | ||
["err_arc_array_param_no_ownership"]={ | ["err_arc_array_param_no_ownership"]={ | ||
Line 1,230: | Line 1,230: | ||
[h]=L, | [h]=L, | ||
[d]={Z,1308874139,Y}, | [d]={Z,1308874139,Y}, | ||
[k]={{q, | [k]={{q,14905,"ParmVarDecl *Sema::CheckParameter(DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC) {\n // In ARC, infer a lifetime qualifier for appropriate parameter types.\n if (getLangOpts().ObjCAutoRefCount && T.getObjCLifetime() == Qualifiers::OCL_None && T->isObjCLifetimeType()) {\n // Special cases for arrays:\n // - if it\'s const, use __unsafe_unretained\n // - otherwise, it\'s an error\n if (T->isArrayType()) {\n if (!T.isConstQualified()) {\n if (DelayedDiagnostics.shouldDelayDiagnostics())\n DelayedDiagnostics.add(sema::DelayedDiagnostic::makeForbiddenType(NameLoc, diag::err_arc_array_param_no_ownership, T, false));"},{q,14907,"ParmVarDecl *Sema::CheckParameter(DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC) {\n // In ARC, infer a lifetime qualifier for appropriate parameter types.\n if (getLangOpts().ObjCAutoRefCount && T.getObjCLifetime() == Qualifiers::OCL_None && T->isObjCLifetimeType()) {\n // Special cases for arrays:\n // - if it\'s const, use __unsafe_unretained\n // - otherwise, it\'s an error\n if (T->isArrayType()) {\n if (!T.isConstQualified()) {\n if (DelayedDiagnostics.shouldDelayDiagnostics())\n else\n Diag(NameLoc, diag::err_arc_array_param_no_ownership) << TSInfo->getTypeLoc().getSourceRange();"},{p,9835,"/// Handle a delayed forbidden-type diagnostic.\nstatic void handleDelayedForbiddenType(Sema &S, DelayedDiagnostic &DD, Decl *D) {\n if (S.getLangOpts().ObjCAutoRefCount)\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n if (FD->hasAttr<UnavailableAttr>() && DD.getForbiddenTypeDiagnostic() == diag::err_arc_array_param_no_ownership) {"}} | ||
}, | }, | ||
["err_arc_assign_property_ownership"]={ | ["err_arc_assign_property_ownership"]={ | ||
Line 1,242: | Line 1,242: | ||
[h]="ARC and @properties", | [h]="ARC and @properties", | ||
[d]={Z,1308874139,Y}, | [d]={Z,1308874139,Y}, | ||
[k]={{X, | [k]={{X,208,"class PropertiesRewriter {\n void removeAssignForDefaultStrong(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD)\n Pass.TA.clearDiagnostic(diag::err_arc_strong_property_ownership, diag::err_arc_assign_property_ownership, diag::err_arc_inconsistent_property_ownership, I->IvarD->getLocation());"},{X,237,"class PropertiesRewriter {\n void rewriteAssign(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD)\n Pass.TA.clearDiagnostic(diag::err_arc_strong_property_ownership, diag::err_arc_assign_property_ownership, diag::err_arc_inconsistent_property_ownership, I->IvarD->getLocation());"},{X,262,"class PropertiesRewriter {\n void maybeAddWeakOrUnsafeUnretainedAttr(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD) {\n Pass.TA.clearDiagnostic(diag::err_arc_strong_property_ownership, diag::err_arc_assign_property_ownership, diag::err_arc_inconsistent_property_ownership, I->IvarD->getLocation());"},{P,777,"static void checkARCPropertyImpl(Sema &S, SourceLocation propertyImplLoc, ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {\n case Qualifiers::OCL_ExplicitNone:\n S.Diag(ivar->getLocation(), diag::err_arc_assign_property_ownership) << property->getDeclName() << ivar->getDeclName() << ((property->getPropertyAttributesAsWritten() & ObjCPropertyAttribute::kind_assign) != 0);"}} | ||
}, | }, | ||
["err_arc_atomic_ownership"]={ | ["err_arc_atomic_ownership"]={ | ||
Line 1,254: | Line 1,254: | ||
[h]=L, | [h]=L, | ||
[d]={Z,1308874139,Y}, | [d]={Z,1308874139,Y}, | ||
[k]={{s, | [k]={{s,3238,"bool Sema::CheckARMBuiltinExclusiveCall(unsigned BuiltinID, CallExpr *TheCall, unsigned MaxWidth) {\n case Qualifiers::OCL_Autoreleasing:\n Diag(DRE->getBeginLoc(), diag::err_arc_atomic_ownership) << ValType << PointerArg->getSourceRange();"},{s,7247,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n case Qualifiers::OCL_Autoreleasing:\n Diag(ExprRange.getBegin(), diag::err_arc_atomic_ownership) << ValType << Ptr->getSourceRange();"},{s,7582,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n case Qualifiers::OCL_Autoreleasing:\n Diag(DRE->getBeginLoc(), diag::err_arc_atomic_ownership) << ValType << FirstArg->getSourceRange();"}} | ||
}, | }, | ||
["err_arc_autoreleasing_capture"]={ | ["err_arc_autoreleasing_capture"]={ | ||
Line 1,266: | Line 1,266: | ||
[h]=L, | [h]=L, | ||
[d]={"67cd5e094e43",1333085028,"Forbid the block and lambda copy-capture of __autoreleasing variables"}, | [d]={"67cd5e094e43",1333085028,"Forbid the block and lambda copy-capture of __autoreleasing variables"}, | ||
[k]={{y, | [k]={{y,19244,"// Returns true if the capture by block was successful.\nstatic bool captureInBlock(BlockScopeInfo *BSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool Nested, Sema &S, bool Invalid) {\n // Forbid the block-capture of autoreleasing variables.\n if (!Invalid && CaptureType.getObjCLifetime() == Qualifiers::OCL_Autoreleasing) {\n if (BuildAndDiagnose) {\n S.Diag(Loc, diag::err_arc_autoreleasing_capture) << /*block*/ 0;"},{y,19394,"/// Capture the given variable in the lambda.\nstatic bool captureInLambda(LambdaScopeInfo *LSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool RefersToCapturedVariable, const Sema::TryCaptureKind Kind, SourceLocation EllipsisLoc, const bool IsTopScope, Sema &S, bool Invalid) {\n // Compute the type of the field that will capture this variable.\n if (ByRef) {\n } else {\n // Forbid the lambda copy-capture of autoreleasing variables.\n if (!Invalid && CaptureType.getObjCLifetime() == Qualifiers::OCL_Autoreleasing) {\n if (BuildAndDiagnose) {\n S.Diag(Loc, diag::err_arc_autoreleasing_capture) << /*lambda*/ 1;"}} | ||
}, | }, | ||
["err_arc_autoreleasing_var"]={ | ["err_arc_autoreleasing_var"]={ | ||
Line 1,278: | Line 1,278: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{q, | [k]={{q,6876,"bool Sema::inferObjCARCLifetime(ValueDecl *decl) {\n if (lifetime == Qualifiers::OCL_Autoreleasing) {\n if (kind != -1U) {\n Diag(decl->getLocation(), diag::err_arc_autoreleasing_var) << kind;"}} | ||
}, | }, | ||
["err_arc_bridge_cast_incompatible"]={ | ["err_arc_bridge_cast_incompatible"]={ | ||
Line 1,290: | Line 1,290: | ||
[h]="ARC Casting Rules", | [h]="ARC Casting Rules", | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{G, | [k]={{G,4728,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n } else if (T->isCARCBridgableType() && FromType->isObjCARCBridgableType()) {\n } else {\n Diag(LParenLoc, diag::err_arc_bridge_cast_incompatible) << FromType << T << Kind << SubExpr->getSourceRange() << TSInfo->getTypeLoc().getSourceRange();"}} | ||
}, | }, | ||
["err_arc_bridge_cast_wrong_kind"]={ | ["err_arc_bridge_cast_wrong_kind"]={ | ||
Line 1,302: | Line 1,302: | ||
[h]="ARC Casting Rules", | [h]="ARC Casting Rules", | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{G, | [k]={{G,4665,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n case OBC_BridgeRetained: {\n Diag(BridgeKeywordLoc, diag::err_arc_bridge_cast_wrong_kind) << 2 << FromType << (T->isBlockPointerType() ? 1 : 0) << T << SubExpr->getSourceRange() << Kind;"},{G,4708,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n } else if (T->isCARCBridgableType() && FromType->isObjCARCBridgableType()) {\n case OBC_BridgeTransfer: {\n Diag(BridgeKeywordLoc, diag::err_arc_bridge_cast_wrong_kind) << (FromType->isBlockPointerType() ? 1 : 0) << FromType << 2 << T << SubExpr->getSourceRange() << Kind;"}} | ||
}, | }, | ||
["err_arc_bridge_retain"]={ | ["err_arc_bridge_retain"]={ | ||
Line 1,314: | Line 1,314: | ||
[h]="ARC Parse Issue", | [h]="ARC Parse Issue", | ||
[d]={"0c07bee8bd2c",1308347772,"Only accept __bridge_retain in system headers, as Doug suggested."}, | [d]={"0c07bee8bd2c",1308347772,"Only accept __bridge_retain in system headers, as Doug suggested."}, | ||
[k]={{kb, | [k]={{kb,2982,"/// ParseParenExpression - This parses the unit that starts with a \'(\' token,\n/// based on what is allowed by ExprType. The actual thing parsed is returned\n/// in ExprType. If stopIfCastExpr is true, it will only return the parsed type,\n/// not the parsed cast-expression.\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// \'(\' expression \')\'\n/// [GNU] \'(\' compound-statement \')\' (if !ParenExprOnly)\n/// postfix-expression: [C99 6.5.2]\n/// \'(\' type-name \')\' \'{\' initializer-list \'}\'\n/// \'(\' type-name \')\' \'{\' initializer-list \',\' \'}\'\n/// cast-expression: [C99 6.5.4]\n/// \'(\' type-name \')\' cast-expression\n/// [ARC] bridged-cast-expression\n/// [ARC] bridged-cast-expression:\n/// (__bridge type-name) cast-expression\n/// (__bridge_transfer type-name) cast-expression\n/// (__bridge_retained type-name) cast-expression\n/// fold-expression: [C++1z]\n/// \'(\' cast-expression fold-operator \'...\' \')\'\n/// \'(\' \'...\' fold-operator cast-expression \')\'\n/// \'(\' cast-expression fold-operator \'...\'\n/// fold-operator cast-expression \')\'\n/// [OPENMP] Array shaping operation\n/// \'(\' \'[\' expression \']\' { \'[\' expression \']\' } cast-expression\n/// \\endverbatim\nExprResult Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr, bool isTypeCast, ParsedType &CastTy, SourceLocation &RParenLoc) {\n // None of these cases should fall through with an invalid Result\n // unless they\'ve already reported an error.\n if (ExprType >= CompoundStmt && Tok.is(tok::l_brace)) {\n } else if (ExprType >= CompoundLiteral && BridgeCast) {\n if (tokenKind == tok::kw___bridge)\n else if (tokenKind == tok::kw___bridge_transfer)\n else if (tokenKind == tok::kw___bridge_retained)\n else {\n if (!PP.getSourceManager().isInSystemHeader(BridgeKeywordLoc))\n Diag(BridgeKeywordLoc, diag::err_arc_bridge_retain) << FixItHint::CreateReplacement(BridgeKeywordLoc, \"__bridge_retained\");"}} | ||
}, | }, | ||
["err_arc_cast_requires_bridge"]={ | ["err_arc_cast_requires_bridge"]={ | ||
Line 1,326: | Line 1,326: | ||
[h]="ARC Casting Rules", | [h]="ARC Casting Rules", | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{hb, | [k]={{hb,210,"class UnbridgedCastRewriter : public RecursiveASTVisitor<UnbridgedCastRewriter> {\n void rewriteToBridgedCast(CastExpr *E, ObjCBridgeCastKind Kind, Transaction &Trans) {\n if (!TA.hasDiagnostic(diag::err_arc_mismatched_cast, diag::err_arc_cast_requires_bridge, E->getBeginLoc())) {"},{hb,227,"class UnbridgedCastRewriter : public RecursiveASTVisitor<UnbridgedCastRewriter> {\n void rewriteToBridgedCast(CastExpr *E, ObjCBridgeCastKind Kind, Transaction &Trans) {\n TA.clearDiagnostic(diag::err_arc_mismatched_cast, diag::err_arc_cast_requires_bridge, E->getBeginLoc());"},{hb,303,"class UnbridgedCastRewriter : public RecursiveASTVisitor<UnbridgedCastRewriter> {\n void rewriteBlockCopyMacro(CastExpr *E) {\n Pass.TA.clearDiagnostic(diag::err_arc_mismatched_cast, diag::err_arc_cast_requires_bridge, OuterRange);"},{hb,313,"class UnbridgedCastRewriter : public RecursiveASTVisitor<UnbridgedCastRewriter> {\n void removeBlockReleaseMacro(CastExpr *E) {\n Pass.TA.clearDiagnostic(diag::err_arc_mismatched_cast, diag::err_arc_cast_requires_bridge, OuterRange);"},{G,3918,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // Bridge from an ARC type to a CF type.\n if (castACTC == ACTC_retainable && isAnyRetainable(exprACTC)) {\n S.Diag(loc, diag::err_arc_cast_requires_bridge) << convKindForDiag << 2 // of C pointer type"},{G,3960,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // Bridge from a CF type to an ARC type.\n if (exprACTC == ACTC_retainable && isAnyRetainable(castACTC)) {\n S.Diag(loc, diag::err_arc_cast_requires_bridge) << convKindForDiag << unsigned(castExprType->isBlockPointerType()) // of ObjC|block type"}} | ||
}, | }, | ||
["err_arc_collection_forward"]={ | ["err_arc_collection_forward"]={ | ||
Line 1,338: | Line 1,338: | ||
[h]=L, | [h]=L, | ||
[d]={"538482373bba",1311728835,"Clean up the analysis of the collection operand to ObjC"}, | [d]={"538482373bba",1311728835,"Clean up the analysis of the collection operand to ObjC"}, | ||
[k]={{R, | [k]={{R,2244,"ExprResult Sema::CheckObjCForCollectionOperand(SourceLocation forLoc, Expr *collection) {\n if (iface && (getLangOpts().ObjCAutoRefCount ? RequireCompleteType(forLoc, QualType(objectType, 0), diag::err_arc_collection_forward, collection) : !isCompleteType(forLoc, QualType(objectType, 0)))) {"}} | ||
}, | }, | ||
["err_arc_convesion_of_weak_unavailable"]={ | ["err_arc_convesion_of_weak_unavailable"]={ | ||
Line 1,350: | Line 1,350: | ||
[h]=Ab, | [h]=Ab, | ||
[d]={"f2913401fc81",1310146902,"objc++-arc: more diagnosis of converting a weak-unavailable"}, | [d]={"f2913401fc81",1310146902,"objc++-arc: more diagnosis of converting a weak-unavailable"}, | ||
[k]={{w, | [k]={{w,3215,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ARC imposes extra restrictions on casts.\n if (Self.getLangOpts().allowsNonTrivialObjCLifetimeQualifiers()) {\n if (Self.getLangOpts().ObjCAutoRefCount && CastPtr) {\n } else if (!Self.CheckObjCARCUnavailableWeakConversion(DestType, SrcType)) {\n Self.Diag(SrcExpr.get()->getBeginLoc(), diag::err_arc_convesion_of_weak_unavailable) << 1 << SrcType << DestType << SrcExpr.get()->getSourceRange();"},{x,4497,"/// PerformImplicitConversion - Perform an implicit conversion of the\n/// expression From to the type ToType by following the standard\n/// conversion sequence SCS. Returns the converted\n/// expression. Flavor is the context in which we\'re performing this\n/// conversion, for use in error messages.\nExprResult Sema::PerformImplicitConversion(Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK) {\n case ICK_Pointer_Conversion: {\n if (SCS.IncompatibleObjC && Action != AA_Casting) {\n } else if (getLangOpts().allowsNonTrivialObjCLifetimeQualifiers() && !CheckObjCARCUnavailableWeakConversion(ToType, From->getType())) {\n if (Action == AA_Initializing)\n else\n Diag(From->getBeginLoc(), diag::err_arc_convesion_of_weak_unavailable) << (Action == AA_Casting) << From->getType() << ToType << From->getSourceRange();"}} | ||
}, | }, | ||
["err_arc_gained_method_convention"]={ | ["err_arc_gained_method_convention"]={ | ||
Line 1,362: | Line 1,362: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{I, | [k]={{I,2530,"/// In ARC, check whether the conventional meanings of the two methods\n/// match. If they don\'t, it\'s a hard error.\nstatic bool checkMethodFamilyMismatch(Sema &S, ObjCMethodDecl *impl, ObjCMethodDecl *decl) {\n if (declFamily == OMF_None) {\n errorID = diag::err_arc_gained_method_convention;"}} | ||
}, | }, | ||
["err_arc_illegal_explicit_message"]={ | ["err_arc_illegal_explicit_message"]={ | ||
Line 1,374: | Line 1,374: | ||
[h]=jb, | [h]=jb, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{"clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp", | [k]={{"clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp",390,"class RetainReleaseDeallocRemover : public RecursiveASTVisitor<RetainReleaseDeallocRemover> {\n void clearDiagnostics(SourceLocation loc) const { Pass.TA.clearDiagnostic(diag::err_arc_illegal_explicit_message, diag::err_unavailable, diag::err_unavailable_message, loc); }"},{G,3269,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // In ARC, forbid the user from sending messages to\n // retain/release/autorelease/dealloc/retainCount explicitly.\n if (getLangOpts().ObjCAutoRefCount) {\n case OMF_retainCount:\n Diag(SelLoc, diag::err_arc_illegal_explicit_message) << Sel << RecRange;"}} | ||
}, | }, | ||
["err_arc_illegal_method_def"]={ | ["err_arc_illegal_method_def"]={ | ||
Line 1,386: | Line 1,386: | ||
[h]=jb, | [h]=jb, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{I, | [k]={{I,417,"/// ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible\n/// and user declared, in the method definition\'s AST.\nvoid Sema::ActOnStartOfObjCMethodDef(Scope *FnBodyScope, Decl *D) {\n // In ARC, disallow definition of retain/release/autorelease/retainCount\n if (getLangOpts().ObjCAutoRefCount) {\n case OMF_autorelease:\n Diag(MDecl->getLocation(), diag::err_arc_illegal_method_def) << 0 << MDecl->getSelector();"},{P,1491,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n if (ObjCMethodDecl *getterMethod = property->getGetterMethodDecl()) {\n if (getLangOpts().ObjCAutoRefCount && Synthesize)\n case OMF_autorelease:\n Diag(getterMethod->getLocation(), diag::err_arc_illegal_method_def) << 1 << getterMethod->getSelector();"}} | ||
}, | }, | ||
["err_arc_illegal_selector"]={ | ["err_arc_illegal_selector"]={ | ||
Line 1,398: | Line 1,398: | ||
[h]=jb, | [h]=jb, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{G, | [k]={{G,1364,"ExprResult Sema::ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) {\n // In ARC, forbid the user from using @selector for\n // retain/release/autorelease/dealloc/retainCount.\n if (getLangOpts().ObjCAutoRefCount) {\n case OMF_dealloc:\n Diag(AtLoc, diag::err_arc_illegal_selector) << Sel << SourceRange(LParenLoc, RParenLoc);"}} | ||
}, | }, | ||
["err_arc_inconsistent_property_ownership"]={ | ["err_arc_inconsistent_property_ownership"]={ | ||
Line 1,410: | Line 1,410: | ||
[h]="ARC and @properties", | [h]="ARC and @properties", | ||
[d]={Z,1308874139,Y}, | [d]={Z,1308874139,Y}, | ||
[k]={{"clang/lib/ARCMigrate/TransGCAttrs.cpp", | [k]={{"clang/lib/ARCMigrate/TransGCAttrs.cpp",291,"static void checkAllAtProps(MigrationContext &MigrateCtx, SourceLocation AtLoc, IndivPropsTy &IndProps) {\n for (unsigned i = 0, e = ATLs.size(); i != e; ++i) {\n TA.clearDiagnostic(diag::err_arc_inconsistent_property_ownership, ATLs[i].second->getLocation());"},{X,209,"class PropertiesRewriter {\n void removeAssignForDefaultStrong(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD)\n Pass.TA.clearDiagnostic(diag::err_arc_strong_property_ownership, diag::err_arc_assign_property_ownership, diag::err_arc_inconsistent_property_ownership, I->IvarD->getLocation());"},{X,238,"class PropertiesRewriter {\n void rewriteAssign(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD)\n Pass.TA.clearDiagnostic(diag::err_arc_strong_property_ownership, diag::err_arc_assign_property_ownership, diag::err_arc_inconsistent_property_ownership, I->IvarD->getLocation());"},{X,263,"class PropertiesRewriter {\n void maybeAddWeakOrUnsafeUnretainedAttr(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD) {\n Pass.TA.clearDiagnostic(diag::err_arc_strong_property_ownership, diag::err_arc_assign_property_ownership, diag::err_arc_inconsistent_property_ownership, I->IvarD->getLocation());"},{P,99,"/// Check the internal consistency of a property declaration with\n/// an explicit ownership qualifier.\nstatic void checkPropertyDeclWithOwnership(Sema &S, ObjCPropertyDecl *property) {\n S.Diag(property->getLocation(), diag::err_arc_inconsistent_property_ownership) << property->getDeclName() << expectedLifetime << propertyLifetime;"}} | ||
}, | }, | ||
["err_arc_indirect_no_ownership"]={ | ["err_arc_indirect_no_ownership"]={ | ||
Line 1,422: | Line 1,422: | ||
[h]=L, | [h]=L, | ||
[d]={Z,1308874139,Y}, | [d]={Z,1308874139,Y}, | ||
[k]={{r, | [k]={{r,2073,"/// Given that we\'re building a pointer or reference to the given\nstatic QualType inferARCLifetimeForPointee(Sema &S, QualType type, SourceLocation loc, bool isReference) {\n // If the object type is const-qualified, we can safely use\n // __unsafe_unretained. This is safe (because there are no read\n // barriers), and it\'ll be safe to coerce anything but __weak* to\n // the resulting type.\n if (type.isConstQualified()) {\n } else if (type->isObjCARCImplicitlyUnretainedType()) {\n } else if (S.isUnevaluatedContext()) {\n } else {\n // These types can show up in private ivars in system headers, so\n // we need this to not be an error in those cases. Instead we\n // want to delay.\n if (S.DelayedDiagnostics.shouldDelayDiagnostics()) {\n S.DelayedDiagnostics.add(sema::DelayedDiagnostic::makeForbiddenType(loc, diag::err_arc_indirect_no_ownership, type, isReference));"},{r,2075,"/// Given that we\'re building a pointer or reference to the given\nstatic QualType inferARCLifetimeForPointee(Sema &S, QualType type, SourceLocation loc, bool isReference) {\n // If the object type is const-qualified, we can safely use\n // __unsafe_unretained. This is safe (because there are no read\n // barriers), and it\'ll be safe to coerce anything but __weak* to\n // the resulting type.\n if (type.isConstQualified()) {\n } else if (type->isObjCARCImplicitlyUnretainedType()) {\n } else if (S.isUnevaluatedContext()) {\n } else {\n // These types can show up in private ivars in system headers, so\n // we need this to not be an error in those cases. Instead we\n // want to delay.\n if (S.DelayedDiagnostics.shouldDelayDiagnostics()) {\n } else {\n S.Diag(loc, diag::err_arc_indirect_no_ownership) << type << isReference;"}} | ||
}, | }, | ||
["err_arc_init_method_unrelated_result_type"]={ | ["err_arc_init_method_unrelated_result_type"]={ | ||
Line 1,434: | Line 1,434: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{I, | [k]={{I,108,"/// Check whether the given method, which must be in the \'init\'\n/// family, is a valid member of that family.\n///\n/// \\param receiverTypeIfCall - if null, check this as if declaring it;\n/// if non-null, check this as if making a call to it with the given\n/// receiver type\n///\n/// \\return true to indicate that there was an error and appropriate\n/// actions were taken\nbool Sema::checkInitMethod(ObjCMethodDecl *method, QualType receiverTypeIfCall) {\n Diag(loc, diag::err_arc_init_method_unrelated_result_type);"}} | ||
}, | }, | ||
["err_arc_lost_method_convention"]={ | ["err_arc_lost_method_convention"]={ | ||
Line 1,446: | Line 1,446: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{I, | [k]={{I,2525,"/// In ARC, check whether the conventional meanings of the two methods\n/// match. If they don\'t, it\'s a hard error.\nstatic bool checkMethodFamilyMismatch(Sema &S, ObjCMethodDecl *impl, ObjCMethodDecl *decl) {\n unsigned errorID = diag::err_arc_lost_method_convention;"}} | ||
}, | }, | ||
["err_arc_may_not_respond"]={ | ["err_arc_may_not_respond"]={ | ||
Line 1,458: | Line 1,458: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{G, | [k]={{G,3089,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n if (!Method) {\n if (receiverIsIdLike || ReceiverType->isBlockPointerType() || (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) {\n } else if (ReceiverType->isObjCClassOrClassKindOfType() || ReceiverType->isObjCQualifiedClassType()) {\n } else {\n // We allow sending a message to a qualified ID (\"id<foo>\"), which is ok as\n // long as one of the protocols implements the selector (if not, warn).\n // And as long as message is not deprecated/unavailable (warn if it is).\n if (const ObjCObjectPointerType *QIdTy = ReceiverType->getAsObjCQualifiedIdType()) {\n } else if (const ObjCObjectPointerType *OCIType = ReceiverType->getAsObjCInterfacePointerType()) {\n if (!Method) {\n if (!Method && getLangOpts().ObjCAutoRefCount) {\n Diag(SelLoc, diag::err_arc_may_not_respond) << OCIType->getPointeeType() << Sel << RecRange << SourceRange(SelectorLocs.front(), SelectorLocs.back());"}} | ||
}, | }, | ||
["err_arc_method_not_found"]={ | ["err_arc_method_not_found"]={ | ||
Line 1,470: | Line 1,470: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{G, | [k]={{G,1743,"bool Sema::CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef<SourceLocation> SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) {\n if (!Method) {\n if (getLangOpts().ObjCAutoRefCount)\n DiagID = diag::err_arc_method_not_found;"}} | ||
}, | }, | ||
["err_arc_mismatched_cast"]={ | ["err_arc_mismatched_cast"]={ | ||
Line 1,482: | Line 1,482: | ||
[h]=jb, | [h]=jb, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{hb, | [k]={{hb,209,"class UnbridgedCastRewriter : public RecursiveASTVisitor<UnbridgedCastRewriter> {\n void rewriteToBridgedCast(CastExpr *E, ObjCBridgeCastKind Kind, Transaction &Trans) {\n if (!TA.hasDiagnostic(diag::err_arc_mismatched_cast, diag::err_arc_cast_requires_bridge, E->getBeginLoc())) {"},{hb,226,"class UnbridgedCastRewriter : public RecursiveASTVisitor<UnbridgedCastRewriter> {\n void rewriteToBridgedCast(CastExpr *E, ObjCBridgeCastKind Kind, Transaction &Trans) {\n TA.clearDiagnostic(diag::err_arc_mismatched_cast, diag::err_arc_cast_requires_bridge, E->getBeginLoc());"},{hb,302,"class UnbridgedCastRewriter : public RecursiveASTVisitor<UnbridgedCastRewriter> {\n void rewriteBlockCopyMacro(CastExpr *E) {\n Pass.TA.clearDiagnostic(diag::err_arc_mismatched_cast, diag::err_arc_cast_requires_bridge, OuterRange);"},{hb,312,"class UnbridgedCastRewriter : public RecursiveASTVisitor<UnbridgedCastRewriter> {\n void removeBlockReleaseMacro(CastExpr *E) {\n Pass.TA.clearDiagnostic(diag::err_arc_mismatched_cast, diag::err_arc_cast_requires_bridge, OuterRange);"},{G,3997,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n S.Diag(loc, diag::err_arc_mismatched_cast) << !convKindForDiag << srcKind << castExprType << castType << castRange << castExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_arc_multiple_method_decl"]={ | ["err_arc_multiple_method_decl"]={ | ||
Line 1,494: | Line 1,494: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{I, | [k]={{I,3635,"void Sema::DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl<ObjCMethodDecl *> &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) {\n if (issueDiagnostic) {\n if (issueError)\n Diag(R.getBegin(), diag::err_arc_multiple_method_decl) << Sel << R;"}} | ||
}, | }, | ||
["err_arc_new_array_without_ownership"]={ | ["err_arc_new_array_without_ownership"]={ | ||
Line 1,506: | Line 1,506: | ||
[h]=L, | [h]=L, | ||
[d]={Z,1308874139,Y}, | [d]={Z,1308874139,Y}, | ||
[k]={{x, | [k]={{x,2483,"/// Checks that a type is suitable as the allocated type\n/// in a new-expression.\nbool Sema::CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R) {\n // C++ 5.3.4p1: \"[The] type shall be a complete object type, but not an\n // abstract class type or array thereof.\n if (AllocType->isFunctionType())\n else if (AllocType->isReferenceType())\n else if (!AllocType->isDependentType() && RequireCompleteSizedType(Loc, AllocType, diag::err_new_incomplete_or_sizeless_type, R))\n else if (RequireNonAbstractType(Loc, AllocType, diag::err_allocation_of_abstract_type))\n else if (AllocType->isVariablyModifiedType())\n else if (AllocType.getAddressSpace() != LangAS::Default && !getLangOpts().OpenCLCPlusPlus)\n else if (getLangOpts().ObjCAutoRefCount) {\n if (const ArrayType *AT = Context.getAsArrayType(AllocType)) {\n if (BaseAllocType.getObjCLifetime() == Qualifiers::OCL_None && BaseAllocType->isObjCLifetimeType())\n return Diag(Loc, diag::err_arc_new_array_without_ownership) << BaseAllocType;"}} | ||
}, | }, | ||
["err_arc_nolifetime_behavior"]={ | ["err_arc_nolifetime_behavior"]={ | ||
Line 1,518: | Line 1,518: | ||
[h]=jb, | [h]=jb, | ||
[d]={"2fa646d59623",1319832367,"objective-c arc: type-casting of an objc pointer to"}, | [d]={"2fa646d59623",1319832367,"objective-c arc: type-casting of an objc pointer to"}, | ||
[k]={{G, | [k]={{G,4426,"Sema::ARCConversionResult Sema::CheckObjCConversion(SourceRange castRange, QualType castType, Expr *&castExpr, CheckedConversionKind CCK, bool Diagnose, bool DiagnoseCFAudited, BinaryOperatorKind Opc) {\n if (exprACTC == castACTC) {\n // Check for viability and report error if casting an rvalue to a\n // life-time qualifier.\n if (castACTC == ACTC_retainable && (CCK == CCK_CStyleCast || CCK == CCK_OtherCast) && castType != castExprType) {\n if (QDT != castType && QDT.getObjCLifetime() != Qualifiers::OCL_None) {\n if (Diagnose) {\n Diag(loc, diag::err_arc_nolifetime_behavior);"}} | ||
}, | }, | ||
["err_arc_nonlocal_writeback"]={ | ["err_arc_nonlocal_writeback"]={ | ||
Line 1,530: | Line 1,530: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{E, | [k]={{E,5948,"/// Check whether the given expression is a valid operand for an\n/// indirect copy/restore.\nstatic void checkIndirectCopyRestoreSource(Sema &S, Expr *src) {\n S.Diag(src->getExprLoc(), diag::err_arc_nonlocal_writeback) << ((unsigned)iik - 1) // shift index into diagnostic explanations"}} | ||
}, | }, | ||
["err_arc_objc_property_default_assign_on_object"]={ | ["err_arc_objc_property_default_assign_on_object"]={ | ||
Line 1,542: | Line 1,542: | ||
[h]=jb, | [h]=jb, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{X, | [k]={{X,266,"class PropertiesRewriter {\n void maybeAddWeakOrUnsafeUnretainedAttr(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD) {\n Pass.TA.clearDiagnostic(diag::err_arc_objc_property_default_assign_on_object, I->ImplD->getLocation());"},{P,1306,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n if (!Ivar) {\n // In ARC, give the ivar a lifetime qualifier based on the\n // property attributes.\n if ((getLangOpts().ObjCAutoRefCount || isARCWeak) && !PropertyIvarType.getObjCLifetime() && PropertyIvarType->isObjCRetainableType()) {\n // It\'s an error if we have to do this and the user didn\'t\n // explicitly write an ownership attribute on the property.\n if (!hasWrittenStorageAttribute(property, QueryKind) && !(kind & ObjCPropertyAttribute::kind_strong)) {\n Diag(PropertyDiagLoc, diag::err_arc_objc_property_default_assign_on_object);"}} | ||
}, | }, | ||
["err_arc_perform_selector_retains"]={ | ["err_arc_perform_selector_retains"]={ | ||
Line 1,554: | Line 1,554: | ||
[h]=o, | [h]=o, | ||
[d]={"b7a773626fea",1309905539,"objc-arc: enforce performSelector rules in rejecting retaining selectors"}, | [d]={"b7a773626fea",1309905539,"objc-arc: enforce performSelector rules in rejecting retaining selectors"}, | ||
[k]={{G, | [k]={{G,3297,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // In ARC, forbid the user from sending messages to\n // retain/release/autorelease/dealloc/retainCount explicitly.\n if (getLangOpts().ObjCAutoRefCount) {\n case OMF_performSelector:\n if (Method && NumArgs >= 1) {\n if (const auto *SelExp = dyn_cast<ObjCSelectorExpr>(Args[0]->IgnoreParens())) {\n if (SelMethod) {\n case OMF_init:\n // Issue error, unless ns_returns_not_retained.\n if (!SelMethod->hasAttr<NSReturnsNotRetainedAttr>()) {\n Diag(SelLoc, diag::err_arc_perform_selector_retains);"},{G,3307,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // In ARC, forbid the user from sending messages to\n // retain/release/autorelease/dealloc/retainCount explicitly.\n if (getLangOpts().ObjCAutoRefCount) {\n case OMF_performSelector:\n if (Method && NumArgs >= 1) {\n if (const auto *SelExp = dyn_cast<ObjCSelectorExpr>(Args[0]->IgnoreParens())) {\n if (SelMethod) {\n default:\n // +0 call. OK. unless ns_returns_retained.\n if (SelMethod->hasAttr<NSReturnsRetainedAttr>()) {\n Diag(SelLoc, diag::err_arc_perform_selector_retains);"}} | ||
}, | }, | ||
["err_arc_pseudo_dtor_inconstant_quals"]={ | ["err_arc_pseudo_dtor_inconstant_quals"]={ | ||
Line 1,566: | Line 1,566: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{x, | [k]={{x,7822,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n // C++ [expr.pseudo]p2:\n // [...] The cv-unqualified versions of the object type and of the type\n // designated by the pseudo-destructor-name shall be the same type.\n if (DestructedTypeInfo) {\n if (!DestructedType->isDependentType() && !ObjectType->isDependentType()) {\n if (!Context.hasSameUnqualifiedType(DestructedType, ObjectType)) {\n } else if (DestructedType.getObjCLifetime() != ObjectType.getObjCLifetime()) {\n if (DestructedType.getObjCLifetime() == Qualifiers::OCL_None) {\n } else {\n Diag(DestructedTypeStart, diag::err_arc_pseudo_dtor_inconstant_quals) << ObjectType << DestructedType << Base->getSourceRange() << DestructedTypeInfo->getTypeLoc().getSourceRange();"}} | ||
}, | }, | ||
["err_arc_receiver_forward_class"]={ | ["err_arc_receiver_forward_class"]={ | ||
Line 1,578: | Line 1,578: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{G, | [k]={{G,2663,"/// \\param ReceiverType The type of the object receiving the\n/// message. When \\p ReceiverTypeInfo is non-NULL, this is the same\n/// type as that refers to. For a superclass send, this is the type of\n/// the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this class message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // Find the method we are messaging.\n if (!Method) {\n if (RequireCompleteType(Loc, Context.getObjCInterfaceType(Class), (getLangOpts().ObjCAutoRefCount ? diag::err_arc_receiver_forward_class : diag::warn_receiver_forward_class), TypeRange)) {"}} | ||
}, | }, | ||
["err_arc_receiver_forward_instance"]={ | ["err_arc_receiver_forward_instance"]={ | ||
Line 1,590: | Line 1,590: | ||
[h]=L, | [h]=L, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{G, | [k]={{G,3066,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n if (!Method) {\n if (receiverIsIdLike || ReceiverType->isBlockPointerType() || (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) {\n } else if (ReceiverType->isObjCClassOrClassKindOfType() || ReceiverType->isObjCQualifiedClassType()) {\n } else {\n // We allow sending a message to a qualified ID (\"id<foo>\"), which is ok as\n // long as one of the protocols implements the selector (if not, warn).\n // And as long as message is not deprecated/unavailable (warn if it is).\n if (const ObjCObjectPointerType *QIdTy = ReceiverType->getAsObjCQualifiedIdType()) {\n } else if (const ObjCObjectPointerType *OCIType = ReceiverType->getAsObjCInterfacePointerType()) {\n if (RequireCompleteType(Loc, OCIType->getPointeeType(), getLangOpts().ObjCAutoRefCount ? diag::err_arc_receiver_forward_instance : diag::warn_receiver_forward_instance, RecRange)) {"}} | ||
}, | }, | ||
["err_arc_strong_property_ownership"]={ | ["err_arc_strong_property_ownership"]={ | ||
Line 1,602: | Line 1,602: | ||
[h]="ARC and @properties", | [h]="ARC and @properties", | ||
[d]={Z,1308874139,Y}, | [d]={Z,1308874139,Y}, | ||
[k]={{X, | [k]={{X,207,"class PropertiesRewriter {\n void removeAssignForDefaultStrong(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD)\n Pass.TA.clearDiagnostic(diag::err_arc_strong_property_ownership, diag::err_arc_assign_property_ownership, diag::err_arc_inconsistent_property_ownership, I->IvarD->getLocation());"},{X,236,"class PropertiesRewriter {\n void rewriteAssign(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD)\n Pass.TA.clearDiagnostic(diag::err_arc_strong_property_ownership, diag::err_arc_assign_property_ownership, diag::err_arc_inconsistent_property_ownership, I->IvarD->getLocation());"},{X,261,"class PropertiesRewriter {\n void maybeAddWeakOrUnsafeUnretainedAttr(PropsTy &props, SourceLocation atLoc) const {\n for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I) {\n if (I->ImplD) {\n Pass.TA.clearDiagnostic(diag::err_arc_strong_property_ownership, diag::err_arc_assign_property_ownership, diag::err_arc_inconsistent_property_ownership, I->IvarD->getLocation());"},{P,764,"static void checkARCPropertyImpl(Sema &S, SourceLocation propertyImplLoc, ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {\n case Qualifiers::OCL_Strong:\n S.Diag(ivar->getLocation(), diag::err_arc_strong_property_ownership) << property->getDeclName() << ivar->getDeclName() << ivarLifetime;"}} | ||
}, | }, | ||
["err_arc_thread_ownership"]={ | ["err_arc_thread_ownership"]={ | ||
Line 1,614: | Line 1,614: | ||
[h]=L, | [h]=L, | ||
[d]={Z,1308874139,Y}, | [d]={Z,1308874139,Y}, | ||
[k]={{q, | [k]={{q,6893,"bool Sema::inferObjCARCLifetime(ValueDecl *decl) {\n if (VarDecl *var = dyn_cast<VarDecl>(decl)) {\n // Thread-local variables cannot have lifetime.\n if (lifetime && lifetime != Qualifiers::OCL_ExplicitNone && var->getTLSKind()) {\n Diag(var->getLocation(), diag::err_arc_thread_ownership) << var->getType();"}} | ||
}, | }, | ||
["err_arc_typecheck_convert_incompatible_pointer"]={ | ["err_arc_typecheck_convert_incompatible_pointer"]={ | ||
Line 1,626: | Line 1,626: | ||
[h]=o, | [h]=o, | ||
[d]={"3a25d0d59395",1375312774,"ObjectiveC ARC: finishing off issuing error when"}, | [d]={"3a25d0d59395",1375312774,"ObjectiveC ARC: finishing off issuing error when"}, | ||
[k]={{y, | [k]={{y,17563,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n case IncompatiblePointer:\n if (Action == AA_Passing_CFAudited) {\n DiagKind = diag::err_arc_typecheck_convert_incompatible_pointer;"}} | ||
}, | }, | ||
["err_arc_unsupported_on_runtime"]={ | ["err_arc_unsupported_on_runtime"]={ | ||
Line 1,638: | Line 1,638: | ||
[h]=a, | [h]=a, | ||
[d]={"3deb1ad40ca6",1345517263,"Screw around with ObjCRuntime some more, changing the"}, | [d]={"3deb1ad40ca6",1345517263,"Screw around with ObjCRuntime some more, changing the"}, | ||
[k]={{O, | [k]={{O,3665,"#include \"clang/Driver/Options.inc\"\n if (Opts.ObjC) {\n if (Args.hasArg(OPT_fobjc_gc_only))\n else if (Args.hasArg(OPT_fobjc_gc))\n else if (Args.hasArg(OPT_fobjc_arc)) {\n if (!Opts.ObjCRuntime.allowsARC())\n Diags.Report(diag::err_arc_unsupported_on_runtime);"}} | ||
}, | }, | ||
["err_arc_unsupported_on_toolchain"]={ | ["err_arc_unsupported_on_toolchain"]={ | ||
Line 1,650: | Line 1,650: | ||
[h]=a, | [h]=a, | ||
[d]={"3deb1ad40ca6",1345517263,"Screw around with ObjCRuntime some more, changing the"}, | [d]={"3deb1ad40ca6",1345517263,"Screw around with ObjCRuntime some more, changing the"}, | ||
[k]={{"clang/lib/Driver/ToolChains/Darwin.cpp", | [k]={{"clang/lib/Driver/ToolChains/Darwin.cpp",3295,"void Darwin::CheckObjCARC() const {\n getDriver().Diag(diag::err_arc_unsupported_on_toolchain);"}} | ||
}, | }, | ||
["err_arc_unsupported_weak_class"]={ | ["err_arc_unsupported_weak_class"]={ | ||
Line 1,662: | Line 1,662: | ||
[h]=Ab, | [h]=Ab, | ||
[d]={"1f626d6fd1ca",1309980245,"objc-arc: Support objc_arc_weak_unavailable on those"}, | [d]={"1f626d6fd1ca",1309980245,"objc-arc: Support objc_arc_weak_unavailable on those"}, | ||
[k]={{"clang/lib/ARCMigrate/TransGCAttrs.cpp", | [k]={{"clang/lib/ARCMigrate/TransGCAttrs.cpp",211,"static void checkWeakGCAttrs(MigrationContext &MigrateCtx) {\n for (unsigned i = 0, e = MigrateCtx.GCAttrs.size(); i != e; ++i) {\n if (Attr.Kind == MigrationContext::GCAttrOccurrence::Weak) {\n if (!canApplyWeak(MigrateCtx.Pass.Ctx, Attr.ModifiedType,\n TA.clearDiagnostic(diag::err_arc_weak_no_runtime, diag::err_arc_unsupported_weak_class, Attr.Loc);"},{r,7074,"/// handleObjCOwnershipTypeAttr - Process an objc_ownership\n/// attribute on the specified type.\n///\n/// Returns \'true\' if the attribute was handled.\nstatic bool handleObjCOwnershipTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // Forbid __weak for class objects marked as\n // objc_arc_weak_reference_unavailable\n if (lifetime == Qualifiers::OCL_Weak) {\n if (const ObjCObjectPointerType *ObjT = type->getAs<ObjCObjectPointerType>()) {\n if (ObjCInterfaceDecl *Class = ObjT->getInterfaceDecl()) {\n if (Class->isArcWeakrefUnavailable()) {\n S.Diag(AttrLoc, diag::err_arc_unsupported_weak_class);"}} | ||
}, | }, | ||
["err_arc_unused_init_message"]={ | ["err_arc_unused_init_message"]={ | ||
Line 1,674: | Line 1,674: | ||
[h]=jb, | [h]=jb, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{"clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp", | [k]={{"clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp",53,"class UnusedInitRewriter : public RecursiveASTVisitor<UnusedInitRewriter> {\n bool VisitObjCMessageExpr(ObjCMessageExpr *ME) {\n if (ME->isDelegateInitCall() && isRemovable(ME) && Pass.TA.hasDiagnostic(diag::err_arc_unused_init_message, ME->getExprLoc())) {"},{"clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp",56,"class UnusedInitRewriter : public RecursiveASTVisitor<UnusedInitRewriter> {\n bool VisitObjCMessageExpr(ObjCMessageExpr *ME) {\n if (ME->isDelegateInitCall() && isRemovable(ME) && Pass.TA.hasDiagnostic(diag::err_arc_unused_init_message, ME->getExprLoc())) {\n Pass.TA.clearDiagnostic(diag::err_arc_unused_init_message, ME->getExprLoc());"},{R,328,"void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) {\n if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(E)) {\n if (getLangOpts().ObjCAutoRefCount && ME->isDelegateInitCall()) {\n Diag(Loc, diag::err_arc_unused_init_message) << R1;"}} | ||
}, | }, | ||
["err_arc_weak_disabled"]={ | ["err_arc_weak_disabled"]={ | ||
Line 1,686: | Line 1,686: | ||
[h]=Ab, | [h]=Ab, | ||
[d]={"460ce58fa6a1",1445539097,"Define weak and __weak to mean ARC-style weak references, even in MRC."}, | [d]={"460ce58fa6a1",1445539097,"Define weak and __weak to mean ARC-style weak references, even in MRC."}, | ||
[k]={{p, | [k]={{p,9802,"/// Is the given declaration allowed to use a forbidden type?\n/// If so, it\'ll still be annotated with an attribute that makes it\n/// illegal to actually use.\nstatic bool isForbiddenTypeAllowed(Sema &S, Decl *D, const DelayedDiagnostic &diag, UnavailableAttr::ImplicitReason &reason) {\n // Silently accept unsupported uses of __weak in both user and system\n // declarations when it\'s been disabled, for ease of integration with\n // -fno-objc-arc files. We do have to take some care against attempts\n // to define such things; for now, we\'ve only done that for ivars\n // and properties.\n if ((isa<ObjCIvarDecl>(D) || isa<ObjCPropertyDecl>(D))) {\n if (diag.getForbiddenTypeDiagnostic() == diag::err_arc_weak_disabled || diag.getForbiddenTypeDiagnostic() == diag::err_arc_weak_no_runtime) {"},{I,3794,"/// Diagnose attempts to define ARC-__weak ivars when __weak is disabled.\nstatic void DiagnoseWeakIvars(Sema &S, ObjCImplementationDecl *ID) {\n for (auto ivar = ID->getClassInterface()->all_declared_ivar_begin(); ivar; ivar = ivar->getNextIvar()) {\n if (ivar->getType().getObjCLifetime() == Qualifiers::OCL_Weak) {\n if (S.getLangOpts().ObjCWeakRuntime) {\n S.Diag(ivar->getLocation(), diag::err_arc_weak_disabled);"},{r,7057,"/// handleObjCOwnershipTypeAttr - Process an objc_ownership\n/// attribute on the specified type.\n///\n/// Returns \'true\' if the attribute was handled.\nstatic bool handleObjCOwnershipTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // Sometimes, __weak isn\'t allowed.\n if (lifetime == Qualifiers::OCL_Weak && !S.getLangOpts().ObjCWeak && !NonObjCPointer) {\n unsigned diagnostic = (S.getLangOpts().ObjCWeakRuntime ? diag::err_arc_weak_disabled : diag::err_arc_weak_no_runtime);"}} | ||
}, | }, | ||
["err_arc_weak_ivar_access"]={ | ["err_arc_weak_ivar_access"]={ | ||
Line 1,698: | Line 1,698: | ||
[h]=o, | [h]=o, | ||
[d]={ub,1480718311,yb}, | [d]={ub,1480718311,yb}, | ||
[k]={{"clang/lib/Sema/SemaExprMember.cpp", | [k]={{"clang/lib/Sema/SemaExprMember.cpp",1462,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n if (S.getLangOpts().ObjCWeak) {\n if (DeclRefExpr *DE = dyn_cast<DeclRefExpr>(BaseExp))\n if (DE->getType().getObjCLifetime() == Qualifiers::OCL_Weak) {\n S.Diag(DE->getLocation(), diag::err_arc_weak_ivar_access);"}} | ||
}, | }, | ||
["err_arc_weak_no_runtime"]={ | ["err_arc_weak_no_runtime"]={ | ||
Line 1,710: | Line 1,710: | ||
[h]=Ab, | [h]=Ab, | ||
[d]={H,1308178962,J}, | [d]={H,1308178962,J}, | ||
[k]={{"clang/lib/ARCMigrate/TransGCAttrs.cpp", | [k]={{"clang/lib/ARCMigrate/TransGCAttrs.cpp",210,"static void checkWeakGCAttrs(MigrationContext &MigrateCtx) {\n for (unsigned i = 0, e = MigrateCtx.GCAttrs.size(); i != e; ++i) {\n if (Attr.Kind == MigrationContext::GCAttrOccurrence::Weak) {\n if (!canApplyWeak(MigrateCtx.Pass.Ctx, Attr.ModifiedType,\n TA.clearDiagnostic(diag::err_arc_weak_no_runtime, diag::err_arc_unsupported_weak_class, Attr.Loc);"},{p,9803,"/// Is the given declaration allowed to use a forbidden type?\n/// If so, it\'ll still be annotated with an attribute that makes it\n/// illegal to actually use.\nstatic bool isForbiddenTypeAllowed(Sema &S, Decl *D, const DelayedDiagnostic &diag, UnavailableAttr::ImplicitReason &reason) {\n // Silently accept unsupported uses of __weak in both user and system\n // declarations when it\'s been disabled, for ease of integration with\n // -fno-objc-arc files. We do have to take some care against attempts\n // to define such things; for now, we\'ve only done that for ivars\n // and properties.\n if ((isa<ObjCIvarDecl>(D) || isa<ObjCPropertyDecl>(D))) {\n if (diag.getForbiddenTypeDiagnostic() == diag::err_arc_weak_disabled || diag.getForbiddenTypeDiagnostic() == diag::err_arc_weak_no_runtime) {"},{I,3796,"/// Diagnose attempts to define ARC-__weak ivars when __weak is disabled.\nstatic void DiagnoseWeakIvars(Sema &S, ObjCImplementationDecl *ID) {\n for (auto ivar = ID->getClassInterface()->all_declared_ivar_begin(); ivar; ivar = ivar->getNextIvar()) {\n if (ivar->getType().getObjCLifetime() == Qualifiers::OCL_Weak) {\n if (S.getLangOpts().ObjCWeakRuntime) {\n } else {\n S.Diag(ivar->getLocation(), diag::err_arc_weak_no_runtime);"},{r,7058,"/// handleObjCOwnershipTypeAttr - Process an objc_ownership\n/// attribute on the specified type.\n///\n/// Returns \'true\' if the attribute was handled.\nstatic bool handleObjCOwnershipTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // Sometimes, __weak isn\'t allowed.\n if (lifetime == Qualifiers::OCL_Weak && !S.getLangOpts().ObjCWeak && !NonObjCPointer) {\n unsigned diagnostic = (S.getLangOpts().ObjCWeakRuntime ? diag::err_arc_weak_disabled : diag::err_arc_weak_no_runtime);"}} | ||
}, | }, | ||
["err_arc_weak_unavailable_assign"]={ | ["err_arc_weak_unavailable_assign"]={ | ||
Line 1,722: | Line 1,722: | ||
[h]=Ab, | [h]=Ab, | ||
[d]={"6f472e803bf8",1310064947,"objc-arc: diagnose assignment/cast of a weak-unavailable"}, | [d]={"6f472e803bf8",1310064947,"objc-arc: diagnose assignment/cast of a weak-unavailable"}, | ||
[k]={{y, | [k]={{y,17705,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n case IncompatibleObjCWeakRef:\n DiagKind = diag::err_arc_weak_unavailable_assign;"},{x,4495,"/// PerformImplicitConversion - Perform an implicit conversion of the\n/// expression From to the type ToType by following the standard\n/// conversion sequence SCS. Returns the converted\n/// expression. Flavor is the context in which we\'re performing this\n/// conversion, for use in error messages.\nExprResult Sema::PerformImplicitConversion(Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK) {\n case ICK_Pointer_Conversion: {\n if (SCS.IncompatibleObjC && Action != AA_Casting) {\n } else if (getLangOpts().allowsNonTrivialObjCLifetimeQualifiers() && !CheckObjCARCUnavailableWeakConversion(ToType, From->getType())) {\n if (Action == AA_Initializing)\n Diag(From->getBeginLoc(), diag::err_arc_weak_unavailable_assign);"}} | ||
}, | }, | ||
["err_arc_weak_unavailable_property"]={ | ["err_arc_weak_unavailable_property"]={ | ||
Line 1,734: | Line 1,734: | ||
[h]=Ab, | [h]=Ab, | ||
[d]={"e283346d0bf4",1323460511,"objc-arc: diagnose synthesis of a \'weak unavailable\' property."}, | [d]={"e283346d0bf4",1323460511,"objc-arc: diagnose synthesis of a \'weak unavailable\' property."}, | ||
[k]={{P, | [k]={{P,1265,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n if (kind & ObjCPropertyAttribute::kind_weak) {\n // Add GC __weak to the ivar type if the property is weak.\n if (getLangOpts().getGC() != LangOptions::NonGC) {\n } else {\n if (!getLangOpts().ObjCWeak) {\n } else {\n if (const ObjCObjectPointerType *ObjT = PropertyIvarType->getAs<ObjCObjectPointerType>()) {\n if (ObjI && ObjI->isArcWeakrefUnavailable()) {\n Diag(property->getLocation(), diag::err_arc_weak_unavailable_property) << PropertyIvarType;"}} | ||
}, | }, | ||
["err_arch_unsupported_isa"]={ | ["err_arch_unsupported_isa"]={ | ||
Line 1,746: | Line 1,746: | ||
[h]=a, | [h]=a, | ||
[d]={"83e57c232702",1501843218,"[Driver] Error if ARM mode was selected explicitly for M-profile CPUs."}, | [d]={"83e57c232702",1501843218,"[Driver] Error if ARM mode was selected explicitly for M-profile CPUs."}, | ||
[k]={{"clang/lib/Driver/ToolChains/Arch/ARM.cpp", | [k]={{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",267,"void arm::setArchNameInTriple(const Driver &D, const ArgList &Args, types::ID InputType, llvm::Triple &Triple) {\n if (IsMProfile && ARMModeRequested) {\n if (MCPU.size())\n else\n D.Diag(diag::err_arch_unsupported_isa) << tools::arm::getARMArch(MArch, Triple) << \"ARM\";"}} | ||
}, | }, | ||
["err_arcmt_nsinvocation_ownership"]={ | ["err_arcmt_nsinvocation_ownership"]={ | ||
Line 1,758: | Line 1,758: | ||
[h]=a, | [h]=a, | ||
[d]={"42aa21222d37",1390712852,"ARCMigrate: Introduce proper diagnostics for TransformActions"}, | [d]={"42aa21222d37",1390712852,"ARCMigrate: Introduce proper diagnostics for TransformActions"}, | ||
[k]={{"clang/lib/ARCMigrate/TransAPIUses.cpp", | [k]={{"clang/lib/ARCMigrate/TransAPIUses.cpp",79,"class APIChecker : public RecursiveASTVisitor<APIChecker> {\n bool VisitObjCMessageExpr(ObjCMessageExpr *E) {\n // NSInvocation.\n if (E->isInstanceMessage() && E->getReceiverInterface() && E->getReceiverInterface()->getName() == \"NSInvocation\") {\n if (pointee.getObjCLifetime() > Qualifiers::OCL_ExplicitNone)\n Pass.TA.report(parm->getBeginLoc(), diag::err_arcmt_nsinvocation_ownership, parm->getSourceRange()) << selName;"}} | ||
}, | }, | ||
["err_arg_with_address_space"]={ | ["err_arg_with_address_space"]={ | ||
Line 1,770: | Line 1,770: | ||
[h]=o, | [h]=o, | ||
[d]={"fd2dcba7f3a6",1254343663,"Add an error for function parameters that have a qualified address space since this is not allowed b..."}, | [d]={"fd2dcba7f3a6",1254343663,"Add an error for function parameters that have a qualified address space since this is not allowed b..."}, | ||
[k]={{q, | [k]={{q,14958,"ParmVarDecl *Sema::CheckParameter(DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC) {\n // ISO/IEC TR 18037 S6.7.3: \"The type of an object with automatic storage\n // duration shall not be qualified by an address-space qualifier.\"\n // Since all parameters have automatic store duration, they can not have\n // an address space.\n if (T.getAddressSpace() != LangAS::Default &&\n Diag(NameLoc, diag::err_arg_with_address_space);"},{I,5151,"/// Build a type-check a new Objective-C exception variable declaration.\nVarDecl *Sema::BuildObjCExceptionDecl(TypeSourceInfo *TInfo, QualType T, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid) {\n // ISO/IEC TR 18037 S6.7.3: \"The type of an object with automatic storage\n // duration shall not be qualified by an address-space qualifier.\"\n // Since all parameters have automatic store duration, they can not have\n // an address space.\n if (T.getAddressSpace() != LangAS::Default) {\n Diag(IdLoc, diag::err_arg_with_address_space);"}} | ||
}, | }, | ||
["err_argument_invalid_range"]={ | ["err_argument_invalid_range"]={ | ||
Line 1,782: | Line 1,782: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{s, | [k]={{s,8809,"/// SemaBuiltinConstantArgRange - Handle a check if argument ArgNum of CallExpr\n/// TheCall is a constant expression in the range [Low, High].\nbool Sema::SemaBuiltinConstantArgRange(CallExpr *TheCall, int ArgNum, int Low, int High, bool RangeIsError) {\n if (Result.getSExtValue() < Low || Result.getSExtValue() > High) {\n if (RangeIsError)\n return Diag(TheCall->getBeginLoc(), diag::err_argument_invalid_range) << toString(Result, 10) << Low << High << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_argument_not_contiguous_bit_field"]={ | ["err_argument_not_contiguous_bit_field"]={ | ||
Line 1,794: | Line 1,794: | ||
[h]=o, | [h]=o, | ||
[d]={Lb,1615397021,Kb}, | [d]={Lb,1615397021,Kb}, | ||
[k]={{s, | [k]={{s,4238,"/// Returns true if the argument consists of one contiguous run of 1s with any\n/// number of 0s on either side. The 1s are allowed to wrap from LSB to MSB, so\n/// 0x000FFF0, 0x0000FFFF, 0xFF0000FF, 0x0 are all runs. 0x0F0F0000 is not,\n/// since all 1s are not contiguous.\nbool Sema::SemaValueIsRunOfOnes(CallExpr *TheCall, unsigned ArgNum) {\n return Diag(TheCall->getBeginLoc(), diag::err_argument_not_contiguous_bit_field) << ArgNum << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_argument_not_multiple"]={ | ["err_argument_not_multiple"]={ | ||
Line 1,806: | Line 1,806: | ||
[h]=o, | [h]=o, | ||
[d]={"1f90f2d33f72",1476899452,"[mips][msa] Range check MSA intrinsics with immediates"}, | [d]={"1f90f2d33f72",1476899452,"[mips][msa] Range check MSA intrinsics with immediates"}, | ||
[k]={{s, | [k]={{s,8839,"/// SemaBuiltinConstantArgMultiple - Handle a check if argument ArgNum of CallExpr\n/// TheCall is a constant expression is a multiple of Num..\nbool Sema::SemaBuiltinConstantArgMultiple(CallExpr *TheCall, int ArgNum, unsigned Num) {\n if (Result.getSExtValue() % Num != 0)\n return Diag(TheCall->getBeginLoc(), diag::err_argument_not_multiple) << Num << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_argument_not_power_of_2"]={ | ["err_argument_not_power_of_2"]={ | ||
Line 1,818: | Line 1,818: | ||
[h]=o, | [h]=o, | ||
[d]={"08074cc96557",1567435850,"[clang,ARM] Initial ACLE intrinsics for MVE."}, | [d]={"08074cc96557",1567435850,"[clang,ARM] Initial ACLE intrinsics for MVE."}, | ||
[k]={{s, | [k]={{s,8864,"/// SemaBuiltinConstantArgPower2 - Check if argument ArgNum of TheCall is a\n/// constant expression representing a power of 2.\nbool Sema::SemaBuiltinConstantArgPower2(CallExpr *TheCall, int ArgNum) {\n return Diag(TheCall->getBeginLoc(), diag::err_argument_not_power_of_2) << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_argument_not_shifted_byte"]={ | ["err_argument_not_shifted_byte"]={ | ||
Line 1,830: | Line 1,830: | ||
[h]=o, | [h]=o, | ||
[d]={"08074cc96557",1567435850,"[clang,ARM] Initial ACLE intrinsics for MVE."}, | [d]={"08074cc96557",1567435850,"[clang,ARM] Initial ACLE intrinsics for MVE."}, | ||
[k]={{s, | [k]={{s,8913,"/// SemaBuiltinConstantArgShiftedByte - Check if argument ArgNum of TheCall is\n/// a constant expression representing an arbitrary byte value shifted left by\n/// a multiple of 8 bits.\nbool Sema::SemaBuiltinConstantArgShiftedByte(CallExpr *TheCall, int ArgNum, unsigned ArgBits) {\n return Diag(TheCall->getBeginLoc(), diag::err_argument_not_shifted_byte) << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_argument_not_shifted_byte_or_xxff"]={ | ["err_argument_not_shifted_byte_or_xxff"]={ | ||
Line 1,842: | Line 1,842: | ||
[h]=o, | [h]=o, | ||
[d]={"08074cc96557",1567435850,"[clang,ARM] Initial ACLE intrinsics for MVE."}, | [d]={"08074cc96557",1567435850,"[clang,ARM] Initial ACLE intrinsics for MVE."}, | ||
[k]={{s, | [k]={{s,8946,"/// SemaBuiltinConstantArgShiftedByteOr0xFF - Check if argument ArgNum of\n/// TheCall is a constant expression representing either a shifted byte value,\n/// or a value of the form 0x??FF (i.e. a member of the arithmetic progression\n/// 0x00FF, 0x01FF, ..., 0xFFFF). This strange range check is needed for some\n/// Arm MVE intrinsics.\nbool Sema::SemaBuiltinConstantArgShiftedByteOrXXFF(CallExpr *TheCall, int ArgNum, unsigned ArgBits) {\n return Diag(TheCall->getBeginLoc(), diag::err_argument_not_shifted_byte_or_xxff) << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_argument_required_after_attribute"]={ | ["err_argument_required_after_attribute"]={ | ||
Line 1,854: | Line 1,854: | ||
[h]=B, | [h]=B, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{D, | [k]={{D,1569,"void Parser::ParseSwiftNewTypeAttribute(IdentifierInfo &AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n if (Tok.is(tok::r_paren)) {\n Diag(Tok.getLocation(), diag::err_argument_required_after_attribute);"},{D,7006,"/// ParseFunctionDeclarator - We are after the identifier and have parsed the\n/// declarator D up to a paren, which indicates that we are parsing function\n/// arguments.\n///\n/// If FirstArgAttrs is non-null, then the caller parsed those attributes\n/// immediately after the open paren - they will be applied to the DeclSpec\n/// of the first parameter.\n///\n/// If RequiresArg is true, then the first argument of the function is required\n/// to be present and required to not be an identifier list.\n///\n/// For C++, after the parameter-list, it also parses the cv-qualifier-seq[opt],\n/// (C++11) ref-qualifier[opt], exception-specification[opt],\n/// (C++11) attribute-specifier-seq[opt], (C++11) trailing-return-type[opt] and\n/// (C++2a) the trailing requires-clause.\n///\n/// [C++11] exception-specification:\n/// dynamic-exception-specification\n/// noexcept-specification\n///\nvoid Parser::ParseFunctionDeclarator(Declarator &D, ParsedAttributes &FirstArgAttrs, BalancedDelimiterTracker &Tracker, bool IsAmbiguous, bool RequiresArg) {\n if (isFunctionDeclaratorIdentifierList()) {\n if (RequiresArg)\n Diag(Tok, diag::err_argument_required_after_attribute);"},{D,7023,"/// ParseFunctionDeclarator - We are after the identifier and have parsed the\n/// declarator D up to a paren, which indicates that we are parsing function\n/// arguments.\n///\n/// If FirstArgAttrs is non-null, then the caller parsed those attributes\n/// immediately after the open paren - they will be applied to the DeclSpec\n/// of the first parameter.\n///\n/// If RequiresArg is true, then the first argument of the function is required\n/// to be present and required to not be an identifier list.\n///\n/// For C++, after the parameter-list, it also parses the cv-qualifier-seq[opt],\n/// (C++11) ref-qualifier[opt], exception-specification[opt],\n/// (C++11) attribute-specifier-seq[opt], (C++11) trailing-return-type[opt] and\n/// (C++2a) the trailing requires-clause.\n///\n/// [C++11] exception-specification:\n/// dynamic-exception-specification\n/// noexcept-specification\n///\nvoid Parser::ParseFunctionDeclarator(Declarator &D, ParsedAttributes &FirstArgAttrs, BalancedDelimiterTracker &Tracker, bool IsAmbiguous, bool RequiresArg) {\n if (isFunctionDeclaratorIdentifierList()) {\n } else {\n if (Tok.isNot(tok::r_paren))\n else if (RequiresArg)\n Diag(Tok, diag::err_argument_required_after_attribute);"}} | ||
}, | }, | ||
["err_arithmetic_nonfragile_interface"]={ | ["err_arithmetic_nonfragile_interface"]={ | ||
Line 1,866: | Line 1,866: | ||
[h]=o, | [h]=o, | ||
[d]={"12bdebbbf7ff",1240617008,"reject explicit pointer arithmetic on interface pointers in 64-bit objc ABI"}, | [d]={"12bdebbbf7ff",1240617008,"reject explicit pointer arithmetic on interface pointers in 64-bit objc ABI"}, | ||
[k]={{y, | [k]={{y,4986,"/// Diagnose if arithmetic on the given ObjC pointer is illegal.\n///\n/// \\return true on error\nstatic bool checkArithmeticOnObjCPointer(Sema &S, SourceLocation opLoc, Expr *op) {\n S.Diag(opLoc, diag::err_arithmetic_nonfragile_interface) << op->getType()->castAs<ObjCObjectPointerType>()->getPointeeType() << op->getSourceRange();"}} | ||
}, | }, | ||
["err_arm_invalid_coproc"]={ | ["err_arm_invalid_coproc"]={ | ||
Line 1,878: | Line 1,878: | ||
[h]=o, | [h]=o, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{s, | [k]={{s,3142,"bool Sema::CheckARMCoprocessorImmediate(const TargetInfo &TI, const Expr *CoprocArg, bool WantCDE) {\n if (IsCDECoproc != WantCDE)\n return Diag(CoprocArg->getBeginLoc(), diag::err_arm_invalid_coproc) << (int)CoprocNo << (int)WantCDE << CoprocArg->getSourceRange();"}} | ||
}, | }, | ||
["err_arm_invalid_specialreg"]={ | ["err_arm_invalid_specialreg"]={ | ||
Line 1,890: | Line 1,890: | ||
[h]=o, | [h]=o, | ||
[d]={"59b2d8390941",1434390661,"This patch implements clang support for the ACLE special register intrinsics"}, | [d]={"59b2d8390941",1434390661,"This patch implements clang support for the ACLE special register intrinsics"}, | ||
[k]={{s, | [k]={{s,9141,"/// SemaBuiltinARMSpecialReg - Handle a check if argument ArgNum of CallExpr\n/// TheCall is an ARM/AArch64 special register string literal.\nbool Sema::SemaBuiltinARMSpecialReg(unsigned BuiltinID, CallExpr *TheCall, int ArgNum, unsigned ExpectedFieldNum, bool AllowName) {\n if (Fields.size() != ExpectedFieldNum && !(AllowName && Fields.size() == 1))\n return Diag(TheCall->getBeginLoc(), diag::err_arm_invalid_specialreg) << Arg->getSourceRange();"},{s,9183,"/// SemaBuiltinARMSpecialReg - Handle a check if argument ArgNum of CallExpr\n/// TheCall is an ARM/AArch64 special register string literal.\nbool Sema::SemaBuiltinARMSpecialReg(unsigned BuiltinID, CallExpr *TheCall, int ArgNum, unsigned ExpectedFieldNum, bool AllowName) {\n // If the string is the name of a register then we cannot check that it is\n // valid here but if the string is of one the forms described in ACLE then we\n // can check that the supplied fields are integers and within the valid\n // ranges.\n if (Fields.size() > 1) {\n if (!ValidString)\n return Diag(TheCall->getBeginLoc(), diag::err_arm_invalid_specialreg) << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_array_designator_empty_range"]={ | ["err_array_designator_empty_range"]={ | ||
Line 1,902: | Line 1,902: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{E, | [k]={{E,3400,"ExprResult Sema::ActOnDesignatedInitializer(Designation &Desig, SourceLocation EqualOrColonLoc, bool GNUSyntax, ExprResult Init) {\n // Build designators and check array designator expressions.\n for (unsigned Idx = 0; Idx < Desig.getNumDesignators(); ++Idx) {\n if (D.isFieldDesignator()) {\n } else if (D.isArrayDesignator()) {\n } else if (D.isArrayRangeDesignator()) {\n if (!StartIndex || !EndIndex)\n else {\n if (!StartDependent && !EndDependent && EndValue < StartValue) {\n Diag(D.getEllipsisLoc(), diag::err_array_designator_empty_range) << toString(StartValue, 10) << toString(EndValue, 10) << StartIndex->getSourceRange() << EndIndex->getSourceRange();"}} | ||
}, | }, | ||
["err_array_designator_negative"]={ | ["err_array_designator_negative"]={ | ||
Line 1,914: | Line 1,914: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{E, | [k]={{E,3337,"/// Check that the given Index expression is a valid array designator\n/// value. This is essentially just a wrapper around\n/// VerifyIntegerConstantExpression that also checks for negative values\n/// and produces a reasonable diagnostic if there is a\n/// failure. Returns the index expression, possibly with an implicit cast\n/// added, on success. If everything went okay, Value will receive the\n/// value of the constant expression.\nstatic ExprResult CheckArrayDesignatorExpr(Sema &S, Expr *Index, llvm::APSInt &Value) {\n if (Value.isSigned() && Value.isNegative())\n return S.Diag(Loc, diag::err_array_designator_negative) << toString(Value, 10) << Index->getSourceRange();"}} | ||
}, | }, | ||
["err_array_designator_non_array"]={ | ["err_array_designator_non_array"]={ | ||
Line 1,926: | Line 1,926: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{E, | [k]={{E,3001,"/// Check the well-formedness of a C99 designated initializer.\n///\n/// Determines whether the designated initializer @p DIE, which\n/// resides at the given @p Index within the initializer list @p\n/// IList, is well-formed for a current object of type @p DeclType\n/// (C99 6.7.8). The actual subobject that this designator refers to\n/// within the current subobject is returned in either\n/// @p NextField or @p NextElementIndex (whichever is appropriate).\n///\n/// @param IList The initializer list in which this designated\n/// initializer occurs.\n///\n/// @param DIE The designated initializer expression.\n///\n/// @param DesigIdx The index of the current designator.\n///\n/// @param CurrentObjectType The type of the \"current object\" (C99 6.7.8p17),\n/// into which the designation in @p DIE should refer.\n///\n/// @param NextField If non-NULL and the first designator in @p DIE is\n/// a field, this will be set to the field declaration corresponding\n/// to the field named by the designator. On input, this is expected to be\n/// the next field that would be initialized in the absence of designation,\n/// if the complete object being initialized is a struct.\n///\n/// @param NextElementIndex If non-NULL and the first designator in @p\n/// DIE is an array designator or GNU array-range designator, this\n/// will be set to the last index initialized by this designator.\n///\n/// @param Index Index into @p IList where the designated initializer\n/// @p DIE occurs.\n///\n/// @param StructuredList The initializer list expression that\n/// describes all of the subobject initializers in the order they\'ll\n/// actually be initialized.\n///\n/// @returns true if there was an error, false otherwise.\nbool InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, InitListExpr *IList, DesignatedInitExpr *DIE, unsigned DesigIdx, QualType &CurrentObjectType, RecordDecl::field_iterator *NextField, llvm::APSInt *NextElementIndex, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool FinishSubobjectInit, bool TopLevelObject) {\n if (!AT) {\n if (!VerifyOnly)\n SemaRef.Diag(D->getLBracketLoc(), diag::err_array_designator_non_array) << CurrentObjectType;"}} | ||
}, | }, | ||
["err_array_designator_too_large"]={ | ["err_array_designator_too_large"]={ | ||
Line 1,938: | Line 1,938: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{E, | [k]={{E,3043,"/// Check the well-formedness of a C99 designated initializer.\n///\n/// Determines whether the designated initializer @p DIE, which\n/// resides at the given @p Index within the initializer list @p\n/// IList, is well-formed for a current object of type @p DeclType\n/// (C99 6.7.8). The actual subobject that this designator refers to\n/// within the current subobject is returned in either\n/// @p NextField or @p NextElementIndex (whichever is appropriate).\n///\n/// @param IList The initializer list in which this designated\n/// initializer occurs.\n///\n/// @param DIE The designated initializer expression.\n///\n/// @param DesigIdx The index of the current designator.\n///\n/// @param CurrentObjectType The type of the \"current object\" (C99 6.7.8p17),\n/// into which the designation in @p DIE should refer.\n///\n/// @param NextField If non-NULL and the first designator in @p DIE is\n/// a field, this will be set to the field declaration corresponding\n/// to the field named by the designator. On input, this is expected to be\n/// the next field that would be initialized in the absence of designation,\n/// if the complete object being initialized is a struct.\n///\n/// @param NextElementIndex If non-NULL and the first designator in @p\n/// DIE is an array designator or GNU array-range designator, this\n/// will be set to the last index initialized by this designator.\n///\n/// @param Index Index into @p IList where the designated initializer\n/// @p DIE occurs.\n///\n/// @param StructuredList The initializer list expression that\n/// describes all of the subobject initializers in the order they\'ll\n/// actually be initialized.\n///\n/// @returns true if there was an error, false otherwise.\nbool InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, InitListExpr *IList, DesignatedInitExpr *DIE, unsigned DesigIdx, QualType &CurrentObjectType, RecordDecl::field_iterator *NextField, llvm::APSInt *NextElementIndex, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool FinishSubobjectInit, bool TopLevelObject) {\n if (isa<ConstantArrayType>(AT)) {\n if (DesignatedEndIndex >= MaxElements) {\n if (!VerifyOnly)\n SemaRef.Diag(IndexExpr->getBeginLoc(), diag::err_array_designator_too_large) << toString(DesignatedEndIndex, 10) << toString(MaxElements, 10) << IndexExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_array_element_alignment"]={ | ["err_array_element_alignment"]={ | ||
Line 1,950: | Line 1,950: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{r, | [k]={{r,2448,"bool Sema::checkArrayElementAlignment(QualType EltTy, SourceLocation Loc) {\n Diag(Loc, diag::err_array_element_alignment) << EltTy << Size.getQuantity() << Alignment.getQuantity();"}} | ||
}, | }, | ||
["err_array_incomplete_or_sizeless_type"]={ | ["err_array_incomplete_or_sizeless_type"]={ | ||
Line 1,962: | Line 1,962: | ||
[h]=o, | [h]=o, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{q, | [k]={{q,13802,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n case VarDecl::TentativeDefinition:\n // File scope. C99 6.9.2p2: A declaration of an identifier for an\n // object that has file scope without an initializer, and without a\n // storage-class specifier or with the storage-class specifier \"static\",\n // constitutes a tentative definition. Note: A tentative definition with\n // external linkage is valid (C99 6.2.2p5).\n if (!Var->isInvalidDecl()) {\n if (const IncompleteArrayType *ArrayT = Context.getAsIncompleteArrayType(Type)) {\n if (RequireCompleteSizedType(Var->getLocation(), ArrayT->getElementType(), diag::err_array_incomplete_or_sizeless_type))"},{y,7674,"ExprResult Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr) {\n if (literalType->isArrayType()) {\n if (RequireCompleteSizedType(LParenLoc, Context.getBaseElementType(literalType), diag::err_array_incomplete_or_sizeless_type, SourceRange(LParenLoc, LiteralExpr->getSourceRange().getEnd())))"},{r,2492,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n if (getLangOpts().CPlusPlus) {\n if (T->isVoidType() || T->isIncompleteArrayType()) {\n Diag(Loc, diag::err_array_incomplete_or_sizeless_type) << 0 << T;"},{r,2512,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n if (getLangOpts().CPlusPlus) {\n } else {\n if (!T.isWebAssemblyReferenceType() && RequireCompleteSizedType(Loc, T, diag::err_array_incomplete_or_sizeless_type))"},{r,2526,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n if (T->isSizelessType() && !T.isWebAssemblyReferenceType()) {\n Diag(Loc, diag::err_array_incomplete_or_sizeless_type) << 1 << T;"}} | ||
}, | }, | ||
["err_array_init_different_type"]={ | ["err_array_init_different_type"]={ | ||
Line 1,974: | Line 1,974: | ||
[h]=o, | [h]=o, | ||
[d]={"e2f943b5cb44",1298399391,"Implement the GNU C extension which permits the initialization of an"}, | [d]={"e2f943b5cb44",1298399391,"Implement the GNU C extension which permits the initialization of an"}, | ||
[k]={{E, | [k]={{E,9611,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_NonConstantArrayInit:\n S.Diag(Kind.getLocation(), (Failure == FK_ArrayTypeMismatch ? diag::err_array_init_different_type : diag::err_array_init_non_constant_array)) << DestType.getNonReferenceType() << OnlyArg->getType() << Args[0]->getSourceRange();"}} | ||
}, | }, | ||
["err_array_init_incompat_wide_string_into_wchar"]={ | ["err_array_init_incompat_wide_string_into_wchar"]={ | ||
Line 1,986: | Line 1,986: | ||
[h]=o, | [h]=o, | ||
[d]={"8f62c5ca22f4",1368615784,"Better diagnostics for string initialization."}, | [d]={"8f62c5ca22f4",1368615784,"Better diagnostics for string initialization."}, | ||
[k]={{E, | [k]={{E,9594,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_IncompatWideStringIntoWideChar:\n S.Diag(Kind.getLocation(), diag::err_array_init_incompat_wide_string_into_wchar);"}} | ||
}, | }, | ||
["err_array_init_narrow_string_into_wchar"]={ | ["err_array_init_narrow_string_into_wchar"]={ | ||
Line 1,998: | Line 1,998: | ||
[h]=o, | [h]=o, | ||
[d]={"8f62c5ca22f4",1368615784,"Better diagnostics for string initialization."}, | [d]={"8f62c5ca22f4",1368615784,"Better diagnostics for string initialization."}, | ||
[k]={{E, | [k]={{E,9587,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_NarrowStringIntoWideCharArray:\n S.Diag(Kind.getLocation(), diag::err_array_init_narrow_string_into_wchar);"}} | ||
}, | }, | ||
["err_array_init_non_constant_array"]={ | ["err_array_init_non_constant_array"]={ | ||
Line 2,010: | Line 2,010: | ||
[h]=o, | [h]=o, | ||
[d]={"e2f943b5cb44",1298399391,"Implement the GNU C extension which permits the initialization of an"}, | [d]={"e2f943b5cb44",1298399391,"Implement the GNU C extension which permits the initialization of an"}, | ||
[k]={{E, | [k]={{E,9612,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_NonConstantArrayInit:\n S.Diag(Kind.getLocation(), (Failure == FK_ArrayTypeMismatch ? diag::err_array_init_different_type : diag::err_array_init_non_constant_array)) << DestType.getNonReferenceType() << OnlyArg->getType() << Args[0]->getSourceRange();"}} | ||
}, | }, | ||
["err_array_init_not_init_list"]={ | ["err_array_init_not_init_list"]={ | ||
Line 2,022: | Line 2,022: | ||
[h]=o, | [h]=o, | ||
[d]={"3e1e52782604",1260399737,"Reimplement reference initialization (C++ [dcl.init.ref]) using the"}, | [d]={"3e1e52782604",1260399737,"Reimplement reference initialization (C++ [dcl.init.ref]) using the"}, | ||
[k]={{E, | [k]={{E,9578,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_ArrayNeedsInitList:\n S.Diag(Kind.getLocation(), diag::err_array_init_not_init_list) << 0;"},{E,9581,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_ArrayNeedsInitListOrStringLiteral:\n S.Diag(Kind.getLocation(), diag::err_array_init_not_init_list) << 1;"},{E,9584,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_ArrayNeedsInitListOrWideStringLiteral:\n S.Diag(Kind.getLocation(), diag::err_array_init_not_init_list) << 2;"}} | ||
}, | }, | ||
["err_array_init_plain_string_into_char8_t"]={ | ["err_array_init_plain_string_into_char8_t"]={ | ||
Line 2,034: | Line 2,034: | ||
[h]=o, | [h]=o, | ||
[d]={"3a8244df6fb8",1525150965,"Implement P0482R2, support for char8_t type."}, | [d]={"3a8244df6fb8",1525150965,"Implement P0482R2, support for char8_t type."}, | ||
[k]={{E, | [k]={{E,9598,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_PlainStringIntoUTF8Char:\n S.Diag(Kind.getLocation(), diag::err_array_init_plain_string_into_char8_t);"}} | ||
}, | }, | ||
["err_array_init_utf8_string_into_char"]={ | ["err_array_init_utf8_string_into_char"]={ | ||
Line 2,046: | Line 2,046: | ||
[h]=o, | [h]=o, | ||
[d]={"3a8244df6fb8",1525150965,"Implement P0482R2, support for char8_t type."}, | [d]={"3a8244df6fb8",1525150965,"Implement P0482R2, support for char8_t type."}, | ||
[k]={{E, | [k]={{E,9604,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_UTF8StringIntoPlainChar:\n S.Diag(Kind.getLocation(), diag::err_array_init_utf8_string_into_char) << DestType->isSignedIntegerType() << S.getLangOpts().CPlusPlus20;"}} | ||
}, | }, | ||
["err_array_init_wide_string_into_char"]={ | ["err_array_init_wide_string_into_char"]={ | ||
Line 2,058: | Line 2,058: | ||
[h]=o, | [h]=o, | ||
[d]={"8f62c5ca22f4",1368615784,"Better diagnostics for string initialization."}, | [d]={"8f62c5ca22f4",1368615784,"Better diagnostics for string initialization."}, | ||
[k]={{E, | [k]={{E,9590,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_WideStringIntoCharArray:\n S.Diag(Kind.getLocation(), diag::err_array_init_wide_string_into_char);"}} | ||
}, | }, | ||
["err_array_new_needs_size"]={ | ["err_array_new_needs_size"]={ | ||
Line 2,070: | Line 2,070: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{x, | [k]={{x,1869,"/// Parsed a C++ \'new\' expression (C++ 5.3.4).\n///\n/// E.g.:\n/// @code new (memory) int[size][4] @endcode\n/// or\n/// @code ::new Foo(23, \"hello\") @endcode\n///\n/// \\param StartLoc The first location of the expression.\n/// \\param UseGlobal True if \'new\' was prefixed with \'::\'.\n/// \\param PlacementLParen Opening paren of the placement arguments.\n/// \\param PlacementArgs Placement new arguments.\n/// \\param PlacementRParen Closing paren of the placement arguments.\n/// \\param TypeIdParens If the type is in parens, the source range.\n/// \\param D The type to be allocated, as well as array dimensions.\n/// \\param Initializer The initializing expression or initializer-list, or null\n/// if there is none.\nExprResult Sema::ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, Expr *Initializer) {\n // If the specified type is an array, unwrap it and save the expression.\n if (D.getNumTypeObjects() > 0 && D.getTypeObject(0).Kind == DeclaratorChunk::Array) {\n if (!Chunk.Arr.NumElts && !Initializer)\n return ExprError(Diag(Chunk.Loc, diag::err_array_new_needs_size) << D.getSourceRange());"}} | ||
}, | }, | ||
["err_array_of_abstract_type"]={ | ["err_array_of_abstract_type"]={ | ||
Line 2,082: | Line 2,082: | ||
[h]=o, | [h]=o, | ||
[d]={"7d8072e03860",1272397094,"Diagnose the use of abstract types as array element types. Previously,"}, | [d]={"7d8072e03860",1272397094,"Diagnose the use of abstract types as array element types. Previously,"}, | ||
[k]={{v, | [k]={{v,6095,"#include \"clang/AST/TypeLocNodes.def\"\n CheckPolymorphic(PointerTypeLoc) CheckPolymorphic(ReferenceTypeLoc) CheckPolymorphic(MemberPointerTypeLoc) CheckPolymorphic(BlockPointerTypeLoc) CheckPolymorphic(AtomicTypeLoc)\n // It matched; do some magic.\n // FIXME: These should be at most warnings. See P0929R2, CWG1640, CWG1646.\n if (Sel == Sema::AbstractArrayType) {\n Info.S.Diag(Ctx->getLocation(), diag::err_array_of_abstract_type) << T << TL.getSourceRange();"},{r,2497,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n if (getLangOpts().CPlusPlus) {\n if (RequireNonAbstractType(Brackets.getBegin(), T, diag::err_array_of_abstract_type))"}} | ||
}, | }, | ||
["err_array_section_does_not_specify_contiguous_storage"]={ | ["err_array_section_does_not_specify_contiguous_storage"]={ | ||
Line 2,094: | Line 2,094: | ||
[h]="OpenMP Issue", | [h]="OpenMP Issue", | ||
[d]={"a9f35cb7d665",1457538365,"[OpenMP] Add support for multidimensional array sections in map clause SEMA."}, | [d]={"a9f35cb7d665",1457538365,"[OpenMP] Add support for multidimensional array sections in map clause SEMA."}, | ||
[k]={{"clang/lib/Sema/SemaOpenMP.cpp", | [k]={{"clang/lib/Sema/SemaOpenMP.cpp",21302,"class MapBaseChecker final : public StmtVisitor<MapBaseChecker, bool> {\n bool VisitOMPArraySectionExpr(OMPArraySectionExpr *OASE) {\n if (AllowWholeSizeArraySection) {\n } else if (DKind == OMPD_target_update && SemaRef.getLangOpts().OpenMP >= 50) {\n } else if (AllowUnitySizeArraySection && NotUnity) {\n SemaRef.Diag(ELoc, diag::err_array_section_does_not_specify_contiguous_storage) << OASE->getSourceRange();"}} | ||
}, | }, | ||
["err_array_section_does_not_specify_length"]={ | ["err_array_section_does_not_specify_length"]={ | ||
Line 2,106: | Line 2,106: | ||
[h]="OpenMP Issue", | [h]="OpenMP Issue", | ||
[d]={fb,1590001902,eb}, | [d]={fb,1590001902,eb}, | ||
[k]={{"clang/lib/Sema/SemaOpenMP.cpp", | [k]={{"clang/lib/Sema/SemaOpenMP.cpp",21437,"/// Return the expression of the base of the mappable expression or null if it\n/// cannot be determined and do all the necessary checks to see if the\n/// expression is valid as a standalone mappable expression. In the process,\n/// record all the components of the expression.\nstatic const Expr *checkMapClauseExpressionBase(Sema &SemaRef, Expr *E, OMPClauseMappableExprCommon::MappableExprComponentList &CurComponents, OpenMPClauseKind CKind, OpenMPDirectiveKind DKind, bool NoDiagnose) {\n if (Checker.Visit(E->IgnoreParens())) {\n // Check if the highest dimension array section has length specified\n if (SemaRef.getLangOpts().OpenMP >= 50 && !CurComponents.empty() && (CKind == OMPC_to || CKind == OMPC_from)) {\n for (; CI != CE; ++CI) {\n SemaRef.Diag(ELoc, diag::err_array_section_does_not_specify_length) << ERange;"}} | ||
}, | }, | ||
["err_array_size_ambiguous_conversion"]={ | ["err_array_size_ambiguous_conversion"]={ | ||
Line 2,118: | Line 2,118: | ||
[h]=o, | [h]=o, | ||
[d]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class"}, | [d]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class"}, | ||
[k]={{x, | [k]={{x,2172,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n if (getLangOpts().CPlusPlus14) {\n } else {\n class SizeConvertDiagnoser : public ICEConvertDiagnoser {\n SemaDiagnosticBuilder diagnoseAmbiguous(Sema &S, SourceLocation Loc, QualType T) override { return S.Diag(Loc, diag::err_array_size_ambiguous_conversion) << T; }"}} | ||
}, | }, | ||
["err_array_size_explicit_conversion"]={ | ["err_array_size_explicit_conversion"]={ | ||
Line 2,130: | Line 2,130: | ||
[h]=o, | [h]=o, | ||
[d]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class"}, | [d]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class"}, | ||
[k]={{x, | [k]={{x,2161,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n if (getLangOpts().CPlusPlus14) {\n } else {\n class SizeConvertDiagnoser : public ICEConvertDiagnoser {\n SemaDiagnosticBuilder diagnoseExplicitConv(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy) override { return S.Diag(Loc, diag::err_array_size_explicit_conversion) << T << ConvTy; }"}} | ||
}, | }, | ||
["err_array_size_incomplete_type"]={ | ["err_array_size_incomplete_type"]={ | ||
Line 2,142: | Line 2,142: | ||
[h]=o, | [h]=o, | ||
[d]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class"}, | [d]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class"}, | ||
[k]={{x, | [k]={{x,2155,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n if (getLangOpts().CPlusPlus14) {\n } else {\n class SizeConvertDiagnoser : public ICEConvertDiagnoser {\n SemaDiagnosticBuilder diagnoseIncomplete(Sema &S, SourceLocation Loc, QualType T) override { return S.Diag(Loc, diag::err_array_size_incomplete_type) << T << ArraySize->getSourceRange(); }"}} | ||
}, | }, | ||
["err_array_size_non_int"]={ | ["err_array_size_non_int"]={ | ||
Line 2,154: | Line 2,154: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{r, | [k]={{r,2414,"/// Check whether the specified array bound can be evaluated using the relevant\n/// language rules. If so, returns the possibly-converted expression and sets\n/// SizeVal to the size. If not, but the expression might be a VLA bound,\n/// returns ExprResult(). Otherwise, produces a diagnostic and returns\n/// ExprError().\nstatic ExprResult checkArraySize(Sema &S, Expr *&ArraySize, llvm::APSInt &SizeVal, unsigned VLADiag, bool VLAIsError) {\n // If the size is an ICE, it certainly isn\'t a VLA. If we\'re in a GNU mode\n // (like gnu99, but not c99) accept any evaluatable value as an extension.\n class VLADiagnoser : public Sema::VerifyICEDiagnoser {\n Sema::SemaDiagnosticBuilder diagnoseNotICEType(Sema &S, SourceLocation Loc, QualType T) override { return S.Diag(Loc, diag::err_array_size_non_int) << T; }"},{r,2570,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // C99 6.7.5.2p1: The size expression shall have integer type.\n // C++11 allows contextual conversions to such types.\n if (!getLangOpts().CPlusPlus11 && ArraySize && !ArraySize->isTypeDependent() && !ArraySize->getType()->isIntegralOrUnscopedEnumerationType()) {\n Diag(ArraySize->getBeginLoc(), diag::err_array_size_non_int) << ArraySize->getType() << ArraySize->getSourceRange();"}} | ||
}, | }, | ||
["err_array_size_not_integral"]={ | ["err_array_size_not_integral"]={ | ||
Line 2,166: | Line 2,166: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{x, | [k]={{x,2149,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n if (getLangOpts().CPlusPlus14) {\n } else {\n class SizeConvertDiagnoser : public ICEConvertDiagnoser {\n SemaDiagnosticBuilder diagnoseNotInt(Sema &S, SourceLocation Loc, QualType T) override { return S.Diag(Loc, diag::err_array_size_not_integral) << S.getLangOpts().CPlusPlus11 << T; }"}} | ||
}, | }, | ||
["err_array_star_in_function_definition"]={ | ["err_array_star_in_function_definition"]={ | ||
Line 2,178: | Line 2,178: | ||
[h]=o, | [h]=o, | ||
[d]={"deb55d512333",1265000569,"Fix for PR5185. C99 [*] VLA notation should be disallowed in function definitions."}, | [d]={"deb55d512333",1265000569,"Fix for PR5185. C99 [*] VLA notation should be disallowed in function definitions."}, | ||
[k]={{s, | [k]={{s,16617,"static void diagnoseArrayStarInParamType(Sema &S, QualType PType, SourceLocation Loc) {\n S.Diag(Loc, diag::err_array_star_in_function_definition);"}} | ||
}, | }, | ||
["err_array_star_outside_prototype"]={ | ["err_array_star_outside_prototype"]={ | ||
Line 2,190: | Line 2,190: | ||
[h]=o, | [h]=o, | ||
[d]={"4e2ab5550284",1240783071,"Add a bit more handling for declarations like \"int a[*]\"."}, | [d]={"4e2ab5550284",1240783071,"Add a bit more handling for declarations like \"int a[*]\"."}, | ||
[k]={{r, | [k]={{r,5134,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n case DeclaratorChunk::Array: {\n if (ASM == ArrayType::Star && !D.isPrototypeContext()) {\n S.Diag(DeclType.Loc, diag::err_array_star_outside_prototype);"}} | ||
}, | }, | ||
["err_array_static_not_outermost"]={ | ["err_array_static_not_outermost"]={ | ||
Line 2,202: | Line 2,202: | ||
[h]=o, | [h]=o, | ||
[d]={"420052640f7c",1345016550,"Check for improper use of \'static\' and type qualifiers in array"}, | [d]={"420052640f7c",1345016550,"Check for improper use of \'static\' and type qualifiers in array"}, | ||
[k]={{r, | [k]={{r,5157,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n case DeclaratorChunk::Array: {\n // C99 6.7.5.2p1: The optional type qualifiers and the keyword static\n // shall appear only in a declaration of a function parameter with an\n // array type, ...\n if (ASM == ArrayType::Static || ATI.TypeQuals) {\n // C99 6.7.5.2p1: ... and then only in the outermost array type\n // derivation.\n if (hasOuterPointerLikeChunk(D, chunkIndex)) {\n S.Diag(DeclType.Loc, diag::err_array_static_not_outermost) << (ASM == ArrayType::Static ? \"\'static\'\" : \"type qualifier\");"}} | ||
}, | }, | ||
["err_array_static_outside_prototype"]={ | ["err_array_static_outside_prototype"]={ | ||
Line 2,214: | Line 2,214: | ||
[h]=o, | [h]=o, | ||
[d]={"420052640f7c",1345016550,"Check for improper use of \'static\' and type qualifiers in array"}, | [d]={"420052640f7c",1345016550,"Check for improper use of \'static\' and type qualifiers in array"}, | ||
[k]={{r, | [k]={{r,5145,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n case DeclaratorChunk::Array: {\n // C99 6.7.5.2p1: The optional type qualifiers and the keyword static\n // shall appear only in a declaration of a function parameter with an\n // array type, ...\n if (ASM == ArrayType::Static || ATI.TypeQuals) {\n if (!(D.isPrototypeContext() || D.getContext() == DeclaratorContext::KNRTypeList)) {\n S.Diag(DeclType.Loc, diag::err_array_static_outside_prototype) << (ASM == ArrayType::Static ? \"\'static\'\" : \"type qualifier\");"}} | ||
}, | }, | ||
["err_array_too_large"]={ | ["err_array_too_large"]={ | ||
Line 2,226: | Line 2,226: | ||
[h]=o, | [h]=o, | ||
[d]={"caa1bf434d93",1282091940,"Emit an error if an array is too large. We\'re slightly more strict"}, | [d]={"caa1bf434d93",1282091940,"Emit an error if an array is too large. We\'re slightly more strict"}, | ||
[k]={{q, | [k]={{q,6611,"/// Attempt to fold a variable-sized type to a constant-sized type, returning\n/// true if we were successful.\nbool Sema::tryToFixVariablyModifiedVarType(TypeSourceInfo *&TInfo, QualType &T, SourceLocation Loc, unsigned FailedFoldDiagID) {\n if (SizeIsNegative)\n else if (Oversized.getBoolValue())\n Diag(Loc, diag::err_array_too_large) << toString(Oversized, 10);"},{q,6730,"void Sema::CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *NewTD) {\n if (T->isVariablyModifiedType()) {\n if (S->getFnParent() == nullptr) {\n if (FixedTInfo) {\n } else {\n if (SizeIsNegative)\n else if (T->isVariableArrayType())\n else if (Oversized.getBoolValue())\n Diag(NewTD->getLocation(), diag::err_array_too_large) << toString(Oversized, 10);"},{x,2230,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n // We\'ve already performed any required implicit conversion to integer or\n // unscoped enumeration type.\n // FIXME: Per CWG1464, we are required to check the value prior to\n // converting to size_t. This will never find a negative array size in\n // C++14 onwards, because Value is always unsigned here!\n if (std::optional<llvm::APSInt> Value = (*ArraySize)->getIntegerConstantExpr(Context)) {\n if (!AllocType->isDependentType()) {\n if (ActiveSizeBits > ConstantArrayType::getMaxSizeBits(Context))\n return ExprError(Diag((*ArraySize)->getBeginLoc(), diag::err_array_too_large) << toString(*Value, 10) << (*ArraySize)->getSourceRange());"},{r,2660,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n if (!ArraySize) {\n } else if (ArraySize->isTypeDependent() || ArraySize->isValueDependent()) {\n } else {\n if (!R.isUsable()) {\n } else if (!T->isDependentType() && !T->isIncompleteType() && !T->isConstantSizeType()) {\n } else {\n if (ActiveSizeBits > ConstantArrayType::getMaxSizeBits(Context)) {\n Diag(ArraySize->getBeginLoc(), diag::err_array_too_large) << toString(ConstVal, 10) << ArraySize->getSourceRange();"}} | ||
}, | }, | ||
["err_as_qualified_auto_decl"]={ | ["err_as_qualified_auto_decl"]={ | ||
Line 2,238: | Line 2,238: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{q, | [k]={{q,8537,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // Emit an error if an address space was applied to decl with local storage.\n // This includes arrays of objects with address space qualifiers, but not\n // automatic variables that point to other address spaces.\n // ISO/IEC TR 18037 S5.1.2\n if (!getLangOpts().OpenCL && NewVD->hasLocalStorage() && T.getAddressSpace() != LangAS::Default) {\n Diag(NewVD->getLocation(), diag::err_as_qualified_auto_decl) << 0;"},{q,8638,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if (getLangOpts().OpenCL) {\n // FIXME: Adding local AS in C++ for OpenCL might make sense.\n if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() || NewVD->hasExternalStorage()) {\n } else {\n if (T.getAddressSpace() == LangAS::opencl_constant || T.getAddressSpace() == LangAS::opencl_local) {\n } else if (T.getAddressSpace() != LangAS::opencl_private &&\n Diag(NewVD->getLocation(), diag::err_as_qualified_auto_decl) << 1;"}} | ||
}, | }, | ||
["err_asm_bad_register_type"]={ | ["err_asm_bad_register_type"]={ | ||
Line 2,250: | Line 2,250: | ||
[h]=C, | [h]=C, | ||
[d]={"2e31e4e47b09",1401986722,"Add pointer types to global named register"}, | [d]={"2e31e4e47b09",1401986722,"Add pointer types to global named register"}, | ||
[k]={{q, | [k]={{q,7969,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // Handle GNU asm-label extension (encoded as an attribute).\n if (Expr *E = (Expr *)D.getAsmLabel()) {\n if (S->getFnParent() != nullptr) {\n } else if (SC == SC_Register) {\n if (!R->isIntegralType(Context) && !R->isPointerType()) {\n Diag(D.getBeginLoc(), diag::err_asm_bad_register_type);"}} | ||
}, | }, | ||
["err_asm_duplicate_qual"]={ | ["err_asm_duplicate_qual"]={ | ||
Line 2,262: | Line 2,262: | ||
[h]=C, | [h]=C, | ||
[d]={"f08df464ae89",1582039343,"[OPENMP50]Add initial support for OpenMP 5.0 iterator."}, | [d]={"f08df464ae89",1582039343,"[OPENMP50]Add initial support for OpenMP 5.0 iterator."}, | ||
[k]={{"clang/lib/Parse/ParseStmtAsm.cpp", | [k]={{"clang/lib/Parse/ParseStmtAsm.cpp",696,"/// parseGNUAsmQualifierListOpt - Parse a GNU extended asm qualifier list.\n/// asm-qualifier:\n/// volatile\n/// inline\n/// goto\n///\n/// asm-qualifier-list:\n/// asm-qualifier\n/// asm-qualifier-list asm-qualifier\nbool Parser::parseGNUAsmQualifierListOpt(GNUAsmQualifiers &AQ) {\n while (true) {\n if (AQ.setAsmQualifier(A))\n Diag(Tok.getLocation(), diag::err_asm_duplicate_qual) << GNUAsmQualifiers::getQualifierName(A);"}} | ||
}, | }, | ||
["err_asm_empty"]={ | ["err_asm_empty"]={ | ||
Line 2,274: | Line 2,274: | ||
[h]=C, | [h]=C, | ||
[d]={"317be45091d7",1348516679,"Replace an assertion with an error for empty __asm statements."}, | [d]={"317be45091d7",1348516679,"Replace an assertion with an error for empty __asm statements."}, | ||
[k]={{"clang/lib/Parse/ParseStmtAsm.cpp", | [k]={{"clang/lib/Parse/ParseStmtAsm.cpp",330,"/// Turn a sequence of our tokens back into a string that we can hand\n/// to the MC asm parser.\nstatic bool buildMSAsmString(Preprocessor &PP, SourceLocation AsmLoc, ArrayRef<Token> AsmToks, SmallVectorImpl<unsigned> &TokOffsets, SmallString<512> &Asm) {\n for (unsigned i = 0, e = AsmToks.size(); i < e; ++i) {\n // Don\'t actually write \'__asm\' into the assembly stream.\n if (Tok.is(tok::kw_asm)) {\n // Complain about __asm at the end of the stream.\n if (i + 1 == e) {\n PP.Diag(AsmLoc, diag::err_asm_empty);"}} | ||
}, | }, | ||
["err_asm_empty_symbolic_operand_name"]={ | ["err_asm_empty_symbolic_operand_name"]={ | ||
Line 2,286: | Line 2,286: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{ob, | [k]={{ob,750,"/// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing\n/// it into pieces. If the asm string is erroneous, emit errors and return\n/// true, otherwise return false.\nunsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece> &Pieces, const ASTContext &C, unsigned &DiagOffs) const {\n while (true) {\n // Handle operands that have asmSymbolicName (e.g., %x[foo]).\n if (EscapedChar == \'[\') {\n if (NameEnd == CurPtr)\n return diag::err_asm_empty_symbolic_operand_name;"}} | ||
}, | }, | ||
["err_asm_incomplete_type"]={ | ["err_asm_incomplete_type"]={ | ||
Line 2,298: | Line 2,298: | ||
[h]=C, | [h]=C, | ||
[d]={"f413f5ed44dd",1367539813,"Move parsing of identifiers in MS-style inline assembly into"}, | [d]={"f413f5ed44dd",1367539813,"Move parsing of identifiers in MS-style inline assembly into"}, | ||
[k]={{F, | [k]={{F,816,"ExprResult Sema::LookupInlineAsmIdentifier(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool IsUnevaluatedContext) {\n if (RequireCompleteExprType(Result.get(), diag::err_asm_incomplete_type)) {"},{F,864,"bool Sema::LookupInlineAsmField(StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc) {\n for (StringRef NextMember : Members) {\n if (RequireCompleteType(AsmLoc, QualType(RT, 0), diag::err_asm_incomplete_type))"}} | ||
}, | }, | ||
["err_asm_input_duplicate_match"]={ | ["err_asm_input_duplicate_match"]={ | ||
Line 2,310: | Line 2,310: | ||
[h]=C, | [h]=C, | ||
[d]={"8e261be91106",1442846460,"Fix assertion in inline assembler IR gen"}, | [d]={"8e261be91106",1442846460,"Fix assertion in inline assembler IR gen"}, | ||
[k]={{F, | [k]={{F,606,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = 0, e = InputConstraintInfos.size(); i != e; ++i) {\n if (InputMatchedToOutput[TiedTo] != ~0U) {\n targetDiag(NS->getInputExpr(i)->getBeginLoc(), diag::err_asm_input_duplicate_match) << TiedTo;"}} | ||
}, | }, | ||
["err_asm_invalid_escape"]={ | ["err_asm_invalid_escape"]={ | ||
Line 2,322: | Line 2,322: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{ob, | [k]={{ob,663,"/// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing\n/// it into pieces. If the asm string is erroneous, emit errors and return\n/// true, otherwise return false.\nunsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece> &Pieces, const ASTContext &C, unsigned &DiagOffs) const {\n while (true) {\n // Escaped \"%\" character in asm string.\n if (CurPtr == StrEnd) {\n return diag::err_asm_invalid_escape;"},{ob,701,"/// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing\n/// it into pieces. If the asm string is erroneous, emit errors and return\n/// true, otherwise return false.\nunsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece> &Pieces, const ASTContext &C, unsigned &DiagOffs) const {\n while (true) {\n if (isLetter(EscapedChar)) {\n if (CurPtr == StrEnd) { // Premature end.\n return diag::err_asm_invalid_escape;"},{ob,780,"/// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing\n/// it into pieces. If the asm string is erroneous, emit errors and return\n/// true, otherwise return false.\nunsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece> &Pieces, const ASTContext &C, unsigned &DiagOffs) const {\n while (true) {\n return diag::err_asm_invalid_escape;"}} | ||
}, | }, | ||
["err_asm_invalid_global_var_reg"]={ | ["err_asm_invalid_global_var_reg"]={ | ||
Line 2,334: | Line 2,334: | ||
[h]=C, | [h]=C, | ||
[d]={"8c26ea663d43",1447805728,"Produce a better diagnostic for global register variables."}, | [d]={"8c26ea663d43",1447805728,"Produce a better diagnostic for global register variables."}, | ||
[k]={{q, | [k]={{q,7963,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // Handle GNU asm-label extension (encoded as an attribute).\n if (Expr *E = (Expr *)D.getAsmLabel()) {\n if (S->getFnParent() != nullptr) {\n } else if (SC == SC_Register) {\n // Global Named register\n if (DeclAttrsMatchCUDAMode(getLangOpts(), NewVD)) {\n if (!TI.isValidGCCRegisterName(Label))\n else if (!TI.validateGlobalRegisterVariable(Label, Context.getTypeSize(R), HasSizeMismatch))\n Diag(E->getExprLoc(), diag::err_asm_invalid_global_var_reg) << Label;"}} | ||
}, | }, | ||
["err_asm_invalid_input_constraint"]={ | ["err_asm_invalid_input_constraint"]={ | ||
Line 2,346: | Line 2,346: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{F, | [k]={{F,368,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = NumOutputs, e = NumOutputs + NumInputs; i != e; i++) {\n if (!Context.getTargetInfo().validateInputConstraint(OutputConstraintInfos, Info)) {\n targetDiag(Literal->getBeginLoc(), diag::err_asm_invalid_input_constraint) << Info.getConstraintStr();"}} | ||
}, | }, | ||
["err_asm_invalid_input_size"]={ | ["err_asm_invalid_input_size"]={ | ||
Line 2,358: | Line 2,358: | ||
[h]=C, | [h]=C, | ||
[d]={"887b485dbe3d",1352702571,"Check that the input size is correct for the given constraint."}, | [d]={"887b485dbe3d",1352702571,"Check that the input size is correct for the given constraint."}, | ||
[k]={{F, | [k]={{F,461,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = NumOutputs, e = NumOutputs + NumInputs; i != e; i++) {\n if (!Context.getTargetInfo().validateInputSize(FeatureMap, Literal->getString(), Size))\n return targetDiag(InputExpr->getBeginLoc(), diag::err_asm_invalid_input_size) << Info.getConstraintStr();"}} | ||
}, | }, | ||
["err_asm_invalid_lvalue_in_input"]={ | ["err_asm_invalid_lvalue_in_input"]={ | ||
Line 2,370: | Line 2,370: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{F, | [k]={{F,401,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = NumOutputs, e = NumOutputs + NumInputs; i != e; i++) {\n // Only allow void types for memory constraints.\n if (Info.allowsMemory() && !Info.allowsRegister()) {\n if (CheckAsmLValue(InputExpr, *this))\n return StmtError(Diag(InputExpr->getBeginLoc(), diag::err_asm_invalid_lvalue_in_input) << Info.getConstraintStr() << InputExpr->getSourceRange());"}} | ||
}, | }, | ||
["err_asm_invalid_lvalue_in_output"]={ | ["err_asm_invalid_lvalue_in_output"]={ | ||
Line 2,382: | Line 2,382: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{F, | [k]={{F,339,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = 0; i != NumOutputs; i++) {\n default:\n return StmtError(Diag(OutputExpr->getBeginLoc(), diag::err_asm_invalid_lvalue_in_output) << OutputExpr->getSourceRange());"}} | ||
}, | }, | ||
["err_asm_invalid_operand_number"]={ | ["err_asm_invalid_operand_number"]={ | ||
Line 2,394: | Line 2,394: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{ob, | [k]={{ob,722,"/// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing\n/// it into pieces. If the asm string is erroneous, emit errors and return\n/// true, otherwise return false.\nunsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece> &Pieces, const ASTContext &C, unsigned &DiagOffs) const {\n while (true) {\n // Handle operands that don\'t have asmSymbolicName (e.g., %x4).\n if (isDigit(EscapedChar)) {\n if (N >= NumOperands) {\n return diag::err_asm_invalid_operand_number;"}} | ||
}, | }, | ||
["err_asm_invalid_output_constraint"]={ | ["err_asm_invalid_output_constraint"]={ | ||
Line 2,406: | Line 2,406: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{F, | [k]={{F,277,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = 0; i != NumOutputs; i++) {\n if (!Context.getTargetInfo().validateOutputConstraint(Info)) {\n targetDiag(Literal->getBeginLoc(), diag::err_asm_invalid_output_constraint) << Info.getConstraintStr();"}} | ||
}, | }, | ||
["err_asm_invalid_output_size"]={ | ["err_asm_invalid_output_size"]={ | ||
Line 2,418: | Line 2,418: | ||
[h]=C, | [h]=C, | ||
[d]={"974131ea8825",1411064238,"[X86, inlineasm] Check that the output size is correct for the given constraint."}, | [d]={"974131ea8825",1411064238,"[X86, inlineasm] Check that the output size is correct for the given constraint."}, | ||
[k]={{F, | [k]={{F,346,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = 0; i != NumOutputs; i++) {\n if (!Context.getTargetInfo().validateOutputSize(FeatureMap, Literal->getString(), Size)) {\n targetDiag(OutputExpr->getBeginLoc(), diag::err_asm_invalid_output_size) << Info.getConstraintStr();"}} | ||
}, | }, | ||
["err_asm_invalid_type"]={ | ["err_asm_invalid_type"]={ | ||
Line 2,430: | Line 2,430: | ||
[h]=C, | [h]=C, | ||
[d]={"60ee88599098",1589228634,"[clang][asm goto][slh] Warn if asm goto + SLH"}, | [d]={"60ee88599098",1589228634,"[clang][asm goto][slh] Warn if asm goto + SLH"}, | ||
[k]={{F, | [k]={{F,306,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = 0; i != NumOutputs; i++) {\n // Disallow bit-precise integer types, since the backends tend to have\n // difficulties with abnormal sizes.\n if (OutputExpr->getType()->isBitIntType())\n return StmtError(Diag(OutputExpr->getBeginLoc(), diag::err_asm_invalid_type) << OutputExpr->getType() << 0 /*Input*/"},{F,442,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = NumOutputs, e = NumOutputs + NumInputs; i != e; i++) {\n if (InputExpr->getType()->isBitIntType())\n return StmtError(Diag(InputExpr->getBeginLoc(), diag::err_asm_invalid_type) << InputExpr->getType() << 1 /*Output*/"},{F,948,"StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef<Token> AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef<StringRef> Constraints, ArrayRef<StringRef> Clobbers, ArrayRef<Expr *> Exprs, SourceLocation EndLoc) {\n for (uint64_t I = 0; I < NumOutputs + NumInputs; ++I) {\n if (E->getType()->isBitIntType()) {\n Diag(E->getBeginLoc(), diag::err_asm_invalid_type) << E->getType() << (I < NumOutputs) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_asm_invalid_type_in_input"]={ | ["err_asm_invalid_type_in_input"]={ | ||
Line 2,442: | Line 2,442: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{"clang/lib/CodeGen/CGStmt.cpp", | [k]={{"clang/lib/CodeGen/CGStmt.cpp",2565,"void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {\n for (unsigned i = 0, e = S.getNumOutputs(); i != e; i++) {\n if (!Info.allowsMemory() && IsScalarOrAggregate) {\n if (llvm::Type *AdjTy = getTargetHooks().adjustInlineAsmType(*this, OutputConstraint, ResultRegTypes.back()))\n else {\n CGM.getDiags().Report(S.getAsmLoc(), diag::err_asm_invalid_type_in_input) << OutExpr->getType() << OutputConstraint;"},{"clang/lib/CodeGen/CGStmt.cpp",2694,"void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {\n for (unsigned i = 0, e = S.getNumInputs(); i != e; i++) {\n if (llvm::Type *AdjTy = getTargetHooks().adjustInlineAsmType(*this, ReplaceConstraint, Arg->getType()))\n else\n CGM.getDiags().Report(S.getAsmLoc(), diag::err_asm_invalid_type_in_input) << InputExpr->getType() << InputConstraint;"},{"clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp",120,"#endif\n if (RDO & IsLate) {\n Instance.getDiagnostics().Report(diag::err_asm_invalid_type_in_input) << \"Generating Interface Stubs is not supported with \""},{"clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp",234,"#endif\n bool HandleNamedDecl(const NamedDecl *ND, MangledSymbols &Symbols, int RDO) {\n Instance.getDiagnostics().Report(diag::err_asm_invalid_type_in_input) << \"Expected a function or function template decl.\";"},{F,434,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = NumOutputs, e = NumOutputs + NumInputs; i != e; i++) {\n if (Info.allowsRegister()) {\n if (InputExpr->getType()->isVoidType()) {\n return StmtError(Diag(InputExpr->getBeginLoc(), diag::err_asm_invalid_type_in_input) << InputExpr->getType() << Info.getConstraintStr() << InputExpr->getSourceRange());"}} | ||
}, | }, | ||
["err_asm_naked_parm_ref"]={ | ["err_asm_naked_parm_ref"]={ | ||
Line 2,454: | Line 2,454: | ||
[h]=o, | [h]=o, | ||
[d]={"93dbeae0f734",1409869008,"Don\'t allow inline asm statements to reference parameters in naked functions"}, | [d]={"93dbeae0f734",1409869008,"Don\'t allow inline asm statements to reference parameters in naked functions"}, | ||
[k]={{F, | [k]={{F,149,"static bool CheckNakedParmReference(Expr *E, Sema &S) {\n while (WorkList.size()) {\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {\n if (isa<ParmVarDecl>(DRE->getDecl())) {\n S.Diag(DRE->getBeginLoc(), diag::err_asm_naked_parm_ref);"}} | ||
}, | }, | ||
["err_asm_naked_this_ref"]={ | ["err_asm_naked_this_ref"]={ | ||
Line 2,466: | Line 2,466: | ||
[h]=o, | [h]=o, | ||
[d]={"71ac240620c4",1423002958,"Diagnose CXX \'this\' pointer reference in funcs with naked attr"}, | [d]={"71ac240620c4",1423002958,"Diagnose CXX \'this\' pointer reference in funcs with naked attr"}, | ||
[k]={{F, | [k]={{F,143,"static bool CheckNakedParmReference(Expr *E, Sema &S) {\n while (WorkList.size()) {\n if (isa<CXXThisExpr>(E)) {\n S.Diag(E->getBeginLoc(), diag::err_asm_naked_this_ref);"}} | ||
}, | }, | ||
["err_asm_non_addr_value_in_memory_constraint"]={ | ["err_asm_non_addr_value_in_memory_constraint"]={ | ||
Line 2,478: | Line 2,478: | ||
[h]=C, | [h]=C, | ||
[d]={"d9eab9cc130d",1438598290,"Additional fix for PR14269: Crash on vector elements / global register vars in inline assembler."}, | [d]={"d9eab9cc130d",1438598290,"Additional fix for PR14269: Crash on vector elements / global register vars in inline assembler."}, | ||
[k]={{F, | [k]={{F,184,"/// Returns true if given expression is not compatible with inline\n/// assembly\'s memory constraint; false otherwise.\nstatic bool checkExprMemoryConstraintCompat(Sema &S, Expr *E, TargetInfo::ConstraintInfo &Info, bool is_input_expr) {\n if (EType != ExprSafeType) {\n S.Diag(E->getBeginLoc(), diag::err_asm_non_addr_value_in_memory_constraint) << EType << is_input_expr << Info.getConstraintStr() << E->getSourceRange();"}} | ||
}, | }, | ||
["err_asm_operand_wide_string_literal"]={ | ["err_asm_operand_wide_string_literal"]={ | ||
Line 2,490: | Line 2,490: | ||
[h]=B, | [h]=B, | ||
[d]={"65cdbf58a7dc",1322786146,"Diagnose use of wide string literal in \'asm\' instead of crashing. Fixes <rdar://problem/10465079>."}, | [d]={"65cdbf58a7dc",1322786146,"Diagnose use of wide string literal in \'asm\' instead of crashing. Fixes <rdar://problem/10465079>."}, | ||
[k]={{Jb, | [k]={{Jb,1632,"/// ParseAsmStringLiteral - This is just a normal string-literal, but is not\n/// allowed to be a wide string, and is not subject to character translation.\n/// Unlike GCC, we also diagnose an empty string literal when parsing for an\n/// asm label as opposed to an asm statement, because such a construct does not\n/// behave well.\n///\n/// [GNU] asm-string-literal:\n/// string-literal\n///\nExprResult Parser::ParseAsmStringLiteral(bool ForAsmLabel) {\n if (!AsmString.isInvalid()) {\n if (!SL->isOrdinary()) {\n Diag(Tok, diag::err_asm_operand_wide_string_literal) << SL->isWide() << SL->getSourceRange();"},{Jb,1638,"/// ParseAsmStringLiteral - This is just a normal string-literal, but is not\n/// allowed to be a wide string, and is not subject to character translation.\n/// Unlike GCC, we also diagnose an empty string literal when parsing for an\n/// asm label as opposed to an asm statement, because such a construct does not\n/// behave well.\n///\n/// [GNU] asm-string-literal:\n/// string-literal\n///\nExprResult Parser::ParseAsmStringLiteral(bool ForAsmLabel) {\n if (!AsmString.isInvalid()) {\n if (ForAsmLabel && SL->getString().empty()) {\n Diag(Tok, diag::err_asm_operand_wide_string_literal) << 2 /* an empty */ << SL->getSourceRange();"}} | ||
}, | }, | ||
["err_asm_pmf_through_constraint_not_permitted"]={ | ["err_asm_pmf_through_constraint_not_permitted"]={ | ||
Line 2,502: | Line 2,502: | ||
[h]=C, | [h]=C, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{F, | [k]={{F,385,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = NumOutputs, e = NumOutputs + NumInputs; i != e; i++) {\n if (InputExpr->getType()->isMemberPointerType())\n return StmtError(Diag(InputExpr->getBeginLoc(), diag::err_asm_pmf_through_constraint_not_permitted) << InputExpr->getSourceRange());"}} | ||
}, | }, | ||
["err_asm_qualifier_ignored"]={ | ["err_asm_qualifier_ignored"]={ | ||
Line 2,514: | Line 2,514: | ||
[h]=C, | [h]=C, | ||
[d]={"f08df464ae89",1582039343,"[OPENMP50]Add initial support for OpenMP 5.0 iterator."}, | [d]={"f08df464ae89",1582039343,"[OPENMP50]Add initial support for OpenMP 5.0 iterator."}, | ||
[k]={{"clang/lib/Parse/ParseStmtAsm.cpp", | [k]={{"clang/lib/Parse/ParseStmtAsm.cpp",689,"/// parseGNUAsmQualifierListOpt - Parse a GNU extended asm qualifier list.\n/// asm-qualifier:\n/// volatile\n/// inline\n/// goto\n///\n/// asm-qualifier-list:\n/// asm-qualifier\n/// asm-qualifier-list asm-qualifier\nbool Parser::parseGNUAsmQualifierListOpt(GNUAsmQualifiers &AQ) {\n while (true) {\n if (A == GNUAsmQualifiers::AQ_unspecified) {\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok.getLocation(), diag::err_asm_qualifier_ignored);"}} | ||
}, | }, | ||
["err_asm_register_size_mismatch"]={ | ["err_asm_register_size_mismatch"]={ | ||
Line 2,526: | Line 2,526: | ||
[h]=C, | [h]=C, | ||
[d]={"8c26ea663d43",1447805728,"Produce a better diagnostic for global register variables."}, | [d]={"8c26ea663d43",1447805728,"Produce a better diagnostic for global register variables."}, | ||
[k]={{q, | [k]={{q,7965,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // Handle GNU asm-label extension (encoded as an attribute).\n if (Expr *E = (Expr *)D.getAsmLabel()) {\n if (S->getFnParent() != nullptr) {\n } else if (SC == SC_Register) {\n // Global Named register\n if (DeclAttrsMatchCUDAMode(getLangOpts(), NewVD)) {\n if (!TI.isValidGCCRegisterName(Label))\n else if (!TI.validateGlobalRegisterVariable(Label, Context.getTypeSize(R), HasSizeMismatch))\n else if (HasSizeMismatch)\n Diag(E->getExprLoc(), diag::err_asm_register_size_mismatch) << Label;"}} | ||
}, | }, | ||
["err_asm_tying_incompatible_types"]={ | ["err_asm_tying_incompatible_types"]={ | ||
Line 2,538: | Line 2,538: | ||
[h]=C, | [h]=C, | ||
[d]={"574428e4db41",1240770144,"implement PR4077: [Linux kernel] inscrutable error on inline asm input/output constraint mismatch"}, | [d]={"574428e4db41",1240770144,"implement PR4077: [Linux kernel] inscrutable error on inline asm input/output constraint mismatch"}, | ||
[k]={{F, | [k]={{F,705,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = 0, e = InputConstraintInfos.size(); i != e; ++i) {\n targetDiag(InputExpr->getBeginLoc(), diag::err_asm_tying_incompatible_types) << InTy << OutTy << OutputExpr->getSourceRange() << InputExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_asm_unexpected_constraint_alternatives"]={ | ["err_asm_unexpected_constraint_alternatives"]={ | ||
Line 2,550: | Line 2,550: | ||
[h]=C, | [h]=C, | ||
[d]={"c63fa612e46e",1419826199,"Sema: Forbid inconsistent constraint alternatives"}, | [d]={"c63fa612e46e",1419826199,"Sema: Forbid inconsistent constraint alternatives"}, | ||
[k]={{F, | [k]={{F,572,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = 0, e = OutputConstraintInfos.size(); i != e; ++i) {\n if (NumAlternatives == ~0U) {\n } else if (NumAlternatives != AltCount) {\n targetDiag(NS->getOutputExpr(i)->getBeginLoc(), diag::err_asm_unexpected_constraint_alternatives) << NumAlternatives << AltCount;"},{F,587,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n for (unsigned i = 0, e = InputConstraintInfos.size(); i != e; ++i) {\n if (NumAlternatives == ~0U) {\n } else if (NumAlternatives != AltCount) {\n targetDiag(NS->getInputExpr(i)->getBeginLoc(), diag::err_asm_unexpected_constraint_alternatives) << NumAlternatives << AltCount;"}} | ||
}, | }, | ||
["err_asm_unknown_register_name"]={ | ["err_asm_unknown_register_name"]={ | ||
Line 2,562: | Line 2,562: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,7945,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // Handle GNU asm-label extension (encoded as an attribute).\n if (Expr *E = (Expr *)D.getAsmLabel()) {\n if (S->getFnParent() != nullptr) {\n case SC_Register:\n // Local Named register\n if (!Context.getTargetInfo().isValidGCCRegisterName(Label) && DeclAttrsMatchCUDAMode(getLangOpts(), getCurFunctionDecl()))\n Diag(E->getExprLoc(), diag::err_asm_unknown_register_name) << Label;"},{q,7959,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // Handle GNU asm-label extension (encoded as an attribute).\n if (Expr *E = (Expr *)D.getAsmLabel()) {\n if (S->getFnParent() != nullptr) {\n } else if (SC == SC_Register) {\n // Global Named register\n if (DeclAttrsMatchCUDAMode(getLangOpts(), NewVD)) {\n if (!TI.isValidGCCRegisterName(Label))\n Diag(E->getExprLoc(), diag::err_asm_unknown_register_name) << Label;"},{F,475,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n // Check that the clobbers are valid.\n for (unsigned i = 0; i != NumClobbers; i++) {\n if (!Context.getTargetInfo().isValidClobber(Clobber)) {\n targetDiag(Literal->getBeginLoc(), diag::err_asm_unknown_register_name) << Clobber;"}} | ||
}, | }, | ||
["err_asm_unknown_symbolic_operand_name"]={ | ["err_asm_unknown_symbolic_operand_name"]={ | ||
Line 2,574: | Line 2,574: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{ob, | [k]={{ob,758,"/// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing\n/// it into pieces. If the asm string is erroneous, emit errors and return\n/// true, otherwise return false.\nunsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece> &Pieces, const ASTContext &C, unsigned &DiagOffs) const {\n while (true) {\n // Handle operands that have asmSymbolicName (e.g., %x[foo]).\n if (EscapedChar == \'[\') {\n if (N == -1) {\n return diag::err_asm_unknown_symbolic_operand_name;"}} | ||
}, | }, | ||
["err_asm_unterminated_symbolic_operand_name"]={ | ["err_asm_unterminated_symbolic_operand_name"]={ | ||
Line 2,586: | Line 2,586: | ||
[h]=C, | [h]=C, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{ob, | [k]={{ob,748,"/// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing\n/// it into pieces. If the asm string is erroneous, emit errors and return\n/// true, otherwise return false.\nunsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl<AsmStringPiece> &Pieces, const ASTContext &C, unsigned &DiagOffs) const {\n while (true) {\n // Handle operands that have asmSymbolicName (e.g., %x[foo]).\n if (EscapedChar == \'[\') {\n if (NameEnd == nullptr)\n return diag::err_asm_unterminated_symbolic_operand_name;"}} | ||
}, | }, | ||
["err_asm_unwind_and_goto"]={ | ["err_asm_unwind_and_goto"]={ | ||
Line 2,598: | Line 2,598: | ||
[h]=C, | [h]=C, | ||
[d]={Lb,1615397021,Kb}, | [d]={Lb,1615397021,Kb}, | ||
[k]={{F, | [k]={{F,490,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n // Using unwind clobber and asm-goto together is not supported right now.\n if (UnwindClobberLoc && NumLabels > 0) {\n targetDiag(*UnwindClobberLoc, diag::err_asm_unwind_and_goto);"}} | ||
}, | }, | ||
["err_assoc_compatible_types"]={ | ["err_assoc_compatible_types"]={ | ||
Line 2,610: | Line 2,610: | ||
[h]=o, | [h]=o, | ||
[d]={"91147596414d",1302827748,"C1X: implement generic selections"}, | [d]={"91147596414d",1302827748,"C1X: implement generic selections"}, | ||
[k]={{y, | [k]={{y,1778,"ExprResult Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef<TypeSourceInfo *> Types, ArrayRef<Expr *> Exprs) {\n for (unsigned i = 0; i < NumAssocs; ++i) {\n if (Types[i]) {\n if (Types[i]->getType()->isDependentType()) {\n } else {\n // C11 6.5.1.1p2 \"No two generic associations in the same generic\n // selection shall specify compatible types.\"\n for (unsigned j = i + 1; j < NumAssocs; ++j)\n if (Types[j] && !Types[j]->getType()->isDependentType() && Context.typesAreCompatible(Types[i]->getType(), Types[j]->getType())) {\n Diag(Types[j]->getTypeLoc().getBeginLoc(), diag::err_assoc_compatible_types) << Types[j]->getTypeLoc().getSourceRange() << Types[j]->getType() << Types[i]->getType();"}} | ||
}, | }, | ||
["err_assoc_type_incomplete"]={ | ["err_assoc_type_incomplete"]={ | ||
Line 2,622: | Line 2,622: | ||
[h]=o, | [h]=o, | ||
[d]={"91147596414d",1302827748,"C1X: implement generic selections"}, | [d]={"91147596414d",1302827748,"C1X: implement generic selections"}, | ||
[k]={{y, | [k]={{y,1726,"ExprResult Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef<TypeSourceInfo *> Types, ArrayRef<Expr *> Exprs) {\n for (unsigned i = 0; i < NumAssocs; ++i) {\n if (Types[i]) {\n if (Types[i]->getType()->isDependentType()) {\n } else {\n if (ControllingExpr && Types[i]->getType()->isIncompleteType())\n D = diag::err_assoc_type_incomplete;"}} | ||
}, | }, | ||
["err_assoc_type_nonobject"]={ | ["err_assoc_type_nonobject"]={ | ||
Line 2,634: | Line 2,634: | ||
[h]=o, | [h]=o, | ||
[d]={"91147596414d",1302827748,"C1X: implement generic selections"}, | [d]={"91147596414d",1302827748,"C1X: implement generic selections"}, | ||
[k]={{y, | [k]={{y,1728,"ExprResult Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef<TypeSourceInfo *> Types, ArrayRef<Expr *> Exprs) {\n for (unsigned i = 0; i < NumAssocs; ++i) {\n if (Types[i]) {\n if (Types[i]->getType()->isDependentType()) {\n } else {\n if (ControllingExpr && Types[i]->getType()->isIncompleteType())\n else if (ControllingExpr && !Types[i]->getType()->isObjectType())\n D = diag::err_assoc_type_nonobject;"}} | ||
}, | }, | ||
["err_assoc_type_variably_modified"]={ | ["err_assoc_type_variably_modified"]={ | ||
Line 2,646: | Line 2,646: | ||
[h]=o, | [h]=o, | ||
[d]={"91147596414d",1302827748,"C1X: implement generic selections"}, | [d]={"91147596414d",1302827748,"C1X: implement generic selections"}, | ||
[k]={{y, | [k]={{y,1730,"ExprResult Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef<TypeSourceInfo *> Types, ArrayRef<Expr *> Exprs) {\n for (unsigned i = 0; i < NumAssocs; ++i) {\n if (Types[i]) {\n if (Types[i]->getType()->isDependentType()) {\n } else {\n if (ControllingExpr && Types[i]->getType()->isIncompleteType())\n else if (ControllingExpr && !Types[i]->getType()->isObjectType())\n else if (Types[i]->getType()->isVariablyModifiedType())\n D = diag::err_assoc_type_variably_modified;"}} | ||
}, | }, | ||
["err_ast_file_invalid"]={ | ["err_ast_file_invalid"]={ | ||
Line 2,658: | Line 2,658: | ||
[h]="AST Deserialization Issue", | [h]="AST Deserialization Issue", | ||
[d]={"a2f2c2f3a463",1605203629,"Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC"}, | [d]={"a2f2c2f3a463",1605203629,"Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC"}, | ||
[k]={{"clang/lib/Serialization/ASTReader.cpp", | [k]={{"clang/lib/Serialization/ASTReader.cpp",4643,"ASTReader::ASTReadResult ASTReader::ReadASTCore(StringRef FileName, ModuleKind Type, SourceLocation ImportLoc, ModuleFile *ImportedBy, SmallVectorImpl<ImportedModule> &Loaded, off_t ExpectedSize, time_t ExpectedModTime, ASTFileSignature ExpectedSignature, unsigned ClientLoadCapabilities) {\n // Sniff for the signature.\n if (llvm::Error Err = doesntStartWithASTFileMagic(Stream)) {\n Diag(diag::err_ast_file_invalid) << moduleKindForDiagnostic(Type) << FileName << std::move(Err);"}} | ||
}, | }, | ||
["err_ast_file_not_found"]={ | ["err_ast_file_not_found"]={ | ||
Line 2,670: | Line 2,670: | ||
[h]="AST Deserialization Issue", | [h]="AST Deserialization Issue", | ||
[d]={"a2f2c2f3a463",1605203629,"Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC"}, | [d]={"a2f2c2f3a463",1605203629,"Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC"}, | ||
[k]={{"clang/lib/Serialization/ASTReader.cpp", | [k]={{"clang/lib/Serialization/ASTReader.cpp",4608,"ASTReader::ASTReadResult ASTReader::ReadASTCore(StringRef FileName, ModuleKind Type, SourceLocation ImportLoc, ModuleFile *ImportedBy, SmallVectorImpl<ImportedModule> &Loaded, off_t ExpectedSize, time_t ExpectedModTime, ASTFileSignature ExpectedSignature, unsigned ClientLoadCapabilities) {\n case ModuleManager::Missing:\n Diag(diag::err_ast_file_not_found) << moduleKindForDiagnostic(Type) << FileName << !ErrorStr.empty() << ErrorStr;"}} | ||
}, | }, | ||
["err_ast_file_out_of_date"]={ | ["err_ast_file_out_of_date"]={ | ||
Line 2,682: | Line 2,682: | ||
[h]="AST Deserialization Issue", | [h]="AST Deserialization Issue", | ||
[d]={"a2f2c2f3a463",1605203629,"Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC"}, | [d]={"a2f2c2f3a463",1605203629,"Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC"}, | ||
[k]={{"clang/lib/Serialization/ASTReader.cpp", | [k]={{"clang/lib/Serialization/ASTReader.cpp",4620,"ASTReader::ASTReadResult ASTReader::ReadASTCore(StringRef FileName, ModuleKind Type, SourceLocation ImportLoc, ModuleFile *ImportedBy, SmallVectorImpl<ImportedModule> &Loaded, off_t ExpectedSize, time_t ExpectedModTime, ASTFileSignature ExpectedSignature, unsigned ClientLoadCapabilities) {\n case ModuleManager::OutOfDate:\n Diag(diag::err_ast_file_out_of_date) << moduleKindForDiagnostic(Type) << FileName << !ErrorStr.empty() << ErrorStr;"}} | ||
}, | }, | ||
["err_at_defs_cxx"]={ | ["err_at_defs_cxx"]={ | ||
Line 2,694: | Line 2,694: | ||
[h]=B, | [h]=B, | ||
[d]={"23c84767484c",1302801679,"Parse an \'@\' in an Objective-C++ class member specification,"}, | [d]={"23c84767484c",1302801679,"Parse an \'@\' in an Objective-C++ class member specification,"}, | ||
[k]={{K, | [k]={{K,2682,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n if (Tok.is(tok::at)) {\n if (getLangOpts().ObjC && NextToken().isObjCAtKeyword(tok::objc_defs))\n Diag(Tok, diag::err_at_defs_cxx);"}} | ||
}, | }, | ||
["err_at_in_class"]={ | ["err_at_in_class"]={ | ||
Line 2,706: | Line 2,706: | ||
[h]=B, | [h]=B, | ||
[d]={"23c84767484c",1302801679,"Parse an \'@\' in an Objective-C++ class member specification,"}, | [d]={"23c84767484c",1302801679,"Parse an \'@\' in an Objective-C++ class member specification,"}, | ||
[k]={{K, | [k]={{K,2684,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n if (Tok.is(tok::at)) {\n if (getLangOpts().ObjC && NextToken().isObjCAtKeyword(tok::objc_defs))\n else\n Diag(Tok, diag::err_at_in_class);"}} | ||
}, | }, | ||
["err_atdef_nonfragile_interface"]={ | ["err_atdef_nonfragile_interface"]={ | ||
Line 2,718: | Line 2,718: | ||
[h]=o, | [h]=o, | ||
[d]={"ece1b2b0e156",1240345721,"Patch to diagnose use of objc\'s @defs in nonfragile abi."}, | [d]={"ece1b2b0e156",1240345721,"Patch to diagnose use of objc\'s @defs in nonfragile abi."}, | ||
[k]={{I, | [k]={{I,5110,"/// Called whenever \\@defs(ClassName) is encountered in the source. Inserts the\n/// instance variables of ClassName into Decls.\nvoid Sema::ActOnDefs(Scope *S, Decl *TagD, SourceLocation DeclStart, IdentifierInfo *ClassName, SmallVectorImpl<Decl *> &Decls) {\n if (LangOpts.ObjCRuntime.isNonFragile()) {\n Diag(DeclStart, diag::err_atdef_nonfragile_interface);"}} | ||
}, | }, | ||
["err_atimport"]={ | ["err_atimport"]={ | ||
Line 2,730: | Line 2,730: | ||
[h]=B, | [h]=B, | ||
[d]={"a773d0861800",1395871363,"Objective-C. Improve diagnostic error for \'@import\' "}, | [d]={"a773d0861800",1395871363,"Objective-C. Improve diagnostic error for \'@import\' "}, | ||
[k]={{"clang/lib/Parse/ParseObjc.cpp", | [k]={{"clang/lib/Parse/ParseObjc.cpp",103,"/// ParseObjCAtDirectives - Handle parts of the external-declaration production:\n/// external-declaration: [C99 6.9]\n/// [OBJC] objc-class-definition\n/// [OBJC] objc-class-declaration\n/// [OBJC] objc-alias-declaration\n/// [OBJC] objc-protocol-definition\n/// [OBJC] objc-method-definition\n/// [OBJC] \'@\' \'end\'\nParser::DeclGroupPtrTy Parser::ParseObjCAtDirectives(ParsedAttributes &DeclAttrs, ParsedAttributes &DeclSpecAttrs) {\n case tok::objc_import:\n Diag(AtLoc, diag::err_atimport);"}} | ||
}, | }, | ||
["err_atomic_builtin_bit_int_prohibit"]={ | ["err_atomic_builtin_bit_int_prohibit"]={ | ||
Line 2,742: | Line 2,742: | ||
[h]=o, | [h]=o, | ||
[d]={db,1616787805,cb}, | [d]={db,1616787805,cb}, | ||
[k]={{s, | [k]={{s,7460,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n if (ValType->isBitIntType()) {\n Diag(Ptr->getExprLoc(), diag::err_atomic_builtin_bit_int_prohibit);"}} | ||
}, | }, | ||
["err_atomic_builtin_cannot_be_const"]={ | ["err_atomic_builtin_cannot_be_const"]={ | ||
Line 2,754: | Line 2,754: | ||
[h]=o, | [h]=o, | ||
[d]={"a383c94ccd63",1525541922,"Disallow pointers to const in __sync_fetch_and_xxx."}, | [d]={"a383c94ccd63",1525541922,"Disallow pointers to const in __sync_fetch_and_xxx."}, | ||
[k]={{s, | [k]={{s,7568,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n if (ValType.isConstQualified()) {\n Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_cannot_be_const) << FirstArg->getType() << FirstArg->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_builtin_ext_int_size"]={ | ["err_atomic_builtin_ext_int_size"]={ | ||
Line 2,766: | Line 2,766: | ||
[h]=o, | [h]=o, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{s, | [k]={{s,7890,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n if (BitIntValType && !llvm::isPowerOf2_64(BitIntValType->getNumBits())) {\n Diag(FirstArg->getExprLoc(), diag::err_atomic_builtin_ext_int_size);"}} | ||
}, | }, | ||
["err_atomic_builtin_must_be_pointer"]={ | ["err_atomic_builtin_must_be_pointer"]={ | ||
Line 2,778: | Line 2,778: | ||
[h]=o, | [h]=o, | ||
[d]={"dc04654697fb",1241765902,"reimplement __sync_* builtins to be variadic and to follow the same"}, | [d]={"dc04654697fb",1241765902,"reimplement __sync_* builtins to be variadic and to follow the same"}, | ||
[k]={{s, | [k]={{s,3182,"bool Sema::CheckARMBuiltinExclusiveCall(unsigned BuiltinID, CallExpr *TheCall, unsigned MaxWidth) {\n if (!pointerType) {\n Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer) << PointerArg->getType() << PointerArg->getSourceRange();"},{s,7153,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n if (!pointerType) {\n Diag(ExprRange.getBegin(), diag::err_atomic_builtin_must_be_pointer) << Ptr->getType() << Ptr->getSourceRange();"},{s,7554,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n if (!pointerType) {\n Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer) << FirstArg->getType() << FirstArg->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_builtin_must_be_pointer_intfltptr"]={ | ["err_atomic_builtin_must_be_pointer_intfltptr"]={ | ||
Line 2,790: | Line 2,790: | ||
[h]=o, | [h]=o, | ||
[d]={"6aacd49094bc",1373968073,"ARM: implement low-level intrinsics for the atomic exclusive operations."}, | [d]={"6aacd49094bc",1373968073,"ARM: implement low-level intrinsics for the atomic exclusive operations."}, | ||
[k]={{s, | [k]={{s,3216,"bool Sema::CheckARMBuiltinExclusiveCall(unsigned BuiltinID, CallExpr *TheCall, unsigned MaxWidth) {\n // In general, we allow ints, floats and pointers to be loaded and stored.\n if (!ValType->isIntegerType() && !ValType->isAnyPointerType() && !ValType->isBlockPointerType() && !ValType->isFloatingType()) {\n Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer_intfltptr) << PointerArg->getType() << PointerArg->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_builtin_must_be_pointer_intptr"]={ | ["err_atomic_builtin_must_be_pointer_intptr"]={ | ||
Line 2,802: | Line 2,802: | ||
[h]=o, | [h]=o, | ||
[d]={"dc04654697fb",1241765902,"reimplement __sync_* builtins to be variadic and to follow the same"}, | [d]={"dc04654697fb",1241765902,"reimplement __sync_* builtins to be variadic and to follow the same"}, | ||
[k]={{s, | [k]={{s,7562,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n if (!ValType->isIntegerType() && !ValType->isAnyPointerType() && !ValType->isBlockPointerType()) {\n Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer_intptr) << FirstArg->getType() << FirstArg->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_builtin_pointer_size"]={ | ["err_atomic_builtin_pointer_size"]={ | ||
Line 2,814: | Line 2,814: | ||
[h]=o, | [h]=o, | ||
[d]={"dc04654697fb",1241765902,"reimplement __sync_* builtins to be variadic and to follow the same"}, | [d]={"dc04654697fb",1241765902,"reimplement __sync_* builtins to be variadic and to follow the same"}, | ||
[k]={{s, | [k]={{s,7633,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n default:\n Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_pointer_size) << FirstArg->getType() << FirstArg->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_exclusive_builtin_pointer_size"]={ | ["err_atomic_exclusive_builtin_pointer_size"]={ | ||
Line 2,826: | Line 2,826: | ||
[h]=o, | [h]=o, | ||
[d]={"6aacd49094bc",1373968073,"ARM: implement low-level intrinsics for the atomic exclusive operations."}, | [d]={"6aacd49094bc",1373968073,"ARM: implement low-level intrinsics for the atomic exclusive operations."}, | ||
[k]={{s, | [k]={{s,3224,"bool Sema::CheckARMBuiltinExclusiveCall(unsigned BuiltinID, CallExpr *TheCall, unsigned MaxWidth) {\n // But ARM doesn\'t have instructions to deal with 128-bit versions.\n if (Context.getTypeSize(ValType) > MaxWidth) {\n Diag(DRE->getBeginLoc(), diag::err_atomic_exclusive_builtin_pointer_size) << PointerArg->getType() << PointerArg->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_load_store_uses_lib"]={ | ["err_atomic_load_store_uses_lib"]={ | ||
Line 2,838: | Line 2,838: | ||
[h]=o, | [h]=o, | ||
[d]={"615de765abde",1369762659,"Patch to issue error when target of MacOS and iOS "}, | [d]={"615de765abde",1369762659,"Patch to issue error when target of MacOS and iOS "}, | ||
[k]={{s, | [k]={{s,7452,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n if ((Op == AtomicExpr::AO__c11_atomic_load || Op == AtomicExpr::AO__c11_atomic_store || Op == AtomicExpr::AO__opencl_atomic_load || Op == AtomicExpr::AO__hip_atomic_load || Op == AtomicExpr::AO__opencl_atomic_store || Op == AtomicExpr::AO__hip_atomic_store) && Context.AtomicUsesUnsupportedLibcall(AE))\n Diag(AE->getBeginLoc(), diag::err_atomic_load_store_uses_lib) << ((Op == AtomicExpr::AO__c11_atomic_load || Op == AtomicExpr::AO__opencl_atomic_load || Op == AtomicExpr::AO__hip_atomic_load) ? 0 : 1);"}} | ||
}, | }, | ||
["err_atomic_op_has_invalid_synch_scope"]={ | ["err_atomic_op_has_invalid_synch_scope"]={ | ||
Line 2,850: | Line 2,850: | ||
[h]=o, | [h]=o, | ||
[d]={"39195062c20c",1501870591,"Add OpenCL 2.0 atomic builtin functions as Clang builtin"}, | [d]={"39195062c20c",1501870591,"Add OpenCL 2.0 atomic builtin functions as Clang builtin"}, | ||
[k]={{s, | [k]={{s,7436,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n if (auto ScopeModel = AtomicExpr::getScopeModel(Op)) {\n if (std::optional<llvm::APSInt> Result = Scope->getIntegerConstantExpr(Context)) {\n if (!ScopeModel->isValid(Result->getZExtValue()))\n Diag(Scope->getBeginLoc(), diag::err_atomic_op_has_invalid_synch_scope) << Scope->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_op_needs_atomic"]={ | ["err_atomic_op_needs_atomic"]={ | ||
Line 2,862: | Line 2,862: | ||
[h]=o, | [h]=o, | ||
[d]={"df14b3a8377f",1318299601,"Initial implementation of __atomic_* (everything except __atomic_is_lock_free)."}, | [d]={"df14b3a8377f",1318299601,"Initial implementation of __atomic_* (everything except __atomic_is_lock_free)."}, | ||
[k]={{s, | [k]={{s,7163,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n if (IsC11) {\n if (!AtomTy->isAtomicType()) {\n Diag(ExprRange.getBegin(), diag::err_atomic_op_needs_atomic) << Ptr->getType() << Ptr->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_op_needs_atomic_int"]={ | ["err_atomic_op_needs_atomic_int"]={ | ||
Line 2,874: | Line 2,874: | ||
[h]=o, | [h]=o, | ||
[d]={"c094e7dc4b3f",1573050950,"[SYCL] Add sycl_kernel attribute for accelerated code outlining"}, | [d]={"c094e7dc4b3f",1573050950,"[SYCL] Add sycl_kernel attribute for accelerated code outlining"}, | ||
[k]={{s, | [k]={{s,7207,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n // For an arithmetic operation, the implied arithmetic must be well-formed.\n if (Form == Arithmetic) {\n if (!IsAllowedValueType(ValType, ArithAllows)) {\n auto DID = ArithAllows & AOEVT_FP ? (ArithAllows & AOEVT_Pointer ? diag::err_atomic_op_needs_atomic_int_ptr_or_fp : diag::err_atomic_op_needs_atomic_int_or_fp) : diag::err_atomic_op_needs_atomic_int;"}} | ||
}, | }, | ||
["err_atomic_op_needs_atomic_int_or_fp"]={ | ["err_atomic_op_needs_atomic_int_or_fp"]={ | ||
Line 2,886: | Line 2,886: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{s, | [k]={{s,7206,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n // For an arithmetic operation, the implied arithmetic must be well-formed.\n if (Form == Arithmetic) {\n if (!IsAllowedValueType(ValType, ArithAllows)) {\n auto DID = ArithAllows & AOEVT_FP ? (ArithAllows & AOEVT_Pointer ? diag::err_atomic_op_needs_atomic_int_ptr_or_fp : diag::err_atomic_op_needs_atomic_int_or_fp) : diag::err_atomic_op_needs_atomic_int;"}} | ||
}, | }, | ||
["err_atomic_op_needs_atomic_int_or_ptr"]={ | ["err_atomic_op_needs_atomic_int_or_ptr"]={ | ||
Line 2,898: | Line 2,898: | ||
[h]=o, | [h]=o, | ||
[d]={"df14b3a8377f",1318299601,"Initial implementation of __atomic_* (everything except __atomic_is_lock_free)."}, | [d]={"df14b3a8377f",1318299601,"Initial implementation of __atomic_* (everything except __atomic_is_lock_free)."}, | ||
[k]={{s, | [k]={{s,7220,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n // For an arithmetic operation, the implied arithmetic must be well-formed.\n if (Form == Arithmetic) {\n } else if (IsN && !ValType->isIntegerType() && !ValType->isPointerType()) {\n Diag(ExprRange.getBegin(), diag::err_atomic_op_needs_atomic_int_or_ptr) << IsC11 << Ptr->getType() << Ptr->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_op_needs_atomic_int_ptr_or_fp"]={ | ["err_atomic_op_needs_atomic_int_ptr_or_fp"]={ | ||
Line 2,910: | Line 2,910: | ||
[h]=o, | [h]=o, | ||
[d]={fb,1590001902,eb}, | [d]={fb,1590001902,eb}, | ||
[k]={{s, | [k]={{s,7205,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n // For an arithmetic operation, the implied arithmetic must be well-formed.\n if (Form == Arithmetic) {\n if (!IsAllowedValueType(ValType, ArithAllows)) {\n auto DID = ArithAllows & AOEVT_FP ? (ArithAllows & AOEVT_Pointer ? diag::err_atomic_op_needs_atomic_int_ptr_or_fp : diag::err_atomic_op_needs_atomic_int_or_fp) : diag::err_atomic_op_needs_atomic_int;"}} | ||
}, | }, | ||
["err_atomic_op_needs_non_const_atomic"]={ | ["err_atomic_op_needs_non_const_atomic"]={ | ||
Line 2,922: | Line 2,922: | ||
[h]=o, | [h]=o, | ||
[d]={"e00921a0a448",1347689398,"const _Atomic(T) is not an atomic type, so do not allow it as the type \'A\' in"}, | [d]={"e00921a0a448",1347689398,"const _Atomic(T) is not an atomic type, so do not allow it as the type \'A\' in"}, | ||
[k]={{s, | [k]={{s,7169,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n if (IsC11) {\n if ((Form != Load && Form != LoadCopy && AtomTy.isConstQualified()) || AtomTy.getAddressSpace() == LangAS::opencl_constant) {\n Diag(ExprRange.getBegin(), diag::err_atomic_op_needs_non_const_atomic) << (AtomTy.isConstQualified() ? 0 : 1) << Ptr->getType() << Ptr->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_op_needs_non_const_pointer"]={ | ["err_atomic_op_needs_non_const_pointer"]={ | ||
Line 2,934: | Line 2,934: | ||
[h]=o, | [h]=o, | ||
[d]={"a3a7c56143f4",1443917462,"Diagnose const atomics in __atomic builtins."}, | [d]={"a3a7c56143f4",1443917462,"Diagnose const atomics in __atomic builtins."}, | ||
[k]={{s, | [k]={{s,7177,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n if (IsC11) {\n } else if (Form != Load && Form != LoadCopy) {\n if (ValType.isConstQualified()) {\n Diag(ExprRange.getBegin(), diag::err_atomic_op_needs_non_const_pointer) << Ptr->getType() << Ptr->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_op_needs_trivial_copy"]={ | ["err_atomic_op_needs_trivial_copy"]={ | ||
Line 2,946: | Line 2,946: | ||
[h]=o, | [h]=o, | ||
[d]={"feea883de4e5",1334207297,"Implement support for 18 of the GNU-compatible __atomic builtins."}, | [d]={"feea883de4e5",1334207297,"Implement support for 18 of the GNU-compatible __atomic builtins."}, | ||
[k]={{s, | [k]={{s,7231,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n if (!IsC11 && !AtomTy.isTriviallyCopyableType(Context) && !AtomTy->isScalarType()) {\n Diag(ExprRange.getBegin(), diag::err_atomic_op_needs_trivial_copy) << Ptr->getType() << Ptr->getSourceRange();"}} | ||
}, | }, | ||
["err_atomic_property_nontrivial_assign_op"]={ | ["err_atomic_property_nontrivial_assign_op"]={ | ||
Line 2,958: | Line 2,958: | ||
[h]=o, | [h]=o, | ||
[d]={"a08a74705bb0",1326155821,"objc++: patch for IRgen for atomic properties of"}, | [d]={"a08a74705bb0",1326155821,"objc++: patch for IRgen for atomic properties of"}, | ||
[k]={{P, | [k]={{P,1547,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n if (ObjCMethodDecl *setterMethod = property->getSetterMethodDecl()) {\n if (getLangOpts().CPlusPlus && Synthesize && !CompleteTypeErr && Ivar->getType()->isRecordType()) {\n if (property->getPropertyAttributes() & ObjCPropertyAttribute::kind_atomic) {\n if (const CXXOperatorCallExpr *CXXCE = dyn_cast_or_null<CXXOperatorCallExpr>(callExpr))\n if (const FunctionDecl *FuncDecl = CXXCE->getDirectCallee())\n if (!FuncDecl->isTrivial())\n if (property->getType()->isReferenceType()) {\n Diag(PropertyDiagLoc, diag::err_atomic_property_nontrivial_assign_op) << property->getType();"}} | ||
}, | }, | ||
["err_atomic_specifier_bad_type"]={ | ["err_atomic_specifier_bad_type"]={ | ||
Line 2,970: | Line 2,970: | ||
[h]=o, | [h]=o, | ||
[d]={"0dfb889575a6",1317942033,"Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment t..."}, | [d]={"0dfb889575a6",1317942033,"Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment t..."}, | ||
[k]={{r, | [k]={{r,9762,"QualType Sema::BuildAtomicType(QualType T, SourceLocation Loc) {\n if (!isDependentOrGNUAutoType(T)) {\n if (RequireCompleteType(Loc, T, diag::err_atomic_specifier_bad_type, 0))"},{r,9785,"QualType Sema::BuildAtomicType(QualType T, SourceLocation Loc) {\n if (!isDependentOrGNUAutoType(T)) {\n if (DisallowedKind != -1) {\n Diag(Loc, diag::err_atomic_specifier_bad_type) << DisallowedKind << T;"}} | ||
}, | }, | ||
["err_atprotocol_protocol"]={ | ["err_atprotocol_protocol"]={ | ||
Line 2,982: | Line 2,982: | ||
[h]=o, | [h]=o, | ||
[d]={"b111da14ada1",1534544288,"[ObjC] Error out when using forward-declared protocol in a @protocol"}, | [d]={"b111da14ada1",1534544288,"[ObjC] Error out when using forward-declared protocol in a @protocol"}, | ||
[k]={{G, | [k]={{G,1400,"ExprResult Sema::ParseObjCProtocolExpression(IdentifierInfo *ProtocolId, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc) {\n if (!PDecl->hasDefinition()) {\n Diag(ProtoLoc, diag::err_atprotocol_protocol) << PDecl;"}} | ||
}, | }, | ||
["err_attr_cond_never_constant_expr"]={ | ["err_attr_cond_never_constant_expr"]={ | ||
Line 2,994: | Line 2,994: | ||
[h]=o, | [h]=o, | ||
[d]={"177399e2277c",1483935134,"Add the diagnose_if attribute to clang."}, | [d]={"177399e2277c",1483935134,"Add the diagnose_if attribute to clang."}, | ||
[k]={{p, | [k]={{p,948,"static bool checkFunctionConditionAttr(Sema &S, Decl *D, const ParsedAttr &AL, Expr *&Cond, StringRef &Msg) {\n if (isa<FunctionDecl>(D) && !Cond->isValueDependent() && !Expr::isPotentialConstantExprUnevaluated(Cond, cast<FunctionDecl>(D), Diags)) {\n S.Diag(AL.getLoc(), diag::err_attr_cond_never_constant_expr) << AL;"},{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",253,"static Expr *instantiateDependentFunctionAttrCondition(Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const Attr *A, Expr *OldCond, const Decl *Tmpl, FunctionDecl *New) {\n if (OldCond->isValueDependent() && !Cond->isValueDependent() && !Expr::isPotentialConstantExprUnevaluated(Cond, New, Diags)) {\n S.Diag(A->getLocation(), diag::err_attr_cond_never_constant_expr) << A;"}} | ||
}, | }, | ||
["err_attr_objc_ownership_redundant"]={ | ["err_attr_objc_ownership_redundant"]={ | ||
Line 3,006: | Line 3,006: | ||
[h]=o, | [h]=o, | ||
[d]={Z,1308874139,Y}, | [d]={Z,1308874139,Y}, | ||
[k]={{r, | [k]={{r,6973,"/// handleObjCOwnershipTypeAttr - Process an objc_ownership\n/// attribute on the specified type.\n///\n/// Returns \'true\' if the attribute was handled.\nstatic bool handleObjCOwnershipTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // Check for redundant/conflicting ownership qualifiers.\n if (Qualifiers::ObjCLifetime previousLifetime = type.getQualifiers().getObjCLifetime()) {\n // If it\'s written directly, that\'s an error.\n if (S.Context.hasDirectOwnershipQualifier(type)) {\n S.Diag(AttrLoc, diag::err_attr_objc_ownership_redundant) << type;"}} | ||
}, | }, | ||
["err_attr_swift_error_no_error_parameter"]={ | ["err_attr_swift_error_no_error_parameter"]={ | ||
Line 3,018: | Line 3,018: | ||
[h]=o, | [h]=o, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{p, | [k]={{p,6390,"static void handleSwiftError(Sema &S, Decl *D, const ParsedAttr &AL) {\n auto hasErrorParameter = [](Sema &S, Decl *D, const ParsedAttr &AL) -> bool {\n S.Diag(AL.getLoc(), diag::err_attr_swift_error_no_error_parameter) << AL << isa<ObjCMethodDecl>(D);"}} | ||
}, | }, | ||
["err_attr_swift_error_return_type"]={ | ["err_attr_swift_error_return_type"]={ | ||
Line 3,030: | Line 3,030: | ||
[h]=o, | [h]=o, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{p, | [k]={{p,6403,"static void handleSwiftError(Sema &S, Decl *D, const ParsedAttr &AL) {\n auto hasPointerResult = [](Sema &S, Decl *D, const ParsedAttr &AL) -> bool {\n S.Diag(AL.getLoc(), diag::err_attr_swift_error_return_type) << AL << AL.getArgAsIdent(0)->Ident->getName() << isa<ObjCMethodDecl>(D) << /*pointer*/ 1;"},{p,6414,"static void handleSwiftError(Sema &S, Decl *D, const ParsedAttr &AL) {\n auto hasIntegerResult = [](Sema &S, Decl *D, const ParsedAttr &AL) -> bool {\n S.Diag(AL.getLoc(), diag::err_attr_swift_error_return_type) << AL << AL.getArgAsIdent(0)->Ident->getName() << isa<ObjCMethodDecl>(D) << /*integral*/ 0;"}} | ||
}, | }, | ||
["err_attr_tlsmodel_arg"]={ | ["err_attr_tlsmodel_arg"]={ | ||
Line 3,042: | Line 3,042: | ||
[h]=o, | [h]=o, | ||
[d]={"d3b01bc7c673",1340452306,"Support the tls_model attribute (PR9788)"}, | [d]={"d3b01bc7c673",1340452306,"Support the tls_model attribute (PR9788)"}, | ||
[k]={{p, | [k]={{p,2038,"static void handleTLSModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Check that the value.\n if (Model != \"global-dynamic\" && Model != \"local-dynamic\" && Model != \"initial-exec\" && Model != \"local-exec\") {\n S.Diag(LiteralLoc, diag::err_attr_tlsmodel_arg);"}} | ||
}, | }, | ||
["err_attribute_address_function_type"]={ | ["err_attribute_address_function_type"]={ | ||
Line 3,054: | Line 3,054: | ||
[h]=o, | [h]=o, | ||
[d]={"8f5f520653f5",1311798605,"Forbid address-space-qualified function types, per TR 18037"}, | [d]={"8f5f520653f5",1311798605,"Forbid address-space-qualified function types, per TR 18037"}, | ||
[k]={{r, | [k]={{r,6827,"/// HandleAddressSpaceTypeAttribute - Process an address_space attribute on the\n/// specified type. The attribute contains 1 argument, the id of the address\n/// space for the type.\nstatic void HandleAddressSpaceTypeAttribute(QualType &Type, const ParsedAttr &Attr, TypeProcessingState &State) {\n // ISO/IEC TR 18037 S5.3 (amending C99 6.7.3): \"A function type shall not be\n // qualified by an address-space qualifier.\"\n if (Type->isFunctionType()) {\n S.Diag(Attr.getLoc(), diag::err_attribute_address_function_type);"}} | ||
}, | }, | ||
["err_attribute_address_multiple_qualifiers"]={ | ["err_attribute_address_multiple_qualifiers"]={ | ||
Line 3,066: | Line 3,066: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{r, | [k]={{r,4624,"// Diagnose whether this is a case with the multiple addr spaces.\n// Returns true if this is an invalid case.\n// ISO/IEC TR 18037 S5.3 (amending C99 6.7.3): \"No type shall be qualified\n// by qualifiers for two or more different address spaces.\"\nstatic bool DiagnoseMultipleAddrSpaceAttributes(Sema &S, LangAS ASOld, LangAS ASNew, SourceLocation AttrLoc) {\n if (ASOld != LangAS::Default) {\n if (ASOld != ASNew) {\n S.Diag(AttrLoc, diag::err_attribute_address_multiple_qualifiers);"},{r,6774,"/// BuildAddressSpaceAttr - Builds a DependentAddressSpaceType if an expression\n/// is uninstantiated. If instantiated it will apply the appropriate address\n/// space to the type. This function allows dependent template variables to be\n/// used in conjunction with the address_space attribute\nQualType Sema::BuildAddressSpaceAttr(QualType &T, LangAS ASIdx, Expr *AddrSpace, SourceLocation AttrLoc) {\n // A check with similar intentions as checking if a type already has an\n // address space except for on a dependent types, basically if the\n // current type is already a DependentAddressSpaceType then its already\n // lined up to have another address space on it and we can\'t have\n // multiple address spaces on the one pointer indirection\n if (T->getAs<DependentAddressSpaceType>()) {\n Diag(AttrLoc, diag::err_attribute_address_multiple_qualifiers);"}} | ||
}, | }, | ||
["err_attribute_address_space_negative"]={ | ["err_attribute_address_space_negative"]={ | ||
Line 3,078: | Line 3,078: | ||
[h]=o, | [h]=o, | ||
[d]={"8945266f3d02",1248763938,"Bounds checking for address spaces."}, | [d]={"8945266f3d02",1248763938,"Bounds checking for address spaces."}, | ||
[k]={{r, | [k]={{r,6727,"/// Build an AddressSpace index from a constant expression and diagnose any\n/// errors related to invalid address_spaces. Returns true on successfully\n/// building an AddressSpace index.\nstatic bool BuildAddressSpaceIndex(Sema &S, LangAS &ASIdx, const Expr *AddrSpace, SourceLocation AttrLoc) {\n if (!AddrSpace->isValueDependent()) {\n // Bounds checking.\n if (addrSpace.isSigned()) {\n if (addrSpace.isNegative()) {\n S.Diag(AttrLoc, diag::err_attribute_address_space_negative) << AddrSpace->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_address_space_too_high"]={ | ["err_attribute_address_space_too_high"]={ | ||
Line 3,090: | Line 3,090: | ||
[h]=o, | [h]=o, | ||
[d]={"8945266f3d02",1248763938,"Bounds checking for address spaces."}, | [d]={"8945266f3d02",1248763938,"Bounds checking for address spaces."}, | ||
[k]={{r, | [k]={{r,6739,"/// Build an AddressSpace index from a constant expression and diagnose any\n/// errors related to invalid address_spaces. Returns true on successfully\n/// building an AddressSpace index.\nstatic bool BuildAddressSpaceIndex(Sema &S, LangAS &ASIdx, const Expr *AddrSpace, SourceLocation AttrLoc) {\n if (!AddrSpace->isValueDependent()) {\n if (addrSpace > max) {\n S.Diag(AttrLoc, diag::err_attribute_address_space_too_high) << (unsigned)max.getZExtValue() << AddrSpace->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_aligned_too_great"]={ | ["err_attribute_aligned_too_great"]={ | ||
Line 3,102: | Line 3,102: | ||
[h]=o, | [h]=o, | ||
[d]={"abecae741cb7",1392237370,"Sema: Restrict alignment to 2**28."}, | [d]={"abecae741cb7",1392237370,"Sema: Restrict alignment to 2**28."}, | ||
[k]={{p, | [k]={{p,4481,"void Sema::AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion) {\n if (Alignment > MaximumAlignment) {\n Diag(AttrLoc, diag::err_attribute_aligned_too_great) << MaximumAlignment << E->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_argument_invalid"]={ | ["err_attribute_argument_invalid"]={ | ||
Line 3,114: | Line 3,114: | ||
[h]=o, | [h]=o, | ||
[d]={"5b48d725a0bc",1474851777,"[AMDGPU] Expose flat work group size, register and wave control attributes"}, | [d]={"5b48d725a0bc",1474851777,"[AMDGPU] Expose flat work group size, register and wave control attributes"}, | ||
[k]={{p, | [k]={{p,7853,"static bool checkAMDGPUFlatWorkGroupSizeArguments(Sema &S, Expr *MinExpr, Expr *MaxExpr, const AMDGPUFlatWorkGroupSizeAttr &Attr) {\n if (Min == 0 && Max != 0) {\n S.Diag(Attr.getLocation(), diag::err_attribute_argument_invalid) << &Attr << 0;"},{p,7858,"static bool checkAMDGPUFlatWorkGroupSizeArguments(Sema &S, Expr *MinExpr, Expr *MaxExpr, const AMDGPUFlatWorkGroupSizeAttr &Attr) {\n if (Min > Max) {\n S.Diag(Attr.getLocation(), diag::err_attribute_argument_invalid) << &Attr << 1;"},{p,7907,"static bool checkAMDGPUWavesPerEUArguments(Sema &S, Expr *MinExpr, Expr *MaxExpr, const AMDGPUWavesPerEUAttr &Attr) {\n if (Min == 0 && Max != 0) {\n S.Diag(Attr.getLocation(), diag::err_attribute_argument_invalid) << &Attr << 0;"},{p,7912,"static bool checkAMDGPUWavesPerEUArguments(Sema &S, Expr *MinExpr, Expr *MaxExpr, const AMDGPUWavesPerEUAttr &Attr) {\n if (Max != 0 && Min > Max) {\n S.Diag(Attr.getLocation(), diag::err_attribute_argument_invalid) << &Attr << 1;"}} | ||
}, | }, | ||
["err_attribute_argument_is_zero"]={ | ["err_attribute_argument_is_zero"]={ | ||
Line 3,126: | Line 3,126: | ||
[h]=o, | [h]=o, | ||
[d]={"b1d23a8db36c",1400510498,"[OpenCL] Reject reqd_work_group_size(X, Y, Z) where X, Y or Z == 0."}, | [d]={"b1d23a8db36c",1400510498,"[OpenCL] Reject reqd_work_group_size(X, Y, Z) where X, Y or Z == 0."}, | ||
[k]={{p, | [k]={{p,3221,"// Handles reqd_work_group_size and work_group_size_hint.\ntemplate <typename WorkGroupAttr> static void handleWorkGroupSize(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned i = 0; i < 3; ++i) {\n if (WGSize[i] == 0) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_is_zero) << AL << E->getSourceRange();"},{p,3244,"// Handles intel_reqd_sub_group_size.\nstatic void handleSubGroupSize(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (SGSize == 0) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_is_zero) << AL << E->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_argument_n_type"]={ | ["err_attribute_argument_n_type"]={ | ||
Line 3,138: | Line 3,138: | ||
[h]=o, | [h]=o, | ||
[d]={"29982275012f",1374588237,"Consolidate several attribute argument diagnostics into a single, selectable diagnostic. This makes..."}, | [d]={"29982275012f",1374588237,"Consolidate several attribute argument diagnostics into a single, selectable diagnostic. This makes..."}, | ||
[k]={{"clang/lib/Sema/SemaAttr.cpp", | [k]={{"clang/lib/Sema/SemaAttr.cpp",424,"bool Sema::ConstantFoldAttrArgs(const AttributeCommonInfo &CI, MutableArrayRef<Expr *> Args) {\n for (unsigned Idx = 0; Idx < Args.size(); Idx++) {\n /// Result means the expression can be folded to a constant.\n /// Note.empty() means the expression is a valid constant expression in the\n /// current language mode.\n if (!Result || !Notes.empty()) {\n Diag(E->getBeginLoc(), diag::err_attribute_argument_n_type) << CI << (Idx + 1) << AANT_ArgumentConstantExpr;"},{p,225,"/// If Expr is a valid integer constant, get the value of the integer\n/// expression and return success or failure. May output an error.\n///\n/// Negative argument is implicitly converted to unsigned, unless\n/// \\p StrictlyUnsigned is true.\ntemplate <typename AttrInfo> static bool checkUInt32Argument(Sema &S, const AttrInfo &AI, const Expr *Expr, uint32_t &Val, unsigned Idx = UINT_MAX, bool StrictlyUnsigned = false) {\n if (Expr->isTypeDependent() || !(I = Expr->getIntegerConstantExpr(S.Context))) {\n if (Idx != UINT_MAX)\n S.Diag(getAttrLoc(AI), diag::err_attribute_argument_n_type) << &AI << Idx << AANT_ArgumentIntegerConstant << Expr->getSourceRange();"},{p,319,"/// Check if IdxExpr is a valid parameter index for a function or\n/// instance method D. May output an error.\n///\n/// \\returns true if IdxExpr is a valid index.\ntemplate <typename AttrInfo> static bool checkFunctionOrMethodParameterIndex(Sema &S, const Decl *D, const AttrInfo &AI, unsigned AttrArgNum, const Expr *IdxExpr, ParamIdx &Idx, bool CanIndexImplicitThis = false) {\n if (IdxExpr->isTypeDependent() || !(IdxInt = IdxExpr->getIntegerConstantExpr(S.Context))) {\n S.Diag(getAttrLoc(AI), diag::err_attribute_argument_n_type) << &AI << AttrArgNum << AANT_ArgumentIntegerConstant << IdxExpr->getSourceRange();"},{p,870,"static bool checkTryLockFunAttrCommon(Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl<Expr *> &Args) {\n if (!isIntOrBool(AL.getArgAsExpr(0))) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIntOrBool;"},{p,1037,"static void handleDiagnoseAsBuiltinAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n auto DiagnoseType = [&](unsigned Index, AttributeArgumentNType T) {\n S.Diag(Loc, diag::err_attribute_argument_n_type) << AL << Index << T;"},{p,1700,"void Sema::AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE) {\n if (!E->isValueDependent()) {\n if (!(I = E->getIntegerConstantExpr(Context))) {\n if (OE)\n Diag(AttrLoc, diag::err_attribute_argument_n_type) << &TmpAttr << 1 << AANT_ArgumentIntegerConstant << E->getSourceRange();"},{p,1722,"void Sema::AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE) {\n if (OE && !OE->isValueDependent() && !OE->isIntegerConstantExpr(Context)) {\n Diag(AttrLoc, diag::err_attribute_argument_n_type) << &TmpAttr << 2 << AANT_ArgumentIntegerConstant << OE->getSourceRange();"},{p,1820,"static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIdentifier;"},{p,2967,"static void handleObjCMethodFamilyAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIdentifier;"},{p,3033,"static void handleBlocksAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIdentifier;"},{p,3054,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.getNumArgs() > 0) {\n if (E->isTypeDependent() || !(Idx = E->getIntegerConstantExpr(S.Context))) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIntegerConstant << E->getSourceRange();"},{p,3073,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.getNumArgs() > 1) {\n if (E->isTypeDependent() || !(Idx = E->getIntegerConstantExpr(S.Context))) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 2 << AANT_ArgumentIntegerConstant << E->getSourceRange();"},{p,3754,"static void handleEnumExtensibilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 0 << AANT_ArgumentIdentifier;"},{p,3937,"/// Handle __attribute__((format(type,idx,firstarg))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIdentifier;"},{p,5613,"// Checks whether an argument of launch_bounds attribute is\n// acceptable, performs implicit conversion to Rvalue, and returns\n// non-nullptr Expr result on success. Otherwise, it returns nullptr\n// and may output an error.\nstatic Expr *makeLaunchBoundsArgExpr(Sema &S, Expr *E, const CUDALaunchBoundsAttr &AL, const unsigned Idx) {\n if (!(I = E->getIntegerConstantExpr(S.Context))) {\n S.Diag(E->getExprLoc(), diag::err_attribute_argument_n_type) << &AL << Idx << AANT_ArgumentIntegerConstant << E->getSourceRange();"},{p,5665,"static void handleArgumentWithTypeTagAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << /* arg num = */ 1 << AANT_ArgumentIdentifier;"},{p,5697,"static void handleTypeTagForDatatypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIdentifier;"},{p,5812,"static void handleArmBuiltinAliasAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIdentifier;"},{p,5841,"static void handleBuiltinAliasAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIdentifier;"},{p,6915,"static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type) << AL << 1 << AANT_ArgumentIdentifier;"}} | ||
}, | }, | ||
["err_attribute_argument_out_of_bounds"]={ | ["err_attribute_argument_out_of_bounds"]={ | ||
Line 3,150: | Line 3,150: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{p, | [k]={{p,327,"/// Check if IdxExpr is a valid parameter index for a function or\n/// instance method D. May output an error.\n///\n/// \\returns true if IdxExpr is a valid index.\ntemplate <typename AttrInfo> static bool checkFunctionOrMethodParameterIndex(Sema &S, const Decl *D, const AttrInfo &AI, unsigned AttrArgNum, const Expr *IdxExpr, ParamIdx &Idx, bool CanIndexImplicitThis = false) {\n if (IdxSource < 1 || (!IV && IdxSource > NumParams)) {\n S.Diag(getAttrLoc(AI), diag::err_attribute_argument_out_of_bounds) << &AI << AttrArgNum << IdxExpr->getSourceRange();"},{p,3974,"/// Handle __attribute__((format(type,idx,firstarg))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (Idx < 1 || Idx > NumArgs) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_bounds) << AL << 2 << IdxExpr->getSourceRange();"},{p,4024,"/// Handle __attribute__((format(type,idx,firstarg))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // FirstArg == 0 is is always valid.\n if (FirstArg != 0) {\n if (Kind == StrftimeFormat) {\n } else if (isFunctionOrMethodVariadic(D)) {\n // Else, if the function is variadic, then FirstArg must be 0 or the\n // \"position\" of the ... parameter. It\'s unusual to use 0 with variadic\n // functions, so the fixit proposes the latter.\n if (FirstArg != NumArgs + 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_bounds) << AL << 3 << FirstArgExpr->getSourceRange() << FixItHint::CreateReplacement(FirstArgExpr->getSourceRange(), std::to_string(NumArgs + 1));"},{p,4037,"/// Handle __attribute__((format(type,idx,firstarg))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // FirstArg == 0 is is always valid.\n if (FirstArg != 0) {\n if (Kind == StrftimeFormat) {\n } else if (isFunctionOrMethodVariadic(D)) {\n } else {\n if (FirstArg <= Idx) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_bounds) << AL << 3 << FirstArgExpr->getSourceRange();"},{p,4097,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned I = 0, E = AL.getNumArgs(); I < E; ++I) {\n if (AL.isArgIdent(I)) {\n } else if (AL.isArgExpr(I)) {\n // If the expression is not parseable as an int32_t we have a problem.\n if (!checkUInt32Argument(S, AL, IdxExpr, (uint32_t &)ArgIdx, I + 1, false)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_bounds) << AL << (I + 1) << IdxExpr->getSourceRange();"},{p,4104,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned I = 0, E = AL.getNumArgs(); I < E; ++I) {\n if (AL.isArgIdent(I)) {\n } else if (AL.isArgExpr(I)) {\n // Check oob, excluding the special values, 0 and -1.\n if (ArgIdx < -1 || ArgIdx > NumArgs) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_bounds) << AL << (I + 1) << IdxExpr->getSourceRange();"},{p,6487,"static void checkSwiftAsyncErrorBlock(Sema &S, Decl *D, const SwiftAsyncErrorAttr *ErrorAttr, const SwiftAsyncAttr *AsyncAttr) {\n case SwiftAsyncErrorAttr::NonZeroArgument: {\n if (ParamIdx == 0 || ParamIdx > BlockParams.size()) {\n S.Diag(ErrorAttr->getLocation(), diag::err_attribute_argument_out_of_bounds) << ErrorAttr << 2;"},{p,7418,"static void handleMSP430InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (Num > 63) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_bounds) << AL << (int)NumParams->getSExtValue() << NumParamsExpr->getSourceRange();"},{p,7508,"static void handleM68kInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if ((Num & 1) || Num > 30) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_bounds) << AL << (int)MaybeNumParams->getSExtValue() << NumParamsExpr->getSourceRange();"},{p,7990,"static void handleLayoutVersion(Sema &S, Decl *D, const ParsedAttr &AL) {\n // TODO: Investigate what happens with the next major version of MSVC.\n if (Version != LangOptions::MSVC2015 / 100) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_bounds) << AL << Version << VersionExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_argument_out_of_bounds_extra_info"]={ | ["err_attribute_argument_out_of_bounds_extra_info"]={ | ||
Line 3,162: | Line 3,162: | ||
[h]=o, | [h]=o, | ||
[d]={"ce667f6df971",1549977542,"Renaming yet another diagnostic to not conflict; NFC."}, | [d]={"ce667f6df971",1549977542,"Renaming yet another diagnostic to not conflict; NFC."}, | ||
[k]={{p, | [k]={{p,666,"/// Checks that all attribute arguments, starting from Sidx, resolve to\n/// a capability object.\n/// \\param Sidx The attribute argument index to start checking with.\n/// \\param ParamIdxOk Whether an argument can be indexing into a function\n/// parameter list.\nstatic void checkAttrArgsAreCapabilityObjs(Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl<Expr *> &Args, unsigned Sidx = 0, bool ParamIdxOk = false) {\n for (unsigned Idx = Sidx; Idx < AL.getNumArgs(); ++Idx) {\n // Now check if we index into a record type function param.\n if (!RT && ParamIdxOk) {\n if (FD && IL) {\n if (!ArgValue.isStrictlyPositive() || ParamIdxFromOne > NumParams) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_bounds_extra_info) << AL << Idx + 1 << NumParams;"}} | ||
}, | }, | ||
["err_attribute_argument_out_of_range"]={ | ["err_attribute_argument_out_of_range"]={ | ||
Line 3,174: | Line 3,174: | ||
[h]=o, | [h]=o, | ||
[d]={"4b1e8399c22e",1312912771,"Thread Safety: Added basic argument parsing for all new attributes."}, | [d]={"4b1e8399c22e",1312912771,"Thread Safety: Added basic argument parsing for all new attributes."}, | ||
[k]={{p, | [k]={{p,1188,"static void handlePassObjectSizeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // pass_object_size\'s argument is passed in as the second argument of\n // __builtin_object_size. So, it has the same constraints as that second\n // argument; namely, it must be in the range [0, 3].\n if (Type > 3) {\n S.Diag(E->getBeginLoc(), diag::err_attribute_argument_out_of_range) << AL << 0 << 3 << E->getSourceRange();"},{p,3881,"/// Handle __attribute__((init_priority(priority))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html\nstatic void handleInitPriorityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Only perform the priority check if the attribute is outside of a system\n // header. Values <= 100 are reserved for the implementation, and libc++\n // benefits from being able to specify values in that range.\n if ((prioritynum < 101 || prioritynum > 65535) && !S.getSourceManager().isInSystemHeader(AL.getLoc())) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_range) << E->getSourceRange() << AL << 101 << 65535;"},{p,5744,"static void handlePatchableFunctionEntryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.getNumArgs() == 2) {\n if (Count < Offset) {\n S.Diag(getAttrLoc(AL), diag::err_attribute_argument_out_of_range) << &AL << 0 << Count << Arg->getBeginLoc();"}} | ||
}, | }, | ||
["err_attribute_argument_parm_pack_not_supported"]={ | ["err_attribute_argument_parm_pack_not_supported"]={ | ||
Line 3,186: | Line 3,186: | ||
[h]=B, | [h]=B, | ||
[d]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions."}, | [d]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions."}, | ||
[k]={{D, | [k]={{D,481,"unsigned Parser::ParseAttributeArgsCommon(IdentifierInfo *AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n if (!ArgExprs.empty() ? Tok.is(tok::comma) : Tok.isNot(tok::r_paren)) {\n if (AttributeIsTypeArgAttr) {\n } else if (AttributeHasVariadicIdentifierArg) {\n } else {\n // Pack expansion must currently be explicitly supported by an attribute.\n for (size_t I = 0; I < ParsedExprs.size(); ++I) {\n if (!attributeAcceptsExprPack(*AttrName)) {\n Diag(Tok.getLocation(), diag::err_attribute_argument_parm_pack_not_supported) << AttrName;"}} | ||
}, | }, | ||
["err_attribute_argument_type"]={ | ["err_attribute_argument_type"]={ | ||
Line 3,198: | Line 3,198: | ||
[h]=o, | [h]=o, | ||
[d]={"3bf758cd6579",1375147863,"err_attribute_not_string has been subsumed by err_attribute_argument_type."}, | [d]={"3bf758cd6579",1375147863,"err_attribute_not_string has been subsumed by err_attribute_argument_type."}, | ||
[k]={{p, | [k]={{p,229,"/// If Expr is a valid integer constant, get the value of the integer\n/// expression and return success or failure. May output an error.\n///\n/// Negative argument is implicitly converted to unsigned, unless\n/// \\p StrictlyUnsigned is true.\ntemplate <typename AttrInfo> static bool checkUInt32Argument(Sema &S, const AttrInfo &AI, const Expr *Expr, uint32_t &Val, unsigned Idx = UINT_MAX, bool StrictlyUnsigned = false) {\n if (Expr->isTypeDependent() || !(I = Expr->getIntegerConstantExpr(S.Context))) {\n if (Idx != UINT_MAX)\n else\n S.Diag(getAttrLoc(AI), diag::err_attribute_argument_type) << &AI << AANT_ArgumentIntegerConstant << Expr->getSourceRange();"},{p,354,"/// Check if the argument \\p E is a ASCII string literal. If not emit an error\n/// and return false, otherwise set \\p Str to the value of the string literal\n/// and return true.\nbool Sema::checkStringLiteralArgumentAttr(const AttributeCommonInfo &CI, const Expr *E, StringRef &Str, SourceLocation *ArgLocation) {\n if (!Literal || !Literal->isOrdinary()) {\n Diag(E->getBeginLoc(), diag::err_attribute_argument_type) << CI << AANT_ArgumentString;"},{p,373,"/// Check if the argument \\p ArgNum of \\p Attr is a ASCII string literal.\n/// If not emit an error and return false. If the argument is an identifier it\n/// will emit an error with a fixit hint and treat it as if it was a string\n/// literal.\nbool Sema::checkStringLiteralArgumentAttr(const ParsedAttr &AL, unsigned ArgNum, StringRef &Str, SourceLocation *ArgLocation) {\n // Look for identifiers. If we have one emit a hint to fix it to a literal.\n if (AL.isArgIdent(ArgNum)) {\n Diag(Loc->Loc, diag::err_attribute_argument_type) << AL << AANT_ArgumentString << FixItHint::CreateInsertion(Loc->Loc, \"\\\"\") << FixItHint::CreateInsertion(getLocForEndOfToken(Loc->Loc), \"\\\"\");"},{p,1217,"static void handleConsumableAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.isArgIdent(0)) {\n } else {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,1289,"static void handleParamTypestateAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.isArgIdent(0)) {\n } else {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,1321,"static void handleReturnTypestateAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.isArgIdent(0)) {\n } else {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,1368,"static void handleSetTypestateAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.isArgIdent(0)) {\n } else {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,1390,"static void handleTestTypestateAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.isArgIdent(0)) {\n } else {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,1704,"void Sema::AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE) {\n if (!E->isValueDependent()) {\n if (!(I = E->getIntegerConstantExpr(Context))) {\n if (OE)\n else\n Diag(AttrLoc, diag::err_attribute_argument_type) << &TmpAttr << AANT_ArgumentIntegerConstant << E->getSourceRange();"},{p,2100,"static void handleCPUSpecificAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned ArgNo = 0; ArgNo < getNumAttributeArgs(AL); ++ArgNo) {\n if (!AL.isArgIdent(ArgNo)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,4726,"/// handleModeAttr - This attribute modifies the width of a decl with primitive\n/// type.\n///\n/// Despite what would be logical, the mode attribute is a decl attribute, not a\n/// type attribute: \'int ** __attribute((mode(HI))) *G;\' tries to make \'G\' be\n/// HImode, not an intermediate pointer.\nstatic void handleModeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // This attribute isn\'t documented, but glibc uses it. It changes\n // the width of an int or unsigned int to the specified size.\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,6892,"static void handleSwiftNewType(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,7223,"static void handleHLSLResourceBindingAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,7236,"static void handleHLSLResourceBindingAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.getNumArgs() == 2) {\n if (!AL.isArgIdent(1)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{p,7402,"static void handleMSP430InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgExpr(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIntegerConstant;"},{p,7410,"static void handleMSP430InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!(NumParams = NumParamsExpr->getIntegerConstantExpr(S.Context))) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIntegerConstant << NumParamsExpr->getSourceRange();"},{p,7490,"static void handleM68kInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgExpr(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIntegerConstant;"},{p,7500,"static void handleM68kInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!MaybeNumParams) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIntegerConstant << NumParamsExpr->getSourceRange();"},{p,8592,"static void handleCFGuardAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.isArgIdent(0)) {\n S.Diag(AL.getLoc(), diag::err_attribute_argument_type) << AL << AANT_ArgumentIdentifier;"},{"clang/lib/Sema/SemaStmtAttr.cpp",463,"static Attr *handleOpenCLUnrollHint(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n if (A.getNumArgs() == 1) {\n if (!(ArgVal = E->getIntegerConstantExpr(S.Context))) {\n S.Diag(A.getLoc(), diag::err_attribute_argument_type) << A << AANT_ArgumentIntegerConstant << E->getSourceRange();"},{r,2729,"QualType Sema::BuildVectorType(QualType CurType, Expr *SizeExpr, SourceLocation AttrLoc) {\n if (!VecSize) {\n Diag(AttrLoc, diag::err_attribute_argument_type) << \"vector_size\" << AANT_ArgumentIntegerConstant << SizeExpr->getSourceRange();"},{r,2807,"/// Build an ext-vector type.\n///\n/// Run the required checks for the extended vector type.\nQualType Sema::BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc) {\n if (!ArraySize->isTypeDependent() && !ArraySize->isValueDependent()) {\n if (!vecSize) {\n Diag(AttrLoc, diag::err_attribute_argument_type) << \"ext_vector_type\" << AANT_ArgumentIntegerConstant << ArraySize->getSourceRange();"},{r,2861,"QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) {\n // Both are row and column expressions are invalid.\n if (!ValueRows && !ValueColumns) {\n Diag(AttrLoc, diag::err_attribute_argument_type) << \"matrix_type\" << AANT_ArgumentIntegerConstant << RowRange << ColRange;"},{r,2869,"QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) {\n // Only the row expression is invalid.\n if (!ValueRows) {\n Diag(AttrLoc, diag::err_attribute_argument_type) << \"matrix_type\" << AANT_ArgumentIntegerConstant << RowRange;"},{r,2876,"QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) {\n // Only the column expression is invalid.\n if (!ValueColumns) {\n Diag(AttrLoc, diag::err_attribute_argument_type) << \"matrix_type\" << AANT_ArgumentIntegerConstant << ColRange;"},{r,6717,"/// Build an AddressSpace index from a constant expression and diagnose any\n/// errors related to invalid address_spaces. Returns true on successfully\n/// building an AddressSpace index.\nstatic bool BuildAddressSpaceIndex(Sema &S, LangAS &ASIdx, const Expr *AddrSpace, SourceLocation AttrLoc) {\n if (!AddrSpace->isValueDependent()) {\n if (!OptAddrSpace) {\n S.Diag(AttrLoc, diag::err_attribute_argument_type) << \"\'address_space\'\" << AANT_ArgumentIntegerConstant << AddrSpace->getSourceRange();"},{r,6804,"static void HandleBTFTypeTagAttribute(QualType &Type, const ParsedAttr &Attr, TypeProcessingState &State) {\n if (!StrLiteral) {\n S.Diag(Attr.getLoc(), diag::err_attribute_argument_type) << Attr << AANT_ArgumentString;"},{r,6936,"/// handleObjCOwnershipTypeAttr - Process an objc_ownership\n/// attribute on the specified type.\n///\n/// Returns \'true\' if the attribute was handled.\nstatic bool handleObjCOwnershipTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n if (!attr.isArgIdent(0)) {\n S.Diag(AttrLoc, diag::err_attribute_argument_type) << attr << AANT_ArgumentString;"},{r,7107,"/// handleObjCGCTypeAttr - Process the __attribute__((objc_gc)) type\n/// attribute on the specified type. Returns true to indicate that\n/// the attribute was handled, false to indicate that the type does\n/// not permit the attribute.\nstatic bool handleObjCGCTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // Check the attribute arguments.\n if (!attr.isArgIdent(0)) {\n S.Diag(attr.getLoc(), diag::err_attribute_argument_type) << attr << AANT_ArgumentString;"},{r,8184,"static bool verifyValidIntegerConstantExpr(Sema &S, const ParsedAttr &Attr, llvm::APSInt &Result) {\n S.Diag(Attr.getLoc(), diag::err_attribute_argument_type) << Attr << AANT_ArgumentIntegerConstant << AttrExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_arm_builtin_alias"]={ | ["err_attribute_arm_builtin_alias"]={ | ||
Line 3,210: | Line 3,210: | ||
[h]=o, | [h]=o, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{p, | [k]={{p,5826,"static void handleArmBuiltinAliasAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if ((IsAArch64 && !ArmSveAliasValid(S.Context, BuiltinID, AliasName) && !ArmSmeAliasValid(S.Context, BuiltinID, AliasName)) || (!IsAArch64 && !ArmMveAliasValid(BuiltinID, AliasName) && !ArmCdeAliasValid(BuiltinID, AliasName))) {\n S.Diag(AL.getLoc(), diag::err_attribute_arm_builtin_alias);"}} | ||
}, | }, | ||
["err_attribute_arm_feature_sve_bits_unsupported"]={ | ["err_attribute_arm_feature_sve_bits_unsupported"]={ | ||
Line 3,222: | Line 3,222: | ||
[h]=o, | [h]=o, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{r, | [k]={{r,8265,"/// HandleArmSveVectorBitsTypeAttr - The \"arm_sve_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless SVE types defined by\n/// the ACLE, such as svint32_t and svbool_t.\nstatic void HandleArmSveVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n // Attribute is unsupported if \'-msve-vector-bits=<bits>\' isn\'t specified, or\n // if <bits>+ syntax is used.\n if (!S.getLangOpts().VScaleMin || S.getLangOpts().VScaleMin != S.getLangOpts().VScaleMax) {\n S.Diag(Attr.getLoc(), diag::err_attribute_arm_feature_sve_bits_unsupported) << Attr;"}} | ||
}, | }, | ||
["err_attribute_arm_mve_polymorphism"]={ | ["err_attribute_arm_mve_polymorphism"]={ | ||
Line 3,234: | Line 3,234: | ||
[h]=o, | [h]=o, | ||
[d]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk"}, | [d]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk"}, | ||
[k]={{r, | [k]={{r,8322,"static void HandleArmMveStrictPolymorphismAttr(TypeProcessingState &State, QualType &CurType, ParsedAttr &Attr) {\n if (!VT || VT->getVectorKind() != VectorType::NeonVector) {\n State.getSema().Diag(Attr.getLoc(), diag::err_attribute_arm_mve_polymorphism);"}} | ||
}, | }, | ||
["err_attribute_bad_neon_vector_size"]={ | ["err_attribute_bad_neon_vector_size"]={ | ||
Line 3,246: | Line 3,246: | ||
[h]=o, | [h]=o, | ||
[d]={"118baf76115b",1289867544,"Add support for \"neon_vector_type\" and \"neon_polyvector_type\" attributes"}, | [d]={"118baf76115b",1289867544,"Add support for \"neon_vector_type\" and \"neon_polyvector_type\" attributes"}, | ||
[k]={{r, | [k]={{r,8241,"/// HandleNeonVectorTypeAttr - The \"neon_vector_type\" and\n/// \"neon_polyvector_type\" attributes are used to create vector types that\n/// are mangled according to ARM\'s ABI. Otherwise, these types are identical\n/// to those created with the \"vector_size\" attribute. Unlike \"vector_size\"\n/// the argument to these Neon attributes is the number of vector elements,\n/// not the vector size in bytes. The vector width and element type must\n/// match one of the standard Neon vector types.\nstatic void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S, VectorType::VectorKind VecKind) {\n if (vecSize != 64 && vecSize != 128) {\n S.Diag(Attr.getLoc(), diag::err_attribute_bad_neon_vector_size) << CurType;"}} | ||
}, | }, | ||
["err_attribute_bad_rvv_vector_size"]={ | ["err_attribute_bad_rvv_vector_size"]={ | ||
Line 3,258: | Line 3,258: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{r, | [k]={{r,8385,"/// HandleRISCVRVVVectorBitsTypeAttr - The \"riscv_rvv_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless RVV types such as\n/// vint8m1_t_t.\nstatic void HandleRISCVRVVVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n if (VecSize != ExpectedSize) {\n S.Diag(Attr.getLoc(), diag::err_attribute_bad_rvv_vector_size) << VecSize << ExpectedSize;"}} | ||
}, | }, | ||
["err_attribute_bad_sve_vector_size"]={ | ["err_attribute_bad_sve_vector_size"]={ | ||
Line 3,270: | Line 3,270: | ||
[h]=o, | [h]=o, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{r, | [k]={{r,8288,"/// HandleArmSveVectorBitsTypeAttr - The \"arm_sve_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless SVE types defined by\n/// the ACLE, such as svint32_t and svbool_t.\nstatic void HandleArmSveVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n // The attribute vector size must match -msve-vector-bits.\n if (VecSize != S.getLangOpts().VScaleMin * 128) {\n S.Diag(Attr.getLoc(), diag::err_attribute_bad_sve_vector_size) << VecSize << S.getLangOpts().VScaleMin * 128;"}} | ||
}, | }, | ||
["err_attribute_bounds_for_function"]={ | ["err_attribute_bounds_for_function"]={ | ||
Line 3,282: | Line 3,282: | ||
[h]=o, | [h]=o, | ||
[d]={db,1616787805,cb}, | [d]={db,1616787805,cb}, | ||
[k]={{p, | [k]={{p,1075,"static void handleDiagnoseAsBuiltinAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned I = 1; I < AL.getNumArgs(); ++I) {\n if (Index > DeclFD->getNumParams()) {\n S.Diag(AL.getLoc(), diag::err_attribute_bounds_for_function) << AL << Index << DeclFD << DeclFD->getNumParams();"}} | ||
}, | }, | ||
["err_attribute_builtin_alias"]={ | ["err_attribute_builtin_alias"]={ | ||
Line 3,294: | Line 3,294: | ||
[h]=o, | [h]=o, | ||
[d]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier"}, | [d]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier"}, | ||
[k]={{p, | [k]={{p,5859,"static void handleBuiltinAliasAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if ((IsAArch64 && !ArmSveAliasValid(S.Context, BuiltinID, AliasName)) || (IsARM && !ArmMveAliasValid(BuiltinID, AliasName) && !ArmCdeAliasValid(BuiltinID, AliasName)) || (IsRISCV && !RISCVAliasValid(BuiltinID, AliasName)) || (!IsAArch64 && !IsARM && !IsRISCV && !IsHLSL)) {\n S.Diag(AL.getLoc(), diag::err_attribute_builtin_alias) << AL;"}} | ||
}, | }, | ||
["err_attribute_cleanup_arg_not_function"]={ | ["err_attribute_cleanup_arg_not_function"]={ | ||
Line 3,306: | Line 3,306: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{p, | [k]={{p,3710,"static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // gcc only allows for simple identifiers. Since we support more than gcc, we\n // will warn the user.\n if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {\n if (!FD) {\n S.Diag(Loc, diag::err_attribute_cleanup_arg_not_function) << 1 << NI.getName();"},{p,3720,"static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // gcc only allows for simple identifiers. Since we support more than gcc, we\n // will warn the user.\n if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {\n } else if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(E)) {\n if (!FD) {\n S.Diag(Loc, diag::err_attribute_cleanup_arg_not_function) << 2 << NI.getName();"},{p,3727,"static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // gcc only allows for simple identifiers. Since we support more than gcc, we\n // will warn the user.\n if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {\n } else if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(E)) {\n } else {\n S.Diag(Loc, diag::err_attribute_cleanup_arg_not_function) << 0;"}} | ||
}, | }, | ||
["err_attribute_cleanup_func_arg_incompatible_type"]={ | ["err_attribute_cleanup_func_arg_incompatible_type"]={ | ||
Line 3,318: | Line 3,318: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{p, | [k]={{p,3743,"static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.CheckAssignmentConstraints(FD->getParamDecl(0)->getLocation(), ParamTy, Ty) != Sema::Compatible) {\n S.Diag(Loc, diag::err_attribute_cleanup_func_arg_incompatible_type) << NI.getName() << ParamTy << Ty;"}} | ||
}, | }, | ||
["err_attribute_cleanup_func_must_take_one_arg"]={ | ["err_attribute_cleanup_func_must_take_one_arg"]={ | ||
Line 3,330: | Line 3,330: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{p, | [k]={{p,3732,"static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (FD->getNumParams() != 1) {\n S.Diag(Loc, diag::err_attribute_cleanup_func_must_take_one_arg) << NI.getName();"}} | ||
}, | }, | ||
["err_attribute_dll_ambiguous_default_ctor"]={ | ["err_attribute_dll_ambiguous_default_ctor"]={ | ||
Line 3,342: | Line 3,342: | ||
[h]=o, | [h]=o, | ||
[d]={"474b323a0387",1451540206,"[MSVC Compat] Diagnose multiple default ctors for dllexport\'d classes"}, | [d]={"474b323a0387",1451540206,"[MSVC Compat] Diagnose multiple default ctors for dllexport\'d classes"}, | ||
[k]={{v, | [k]={{v,6298,"static void checkForMultipleExportedDefaultConstructors(Sema &S, CXXRecordDecl *Class) {\n for (Decl *Member : Class->decls()) {\n if (LastExportedDefaultCtor) {\n S.Diag(LastExportedDefaultCtor->getLocation(), diag::err_attribute_dll_ambiguous_default_ctor) << Class;"}} | ||
}, | }, | ||
["err_attribute_dll_deleted"]={ | ["err_attribute_dll_deleted"]={ | ||
Line 3,354: | Line 3,354: | ||
[h]=o, | [h]=o, | ||
[d]={"9de0a57687b9",1401382279,"Sema: Functions with dll attributes cannot be deleted"}, | [d]={"9de0a57687b9",1401382279,"Sema: Functions with dll attributes cannot be deleted"}, | ||
[k]={{v, | [k]={{v,17831,"void Sema::SetDeclDeleted(Decl *Dcl, SourceLocation DelLoc) {\n // dllimport/dllexport cannot be deleted.\n if (const InheritableAttr *DLLAttr = getDLLAttr(Fn)) {\n Diag(Fn->getLocation(), diag::err_attribute_dll_deleted) << DLLAttr;"}} | ||
}, | }, | ||
["err_attribute_dll_lambda"]={ | ["err_attribute_dll_lambda"]={ | ||
Line 3,366: | Line 3,366: | ||
[h]=o, | [h]=o, | ||
[d]={"5869ec4c6c62",1442351130,"MS ABI: Don\'t allow dllexport/import on lambdas"}, | [d]={"5869ec4c6c62",1442351130,"MS ABI: Don\'t allow dllexport/import on lambdas"}, | ||
[k]={{p, | [k]={{p,2089,"static void handleCPUSpecificAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {\n if (MD->getParent()->isLambda()) {\n S.Diag(AL.getLoc(), diag::err_attribute_dll_lambda) << AL;"},{p,8049,"static void handleDLLAttr(Sema &S, Decl *D, const ParsedAttr &A) {\n if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {\n if ((S.Context.getTargetInfo().shouldDLLImportComdatSymbols()) && MD->getParent()->isLambda()) {\n S.Diag(A.getRange().getBegin(), diag::err_attribute_dll_lambda) << A;"}} | ||
}, | }, | ||
["err_attribute_dll_member_of_dll_class"]={ | ["err_attribute_dll_member_of_dll_class"]={ | ||
Line 3,378: | Line 3,378: | ||
[h]=o, | [h]=o, | ||
[d]={"496524b4484b",1401502129,"Diagnose dll attribute on member of class that already has a dll attribute"}, | [d]={"496524b4484b",1401502129,"Diagnose dll attribute on member of class that already has a dll attribute"}, | ||
[k]={{v, | [k]={{v,6483,"/// Check class-level dllimport/dllexport attribute.\nvoid Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) {\n if (Context.getTargetInfo().shouldDLLImportComdatSymbols() && !ClassAttr->isInherited()) {\n // Diagnose dll attributes on members of class with dll attribute.\n for (Decl *Member : Class->decls()) {\n Diag(MemberAttr->getLocation(), diag::err_attribute_dll_member_of_dll_class) << MemberAttr << ClassAttr;"}} | ||
}, | }, | ||
["err_attribute_dll_not_extern"]={ | ["err_attribute_dll_not_extern"]={ | ||
Line 3,390: | Line 3,390: | ||
[h]=o, | [h]=o, | ||
[d]={"8ca0bfc57ff5",1396277818,"Sema: Require external linkage for dll attributes"}, | [d]={"8ca0bfc57ff5",1396277818,"Sema: Require external linkage for dll attributes"}, | ||
[k]={{q, | [k]={{q,7003,"static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) {\n if (const InheritableAttr *Attr = getDLLAttr(&ND)) {\n if ((ND.isExternallyVisible() && AnonNSInMicrosoftMode) || (!AnonNSInMicrosoftMode && (!ND.isExternallyVisible() || (VD && VD->isStaticLocal())))) {\n S.Diag(ND.getLocation(), diag::err_attribute_dll_not_extern) << &ND << Attr;"},{v,6467,"/// Check class-level dllimport/dllexport attribute.\nvoid Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) {\n if (!Class->isExternallyVisible()) {\n Diag(Class->getLocation(), diag::err_attribute_dll_not_extern) << Class << ClassAttr;"}} | ||
}, | }, | ||
["err_attribute_dll_redeclaration"]={ | ["err_attribute_dll_redeclaration"]={ | ||
Line 3,402: | Line 3,402: | ||
[h]=o, | [h]=o, | ||
[d]={"82f0b06749e5",1396277775,"Sema: Check dll attributes on redeclarations"}, | [d]={"82f0b06749e5",1396277775,"Sema: Check dll attributes on redeclarations"}, | ||
[k]={{q, | [k]={{q,7093,"static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, NamedDecl *NewDecl, bool IsSpecialization, bool IsDefinition) {\n if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) {\n unsigned DiagID = JustWarn ? diag::warn_attribute_dll_redeclaration : diag::err_attribute_dll_redeclaration;"}} | ||
}, | }, | ||
["err_attribute_dll_thread_local"]={ | ["err_attribute_dll_thread_local"]={ | ||
Line 3,414: | Line 3,414: | ||
[h]=o, | [h]=o, | ||
[d]={"5da21da4f6d7",1412405514,"MS ABI: Disallow dllimported/exported variables from having TLS"}, | [d]={"5da21da4f6d7",1412405514,"MS ABI: Disallow dllimported/exported variables from having TLS"}, | ||
[k]={{q, | [k]={{q,14463,"/// FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform\n/// any semantic actions necessary after any initializer has been attached.\nvoid Sema::FinalizeDeclaration(Decl *ThisDecl) {\n // dllimport/dllexport variables cannot be thread local, their TLS index\n // isn\'t exported with the variable.\n if (DLLAttr && VD->getTLSKind()) {\n if (F && getDLLAttr(F)) {\n } else {\n Diag(VD->getLocation(), diag::err_attribute_dll_thread_local) << VD << DLLAttr;"}} | ||
}, | }, | ||
["err_attribute_dllimport_data_definition"]={ | ["err_attribute_dllimport_data_definition"]={ | ||
Line 3,426: | Line 3,426: | ||
[h]=o, | [h]=o, | ||
[d]={"8e9791f62c45",1393450033,"Sema: Definition of dllimport globals is not allowed"}, | [d]={"8e9791f62c45",1393450033,"Sema: Definition of dllimport globals is not allowed"}, | ||
[k]={{q, | [k]={{q,13179,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // dllimport cannot be used on variable definitions.\n if (VDecl->hasAttr<DLLImportAttr>() && !VDecl->isStaticDataMember()) {\n Diag(VDecl->getLocation(), diag::err_attribute_dllimport_data_definition);"}} | ||
}, | }, | ||
["err_attribute_dllimport_function_definition"]={ | ["err_attribute_dllimport_function_definition"]={ | ||
Line 3,438: | Line 3,438: | ||
[h]=o, | [h]=o, | ||
[d]={"b0f2f146bb65",1400191669,"Allow dllimport/dllexport on inline functions and adjust the linkage."}, | [d]={"b0f2f146bb65",1400191669,"Allow dllimport/dllexport on inline functions and adjust the linkage."}, | ||
[k]={{q, | [k]={{q,15420,"Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, SkipBodyInfo *SkipBody, FnBodyKind BodyKind) {\n // dllimport cannot be applied to non-inline function definitions.\n if (FD->hasAttr<DLLImportAttr>() && !FD->isInlined() && !FD->isTemplateInstantiation()) {\n Diag(FD->getLocation(), diag::err_attribute_dllimport_function_definition);"}} | ||
}, | }, | ||
["err_attribute_dllimport_function_specialization_definition"]={ | ["err_attribute_dllimport_function_specialization_definition"]={ | ||
Line 3,450: | Line 3,450: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{q, | [k]={{q,7130,"static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, NamedDecl *NewDecl, bool IsSpecialization, bool IsDefinition) {\n if (OldImportAttr && !HasNewAttr && (!IsInline || (IsMicrosoftABI && IsTemplate)) && !IsStaticDataMember && !NewDecl->isLocalExternDecl() && !IsQualifiedFriend) {\n if (IsMicrosoftABI && IsDefinition) {\n if (IsSpecialization) {\n S.Diag(NewDecl->getLocation(), diag::err_attribute_dllimport_function_specialization_definition);"}} | ||
}, | }, | ||
["err_attribute_dllimport_static_field_definition"]={ | ["err_attribute_dllimport_static_field_definition"]={ | ||
Line 3,462: | Line 3,462: | ||
[h]=o, | [h]=o, | ||
[d]={"078d2f89cd6a",1401382220,"Sema: Check dll attributes on static data members"}, | [d]={"078d2f89cd6a",1401382220,"Sema: Check dll attributes on static data members"}, | ||
[k]={{q, | [k]={{q,14446,"/// FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform\n/// any semantic actions necessary after any initializer has been attached.\nvoid Sema::FinalizeDeclaration(Decl *ThisDecl) {\n // Imported static data members cannot be defined out-of-line.\n if (const auto *IA = dyn_cast_or_null<DLLImportAttr>(DLLAttr)) {\n if (VD->isStaticDataMember() && VD->isOutOfLine() && VD->isThisDeclarationADefinition()) {\n Diag(VD->getLocation(), IsClassTemplateMember ? diag::warn_attribute_dllimport_static_field_definition : diag::err_attribute_dllimport_static_field_definition);"}} | ||
}, | }, | ||
["err_attribute_integers_only"]={ | ["err_attribute_integers_only"]={ | ||
Line 3,474: | Line 3,474: | ||
[h]=o, | [h]=o, | ||
[d]={"a747027bc645",1482195942,"Add the alloc_size attribute to clang."}, | [d]={"a747027bc645",1482195942,"Add the alloc_size attribute to clang."}, | ||
[k]={{p, | [k]={{p,820,"/// Checks to be sure that the given parameter number is in bounds, and\n/// is an integral type. Will emit appropriate diagnostics if this returns\n/// false.\n///\n/// AttrArgNo is used to actually retrieve the argument, so it\'s base-0.\ntemplate <typename AttrInfo> static bool checkParamIsIntegerType(Sema &S, const Decl *D, const AttrInfo &AI, unsigned AttrArgNo) {\n if (!ParamTy->isIntegerType() && !ParamTy->isCharType()) {\n S.Diag(SrcLoc, diag::err_attribute_integers_only) << AI << getFunctionOrMethodParamRange(D, Idx.getASTIndex());"},{p,1754,"void Sema::AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ParamExpr) {\n if (!Ty->isDependentType() && !Ty->isIntegralType(Context) && !Ty->isAlignValT()) {\n Diag(ParamExpr->getBeginLoc(), diag::err_attribute_integers_only) << &TmpAttr << FuncDecl->getParamDecl(Idx.getASTIndex())->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_invalid_argument"]={ | ["err_attribute_invalid_argument"]={ | ||
Line 3,486: | Line 3,486: | ||
[h]=o, | [h]=o, | ||
[d]={"d293cbd5fd44",1564077051,"Add lifetime categories attributes"}, | [d]={"d293cbd5fd44",1564077051,"Add lifetime categories attributes"}, | ||
[k]={{p, | [k]={{p,3271,"static void handleVecTypeHint(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!ParmType->isExtVectorType() && !ParmType->isFloatingType() && (ParmType->isBooleanType() || !ParmType->isIntegralType(S.getASTContext()))) {\n S.Diag(AL.getLoc(), diag::err_attribute_invalid_argument) << 2 << AL;"},{p,5236,"static void handleLifetimeCategoryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.hasParsedType()) {\n if (SelectIdx != ~0U) {\n S.Diag(AL.getLoc(), diag::err_attribute_invalid_argument) << SelectIdx << AL;"}} | ||
}, | }, | ||
["err_attribute_invalid_bitint_vector_type"]={ | ["err_attribute_invalid_bitint_vector_type"]={ | ||
Line 3,498: | Line 3,498: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{r, | [k]={{r,2716,"QualType Sema::BuildVectorType(QualType CurType, Expr *SizeExpr, SourceLocation AttrLoc) {\n // Only support _BitInt elements with byte-sized power of 2 NumBits.\n if (const auto *BIT = CurType->getAs<BitIntType>()) {\n if (!llvm::isPowerOf2_32(NumBits) || NumBits < 8) {\n Diag(AttrLoc, diag::err_attribute_invalid_bitint_vector_type) << (NumBits < 8);"},{r,2797,"/// Build an ext-vector type.\n///\n/// Run the required checks for the extended vector type.\nQualType Sema::BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc) {\n // Only support _BitInt elements with byte-sized power of 2 NumBits.\n if (T->isBitIntType()) {\n if (!llvm::isPowerOf2_32(NumBits) || NumBits < 8) {\n Diag(AttrLoc, diag::err_attribute_invalid_bitint_vector_type) << (NumBits < 8);"}} | ||
}, | }, | ||
["err_attribute_invalid_implicit_this_argument"]={ | ["err_attribute_invalid_implicit_this_argument"]={ | ||
Line 3,510: | Line 3,510: | ||
[h]=o, | [h]=o, | ||
[d]={"743682bb9f66",1289896543,"Re-work the handling of implicit \'this\' arguments and silly GCC-style attribute"}, | [d]={"743682bb9f66",1289896543,"Re-work the handling of implicit \'this\' arguments and silly GCC-style attribute"}, | ||
[k]={{p, | [k]={{p,333,"/// Check if IdxExpr is a valid parameter index for a function or\n/// instance method D. May output an error.\n///\n/// \\returns true if IdxExpr is a valid index.\ntemplate <typename AttrInfo> static bool checkFunctionOrMethodParameterIndex(Sema &S, const Decl *D, const AttrInfo &AI, unsigned AttrArgNum, const Expr *IdxExpr, ParamIdx &Idx, bool CanIndexImplicitThis = false) {\n if (HasImplicitThisParam && !CanIndexImplicitThis) {\n if (IdxSource == 1) {\n S.Diag(getAttrLoc(AI), diag::err_attribute_invalid_implicit_this_argument) << &AI << IdxExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_invalid_matrix_type"]={ | ["err_attribute_invalid_matrix_type"]={ | ||
Line 3,522: | Line 3,522: | ||
[h]=o, | [h]=o, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{r, | [k]={{r,2842,"QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) {\n // Check element type, if it is not dependent.\n if (!ElementTy->isDependentType() && !MatrixType::isValidElementType(ElementTy)) {\n Diag(AttrLoc, diag::err_attribute_invalid_matrix_type) << ElementTy;"}} | ||
}, | }, | ||
["err_attribute_invalid_on_decl"]={ | ["err_attribute_invalid_on_decl"]={ | ||
Line 3,534: | Line 3,534: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{p, | [k]={{p,8826,"/// ProcessDeclAttribute - Apply the specific attribute to the specified decl if\n/// the attribute applies to decls. If the attribute is a type attribute, just\n/// silently ignore it if a GNU attribute.\nstatic void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) {\n default:\n S.Diag(AL.getLoc(), diag::err_attribute_invalid_on_decl) << AL << AL.isRegularKeywordAttribute() << D->getLocation();"},{"clang/utils/TableGen/ClangAttrEmitter.cpp",3886,"static void GenerateAppertainsTo(const Record &Attr, raw_ostream &OS) {\n if (DeclSubjects.empty()) {\n // If there are no decl subjects but there are stmt subjects, diagnose\n // trying to apply a statement attribute to a declaration.\n if (!StmtSubjects.empty()) {\n OS << \" S.Diag(AL.getLoc(), diag::err_attribute_invalid_on_decl)\\n\";"}} | ||
}, | }, | ||
["err_attribute_invalid_rvv_type"]={ | ["err_attribute_invalid_rvv_type"]={ | ||
Line 3,546: | Line 3,546: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{r, | [k]={{r,8369,"/// HandleRISCVRVVVectorBitsTypeAttr - The \"riscv_rvv_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless RVV types such as\n/// vint8m1_t_t.\nstatic void HandleRISCVRVVVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n // Attribute can only be attached to a single RVV vector type.\n if (!CurType->isRVVVLSBuiltinType()) {\n S.Diag(Attr.getLoc(), diag::err_attribute_invalid_rvv_type) << Attr << CurType;"}} | ||
}, | }, | ||
["err_attribute_invalid_size"]={ | ["err_attribute_invalid_size"]={ | ||
Line 3,558: | Line 3,558: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{r, | [k]={{r,2756,"QualType Sema::BuildVectorType(QualType CurType, Expr *SizeExpr, SourceLocation AttrLoc) {\n if (!TypeSize || VectorSizeBits % TypeSize) {\n Diag(AttrLoc, diag::err_attribute_invalid_size) << SizeExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_invalid_sve_type"]={ | ["err_attribute_invalid_sve_type"]={ | ||
Line 3,570: | Line 3,570: | ||
[h]=o, | [h]=o, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{r, | [k]={{r,8296,"/// HandleArmSveVectorBitsTypeAttr - The \"arm_sve_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless SVE types defined by\n/// the ACLE, such as svint32_t and svbool_t.\nstatic void HandleArmSveVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n // Attribute can only be attached to a single SVE vector or predicate type.\n if (!CurType->isVLSTBuiltinType()) {\n S.Diag(Attr.getLoc(), diag::err_attribute_invalid_sve_type) << Attr << CurType;"}} | ||
}, | }, | ||
["err_attribute_invalid_vector_type"]={ | ["err_attribute_invalid_vector_type"]={ | ||
Line 3,582: | Line 3,582: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{r, | [k]={{r,2709,"QualType Sema::BuildVectorType(QualType CurType, Expr *SizeExpr, SourceLocation AttrLoc) {\n // The base type must be integer (not Boolean or enumeration) or float, and\n // can\'t already be a vector.\n if ((!CurType->isDependentType() && (!CurType->isBuiltinType() || CurType->isBooleanType() || (!CurType->isIntegerType() && !CurType->isRealFloatingType())) && !CurType->isBitIntType()) || CurType->isArrayType()) {\n Diag(AttrLoc, diag::err_attribute_invalid_vector_type) << CurType;"},{r,2789,"/// Build an ext-vector type.\n///\n/// Run the required checks for the extended vector type.\nQualType Sema::BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc) {\n if ((!T->isDependentType() && !T->isIntegerType() && !T->isRealFloatingType()) || (IsNoBoolVecLang && T->isBooleanType())) {\n Diag(AttrLoc, diag::err_attribute_invalid_vector_type) << T;"},{r,8231,"/// HandleNeonVectorTypeAttr - The \"neon_vector_type\" and\n/// \"neon_polyvector_type\" attributes are used to create vector types that\n/// are mangled according to ARM\'s ABI. Otherwise, these types are identical\n/// to those created with the \"vector_size\" attribute. Unlike \"vector_size\"\n/// the argument to these Neon attributes is the number of vector elements,\n/// not the vector size in bytes. The vector width and element type must\n/// match one of the standard Neon vector types.\nstatic void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S, VectorType::VectorKind VecKind) {\n // Only certain element types are supported for Neon vectors.\n if (!isPermittedNeonBaseType(CurType, VecKind, S) && !IsTargetCUDAAndHostARM) {\n S.Diag(Attr.getLoc(), diag::err_attribute_invalid_vector_type) << CurType;"}} | ||
}, | }, | ||
["err_attribute_missing_on_first_decl"]={ | ["err_attribute_missing_on_first_decl"]={ | ||
Line 3,594: | Line 3,594: | ||
[h]=o, | [h]=o, | ||
[d]={Lb,1615397021,Kb}, | [d]={Lb,1615397021,Kb}, | ||
[k]={{q, | [k]={{q,3710,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n if (const auto *ILA = New->getAttr<InternalLinkageAttr>())\n if (!Old->hasAttr<InternalLinkageAttr>()) {\n Diag(New->getLocation(), diag::err_attribute_missing_on_first_decl) << ILA;"},{q,3718,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n if (auto *EA = New->getAttr<ErrorAttr>()) {\n if (!Old->hasAttr<ErrorAttr>()) {\n Diag(EA->getLocation(), diag::err_attribute_missing_on_first_decl) << EA;"},{q,4043,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n if (getLangOpts().CPlusPlus) {\n // C++11 [dcl.attr.noreturn]p1:\n // The first declaration of a function shall specify the noreturn\n // attribute if any declaration of that function specifies the noreturn\n // attribute.\n if (const auto *NRA = New->getAttr<CXX11NoReturnAttr>())\n if (!Old->hasAttr<CXX11NoReturnAttr>()) {\n Diag(NRA->getLocation(), diag::err_attribute_missing_on_first_decl) << NRA;"},{q,4600,"/// MergeVarDecl - We just parsed a variable \'New\' which has the same name\n/// and scope as a previous declaration \'Old\'. Figure out how to resolve this\n/// situation, merging decls or emitting diagnostics as appropriate.\n///\n/// Tentative definition rules (C99 6.9.2p2) are checked by\n/// FinalizeDeclaratorGroup. Unfortunately, we can\'t analyze tentative\n/// definitions here, since the initializer hasn\'t been attached.\n///\nvoid Sema::MergeVarDecl(VarDecl *New, LookupResult &Previous) {\n if (const auto *ILA = New->getAttr<InternalLinkageAttr>())\n if (!Old->hasAttr<InternalLinkageAttr>()) {\n Diag(New->getLocation(), diag::err_attribute_missing_on_first_decl) << ILA;"}} | ||
}, | }, | ||
["err_attribute_multiple_objc_gc"]={ | ["err_attribute_multiple_objc_gc"]={ | ||
Line 3,606: | Line 3,606: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{r, | [k]={{r,7100,"/// handleObjCGCTypeAttr - Process the __attribute__((objc_gc)) type\n/// attribute on the specified type. Returns true to indicate that\n/// the attribute was handled, false to indicate that the type does\n/// not permit the attribute.\nstatic bool handleObjCGCTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n if (type.getObjCGCAttr() != Qualifiers::GCNone) {\n S.Diag(attr.getLoc(), diag::err_attribute_multiple_objc_gc);"}} | ||
}, | }, | ||
["err_attribute_no_builtin_on_defaulted_deleted_function"]={ | ["err_attribute_no_builtin_on_defaulted_deleted_function"]={ | ||
Line 3,618: | Line 3,618: | ||
[h]=o, | [h]=o, | ||
[d]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute"}, | [d]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute"}, | ||
[k]={{q, | [k]={{q,10801,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // Diagnose no_builtin attribute on function declaration that are not a\n // definition.\n // FIXME: We should really be doing this in\n // SemaDeclAttr.cpp::handleNoBuiltinAttr, unfortunately we only have access to\n // the FunctionDecl and at this point of the code\n // FunctionDecl::isThisDeclarationADefinition() which always returns `false`\n // because Sema::ActOnStartOfFunctionDef has not been called yet.\n if (const auto *NBA = NewFD->getAttr<NoBuiltinAttr>())\n case FunctionDefinitionKind::Deleted:\n Diag(NBA->getLocation(), diag::err_attribute_no_builtin_on_defaulted_deleted_function) << NBA->getSpelling();"}} | ||
}, | }, | ||
["err_attribute_no_builtin_on_non_definition"]={ | ["err_attribute_no_builtin_on_non_definition"]={ | ||
Line 3,630: | Line 3,630: | ||
[h]=o, | [h]=o, | ||
[d]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute"}, | [d]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute"}, | ||
[k]={{q, | [k]={{q,10805,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // Diagnose no_builtin attribute on function declaration that are not a\n // definition.\n // FIXME: We should really be doing this in\n // SemaDeclAttr.cpp::handleNoBuiltinAttr, unfortunately we only have access to\n // the FunctionDecl and at this point of the code\n // FunctionDecl::isThisDeclarationADefinition() which always returns `false`\n // because Sema::ActOnStartOfFunctionDef has not been called yet.\n if (const auto *NBA = NewFD->getAttr<NoBuiltinAttr>())\n case FunctionDefinitionKind::Declaration:\n Diag(NBA->getLocation(), diag::err_attribute_no_builtin_on_non_definition) << NBA->getSpelling();"}} | ||
}, | }, | ||
["err_attribute_no_builtin_wildcard_or_builtin_name"]={ | ["err_attribute_no_builtin_wildcard_or_builtin_name"]={ | ||
Line 3,642: | Line 3,642: | ||
[h]=o, | [h]=o, | ||
[d]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute"}, | [d]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute"}, | ||
[k]={{p, | [k]={{p,1164,"static void handleNoBuiltinAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Empty no_builtin must be on its own.\n if (HasWildcard && Names.size() > 1)\n S.Diag(D->getLocation(), diag::err_attribute_no_builtin_wildcard_or_builtin_name) << AL;"}} | ||
}, | }, | ||
["err_attribute_no_member_function"]={ | ["err_attribute_no_member_function"]={ | ||
Line 3,654: | Line 3,654: | ||
[h]=o, | [h]=o, | ||
[d]={db,1616787805,cb}, | [d]={db,1616787805,cb}, | ||
[k]={{p, | [k]={{p,1025,"static void handleDiagnoseAsBuiltinAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(DeclFD))\n if (!MethodDecl->isStatic()) {\n S.Diag(AL.getLoc(), diag::err_attribute_no_member_function) << AL;"}} | ||
}, | }, | ||
["err_attribute_no_member_pointers"]={ | ["err_attribute_no_member_pointers"]={ | ||
Line 3,666: | Line 3,666: | ||
[h]=o, | [h]=o, | ||
[d]={"317a77f1c7ab",1369265132,"Adding in parsing and the start of semantic support for __sptr and __uptr pointer type qualifiers. ..."}, | [d]={"317a77f1c7ab",1369265132,"Adding in parsing and the start of semantic support for __sptr and __uptr pointer type qualifiers. ..."}, | ||
[k]={{r, | [k]={{r,7380,"static bool handleMSPointerTypeQualifierAttr(TypeProcessingState &State, ParsedAttr &PAttr, QualType &Type) {\n // Check the raw (i.e., desugared) Canonical type to see if it\n // is a pointer type.\n if (!isa<PointerType>(Desugared)) {\n // Pointer type qualifiers can only operate on pointer types, but not\n // pointer-to-member types.\n if (Type->isMemberPointerType())\n S.Diag(PAttr.getLoc(), diag::err_attribute_no_member_pointers) << PAttr;"}} | ||
}, | }, | ||
["err_attribute_not_clinkage"]={ | ["err_attribute_not_clinkage"]={ | ||
Line 3,678: | Line 3,678: | ||
[h]=o, | [h]=o, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{p, | [k]={{p,2146,"static void handleCmseNSEntryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.LangOpts.CPlusPlus && !D->getDeclContext()->isExternCContext()) {\n S.Diag(AL.getLoc(), diag::err_attribute_not_clinkage) << AL;"}} | ||
}, | }, | ||
["err_attribute_not_import_attr"]={ | ["err_attribute_not_import_attr"]={ | ||
Line 3,690: | Line 3,690: | ||
[h]="Modules Issue", | [h]="Modules Issue", | ||
[d]={"49cc1ccb00df",1471557582,"C++ Modules TS: Add parsing support for module import declaration."}, | [d]={"49cc1ccb00df",1471557582,"C++ Modules TS: Add parsing support for module import declaration."}, | ||
[k]={{Jb, | [k]={{Jb,2534,"/// Parse a module import declaration. This is essentially the same for\n/// Objective-C and C++20 except for the leading \'@\' (in ObjC) and the\n/// trailing optional attributes (in C++).\n///\n/// [ObjC] @import declaration:\n/// \'@\' \'import\' module-name \';\'\n/// [ModTS] module-import-declaration:\n/// \'import\' module-name attribute-specifier-seq[opt] \';\'\n/// [C++20] module-import-declaration:\n/// \'export\'[opt] \'import\' module-name\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' module-partition\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' header-name\n/// attribute-specifier-seq[opt] \';\'\nDecl *Parser::ParseModuleImport(SourceLocation AtLoc, Sema::ModuleImportState &ImportState) {\n ProhibitCXX11Attributes(Attrs, diag::err_attribute_not_import_attr, diag::err_keyword_not_import_attr,"}} | ||
}, | }, | ||
["err_attribute_not_module_attr"]={ | ["err_attribute_not_module_attr"]={ | ||
Line 3,702: | Line 3,702: | ||
[h]="Modules Issue", | [h]="Modules Issue", | ||
[d]={"964cc53d9a74",1471570986,"C++ Modules TS: support parsing the \'module\' declaration (including extensions"}, | [d]={"964cc53d9a74",1471570986,"C++ Modules TS: support parsing the \'module\' declaration (including extensions"}, | ||
[k]={{Jb, | [k]={{Jb,2464,"/// Parse a declaration beginning with the \'module\' keyword or C++20\n/// context-sensitive keyword (optionally preceded by \'export\').\n///\n/// module-declaration: [C++20]\n/// \'export\'[opt] \'module\' module-name attribute-specifier-seq[opt] \';\'\n///\n/// global-module-fragment: [C++2a]\n/// \'module\' \';\' top-level-declaration-seq[opt]\n/// module-declaration: [C++2a]\n/// \'export\'[opt] \'module\' module-name module-partition[opt]\n/// attribute-specifier-seq[opt] \';\'\n/// private-module-fragment: [C++2a]\n/// \'module\' \':\' \'private\' \';\' top-level-declaration-seq[opt]\nParser::DeclGroupPtrTy Parser::ParseModuleDecl(Sema::ModuleImportState &ImportState) {\n ProhibitCXX11Attributes(Attrs, diag::err_attribute_not_module_attr, diag::err_keyword_not_module_attr,"}} | ||
}, | }, | ||
["err_attribute_not_supported_in_lang"]={ | ["err_attribute_not_supported_in_lang"]={ | ||
Line 3,714: | Line 3,714: | ||
[h]=o, | [h]=o, | ||
[d]={"df8fe4c91cf2",1385328916,"__declspec(uuid) is only supported for C++ code according to MSDN (as well as behaviorally in MSVC)...."}, | [d]={"df8fe4c91cf2",1385328916,"__declspec(uuid) is only supported for C++ code according to MSDN (as well as behaviorally in MSVC)...."}, | ||
[k]={{p, | [k]={{p,2136,"static void handleCommonAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.LangOpts.CPlusPlus) {\n S.Diag(AL.getLoc(), diag::err_attribute_not_supported_in_lang) << AL << AttributeLangSupport::Cpp;"},{p,6989,"static void handleUuidAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!S.LangOpts.CPlusPlus) {\n S.Diag(AL.getLoc(), diag::err_attribute_not_supported_in_lang) << AL << AttributeLangSupport::C;"},{p,7291,"static void handleMSInheritanceAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!S.LangOpts.CPlusPlus) {\n S.Diag(AL.getLoc(), diag::err_attribute_not_supported_in_lang) << AL << AttributeLangSupport::C;"}} | ||
}, | }, | ||
["err_attribute_not_supported_on_arch"]={ | ["err_attribute_not_supported_on_arch"]={ | ||
Line 3,726: | Line 3,726: | ||
[h]=o, | [h]=o, | ||
[d]={"b51bcaf2f027",1491578027,"Sema: prevent __declspec(naked) use on x64"}, | [d]={"b51bcaf2f027",1491578027,"Sema: prevent __declspec(naked) use on x64"}, | ||
[k]={{p, | [k]={{p,2165,"static void handleNakedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.isDeclspecAttribute()) {\n if (Arch != llvm::Triple::x86 && (Arch != llvm::Triple::arm && Arch != llvm::Triple::thumb)) {\n S.Diag(AL.getLoc(), diag::err_attribute_not_supported_on_arch) << AL << Triple.getArchName();"}} | ||
}, | }, | ||
["err_attribute_not_type_attr"]={ | ["err_attribute_not_type_attr"]={ | ||
Line 3,738: | Line 3,738: | ||
[h]=B, | [h]=B, | ||
[d]={"10876ef5714f",1358386242,"Implement C++11 semantics for [[noreturn]] attribute. This required splitting"}, | [d]={"10876ef5714f",1358386242,"Implement C++11 semantics for [[noreturn]] attribute. This required splitting"}, | ||
[k]={{D, | [k]={{D,3352,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n while (true) {\n DoneWithDeclSpec:\n if (!AttrsLastTime)\n else {\n // Reject C++11 / C2x attributes that aren\'t type attributes.\n for (const ParsedAttr &PA : attrs) {\n Diag(PA.getLoc(), diag::err_attribute_not_type_attr) << PA << PA.isRegularKeywordAttribute();"},{r,8571,"static void processTypeAttrs(TypeProcessingState &state, QualType &type, TypeAttrLocation TAL, const ParsedAttributesView &attrs) {\n for (ParsedAttr &attr : AttrsCopy) {\n default:\n // A [[]] attribute on a declarator chunk must appertain to a type.\n if ((attr.isStandardAttributeSyntax() || attr.isRegularKeywordAttribute()) && TAL == TAL_DeclChunk) {\n state.getSema().Diag(attr.getLoc(), diag::err_attribute_not_type_attr) << attr << attr.isRegularKeywordAttribute();"}} | ||
}, | }, | ||
["err_attribute_only_once_per_parameter"]={ | ["err_attribute_only_once_per_parameter"]={ | ||
Line 3,750: | Line 3,750: | ||
[h]=o, | [h]=o, | ||
[d]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang."}, | [d]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang."}, | ||
[k]={{p, | [k]={{p,1175,"static void handlePassObjectSizeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (D->hasAttr<PassObjectSizeAttr>()) {\n S.Diag(D->getBeginLoc(), diag::err_attribute_only_once_per_parameter) << AL;"}} | ||
}, | }, | ||
["err_attribute_output_parameter"]={ | ["err_attribute_output_parameter"]={ | ||
Line 3,762: | Line 3,762: | ||
[h]=o, | [h]=o, | ||
[d]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles."}, | [d]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles."}, | ||
[k]={{p, | [k]={{p,8564,"static void handleAcquireHandleAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Warn if the parameter is definitely not an output parameter.\n if (const auto *PVD = dyn_cast<ParmVarDecl>(D)) {\n if (PVD->getType()->isIntegerType()) {\n S.Diag(AL.getLoc(), diag::err_attribute_output_parameter) << AL.getRange();"}} | ||
}, | }, | ||
["err_attribute_overloadable_mismatch"]={ | ["err_attribute_overloadable_mismatch"]={ | ||
Line 3,774: | Line 3,774: | ||
[h]=o, | [h]=o, | ||
[d]={"d3cf025ae221",1498599091,"[Sema] Allow unmarked overloadable functions."}, | [d]={"d3cf025ae221",1498599091,"[Sema] Allow unmarked overloadable functions."}, | ||
[k]={{q, | [k]={{q,3730,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n if (!getLangOpts().CPlusPlus) {\n if (OldOvl != New->hasAttr<OverloadableAttr>() && !Old->isImplicit()) {\n Diag(New->getLocation(), diag::err_attribute_overloadable_mismatch) << New << OldOvl;"}} | ||
}, | }, | ||
["err_attribute_overloadable_multiple_unmarked_overloads"]={ | ["err_attribute_overloadable_multiple_unmarked_overloads"]={ | ||
Line 3,786: | Line 3,786: | ||
[h]=o, | [h]=o, | ||
[d]={"d3cf025ae221",1498599091,"[Sema] Allow unmarked overloadable functions."}, | [d]={"d3cf025ae221",1498599091,"[Sema] Allow unmarked overloadable functions."}, | ||
[k]={{q, | [k]={{q,11887,"/// Perform semantic checking of a new function declaration.\n///\n/// Performs semantic analysis of the new function declaration\n/// NewFD. This routine performs all semantic checking that does not\n/// require the actual declarator involved in the declaration, and is\n/// used both for the declaration of functions as they are parsed\n/// (called via ActOnDeclarator) and for the declaration of functions\n/// that have been instantiated via C++ template instantiation (called\n/// via InstantiateDecl).\n///\n/// \\param IsMemberSpecialization whether this new function declaration is\n/// a member specialization (that replaces any definition provided by the\n/// previous declaration).\n///\n/// This sets NewFD->isInvalidDecl() to true if there was an error.\n///\n/// \\returns true if the function declaration is a redeclaration.\nbool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization, bool DeclIsDefn) {\n if (Redeclaration) {\n } else if (!getLangOpts().CPlusPlus && MayNeedOverloadableChecks && !NewFD->getAttr<OverloadableAttr>()) {\n if (OtherUnmarkedIter != Previous.end()) {\n Diag(NewFD->getLocation(), diag::err_attribute_overloadable_multiple_unmarked_overloads);"}} | ||
}, | }, | ||
["err_attribute_overloadable_no_prototype"]={ | ["err_attribute_overloadable_no_prototype"]={ | ||
Line 3,798: | Line 3,798: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{q, | [k]={{q,10621,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (NewFD->hasAttr<OverloadableAttr>() && !NewFD->getType()->getAs<FunctionProtoType>()) {\n Diag(NewFD->getLocation(), diag::err_attribute_overloadable_no_prototype) << NewFD;"}} | ||
}, | }, | ||
["err_attribute_parameter_types"]={ | ["err_attribute_parameter_types"]={ | ||
Line 3,810: | Line 3,810: | ||
[h]=o, | [h]=o, | ||
[d]={db,1616787805,cb}, | [d]={db,1616787805,cb}, | ||
[k]={{p, | [k]={{p,1085,"static void handleDiagnoseAsBuiltinAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned I = 1; I < AL.getNumArgs(); ++I) {\n if (T1.getCanonicalType().getUnqualifiedType() != T2.getCanonicalType().getUnqualifiedType()) {\n S.Diag(IndexExpr->getBeginLoc(), diag::err_attribute_parameter_types) << AL << Index << DeclFD << T2 << I << AttrFD << T1;"}} | ||
}, | }, | ||
["err_attribute_pointers_only"]={ | ["err_attribute_pointers_only"]={ | ||
Line 3,822: | Line 3,822: | ||
[h]=o, | [h]=o, | ||
[d]={"e4a5a90e8d6b",1345162118,"Add support for \"type safety\" attributes that allow checking that \'void *\'"}, | [d]={"e4a5a90e8d6b",1345162118,"Add support for \"type safety\" attributes that allow checking that \'void *\'"}, | ||
[k]={{s, | [k]={{s,16689,"/// CheckParmsForFunctionDef - Check that the parameters of the given\n/// function are appropriate for the definition of a function. This\n/// takes care of any checks that cannot be performed on the\n/// declaration itself, e.g., that the types of each of the function\n/// parameters are complete.\nbool Sema::CheckParmsForFunctionDef(ArrayRef<ParmVarDecl *> Parameters, bool CheckParameterNames) {\n for (ParmVarDecl *Param : Parameters) {\n // Parameters with the pass_object_size attribute only need to be marked\n // constant at function definitions. Because we lack information about\n // whether we\'re on a declaration or definition when we\'re instantiating the\n // attribute, we need to check for constness here.\n if (const auto *Attr = Param->getAttr<PassObjectSizeAttr>())\n if (!Param->getType().isConstQualified())\n Diag(Param->getLocation(), diag::err_attribute_pointers_only) << Attr->getSpelling() << 1;"},{p,1198,"static void handlePassObjectSizeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // pass_object_size is only supported on constant pointer parameters; as a\n // kindness to users, we allow the parameter to be non-const for declarations.\n // At this point, we have no clue if `D` belongs to a function declaration or\n // definition, so we defer the constness check until later.\n if (!cast<ParmVarDecl>(D)->getType()->isPointerType()) {\n S.Diag(D->getBeginLoc(), diag::err_attribute_pointers_only) << AL << 1;"},{p,5686,"static void handleArgumentWithTypeTagAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (IsPointer) {\n if (ArgumentIdxAST >= getFunctionOrMethodNumParams(D) || !getFunctionOrMethodParamType(D, ArgumentIdxAST)->isPointerType())\n S.Diag(AL.getLoc(), diag::err_attribute_pointers_only) << AL << 0;"},{r,7382,"static bool handleMSPointerTypeQualifierAttr(TypeProcessingState &State, ParsedAttr &PAttr, QualType &Type) {\n // Check the raw (i.e., desugared) Canonical type to see if it\n // is a pointer type.\n if (!isa<PointerType>(Desugared)) {\n // Pointer type qualifiers can only operate on pointer types, but not\n // pointer-to-member types.\n if (Type->isMemberPointerType())\n else\n S.Diag(PAttr.getLoc(), diag::err_attribute_pointers_only) << PAttr << 0;"}} | ||
}, | }, | ||
["err_attribute_preferred_name_arg_invalid"]={ | ["err_attribute_preferred_name_arg_invalid"]={ | ||
Line 3,834: | Line 3,834: | ||
[h]=o, | [h]=o, | ||
[d]={fb,1590001902,eb}, | [d]={fb,1590001902,eb}, | ||
[k]={{p, | [k]={{p,1461,"static void handlePreferredName(Sema &S, Decl *D, const ParsedAttr &AL) {\n S.Diag(AL.getLoc(), diag::err_attribute_preferred_name_arg_invalid) << T << CTD;"}} | ||
}, | }, | ||
["err_attribute_regparm_invalid_number"]={ | ["err_attribute_regparm_invalid_number"]={ | ||
Line 3,846: | Line 3,846: | ||
[h]=o, | [h]=o, | ||
[d]={"7044b7670747",1238188007,"Finish off semantic analysis for regparm, and remove the warning. Also "}, | [d]={"7044b7670747",1238188007,"Finish off semantic analysis for regparm, and remove the warning. Also "}, | ||
[k]={{p, | [k]={{p,5587,"/// Checks a regparm attribute, returning true if it is ill-formed and\n/// otherwise setting numParams to the appropriate value.\nbool Sema::CheckRegparmAttr(const ParsedAttr &AL, unsigned &numParams) {\n if (numParams > Context.getTargetInfo().getRegParmMax()) {\n Diag(AL.getLoc(), diag::err_attribute_regparm_invalid_number) << Context.getTargetInfo().getRegParmMax() << NumParamsExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_regparm_wrong_platform"]={ | ["err_attribute_regparm_wrong_platform"]={ | ||
Line 3,858: | Line 3,858: | ||
[h]=o, | [h]=o, | ||
[d]={"7044b7670747",1238188007,"Finish off semantic analysis for regparm, and remove the warning. Also "}, | [d]={"7044b7670747",1238188007,"Finish off semantic analysis for regparm, and remove the warning. Also "}, | ||
[k]={{p, | [k]={{p,5579,"/// Checks a regparm attribute, returning true if it is ill-formed and\n/// otherwise setting numParams to the appropriate value.\nbool Sema::CheckRegparmAttr(const ParsedAttr &AL, unsigned &numParams) {\n if (Context.getTargetInfo().getRegParmMax() == 0) {\n Diag(AL.getLoc(), diag::err_attribute_regparm_wrong_platform) << NumParamsExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_requires_arguments"]={ | ["err_attribute_requires_arguments"]={ | ||
Line 3,870: | Line 3,870: | ||
[h]=B, | [h]=B, | ||
[d]={"ef5d94caf067",1397522199,"Fixing a typo, updating the diagnostic wording and logic based on post-commit review feedback. Amend..."}, | [d]={"ef5d94caf067",1397522199,"Fixing a typo, updating the diagnostic wording and logic based on post-commit review feedback. Amend..."}, | ||
[k]={{D, | [k]={{D,743,"bool Parser::ParseMicrosoftDeclSpecArgs(IdentifierInfo *AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs) {\n // If this attribute\'s args were parsed, and it was expected to have\n // arguments but none were provided, emit a diagnostic.\n if (ExistingAttrs < Attrs.size() && Attrs.back().getMaxArgs() && !NumArgs) {\n Diag(OpenParenLoc, diag::err_attribute_requires_arguments) << AttrName;"},{K,4460,"/// ParseCXX11AttributeArgs -- Parse a C++11 attribute-argument-clause.\n///\n/// [C++11] attribute-argument-clause:\n/// \'(\' balanced-token-seq \')\'\n///\n/// [C++11] balanced-token-seq:\n/// balanced-token\n/// balanced-token-seq balanced-token\n///\n/// [C++11] balanced-token:\n/// \'(\' balanced-token-seq \')\'\n/// \'[\' balanced-token-seq \']\'\n/// \'{\' balanced-token-seq \'}\'\n/// any token but \'(\', \')\', \'[\', \']\', \'{\', or \'}\'\nbool Parser::ParseCXX11AttributeArgs(IdentifierInfo *AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, CachedTokens &OpenMPTokens) {\n if (!Attrs.empty() && IsBuiltInOrStandardCXX11Attribute(AttrName, ScopeName)) {\n // If the attribute is a standard or built-in attribute and we are\n // parsing an argument list, we need to determine whether this attribute\n // was allowed to have an argument list (such as [[deprecated]]), and how\n // many arguments were parsed (so we can diagnose on [[deprecated()]]).\n if (Attr.getMaxArgs() && !NumArgs) {\n Diag(LParenLoc, diag::err_attribute_requires_arguments) << AttrName;"}} | ||
}, | }, | ||
["err_attribute_requires_opencl_version"]={ | ["err_attribute_requires_opencl_version"]={ | ||
Line 3,882: | Line 3,882: | ||
[h]=o, | [h]=o, | ||
[d]={"6bdbcbb3d91b",1455906611,"[OpenCL] Generate metadata for opencl_unroll_hint attribute"}, | [d]={"6bdbcbb3d91b",1455906611,"[OpenCL] Generate metadata for opencl_unroll_hint attribute"}, | ||
[k]={{p, | [k]={{p,8281,"static void handleOpenCLNoSVMAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.LangOpts.getOpenCLCompatibleVersion() < 200)\n S.Diag(AL.getLoc(), diag::err_attribute_requires_opencl_version) << AL << \"2.0\" << 1;"}} | ||
}, | }, | ||
["err_attribute_requires_positive_integer"]={ | ["err_attribute_requires_positive_integer"]={ | ||
Line 3,894: | Line 3,894: | ||
[h]=o, | [h]=o, | ||
[d]={"6bdbcbb3d91b",1455906611,"[OpenCL] Generate metadata for opencl_unroll_hint attribute"}, | [d]={"6bdbcbb3d91b",1455906611,"[OpenCL] Generate metadata for opencl_unroll_hint attribute"}, | ||
[k]={{p, | [k]={{p,241,"/// If Expr is a valid integer constant, get the value of the integer\n/// expression and return success or failure. May output an error.\n///\n/// Negative argument is implicitly converted to unsigned, unless\n/// \\p StrictlyUnsigned is true.\ntemplate <typename AttrInfo> static bool checkUInt32Argument(Sema &S, const AttrInfo &AI, const Expr *Expr, uint32_t &Val, unsigned Idx = UINT_MAX, bool StrictlyUnsigned = false) {\n if (StrictlyUnsigned && I->isSigned() && I->isNegative()) {\n S.Diag(getAttrLoc(AI), diag::err_attribute_requires_positive_integer) << &AI << /*non-negative*/ 1;"},{"clang/lib/Sema/SemaStmtAttr.cpp",471,"static Attr *handleOpenCLUnrollHint(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n if (A.getNumArgs() == 1) {\n if (Val <= 0) {\n S.Diag(A.getRange().getBegin(), diag::err_attribute_requires_positive_integer) << A << /* positive */ 0;"}} | ||
}, | }, | ||
["err_attribute_riscv_rvv_bits_unsupported"]={ | ["err_attribute_riscv_rvv_bits_unsupported"]={ | ||
Line 3,906: | Line 3,906: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{r, | [k]={{r,8348,"/// HandleRISCVRVVVectorBitsTypeAttr - The \"riscv_rvv_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless RVV types such as\n/// vint8m1_t_t.\nstatic void HandleRISCVRVVVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n if (!VScale || !VScale->first || VScale->first != VScale->second) {\n S.Diag(Attr.getLoc(), diag::err_attribute_riscv_rvv_bits_unsupported) << Attr;"}} | ||
}, | }, | ||
["err_attribute_section_invalid_for_target"]={ | ["err_attribute_section_invalid_for_target"]={ | ||
Line 3,918: | Line 3,918: | ||
[h]=o, | [h]=o, | ||
[d]={"30ba674391ae",1249930984,"fix a couple of problems with section attributes:"}, | [d]={"30ba674391ae",1249930984,"fix a couple of problems with section attributes:"}, | ||
[k]={{p, | [k]={{p,3328,"bool Sema::checkSectionName(SourceLocation LiteralLoc, StringRef SecName) {\n if (llvm::Error E = isValidSectionSpecifier(SecName)) {\n Diag(LiteralLoc, diag::err_attribute_section_invalid_for_target) << toString(std::move(E)) << 1 /*\'section\'*/;"},{p,3362,"// This is used for `__declspec(code_seg(\"segname\"))` on a decl.\n// `#pragma code_seg(\"segname\")` uses checkSectionName() instead.\nstatic bool checkCodeSegName(Sema &S, SourceLocation LiteralLoc, StringRef CodeSegName) {\n if (llvm::Error E = S.isValidSectionSpecifier(CodeSegName)) {\n S.Diag(LiteralLoc, diag::err_attribute_section_invalid_for_target) << toString(std::move(E)) << 0 /*\'code-seg\'*/;"}} | ||
}, | }, | ||
["err_attribute_selectany_non_extern_data"]={ | ["err_attribute_selectany_non_extern_data"]={ | ||
Line 3,930: | Line 3,930: | ||
[h]=o, | [h]=o, | ||
[d]={"b144d366934f",1369058557,"Implement __declspec(selectany) under -fms-extensions"}, | [d]={"b144d366934f",1369058557,"Implement __declspec(selectany) under -fms-extensions"}, | ||
[k]={{q, | [k]={{q,6979,"static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) {\n // \'selectany\' only applies to externally visible variable declarations.\n // It does not apply to functions.\n if (SelectAnyAttr *Attr = ND.getAttr<SelectAnyAttr>()) {\n if (isa<FunctionDecl>(ND) || !ND.isExternallyVisible()) {\n S.Diag(Attr->getLocation(), diag::err_attribute_selectany_non_extern_data);"}} | ||
}, | }, | ||
["err_attribute_sentinel_less_than_zero"]={ | ["err_attribute_sentinel_less_than_zero"]={ | ||
Line 3,942: | Line 3,942: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{p, | [k]={{p,3060,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.getNumArgs() > 0) {\n if (Idx->isSigned() && Idx->isNegative()) {\n S.Diag(AL.getLoc(), diag::err_attribute_sentinel_less_than_zero) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_sentinel_not_zero_or_one"]={ | ["err_attribute_sentinel_not_zero_or_one"]={ | ||
Line 3,954: | Line 3,954: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{p, | [k]={{p,3082,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.getNumArgs() > 1) {\n if ((Idx->isSigned() && Idx->isNegative()) || nullPos > 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_sentinel_not_zero_or_one) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_attribute_size_too_large"]={ | ["err_attribute_size_too_large"]={ | ||
Line 3,966: | Line 3,966: | ||
[h]=o, | [h]=o, | ||
[d]={"efe9fa62f5b4",1374800027,"Tighten type-checking for vector attributes."}, | [d]={"efe9fa62f5b4",1374800027,"Tighten type-checking for vector attributes."}, | ||
[k]={{r, | [k]={{r,2742,"QualType Sema::BuildVectorType(QualType CurType, Expr *SizeExpr, SourceLocation AttrLoc) {\n // vecSize is specified in bytes - convert to bits.\n if (!VecSize->isIntN(61)) {\n Diag(AttrLoc, diag::err_attribute_size_too_large) << SizeExpr->getSourceRange() << \"vector\";"},{r,2762,"QualType Sema::BuildVectorType(QualType CurType, Expr *SizeExpr, SourceLocation AttrLoc) {\n if (VectorSizeBits / TypeSize > std::numeric_limits<uint32_t>::max()) {\n Diag(AttrLoc, diag::err_attribute_size_too_large) << SizeExpr->getSourceRange() << \"vector\";"},{r,2814,"/// Build an ext-vector type.\n///\n/// Run the required checks for the extended vector type.\nQualType Sema::BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc) {\n if (!ArraySize->isTypeDependent() && !ArraySize->isValueDependent()) {\n if (!vecSize->isIntN(32)) {\n Diag(AttrLoc, diag::err_attribute_size_too_large) << ArraySize->getSourceRange() << \"vector\";"},{r,2898,"QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) {\n if (!ConstantMatrixType::isDimensionValid(MatrixRows)) {\n Diag(AttrLoc, diag::err_attribute_size_too_large) << RowRange << \"matrix row\";"},{r,2903,"QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) {\n if (!ConstantMatrixType::isDimensionValid(MatrixColumns)) {\n Diag(AttrLoc, diag::err_attribute_size_too_large) << ColRange << \"matrix column\";"}} | ||
}, | }, | ||
["err_attribute_sizeless_type"]={ | ["err_attribute_sizeless_type"]={ | ||
Line 3,978: | Line 3,978: | ||
[h]=o, | [h]=o, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{p, | [k]={{p,4610,"void Sema::CheckAlignasUnderalignment(Decl *D) {\n if (Align && DiagTy->isSizelessType()) {\n Diag(LastAlignedAttr->getLocation(), diag::err_attribute_sizeless_type) << LastAlignedAttr << DiagTy;"}} | ||
}, | }, | ||
["err_attribute_too_few_arguments"]={ | ["err_attribute_too_few_arguments"]={ | ||
Line 3,990: | Line 3,990: | ||
[h]=o, | [h]=o, | ||
[d]={"63fa667c6874",1311883955,"Added basic parsing for all remaining attributes, thread safety"}, | [d]={"63fa667c6874",1311883955,"Added basic parsing for all remaining attributes, thread safety"}, | ||
[k]={{"clang/lib/Sema/ParsedAttr.cpp", | [k]={{"clang/lib/Sema/ParsedAttr.cpp",289,"bool ParsedAttr::checkAtLeastNumArgs(Sema &S, unsigned Num) const { return checkAttributeNumArgsImpl(S, *this, Num, diag::err_attribute_too_few_arguments, std::less<unsigned>()); }"},{p,1834,"static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n case OwnershipAttr::Holds:\n if (AL.getNumArgs() < 2) {\n S.Diag(AL.getLoc(), diag::err_attribute_too_few_arguments) << AL << 2;"},{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",215,"static void instantiateDependentAnnotationAttr(Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AnnotateAttr *Attr, Decl *New) {\n if (HasDelayedArgs) {\n if (Args.size() < 1) {\n S.Diag(Attr->getLoc(), diag::err_attribute_too_few_arguments) << Attr << 1;"},{r,8478,"static void HandleAnnotateTypeAttr(TypeProcessingState &State, QualType &CurType, const ParsedAttr &PA) {\n if (PA.getNumArgs() < 1) {\n S.Diag(PA.getLoc(), diag::err_attribute_too_few_arguments) << PA << 1;"}} | ||
}, | }, | ||
["err_attribute_too_many_arguments"]={ | ["err_attribute_too_many_arguments"]={ | ||
Line 4,002: | Line 4,002: | ||
[h]=o, | [h]=o, | ||
[d]={"80ee5963fde8",1299068105,"Pretty up the wrong-number-of-arguments-for-attribute diagnostic by"}, | [d]={"80ee5963fde8",1299068105,"Pretty up the wrong-number-of-arguments-for-attribute diagnostic by"}, | ||
[k]={{"clang/lib/Sema/ParsedAttr.cpp", | [k]={{"clang/lib/Sema/ParsedAttr.cpp",294,"bool ParsedAttr::checkAtMostNumArgs(Sema &S, unsigned Num) const { return checkAttributeNumArgsImpl(S, *this, Num, diag::err_attribute_too_many_arguments, std::greater<unsigned>()); }"},{p,1840,"static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n case OwnershipAttr::Returns:\n if (AL.getNumArgs() > 2) {\n S.Diag(AL.getLoc(), diag::err_attribute_too_many_arguments) << AL << 1;"},{p,7354,"static void handleARMInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Check the attribute arguments.\n if (AL.getNumArgs() > 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_too_many_arguments) << AL << 1;"},{p,7431,"static void handleMipsInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Only one optional argument permitted.\n if (AL.getNumArgs() > 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_too_many_arguments) << AL << 1;"}} | ||
}, | }, | ||
["err_attribute_unsupported"]={ | ["err_attribute_unsupported"]={ | ||
Line 4,014: | Line 4,014: | ||
[h]=o, | [h]=o, | ||
[d]={"8c3de546d62e",1379354855,"Add error checking to reject neon_vector_type attribute on targets without NEON."}, | [d]={"8c3de546d62e",1379354855,"Add error checking to reject neon_vector_type attribute on targets without NEON."}, | ||
[k]={{r, | [k]={{r,8211,"/// HandleNeonVectorTypeAttr - The \"neon_vector_type\" and\n/// \"neon_polyvector_type\" attributes are used to create vector types that\n/// are mangled according to ARM\'s ABI. Otherwise, these types are identical\n/// to those created with the \"vector_size\" attribute. Unlike \"vector_size\"\n/// the argument to these Neon attributes is the number of vector elements,\n/// not the vector size in bytes. The vector width and element type must\n/// match one of the standard Neon vector types.\nstatic void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S, VectorType::VectorKind VecKind) {\n // Target must have NEON (or MVE, whose vectors are similar enough\n // not to need a separate attribute)\n if (!(S.Context.getTargetInfo().hasFeature(\"neon\") || S.Context.getTargetInfo().hasFeature(\"mve\") || IsTargetCUDAAndHostARM)) {\n S.Diag(Attr.getLoc(), diag::err_attribute_unsupported) << Attr << \"\'neon\' or \'mve\'\";"},{r,8256,"/// HandleArmSveVectorBitsTypeAttr - The \"arm_sve_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless SVE types defined by\n/// the ACLE, such as svint32_t and svbool_t.\nstatic void HandleArmSveVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n // Target must have SVE.\n if (!S.Context.getTargetInfo().hasFeature(\"sve\")) {\n S.Diag(Attr.getLoc(), diag::err_attribute_unsupported) << Attr << \"\'sve\'\";"},{r,8340,"/// HandleRISCVRVVVectorBitsTypeAttr - The \"riscv_rvv_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless RVV types such as\n/// vint8m1_t_t.\nstatic void HandleRISCVRVVVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n // Target must have vector extension.\n if (!S.Context.getTargetInfo().hasFeature(\"zve32x\")) {\n S.Diag(Attr.getLoc(), diag::err_attribute_unsupported) << Attr << \"\'zve32x\'\";"}} | ||
}, | }, | ||
["err_attribute_uuid_malformed_guid"]={ | ["err_attribute_uuid_malformed_guid"]={ | ||
Line 4,026: | Line 4,026: | ||
[h]=a, | [h]=a, | ||
[d]={"7da1166da010",1292809309,"Validate Microsoft\'s uuid attribute string."}, | [d]={"7da1166da010",1292809309,"Validate Microsoft\'s uuid attribute string."}, | ||
[k]={{K, | [k]={{K,4738,"/// Parse uuid() attribute when it appears in a [] Microsoft attribute.\nvoid Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) {\n if (Tok.is(tok::string_literal)) {\n } else {\n while (Tok.isNot(tok::r_paren)) {\n if (Tok.hasLeadingSpace() || Tok.isAtStartOfLine()) {\n Diag(Tok, diag::err_attribute_uuid_malformed_guid);"},{K,4756,"/// Parse uuid() attribute when it appears in a [] Microsoft attribute.\nvoid Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) {\n if (Tok.is(tok::string_literal)) {\n } else {\n if (Tok.hasLeadingSpace() || Tok.isAtStartOfLine()) {\n Diag(Tok, diag::err_attribute_uuid_malformed_guid);"},{p,7007,"static void handleUuidAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Validate GUID length.\n if (StrRef.size() != 36) {\n S.Diag(LiteralLoc, diag::err_attribute_uuid_malformed_guid);"},{p,7014,"static void handleUuidAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned i = 0; i < 36; ++i) {\n if (i == 8 || i == 13 || i == 18 || i == 23) {\n if (StrRef[i] != \'-\') {\n S.Diag(LiteralLoc, diag::err_attribute_uuid_malformed_guid);"},{p,7018,"static void handleUuidAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned i = 0; i < 36; ++i) {\n if (i == 8 || i == 13 || i == 18 || i == 23) {\n } else if (!isHexDigit(StrRef[i])) {\n S.Diag(LiteralLoc, diag::err_attribute_uuid_malformed_guid);"}} | ||
}, | }, | ||
["err_attribute_vecreturn_only_pod_record"]={ | ["err_attribute_vecreturn_only_pod_record"]={ | ||
Line 4,038: | Line 4,038: | ||
[h]=o, | [h]=o, | ||
[d]={"9a587aaaa9e7",1284772327,"Add more error checking to attribute vecreturn"}, | [d]={"9a587aaaa9e7",1284772327,"Add more error checking to attribute vecreturn"}, | ||
[k]={{p, | [k]={{p,2300,"// PS3 PPU-specific.\nstatic void handleVecReturnAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!cast<CXXRecordDecl>(R)->isPOD()) {\n S.Diag(AL.getLoc(), diag::err_attribute_vecreturn_only_pod_record);"}} | ||
}, | }, | ||
["err_attribute_vecreturn_only_vector_member"]={ | ["err_attribute_vecreturn_only_vector_member"]={ | ||
Line 4,050: | Line 4,050: | ||
[h]=o, | [h]=o, | ||
[d]={"9a587aaaa9e7",1284772327,"Add more error checking to attribute vecreturn"}, | [d]={"9a587aaaa9e7",1284772327,"Add more error checking to attribute vecreturn"}, | ||
[k]={{p, | [k]={{p,2295,"// PS3 PPU-specific.\nstatic void handleVecReturnAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!isa<CXXRecordDecl>(R)) {\n S.Diag(AL.getLoc(), diag::err_attribute_vecreturn_only_vector_member);"},{p,2306,"// PS3 PPU-specific.\nstatic void handleVecReturnAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (const auto *I : R->fields()) {\n if ((count == 1) || !I->getType()->isVectorType()) {\n S.Diag(AL.getLoc(), diag::err_attribute_vecreturn_only_vector_member);"}} | ||
}, | }, | ||
["err_attribute_weak_static"]={ | ["err_attribute_weak_static"]={ | ||
Line 4,062: | Line 4,062: | ||
[h]=o, | [h]=o, | ||
[d]={"41136eec6bdb",1247706744,"Generate error on declaration containing \'static\' and \'__attribute__((weak))\'"}, | [d]={"41136eec6bdb",1247706744,"Generate error on declaration containing \'static\' and \'__attribute__((weak))\'"}, | ||
[k]={{q, | [k]={{q,6951,"static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) {\n // \'weak\' only applies to declarations with external linkage.\n if (WeakAttr *Attr = ND.getAttr<WeakAttr>()) {\n if (!ND.isExternallyVisible()) {\n S.Diag(Attr->getLocation(), diag::err_attribute_weak_static);"}} | ||
}, | }, | ||
["err_attribute_weakref_not_global_context"]={ | ["err_attribute_weakref_not_global_context"]={ | ||
Line 4,074: | Line 4,074: | ||
[h]=o, | [h]=o, | ||
[d]={"c18086ae1755",1266962430,"Add support for the weakref attribute. We still produce \"alias weak\" as llvm-gcc does, but are more ..."}, | [d]={"c18086ae1755",1266962430,"Add support for the weakref attribute. We still produce \"alias weak\" as llvm-gcc does, but are more ..."}, | ||
[k]={{p, | [k]={{p,1933,"static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!Ctx->isFileContext()) {\n S.Diag(AL.getLoc(), diag::err_attribute_weakref_not_global_context) << cast<NamedDecl>(D);"}} | ||
}, | }, | ||
["err_attribute_weakref_not_static"]={ | ["err_attribute_weakref_not_static"]={ | ||
Line 4,086: | Line 4,086: | ||
[h]=o, | [h]=o, | ||
[d]={"c18086ae1755",1266962430,"Add support for the weakref attribute. We still produce \"alias weak\" as llvm-gcc does, but are more ..."}, | [d]={"c18086ae1755",1266962430,"Add support for the weakref attribute. We still produce \"alias weak\" as llvm-gcc does, but are more ..."}, | ||
[k]={{q, | [k]={{q,6957,"static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) {\n if (WeakRefAttr *Attr = ND.getAttr<WeakRefAttr>()) {\n if (ND.isExternallyVisible()) {\n S.Diag(Attr->getLocation(), diag::err_attribute_weakref_not_static);"}} | ||
}, | }, | ||
["err_attribute_weakref_without_alias"]={ | ["err_attribute_weakref_without_alias"]={ | ||
Line 4,098: | Line 4,098: | ||
[h]=o, | [h]=o, | ||
[d]={"c18086ae1755",1266962430,"Add support for the weakref attribute. We still produce \"alias weak\" as llvm-gcc does, but are more ..."}, | [d]={"c18086ae1755",1266962430,"Add support for the weakref attribute. We still produce \"alias weak\" as llvm-gcc does, but are more ..."}, | ||
[k]={{p, | [k]={{p,9516,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // FIXME: We should be able to handle these cases in TableGen.\n // GCC accepts\n // static int a9 __attribute__((weakref));\n // but that looks really pointless. We reject it.\n if (D->hasAttr<WeakRefAttr>() && !D->hasAttr<AliasAttr>()) {\n Diag(AttrList.begin()->getLoc(), diag::err_attribute_weakref_without_alias) << cast<NamedDecl>(D);"}} | ||
}, | }, | ||
["err_attribute_webassembly_funcref"]={ | ["err_attribute_webassembly_funcref"]={ | ||
Line 4,121: | Line 4,121: | ||
[h]=o, | [h]=o, | ||
[d]={"96d5c76498b2",1258792989,"Added rudimentary C++0x attribute support."}, | [d]={"96d5c76498b2",1258792989,"Added rudimentary C++0x attribute support."}, | ||
[k]={{p, | [k]={{p,2249,"static void handleAnalyzerNoReturnAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // The checking path for \'noreturn\' and \'analyzer_noreturn\' are different\n // because \'analyzer_noreturn\' does not impact the type.\n if (!isFunctionOrMethodOrBlock(D)) {\n if (!VD || (!VD->getType()->isBlockPointerType() && !VD->getType()->isFunctionPointerType())) {\n S.Diag(AL.getLoc(), AL.isStandardAttributeSyntax() ? diag::err_attribute_wrong_decl_type : diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunctionMethodOrBlock;"},{p,2904,"static void handleVisibilityAttr(Sema &S, Decl *D, const ParsedAttr &AL, bool isTypeVisibility) {\n // \'type_visibility\' can only go on a type or namespace.\n if (isTypeVisibility && !(isa<TagDecl>(D) || isa<ObjCInterfaceDecl>(D) || isa<NamespaceDecl>(D))) {\n S.Diag(AL.getRange().getBegin(), diag::err_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedTypeOrNamespace;"},{p,4429,"/// Perform checking of type validity\n///\n/// C++11 [dcl.align]p1:\n/// An alignment-specifier may be applied to a variable or to a class\n/// data member, but it shall not be applied to a bit-field, a function\n/// parameter, the formal parameter of a catch clause, or a variable\n/// declared with the register storage class specifier. An\n/// alignment-specifier may also be applied to the declaration of a class\n/// or enumeration type.\n/// CWG 2354:\n/// CWG agreed to remove permission for alignas to be applied to\n/// enumerations.\n/// C11 6.7.5/2:\n/// An alignment attribute shall not be specified in a declaration of\n/// a typedef, or a bit-field, or a function, or a parameter, or an\n/// object declared with the register storage-class specifier.\nstatic bool validateAlignasAppliedType(Sema &S, Decl *D, const AlignedAttr &Attr, SourceLocation AttrLoc) {\n if (isa<ParmVarDecl>(D)) {\n } else if (const auto *VD = dyn_cast<VarDecl>(D)) {\n } else if (const auto *FD = dyn_cast<FieldDecl>(D)) {\n } else if (const auto *ED = dyn_cast<EnumDecl>(D)) {\n } else if (!isa<TagDecl>(D)) {\n return S.Diag(AttrLoc, diag::err_attribute_wrong_decl_type) << &Attr << Attr.isRegularKeywordAttribute() << (Attr.isC11() ? ExpectedVariableOrField : ExpectedVariableFieldOrTag);"},{p,5706,"static void handleTypeTagForDatatypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!isa<VarDecl>(D)) {\n S.Diag(AL.getLoc(), diag::err_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedVariable;"},{p,6289,"static void handleObjCOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n S.Diag(D->getBeginLoc(), diag::err_attribute_wrong_decl_type) << AL.getRange() << AL << AL.isRegularKeywordAttribute() << ExpectedVariable;"},{p,8253,"static void handleNoSanitizeSpecificAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (isGlobalVar(D) && SanitizerName != \"address\")\n S.Diag(D->getLocation(), diag::err_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunction;"},{p,9530,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // FIXME: We should be able to handle this in TableGen as well. It would be\n // good to have a way to specify \"these attributes must appear as a group\",\n // for these. Additionally, it would be good to have a way to specify \"these\n // attribute must never appear as a group\" for attributes like cold and hot.\n if (!D->hasAttr<OpenCLKernelAttr>()) {\n // These attributes cannot be applied to a non-kernel function.\n if (const auto *A = D->getAttr<ReqdWorkGroupSizeAttr>()) {\n // diag::err_attribute_wrong_decl_type + ExpectedKernelFunction."},{p,9544,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // FIXME: We should be able to handle this in TableGen as well. It would be\n // good to have a way to specify \"these attributes must appear as a group\",\n // for these. Additionally, it would be good to have a way to specify \"these\n // attribute must never appear as a group\" for attributes like cold and hot.\n if (!D->hasAttr<OpenCLKernelAttr>()) {\n // These attributes cannot be applied to a non-kernel function.\n if (const auto *A = D->getAttr<ReqdWorkGroupSizeAttr>()) {\n } else if (const auto *A = D->getAttr<WorkGroupSizeHintAttr>()) {\n } else if (const auto *A = D->getAttr<VecTypeHintAttr>()) {\n } else if (const auto *A = D->getAttr<OpenCLIntelReqdSubGroupSizeAttr>()) {\n } else if (!D->hasAttr<CUDAGlobalAttr>()) {\n if (const auto *A = D->getAttr<AMDGPUFlatWorkGroupSizeAttr>()) {\n Diag(D->getLocation(), diag::err_attribute_wrong_decl_type) << A << A->isRegularKeywordAttribute() << ExpectedKernelFunction;"},{p,9548,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // FIXME: We should be able to handle this in TableGen as well. It would be\n // good to have a way to specify \"these attributes must appear as a group\",\n // for these. Additionally, it would be good to have a way to specify \"these\n // attribute must never appear as a group\" for attributes like cold and hot.\n if (!D->hasAttr<OpenCLKernelAttr>()) {\n // These attributes cannot be applied to a non-kernel function.\n if (const auto *A = D->getAttr<ReqdWorkGroupSizeAttr>()) {\n } else if (const auto *A = D->getAttr<WorkGroupSizeHintAttr>()) {\n } else if (const auto *A = D->getAttr<VecTypeHintAttr>()) {\n } else if (const auto *A = D->getAttr<OpenCLIntelReqdSubGroupSizeAttr>()) {\n } else if (!D->hasAttr<CUDAGlobalAttr>()) {\n if (const auto *A = D->getAttr<AMDGPUFlatWorkGroupSizeAttr>()) {\n } else if (const auto *A = D->getAttr<AMDGPUWavesPerEUAttr>()) {\n Diag(D->getLocation(), diag::err_attribute_wrong_decl_type) << A << A->isRegularKeywordAttribute() << ExpectedKernelFunction;"},{p,9552,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // FIXME: We should be able to handle this in TableGen as well. It would be\n // good to have a way to specify \"these attributes must appear as a group\",\n // for these. Additionally, it would be good to have a way to specify \"these\n // attribute must never appear as a group\" for attributes like cold and hot.\n if (!D->hasAttr<OpenCLKernelAttr>()) {\n // These attributes cannot be applied to a non-kernel function.\n if (const auto *A = D->getAttr<ReqdWorkGroupSizeAttr>()) {\n } else if (const auto *A = D->getAttr<WorkGroupSizeHintAttr>()) {\n } else if (const auto *A = D->getAttr<VecTypeHintAttr>()) {\n } else if (const auto *A = D->getAttr<OpenCLIntelReqdSubGroupSizeAttr>()) {\n } else if (!D->hasAttr<CUDAGlobalAttr>()) {\n if (const auto *A = D->getAttr<AMDGPUFlatWorkGroupSizeAttr>()) {\n } else if (const auto *A = D->getAttr<AMDGPUWavesPerEUAttr>()) {\n } else if (const auto *A = D->getAttr<AMDGPUNumSGPRAttr>()) {\n Diag(D->getLocation(), diag::err_attribute_wrong_decl_type) << A << A->isRegularKeywordAttribute() << ExpectedKernelFunction;"},{p,9556,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // FIXME: We should be able to handle this in TableGen as well. It would be\n // good to have a way to specify \"these attributes must appear as a group\",\n // for these. Additionally, it would be good to have a way to specify \"these\n // attribute must never appear as a group\" for attributes like cold and hot.\n if (!D->hasAttr<OpenCLKernelAttr>()) {\n // These attributes cannot be applied to a non-kernel function.\n if (const auto *A = D->getAttr<ReqdWorkGroupSizeAttr>()) {\n } else if (const auto *A = D->getAttr<WorkGroupSizeHintAttr>()) {\n } else if (const auto *A = D->getAttr<VecTypeHintAttr>()) {\n } else if (const auto *A = D->getAttr<OpenCLIntelReqdSubGroupSizeAttr>()) {\n } else if (!D->hasAttr<CUDAGlobalAttr>()) {\n if (const auto *A = D->getAttr<AMDGPUFlatWorkGroupSizeAttr>()) {\n } else if (const auto *A = D->getAttr<AMDGPUWavesPerEUAttr>()) {\n } else if (const auto *A = D->getAttr<AMDGPUNumSGPRAttr>()) {\n } else if (const auto *A = D->getAttr<AMDGPUNumVGPRAttr>()) {\n Diag(D->getLocation(), diag::err_attribute_wrong_decl_type) << A << A->isRegularKeywordAttribute() << ExpectedKernelFunction;"}} | ||
}, | }, | ||
["err_attribute_wrong_decl_type_str"]={ | ["err_attribute_wrong_decl_type_str"]={ | ||
Line 4,133: | Line 4,133: | ||
[h]=o, | [h]=o, | ||
[d]={"adf66b617461",1511726472,"Determine the attribute subject for diagnostics based on declarative information in DeclNodes.td. Th..."}, | [d]={"adf66b617461",1511726472,"Determine the attribute subject for diagnostics based on declarative information in DeclNodes.td. Th..."}, | ||
[k]={{p, | [k]={{p,2173,"static void handleNakedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.isDeclspecAttribute()) {\n // This form is not allowed to be written on a member function (static or\n // nonstatic) when in Microsoft compatibility mode.\n if (S.getLangOpts().MSVCCompat && isa<CXXMethodDecl>(D)) {\n S.Diag(AL.getLoc(), diag::err_attribute_wrong_decl_type_str) << AL << AL.isRegularKeywordAttribute() << \"non-member functions\";"}} | ||
}, | }, | ||
["err_attribute_wrong_number_arguments"]={ | ["err_attribute_wrong_number_arguments"]={ | ||
Line 4,145: | Line 4,145: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{"clang/lib/Sema/ParsedAttr.cpp", | [k]={{"clang/lib/Sema/ParsedAttr.cpp",284,"bool ParsedAttr::checkExactlyNumArgs(Sema &S, unsigned Num) const { return checkAttributeNumArgsImpl(S, *this, Num, diag::err_attribute_wrong_number_arguments, std::not_equal_to<unsigned>()); }"},{p,1505,"static void handleIBOutletCollection(Sema &S, Decl *D, const ParsedAttr &AL) {\n // The iboutletcollection attribute can have zero or one arguments.\n if (AL.getNumArgs() > 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << 1;"},{p,1917,"static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Check the attribute arguments.\n if (AL.getNumArgs() > 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << 1;"},{p,3260,"static void handleVecTypeHint(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!AL.hasParsedType()) {\n S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << 1;"},{p,4162,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (CalleeFnProtoType->getNumParams() > EncodingIndices.size() - 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << (unsigned)(EncodingIndices.size() - 1);"},{p,4168,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (CalleeFnProtoType->getNumParams() < EncodingIndices.size() - 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << (unsigned)(EncodingIndices.size() - 1);"},{p,4373,"static void handleAlignedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // check the attribute arguments.\n if (AL.getNumArgs() > 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << 1;"},{r,6795,"static void HandleBTFTypeTagAttribute(QualType &Type, const ParsedAttr &Attr, TypeProcessingState &State) {\n // Check the number of attribute arguments.\n if (Attr.getNumArgs() != 1) {\n S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << Attr << 1;"},{r,6837,"/// HandleAddressSpaceTypeAttribute - Process an address_space attribute on the\n/// specified type. The attribute contains 1 argument, the id of the address\n/// space for the type.\nstatic void HandleAddressSpaceTypeAttribute(QualType &Type, const ParsedAttr &Attr, TypeProcessingState &State) {\n if (Attr.getKind() == ParsedAttr::AT_AddressSpace) {\n // Check the attribute arguments.\n if (Attr.getNumArgs() != 1) {\n S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << Attr << 1;"},{r,7114,"/// handleObjCGCTypeAttr - Process the __attribute__((objc_gc)) type\n/// attribute on the specified type. Returns true to indicate that\n/// the attribute was handled, false to indicate that the type does\n/// not permit the attribute.\nstatic bool handleObjCGCTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n if (attr.getNumArgs() > 1) {\n S.Diag(attr.getLoc(), diag::err_attribute_wrong_number_arguments) << attr << 1;"},{r,8094,"/// HandleVectorSizeAttribute - this attribute is only applicable to integral\n/// and float scalars, although arrays, pointers, and function return values are\n/// allowed in conjunction with this construct. Aggregates with this attribute\n/// are invalid, even if they are of the same size as a corresponding scalar.\n/// The raw attribute should contain precisely 1 argument, the vector size for\n/// the variable, measured in bytes. If curType and rawAttr are well formed,\n/// this routine will return a new vector type.\nstatic void HandleVectorSizeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S) {\n // Check the attribute arguments.\n if (Attr.getNumArgs() != 1) {\n S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << Attr << 1;"},{r,8114,"/// Process the OpenCL-like ext_vector_type attribute when it occurs on\n/// a type.\nstatic void HandleExtVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S) {\n // check the attribute arguments.\n if (Attr.getNumArgs() != 1) {\n S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << Attr << 1;"},{r,8218,"/// HandleNeonVectorTypeAttr - The \"neon_vector_type\" and\n/// \"neon_polyvector_type\" attributes are used to create vector types that\n/// are mangled according to ARM\'s ABI. Otherwise, these types are identical\n/// to those created with the \"vector_size\" attribute. Unlike \"vector_size\"\n/// the argument to these Neon attributes is the number of vector elements,\n/// not the vector size in bytes. The vector width and element type must\n/// match one of the standard Neon vector types.\nstatic void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S, VectorType::VectorKind VecKind) {\n // Check the attribute arguments.\n if (Attr.getNumArgs() != 1) {\n S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << Attr << 1;"},{r,8273,"/// HandleArmSveVectorBitsTypeAttr - The \"arm_sve_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless SVE types defined by\n/// the ACLE, such as svint32_t and svbool_t.\nstatic void HandleArmSveVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n // Check the attribute arguments.\n if (Attr.getNumArgs() != 1) {\n S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << Attr << 1;"},{r,8356,"/// HandleRISCVRVVVectorBitsTypeAttr - The \"riscv_rvv_vector_bits\" attribute is\n/// used to create fixed-length versions of sizeless RVV types such as\n/// vint8m1_t_t.\nstatic void HandleRISCVRVVVectorBitsTypeAttr(QualType &CurType, ParsedAttr &Attr, Sema &S) {\n // Check the attribute arguments.\n if (Attr.getNumArgs() != 1) {\n S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << Attr << 1;"},{r,8461,"/// HandleMatrixTypeAttr - \"matrix_type\" attribute, like ext_vector_type\nstatic void HandleMatrixTypeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S) {\n if (Attr.getNumArgs() != 2) {\n S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << Attr << 2;"},{r,8777,"static void processTypeAttrs(TypeProcessingState &state, QualType &type, TypeAttrLocation TAL, const ParsedAttributesView &attrs) {\n for (ParsedAttr &attr : AttrsCopy) {\n case ParsedAttr::AT_AcquireHandle: {\n if (attr.getNumArgs() != 1) {\n state.getSema().Diag(attr.getLoc(), diag::err_attribute_wrong_number_arguments) << attr << 1;"}} | ||
}, | }, | ||
["err_attribute_wrong_number_arguments_for"]={ | ["err_attribute_wrong_number_arguments_for"]={ | ||
Line 4,157: | Line 4,157: | ||
[h]=o, | [h]=o, | ||
[d]={db,1616787805,cb}, | [d]={db,1616787805,cb}, | ||
[k]={{p, | [k]={{p,1055,"static void handleDiagnoseAsBuiltinAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AttrFD->getNumParams() != AL.getNumArgs() - 1) {\n S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments_for) << AL << AttrFD << AttrFD->getNumParams();"}} | ||
}, | }, | ||
["err_attribute_zero_size"]={ | ["err_attribute_zero_size"]={ | ||
Line 4,169: | Line 4,169: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{r, | [k]={{r,2750,"QualType Sema::BuildVectorType(QualType CurType, Expr *SizeExpr, SourceLocation AttrLoc) {\n if (VectorSizeBits == 0) {\n Diag(AttrLoc, diag::err_attribute_zero_size) << SizeExpr->getSourceRange() << \"vector\";"},{r,2823,"/// Build an ext-vector type.\n///\n/// Run the required checks for the extended vector type.\nQualType Sema::BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc) {\n if (!ArraySize->isTypeDependent() && !ArraySize->isValueDependent()) {\n if (vectorSize == 0) {\n Diag(AttrLoc, diag::err_attribute_zero_size) << ArraySize->getSourceRange() << \"vector\";"},{r,2885,"QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) {\n if (MatrixRows == 0 && MatrixColumns == 0) {\n Diag(AttrLoc, diag::err_attribute_zero_size) << \"matrix\" << RowRange << ColRange;"},{r,2890,"QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) {\n if (MatrixRows == 0) {\n Diag(AttrLoc, diag::err_attribute_zero_size) << \"matrix\" << RowRange;"},{r,2894,"QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, SourceLocation AttrLoc) {\n if (MatrixColumns == 0) {\n Diag(AttrLoc, diag::err_attribute_zero_size) << \"matrix\" << ColRange;"}} | ||
}, | }, | ||
["err_attributes_are_not_compatible"]={ | ["err_attributes_are_not_compatible"]={ | ||
Line 4,181: | Line 4,181: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{p, | [k]={{p,277,"/// Diagnose mutually exclusive attributes when present on a given\n/// declaration. Returns true if diagnosed.\ntemplate <typename AttrTy> static bool checkAttrMutualExclusion(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (const auto *A = D->getAttr<AttrTy>()) {\n S.Diag(AL.getLoc(), diag::err_attributes_are_not_compatible) << AL << A << (AL.isRegularKeywordAttribute() || A->isRegularKeywordAttribute());"},{p,289,"template <typename AttrTy> static bool checkAttrMutualExclusion(Sema &S, Decl *D, const Attr &AL) {\n if (const auto *A = D->getAttr<AttrTy>()) {\n S.Diag(AL.getLocation(), diag::err_attributes_are_not_compatible) << &AL << A << (AL.isRegularKeywordAttribute() || A->isRegularKeywordAttribute());"},{p,1885,"static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned i = 1; i < AL.getNumArgs(); ++i) {\n // Check we don\'t have a conflict with another ownership attribute.\n for (const auto *I : D->specific_attrs<OwnershipAttr>()) {\n // Cannot have two ownership attributes of different kinds for the same\n // index.\n if (I->getOwnKind() != K && llvm::is_contained(I->args(), Idx)) {\n S.Diag(AL.getLoc(), diag::err_attributes_are_not_compatible) << AL << I << (AL.isRegularKeywordAttribute() || I->isRegularKeywordAttribute());"},{p,3898,"ErrorAttr *Sema::mergeErrorAttr(Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic) {\n if (const auto *EA = D->getAttr<ErrorAttr>()) {\n if (!Match) {\n Diag(EA->getLocation(), diag::err_attributes_are_not_compatible) << CI << EA << (CI.isRegularKeywordAttribute() || EA->isRegularKeywordAttribute());"},{p,4958,"SwiftNameAttr *Sema::mergeSwiftNameAttr(Decl *D, const SwiftNameAttr &SNA, StringRef Name) {\n if (const auto *PrevSNA = D->getAttr<SwiftNameAttr>()) {\n if (PrevSNA->getName() != Name && !PrevSNA->isImplicit()) {\n Diag(PrevSNA->getLocation(), diag::err_attributes_are_not_compatible) << PrevSNA << &SNA << (PrevSNA->isRegularKeywordAttribute() || SNA.isRegularKeywordAttribute());"},{p,5256,"static void handleLifetimeCategoryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.getKind() == ParsedAttr::AT_Owner) {\n if (const auto *OAttr = D->getAttr<OwnerAttr>()) {\n if (ExistingDerefType != ParmType.getTypePtrOrNull()) {\n S.Diag(AL.getLoc(), diag::err_attributes_are_not_compatible) << AL << OAttr << (AL.isRegularKeywordAttribute() || OAttr->isRegularKeywordAttribute());"},{p,5275,"static void handleLifetimeCategoryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.getKind() == ParsedAttr::AT_Owner) {\n } else {\n if (const auto *PAttr = D->getAttr<PointerAttr>()) {\n if (ExistingDerefType != ParmType.getTypePtrOrNull()) {\n S.Diag(AL.getLoc(), diag::err_attributes_are_not_compatible) << AL << PAttr << (AL.isRegularKeywordAttribute() || PAttr->isRegularKeywordAttribute());"},{p,5512,"void Sema::AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI abi) {\n if (auto existingAttr = D->getAttr<ParameterABIAttr>()) {\n if (existingAttr->getABI() != abi) {\n Diag(CI.getLoc(), diag::err_attributes_are_not_compatible) << getParameterABISpelling(abi) << existingAttr << (CI.isRegularKeywordAttribute() || existingAttr->isRegularKeywordAttribute());"},{r,7363,"static bool handleMSPointerTypeQualifierAttr(TypeProcessingState &State, ParsedAttr &PAttr, QualType &Type) {\n // You cannot have both __sptr and __uptr on the same type, nor can you\n // have __ptr32 and __ptr64.\n if (Attrs[attr::Ptr32] && Attrs[attr::Ptr64]) {\n S.Diag(PAttr.getLoc(), diag::err_attributes_are_not_compatible) << \"\'__ptr32\'\""},{r,7368,"static bool handleMSPointerTypeQualifierAttr(TypeProcessingState &State, ParsedAttr &PAttr, QualType &Type) {\n // You cannot have both __sptr and __uptr on the same type, nor can you\n // have __ptr32 and __ptr64.\n if (Attrs[attr::Ptr32] && Attrs[attr::Ptr64]) {\n } else if (Attrs[attr::SPtr] && Attrs[attr::UPtr]) {\n S.Diag(PAttr.getLoc(), diag::err_attributes_are_not_compatible) << \"\'__sptr\'\""},{r,7892,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n if (attr.getKind() == ParsedAttr::AT_Regparm) {\n if (CC == CC_X86FastCall) {\n S.Diag(attr.getLoc(), diag::err_attributes_are_not_compatible) << FunctionType::getNameForCallConv(CC) << \"regparm\" << attr.isRegularKeywordAttribute();"},{r,7972,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n if (CCOld != CC) {\n // Error out on when there\'s already an attribute on the type\n // and the CCs don\'t match.\n if (S.getCallingConvAttributedType(type)) {\n S.Diag(attr.getLoc(), diag::err_attributes_are_not_compatible) << FunctionType::getNameForCallConv(CC) << FunctionType::getNameForCallConv(CCOld) << attr.isRegularKeywordAttribute();"},{r,8006,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // Also diagnose fastcall with regparm.\n if (CC == CC_X86FastCall && fn->getHasRegParm()) {\n S.Diag(attr.getLoc(), diag::err_attributes_are_not_compatible) << \"regparm\" << FunctionType::getNameForCallConv(CC_X86FastCall) << attr.isRegularKeywordAttribute();"},{"clang/utils/TableGen/ClangAttrEmitter.cpp",4022,"// Generates the mutual exclusion checks. The checks for parsed attributes are\n// written into OS and the checks for merging declaration attributes are\n// written into MergeOS.\nstatic void GenerateMutualExclusionsChecks(const Record &Attr, const RecordKeeper &Records, raw_ostream &OS, raw_ostream &MergeDeclOS, raw_ostream &MergeStmtOS) {\n // If we discovered any decl or stmt attributes to test for, generate the\n // predicates for them now.\n if (!DeclAttrs.empty()) {\n for (const std::string &A : DeclAttrs) {\n OS << \" S.Diag(AL.getLoc(), diag::err_attributes_are_not_compatible)\""},{"clang/utils/TableGen/ClangAttrEmitter.cpp",4044,"// Generates the mutual exclusion checks. The checks for parsed attributes are\n// written into OS and the checks for merging declaration attributes are\n// written into MergeOS.\nstatic void GenerateMutualExclusionsChecks(const Record &Attr, const RecordKeeper &Records, raw_ostream &OS, raw_ostream &MergeDeclOS, raw_ostream &MergeStmtOS) {\n // If we discovered any decl or stmt attributes to test for, generate the\n // predicates for them now.\n if (!DeclAttrs.empty()) {\n // Also generate the declaration attribute merging logic if the current\n // attribute is one that can be inheritted on a declaration. It is assumed\n // this code will be executed in the context of a function with parameters:\n // Sema &S, Decl *D, Attr *A and that returns a bool (false on diagnostic,\n // true on success).\n if (Attr.isSubClassOf(\"InheritableAttr\")) {\n for (const std::string &A : DeclAttrs) {\n MergeDeclOS << \" S.Diag(First->getLocation(), \"\n << \"diag::err_attributes_are_not_compatible) << First << \""},{"clang/utils/TableGen/ClangAttrEmitter.cpp",4085,"// Generates the mutual exclusion checks. The checks for parsed attributes are\n// written into OS and the checks for merging declaration attributes are\n// written into MergeOS.\nstatic void GenerateMutualExclusionsChecks(const Record &Attr, const RecordKeeper &Records, raw_ostream &OS, raw_ostream &MergeDeclOS, raw_ostream &MergeStmtOS) {\n // Statement attributes are a bit different from declarations. With\n // declarations, each attribute is added to the declaration as it is\n // processed, and so you can look on the Decl * itself to see if there is a\n // conflicting attribute. Statement attributes are processed as a group\n // because AttributedStmt needs to tail-allocate all of the attribute nodes\n // at once. This means we cannot check whether the statement already contains\n // an attribute to check for the conflict. Instead, we need to check whether\n // the given list of semantic attributes contain any conflicts. It is assumed\n // this code will be executed in the context of a function with parameters:\n // Sema &S, const SmallVectorImpl<const Attr *> &C. The code will be within a\n // loop which loops over the container C with a loop variable named A to\n // represent the current attribute to check for conflicts.\n //\n // FIXME: it would be nice not to walk over the list of potential attributes\n // to apply to the statement more than once, but statements typically don\'t\n // have long lists of attributes on them, so re-walking the list should not\n // be an expensive operation.\n if (!StmtAttrs.empty()) {\n MergeStmtOS << \" S.Diag((*Iter)->getLocation(), \"\n << \"diag::err_attributes_are_not_compatible) << *Iter << \""}} | ||
}, | }, | ||
["err_attributes_misplaced"]={ | ["err_attributes_misplaced"]={ | ||
Line 4,193: | Line 4,193: | ||
[h]=B, | [h]=B, | ||
[d]={"c5089c08d4cd",1514240600,"Add a fixit for attributes incorrectly placed prior to \'struct/class/enum\' keyword."}, | [d]={"c5089c08d4cd",1514240600,"Add a fixit for attributes incorrectly placed prior to \'struct/class/enum\' keyword."}, | ||
[k]={{D, | [k]={{D,1719,"void Parser::DiagnoseProhibitedAttributes(const ParsedAttributesView &Attrs, const SourceLocation CorrectLocation) {\n if (CorrectLocation.isValid()) {\n (FirstAttr && FirstAttr->isRegularKeywordAttribute() ? Diag(CorrectLocation, diag::err_keyword_misplaced) << FirstAttr : Diag(CorrectLocation, diag::err_attributes_misplaced)) << FixItHint::CreateInsertionFromRange(CorrectLocation, AttrRange) << FixItHint::CreateRemoval(AttrRange);"}} | ||
}, | }, | ||
["err_attributes_not_allowed"]={ | ["err_attributes_not_allowed"]={ | ||
Line 4,205: | Line 4,205: | ||
[h]=B, | [h]=B, | ||
[d]={"96d5c76498b2",1258792989,"Added rudimentary C++0x attribute support."}, | [d]={"96d5c76498b2",1258792989,"Added rudimentary C++0x attribute support."}, | ||
[k]={{D, | [k]={{D,1683,"/// DiagnoseProhibitedCXX11Attribute - We have found the opening square brackets\n/// of a C++11 attribute-specifier in a location where an attribute is not\n/// permitted. By C++11 [dcl.attr.grammar]p6, this is ill-formed. Diagnose this\n/// situation.\n///\n/// \\return \\c true if we skipped an attribute-like chunk of tokens, \\c false if\n/// this doesn\'t appear to actually be an attribute-specifier, and the caller\n/// should try to parse it.\nbool Parser::DiagnoseProhibitedCXX11Attribute() {\n case CAK_AttributeSpecifier:\n Diag(BeginLoc, diag::err_attributes_not_allowed) << SourceRange(BeginLoc, EndLoc);"},{D,1707,"/// We have found the opening square brackets of a C++11\n/// attribute-specifier in a location where an attribute is not permitted, but\n/// we know where the attributes ought to be written. Parse them anyway, and\n/// provide a fixit moving them to the right place.\nvoid Parser::DiagnoseMisplacedCXX11Attribute(ParsedAttributes &Attrs, SourceLocation CorrectLocation) {\n (Keyword ? Diag(Loc, diag::err_keyword_not_allowed) << Keyword : Diag(Loc, diag::err_attributes_not_allowed)) << FixItHint::CreateInsertionFromRange(CorrectLocation, AttrRange) << FixItHint::CreateRemoval(AttrRange);"},{D,1726,"void Parser::DiagnoseProhibitedAttributes(const ParsedAttributesView &Attrs, const SourceLocation CorrectLocation) {\n if (CorrectLocation.isValid()) {\n } else {\n (FirstAttr && FirstAttr->isRegularKeywordAttribute() ? Diag(Range.getBegin(), diag::err_keyword_not_allowed) << FirstAttr : Diag(Range.getBegin(), diag::err_attributes_not_allowed)) << Range;"},{D,5052,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // An elaborated-type-specifier has a much more constrained grammar:\n //\n // \'enum\' nested-name-specifier[opt] identifier\n //\n // If we parsed any other bits, reject them now.\n //\n // MSVC and (for now at least) Objective-C permit a full enum-specifier\n // or opaque-enum-declaration anywhere.\n if (IsElaboratedTypeSpecifier && !getLangOpts().MicrosoftExt && !getLangOpts().ObjC) {\n ProhibitCXX11Attributes(attrs, diag::err_attributes_not_allowed, diag::err_keyword_not_allowed,"},{D,6052,"/// ParseTypeQualifierListOpt\n/// type-qualifier-list: [C99 6.7.5]\n/// type-qualifier\n/// [vendor] attributes\n/// [ only if AttrReqs & AR_VendorAttributesParsed ]\n/// type-qualifier-list type-qualifier\n/// [vendor] type-qualifier-list attributes\n/// [ only if AttrReqs & AR_VendorAttributesParsed ]\n/// [C++0x] attribute-specifier[opt] is allowed before cv-qualifier-seq\n/// [ only if AttReqs & AR_CXX11AttributesParsed ]\n/// Note: vendor can be GNU, MS, etc and can be explicitly controlled via\n/// AttrRequirements bitmask values.\nvoid Parser::ParseTypeQualifierListOpt(DeclSpec &DS, unsigned AttrReqs, bool AtomicAllowed, bool IdentifierRequired, std::optional<llvm::function_ref<void()>> CodeCompletionHandler) {\n while (true) {\n case tok::kw___attribute:\n if (AttrReqs & AR_GNUAttributesParsedAndRejected)\n Diag(Tok, diag::err_attributes_not_allowed);"},{K,777,"/// ParseUsingDeclaration - Parse C++ using-declaration or alias-declaration.\n/// Assumes that \'using\' was already seen.\n///\n/// using-declaration: [C++ 7.3.p3: namespace.udecl]\n/// \'using\' using-declarator-list[opt] ;\n///\n/// using-declarator-list: [C++1z]\n/// using-declarator \'...\'[opt]\n/// using-declarator-list \',\' using-declarator \'...\'[opt]\n///\n/// using-declarator-list: [C++98-14]\n/// using-declarator\n///\n/// alias-declaration: C++11 [dcl.dcl]p1\n/// \'using\' identifier attribute-specifier-seq[opt] = type-id ;\n///\n/// using-enum-declaration: [C++20, dcl.enum]\n/// \'using\' elaborated-enum-specifier ;\n/// The terminal name of the elaborated-enum-specifier undergoes\n/// ordinary lookup\n///\n/// elaborated-enum-specifier:\n/// \'enum\' nested-name-specifier[opt] identifier\nParser::DeclGroupPtrTy Parser::ParseUsingDeclaration(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &PrefixAttrs, AccessSpecifier AS) {\n // If we had any misplaced attributes from earlier, this is where they\n // should have been written.\n if (MisplacedAttrs.Range.isValid()) {\n (FirstAttr && FirstAttr->isRegularKeywordAttribute() ? Diag(Range.getBegin(), diag::err_keyword_not_allowed) << FirstAttr : Diag(Range.getBegin(), diag::err_attributes_not_allowed)) << FixItHint::CreateInsertionFromRange(Tok.getLocation(), CharSourceRange::getTokenRange(Range)) << FixItHint::CreateRemoval(Range);"},{K,1932,"#include \"clang/Basic/TransformTypeTraits.def\"\n // Forbid misplaced attributes. In cases of a reference, we pass attributes\n // to caller to handle.\n if (TUK != Sema::TUK_Reference) {\n if (AttrRange.isValid()) {\n (FirstAttr && FirstAttr->isRegularKeywordAttribute() ? Diag(Loc, diag::err_keyword_not_allowed) << FirstAttr : Diag(Loc, diag::err_attributes_not_allowed)) << AttrRange << FixItHint::CreateInsertionFromRange(AttrFixitLoc, CharSourceRange(AttrRange, true)) << FixItHint::CreateRemoval(AttrRange);"},{K,1979,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (TemplateId) {\n if (TemplateId->isInvalid()) {\n } else if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation && TUK == Sema::TUK_Declaration) {\n ProhibitCXX11Attributes(attrs, diag::err_attributes_not_allowed, diag::err_keyword_not_allowed,"},{K,1996,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (TemplateId) {\n if (TemplateId->isInvalid()) {\n } else if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation && TUK == Sema::TUK_Declaration) {\n } else if (TUK == Sema::TUK_Reference || (TUK == Sema::TUK_Friend && TemplateInfo.Kind == ParsedTemplateInfo::NonTemplate)) {\n ProhibitCXX11Attributes(attrs, diag::err_attributes_not_allowed, diag::err_keyword_not_allowed,"},{K,2066,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (TemplateId) {\n } else if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation && TUK == Sema::TUK_Declaration) {\n } else if (TUK == Sema::TUK_Friend && TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate) {\n ProhibitCXX11Attributes(attrs, diag::err_attributes_not_allowed, diag::err_keyword_not_allowed,"},{K,2077,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (TemplateId) {\n } else if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation && TUK == Sema::TUK_Declaration) {\n } else if (TUK == Sema::TUK_Friend && TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate) {\n } else {\n if (TUK != Sema::TUK_Declaration && TUK != Sema::TUK_Definition)\n ProhibitCXX11Attributes(attrs, diag::err_attributes_not_allowed, diag::err_keyword_not_allowed,"},{K,3060,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n while (true) {\n if (DS.isFriendSpecified()) {\n // C++11 [dcl.attr.grammar] p4: If an attribute-specifier-seq appertains\n // to a friend declaration, that declaration shall be a definition.\n //\n // Diagnose attributes that appear in a friend member function declarator:\n // friend int foo [[]] ();\n for (const ParsedAttr &AL : DeclaratorInfo.getAttributes())\n if (AL.isCXX11Attribute() || AL.isRegularKeywordAttribute()) {\n (AL.isRegularKeywordAttribute() ? Diag(Loc, diag::err_keyword_not_allowed) << AL : Diag(Loc, diag::err_attributes_not_allowed)) << AL.getRange();"},{K,4664,"void Parser::DiagnoseAndSkipCXX11Attributes() {\n if (EndLoc.isValid()) {\n (Keyword ? Diag(StartLoc, diag::err_keyword_not_allowed) << Keyword : Diag(StartLoc, diag::err_attributes_not_allowed)) << Range;"}} | ||
}, | }, | ||
["err_auto_bitfield"]={ | ["err_auto_bitfield"]={ | ||
Line 4,217: | Line 4,217: | ||
[h]=o, | [h]=o, | ||
[d]={"e301ba2b4891",1447207335,"Add support for GCC\'s \'__auto_type\' extension, per the GCC manual:"}, | [d]={"e301ba2b4891",1447207335,"Add support for GCC\'s \'__auto_type\' extension, per the GCC manual:"}, | ||
[k]={{xb, | [k]={{xb,4868,"/// Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6)\n///\n/// Note that this is done even if the initializer is dependent. (This is\n/// necessary to support partial ordering of templates using \'auto\'.)\n/// A dependent type will be produced when deducing from a dependent type.\n///\n/// \\param Type the type pattern using the auto type-specifier.\n/// \\param Init the initializer for the variable whose type is to be deduced.\n/// \\param Result if type deduction was successful, this will be set to the\n/// deduced type.\n/// \\param Info the argument will be updated to provide additional information\n/// about template argument deduction.\n/// \\param DependentDeduction Set if we should permit deduction in\n/// dependent cases. This is necessary for template partial ordering with\n/// \'auto\' template parameters. The template parameter depth to be used\n/// should be specified in the \'Info\' parameter.\n/// \\param IgnoreConstraints Set if we should not fail if the deduced type does\n/// not satisfy the type-constraint in the auto type.\nSema::TemplateDeductionResult Sema::DeduceAutoType(TypeLoc Type, Expr *Init, QualType &Result, TemplateDeductionInfo &Info, bool DependentDeduction, bool IgnoreConstraints, TemplateSpecCandidateSet *FailedTSC) {\n // If this is a \'decltype(auto)\' specifier, do the decltype dance.\n if (AT->isDecltypeAuto()) {\n } else {\n if (InitList) {\n } else {\n if (!getLangOpts().CPlusPlus && Init->refersToBitField()) {\n Diag(Loc, diag::err_auto_bitfield);"}} | ||
}, | }, | ||
["err_auto_different_deductions"]={ | ["err_auto_different_deductions"]={ | ||
Line 4,229: | Line 4,229: | ||
[h]=o, | [h]=o, | ||
[d]={wb,1298171975,vb}, | [d]={wb,1298171975,vb}, | ||
[k]={{q, | [k]={{q,14629,"/// BuildDeclaratorGroup - convert a list of declarations into a declaration\n/// group, performing any necessary semantic checking.\nSema::DeclGroupPtrTy Sema::BuildDeclaratorGroup(MutableArrayRef<Decl *> Group) {\n // C++14 [dcl.spec.auto]p7: (DR1347)\n // If the type that replaces the placeholder type is not the same in each\n // deduction, the program is ill-formed.\n if (Group.size() > 1) {\n for (unsigned i = 0, e = Group.size(); i != e; ++i) {\n if (Deduced.isNull()) {\n } else if (!Context.hasSameType(DT->getDeducedType(), Deduced)) {\n auto Dia = Diag(D->getTypeSourceInfo()->getTypeLoc().getBeginLoc(), diag::err_auto_different_deductions) << (AT ? (unsigned)AT->getKeyword() : 3) << Deduced << DeducedDecl->getDeclName() << DT->getDeducedType() << D->getDeclName();"}} | ||
}, | }, | ||
["err_auto_expr_deduction_failure"]={ | ["err_auto_expr_deduction_failure"]={ | ||
Line 4,241: | Line 4,241: | ||
[h]=o, | [h]=o, | ||
[d]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | [d]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | ||
[k]={{x, | [k]={{x,1533,"ExprResult Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization) {\n if (Deduced && !Deduced->isDeduced() && isa<DeducedTemplateSpecializationType>(Deduced)) {\n } else if (Deduced && !Deduced->isDeduced()) {\n if (Result != TDK_Success && Result != TDK_AlreadyDiagnosed)\n return ExprError(Diag(TyBeginLoc, diag::err_auto_expr_deduction_failure) << Ty << Deduce->getType() << FullRange << Deduce->getSourceRange());"}} | ||
}, | }, | ||
["err_auto_expr_init_multiple_expressions"]={ | ["err_auto_expr_init_multiple_expressions"]={ | ||
Line 4,253: | Line 4,253: | ||
[h]=o, | [h]=o, | ||
[d]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | [d]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | ||
[k]={{x, | [k]={{x,1516,"ExprResult Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization) {\n if (Deduced && !Deduced->isDeduced() && isa<DeducedTemplateSpecializationType>(Deduced)) {\n } else if (Deduced && !Deduced->isDeduced()) {\n if (Inits.size() > 1) {\n return ExprError(Diag(FirstBad->getBeginLoc(), diag::err_auto_expr_init_multiple_expressions) << Ty << FullRange);"}} | ||
}, | }, | ||
["err_auto_expr_init_no_expression"]={ | ["err_auto_expr_init_no_expression"]={ | ||
Line 4,265: | Line 4,265: | ||
[h]=o, | [h]=o, | ||
[d]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | [d]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | ||
[k]={{x, | [k]={{x,1511,"ExprResult Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization) {\n if (Deduced && !Deduced->isDeduced() && isa<DeducedTemplateSpecializationType>(Deduced)) {\n } else if (Deduced && !Deduced->isDeduced()) {\n if (Inits.empty())\n return ExprError(Diag(TyBeginLoc, diag::err_auto_expr_init_no_expression) << Ty << FullRange);"}} | ||
}, | }, | ||
["err_auto_expr_init_paren_braces"]={ | ["err_auto_expr_init_paren_braces"]={ | ||
Line 4,277: | Line 4,277: | ||
[h]=o, | [h]=o, | ||
[d]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | [d]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | ||
[k]={{x, | [k]={{x,1526,"ExprResult Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization) {\n if (Deduced && !Deduced->isDeduced() && isa<DeducedTemplateSpecializationType>(Deduced)) {\n } else if (Deduced && !Deduced->isDeduced()) {\n if (isa<InitListExpr>(Deduce))\n return ExprError(Diag(Deduce->getBeginLoc(), diag::err_auto_expr_init_paren_braces) << ListInitialization << Ty << FullRange);"},{x,2065,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n if (Deduced && !Deduced->isDeduced() && isa<DeducedTemplateSpecializationType>(Deduced)) {\n } else if (Deduced && !Deduced->isDeduced()) {\n if (isa<InitListExpr>(Deduce))\n return ExprError(Diag(Deduce->getBeginLoc(), diag::err_auto_expr_init_paren_braces) << Braced << AllocType << TypeRange);"}} | ||
}, | }, | ||
["err_auto_fn_deduction_failure"]={ | ["err_auto_fn_deduction_failure"]={ | ||
Line 4,289: | Line 4,289: | ||
[h]=o, | [h]=o, | ||
[d]={ib,1367650832,pb}, | [d]={ib,1367650832,pb}, | ||
[k]={{R, | [k]={{R,3869,"/// Deduce the return type for a function from a returned expression, per\n/// C++1y [dcl.spec.auto]p6.\nbool Sema::DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD, SourceLocation ReturnLoc, Expr *RetExpr, const AutoType *AT) {\n {\n default:\n Diag(RetExpr->getExprLoc(), diag::err_auto_fn_deduction_failure) << OrigResultType.getType() << RetExpr->getType();"}} | ||
}, | }, | ||
["err_auto_fn_different_deductions"]={ | ["err_auto_fn_different_deductions"]={ | ||
Line 4,301: | Line 4,301: | ||
[h]=o, | [h]=o, | ||
[d]={ib,1367650832,pb}, | [d]={ib,1367650832,pb}, | ||
[k]={{R, | [k]={{R,3863,"/// Deduce the return type for a function from a returned expression, per\n/// C++1y [dcl.spec.auto]p6.\nbool Sema::DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD, SourceLocation ReturnLoc, Expr *RetExpr, const AutoType *AT) {\n {\n case TDK_Inconsistent: {\n if (LambdaSI && LambdaSI->HasImplicitReturnType)\n else\n Diag(ReturnLoc, diag::err_auto_fn_different_deductions) << (AT->isDecltypeAuto() ? 1 : 0) << Info.SecondArg << Info.FirstArg;"}} | ||
}, | }, | ||
["err_auto_fn_no_return_but_not_auto"]={ | ["err_auto_fn_no_return_but_not_auto"]={ | ||
Line 4,313: | Line 4,313: | ||
[h]=o, | [h]=o, | ||
[d]={ib,1367650832,pb}, | [d]={ib,1367650832,pb}, | ||
[k]={{q, | [k]={{q,15589,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n {\n if (FD) {\n if (getLangOpts().CPlusPlus14) {\n if (!FD->isInvalidDecl() && Body && !FD->isDependentContext() && FD->getReturnType()->isUndeducedType()) {\n // For a function with a deduced result type to return void,\n // the result type as written must be \'auto\' or \'decltype(auto)\',\n // possibly cv-qualified or constrained, but not ref-qualified.\n if (!FD->getReturnType()->getAs<AutoType>()) {\n Diag(dcl->getLocation(), diag::err_auto_fn_no_return_but_not_auto) << FD->getReturnType();"}} | ||
}, | }, | ||
["err_auto_fn_return_init_list"]={ | ["err_auto_fn_return_init_list"]={ | ||
Line 4,325: | Line 4,325: | ||
[h]=o, | [h]=o, | ||
[d]={ib,1367650832,pb}, | [d]={ib,1367650832,pb}, | ||
[k]={{R, | [k]={{R,3799,"/// Deduce the return type for a function from a returned expression, per\n/// C++1y [dcl.spec.auto]p6.\nbool Sema::DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD, SourceLocation ReturnLoc, Expr *RetExpr, const AutoType *AT) {\n if (RetExpr && isa<InitListExpr>(RetExpr)) {\n Diag(RetExpr->getExprLoc(), getCurLambda() ? diag::err_lambda_return_init_list : diag::err_auto_fn_return_init_list) << RetExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_auto_fn_return_void_but_not_auto"]={ | ["err_auto_fn_return_void_but_not_auto"]={ | ||
Line 4,337: | Line 4,337: | ||
[h]=o, | [h]=o, | ||
[d]={ib,1367650832,pb}, | [d]={ib,1367650832,pb}, | ||
[k]={{R, | [k]={{R,3823,"/// Deduce the return type for a function from a returned expression, per\n/// C++1y [dcl.spec.auto]p6.\nbool Sema::DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD, SourceLocation ReturnLoc, Expr *RetExpr, const AutoType *AT) {\n if (!RetExpr) {\n // For a function with a deduced result type to return with omitted\n // expression, the result type as written must be \'auto\' or\n // \'decltype(auto)\', possibly cv-qualified or constrained, but not\n // ref-qualified.\n if (!OrigResultType.getType()->getAs<AutoType>()) {\n Diag(ReturnLoc, diag::err_auto_fn_return_void_but_not_auto) << OrigResultType.getType();"}} | ||
}, | }, | ||
["err_auto_fn_used_before_defined"]={ | ["err_auto_fn_used_before_defined"]={ | ||
Line 4,349: | Line 4,349: | ||
[h]=o, | [h]=o, | ||
[d]={ib,1367650832,pb}, | [d]={ib,1367650832,pb}, | ||
[k]={{xb, | [k]={{xb,5038,"bool Sema::DeduceReturnType(FunctionDecl *FD, SourceLocation Loc, bool Diagnose) {\n if (StillUndeduced && Diagnose && !FD->isInvalidDecl()) {\n Diag(Loc, diag::err_auto_fn_used_before_defined) << FD;"}} | ||
}, | }, | ||
["err_auto_fn_virtual"]={ | ["err_auto_fn_virtual"]={ | ||
Line 4,361: | Line 4,361: | ||
[h]=o, | [h]=o, | ||
[d]={ib,1367650832,pb}, | [d]={ib,1367650832,pb}, | ||
[k]={{q, | [k]={{q,9898,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (getLangOpts().CPlusPlus) {\n // C++ [dcl.fct.spec]p5:\n // The virtual specifier shall only be used in declarations of\n // nonstatic class member functions that appear within a\n // member-specification of a class declaration; see 10.3.\n //\n if (isVirtual && !NewFD->isInvalidDecl()) {\n if (getLangOpts().CPlusPlus14 && NewFD->getReturnType()->isUndeducedType())\n Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_auto_fn_virtual);"}} | ||
}, | }, | ||
["err_auto_inconsistent_deduction"]={ | ["err_auto_inconsistent_deduction"]={ | ||
Line 4,373: | Line 4,373: | ||
[h]=o, | [h]=o, | ||
[d]={"b1efc9b410ea",1504053848,"Give a better error if auto deduction fails due to inconsistent element types in a braced initialize..."}, | [d]={"b1efc9b410ea",1504053848,"Give a better error if auto deduction fails due to inconsistent element types in a braced initialize..."}, | ||
[k]={{xb, | [k]={{xb,4854,"/// Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6)\n///\n/// Note that this is done even if the initializer is dependent. (This is\n/// necessary to support partial ordering of templates using \'auto\'.)\n/// A dependent type will be produced when deducing from a dependent type.\n///\n/// \\param Type the type pattern using the auto type-specifier.\n/// \\param Init the initializer for the variable whose type is to be deduced.\n/// \\param Result if type deduction was successful, this will be set to the\n/// deduced type.\n/// \\param Info the argument will be updated to provide additional information\n/// about template argument deduction.\n/// \\param DependentDeduction Set if we should permit deduction in\n/// dependent cases. This is necessary for template partial ordering with\n/// \'auto\' template parameters. The template parameter depth to be used\n/// should be specified in the \'Info\' parameter.\n/// \\param IgnoreConstraints Set if we should not fail if the deduced type does\n/// not satisfy the type-constraint in the auto type.\nSema::TemplateDeductionResult Sema::DeduceAutoType(TypeLoc Type, Expr *Init, QualType &Result, TemplateDeductionInfo &Info, bool DependentDeduction, bool IgnoreConstraints, TemplateSpecCandidateSet *FailedTSC) {\n // If this is a \'decltype(auto)\' specifier, do the decltype dance.\n if (AT->isDecltypeAuto()) {\n } else {\n if (InitList) {\n for (Expr *Init : InitList->inits()) {\n if (auto TDK = DeduceTemplateArgumentsFromCallArgument(*this, TemplateParamsSt.get(), 0, TemplArg, Init, Info, Deduced, OriginalCallArgs, /*Decomposed=*/true,\n if (TDK == TDK_Inconsistent) {\n Diag(Info.getLocation(), diag::err_auto_inconsistent_deduction) << Info.FirstArg << Info.SecondArg << DeducedFromInitRange << Init->getSourceRange();"}} | ||
}, | }, | ||
["err_auto_init_list_from_c"]={ | ["err_auto_init_list_from_c"]={ | ||
Line 4,385: | Line 4,385: | ||
[h]=o, | [h]=o, | ||
[d]={"e301ba2b4891",1447207335,"Add support for GCC\'s \'__auto_type\' extension, per the GCC manual:"}, | [d]={"e301ba2b4891",1447207335,"Add support for GCC\'s \'__auto_type\' extension, per the GCC manual:"}, | ||
[k]={{xb, | [k]={{xb,4791,"/// Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6)\n///\n/// Note that this is done even if the initializer is dependent. (This is\n/// necessary to support partial ordering of templates using \'auto\'.)\n/// A dependent type will be produced when deducing from a dependent type.\n///\n/// \\param Type the type pattern using the auto type-specifier.\n/// \\param Init the initializer for the variable whose type is to be deduced.\n/// \\param Result if type deduction was successful, this will be set to the\n/// deduced type.\n/// \\param Info the argument will be updated to provide additional information\n/// about template argument deduction.\n/// \\param DependentDeduction Set if we should permit deduction in\n/// dependent cases. This is necessary for template partial ordering with\n/// \'auto\' template parameters. The template parameter depth to be used\n/// should be specified in the \'Info\' parameter.\n/// \\param IgnoreConstraints Set if we should not fail if the deduced type does\n/// not satisfy the type-constraint in the auto type.\nSema::TemplateDeductionResult Sema::DeduceAutoType(TypeLoc Type, Expr *Init, QualType &Result, TemplateDeductionInfo &Info, bool DependentDeduction, bool IgnoreConstraints, TemplateSpecCandidateSet *FailedTSC) {\n if (!getLangOpts().CPlusPlus && InitList) {\n Diag(Init->getBeginLoc(), diag::err_auto_init_list_from_c);"}} | ||
}, | }, | ||
["err_auto_missing_trailing_return"]={ | ["err_auto_missing_trailing_return"]={ | ||
Line 4,397: | Line 4,397: | ||
[h]=o, | [h]=o, | ||
[d]={"7fb25418ed72",1285958690,"Implement the C++0x \"trailing return type\" feature, e.g.,"}, | [d]={"7fb25418ed72",1285958690,"Implement the C++0x \"trailing return type\" feature, e.g.,"}, | ||
[k]={{r, | [k]={{r,5198,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n case DeclaratorChunk::Function: {\n // Check for auto functions and trailing return type and adjust the\n // return type accordingly.\n if (!D.isInvalidType()) {\n // trailing-return-type is only required if we\'re declaring a function,\n // and not, for instance, a pointer to a function.\n if (D.getDeclSpec().hasAutoTypeSpec() && !FTI.hasTrailingReturnType() && chunkIndex == 0) {\n if (!S.getLangOpts().CPlusPlus14) {\n S.Diag(D.getDeclSpec().getTypeSpecTypeLoc(), D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto ? diag::err_auto_missing_trailing_return : diag::err_deduced_return_type);"}} | ||
}, | }, | ||
["err_auto_new_ctor_multiple_expressions"]={ | ["err_auto_new_ctor_multiple_expressions"]={ | ||
Line 4,409: | Line 4,409: | ||
[h]=o, | [h]=o, | ||
[d]={wb,1298171975,vb}, | [d]={wb,1298171975,vb}, | ||
[k]={{x, | [k]={{x,2056,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n if (Deduced && !Deduced->isDeduced() && isa<DeducedTemplateSpecializationType>(Deduced)) {\n } else if (Deduced && !Deduced->isDeduced()) {\n if (Inits.size() > 1) {\n return ExprError(Diag(FirstBad->getBeginLoc(), diag::err_auto_new_ctor_multiple_expressions) << AllocType << TypeRange);"}} | ||
}, | }, | ||
["err_auto_new_deduction_failure"]={ | ["err_auto_new_deduction_failure"]={ | ||
Line 4,421: | Line 4,421: | ||
[h]=o, | [h]=o, | ||
[d]={wb,1298171975,vb}, | [d]={wb,1298171975,vb}, | ||
[k]={{x, | [k]={{x,2072,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n if (Deduced && !Deduced->isDeduced() && isa<DeducedTemplateSpecializationType>(Deduced)) {\n } else if (Deduced && !Deduced->isDeduced()) {\n if (Result != TDK_Success && Result != TDK_AlreadyDiagnosed)\n return ExprError(Diag(StartLoc, diag::err_auto_new_deduction_failure) << AllocType << Deduce->getType() << TypeRange << Deduce->getSourceRange());"}} | ||
}, | }, | ||
["err_auto_new_requires_ctor_arg"]={ | ["err_auto_new_requires_ctor_arg"]={ | ||
Line 4,433: | Line 4,433: | ||
[h]=o, | [h]=o, | ||
[d]={wb,1298171975,vb}, | [d]={wb,1298171975,vb}, | ||
[k]={{x, | [k]={{x,2051,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n if (Deduced && !Deduced->isDeduced() && isa<DeducedTemplateSpecializationType>(Deduced)) {\n } else if (Deduced && !Deduced->isDeduced()) {\n if (initStyle == CXXNewExpr::NoInit || Inits.empty())\n return ExprError(Diag(StartLoc, diag::err_auto_new_requires_ctor_arg) << AllocType << TypeRange);"}} | ||
}, | }, | ||
["err_auto_non_deduced_not_alone"]={ | ["err_auto_non_deduced_not_alone"]={ | ||
Line 4,445: | Line 4,445: | ||
[h]=o, | [h]=o, | ||
[d]={"8210ed558662",1484274121,"Implement DR1265 (wg21.link/cwg1265)."}, | [d]={"8210ed558662",1484274121,"Implement DR1265 (wg21.link/cwg1265)."}, | ||
[k]={{q, | [k]={{q,14580,"Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS, ArrayRef<Decl *> Group) {\n for (unsigned i = 0, e = Group.size(); i != e; ++i) {\n if (Decl *D = Group[i]) {\n // For declarators, there are some additional syntactic-ish checks we need\n // to perform.\n if (auto *DD = dyn_cast<DeclaratorDecl>(D)) {\n if (FirstDeclaratorInGroup != DD) {\n // A declarator that uses \'auto\' in any way other than to declare a\n // variable with a deduced type cannot be combined with any other\n // declarator in the same group.\n if (FirstNonDeducedAutoInGroup && !DiagnosedNonDeducedAuto) {\n Diag(FirstNonDeducedAutoInGroup->getLocation(), diag::err_auto_non_deduced_not_alone) << FirstNonDeducedAutoInGroup->getType()->hasAutoForTrailingReturnType() << FirstDeclaratorInGroup->getSourceRange() << DD->getSourceRange();"}} | ||
}, | }, | ||
["err_auto_not_allowed"]={ | ["err_auto_not_allowed"]={ | ||
Line 4,457: | Line 4,457: | ||
[h]=o, | [h]=o, | ||
[d]={"94ff77a356a7",1246054739,"More auto work."}, | [d]={"94ff77a356a7",1246054739,"More auto work."}, | ||
[k]={{r, | [k]={{r,3735,"static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, TypeSourceInfo *&ReturnTypeInfo) {\n // C++11 [dcl.spec.auto]p5: reject \'auto\' if it is not in an allowed context.\n if (Deduced) {\n if (Error != -1) {\n SemaRef.Diag(AutoRange.getBegin(), diag::err_auto_not_allowed) << Kind << Error << (int)SemaRef.getTemplateNameKindForDiagnostics(TN) << QualType(Deduced, 0) << AutoRange;"}} | ||
}, | }, | ||
["err_auto_not_allowed_var_inst"]={ | ["err_auto_not_allowed_var_inst"]={ | ||
Line 4,469: | Line 4,469: | ||
[h]=o, | [h]=o, | ||
[d]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som..."}, | [d]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som..."}, | ||
[k]={{Cb, | [k]={{Cb,10482,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n if (!R->isFunctionType()) {\n if (!PrevTemplate) {\n } else {\n // C++1y [dcl.spec.auto]p6:\n // ... A program that uses auto or decltype(auto) in a context not\n // explicitly allowed in this section is ill-formed.\n //\n // This includes auto-typed variable template instantiations.\n if (R->isUndeducedType()) {\n Diag(T->getTypeLoc().getBeginLoc(), diag::err_auto_not_allowed_var_inst);"}} | ||
}, | }, | ||
["err_auto_var_deduction_failure"]={ | ["err_auto_var_deduction_failure"]={ | ||
Line 4,481: | Line 4,481: | ||
[h]=o, | [h]=o, | ||
[d]={wb,1298171975,vb}, | [d]={wb,1298171975,vb}, | ||
[k]={{xb, | [k]={{xb,4977,"void Sema::DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init) {\n if (isa<InitListExpr>(Init))\n else\n Diag(VDecl->getLocation(), VDecl->isInitCapture() ? diag::err_init_capture_deduction_failure : diag::err_auto_var_deduction_failure) << VDecl->getDeclName() << VDecl->getType() << Init->getType() << Init->getSourceRange();"}} | ||
}, | }, | ||
["err_auto_var_deduction_failure_from_init_list"]={ | ["err_auto_var_deduction_failure_from_init_list"]={ | ||
Line 4,493: | Line 4,493: | ||
[h]=o, | [h]=o, | ||
[d]={"42acd4a05b52",1326840608,"Auto deduction support for std::initializer_list, including for-range support. This means you can no..."}, | [d]={"42acd4a05b52",1326840608,"Auto deduction support for std::initializer_list, including for-range support. This means you can no..."}, | ||
[k]={{xb, | [k]={{xb,4972,"void Sema::DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init) {\n if (isa<InitListExpr>(Init))\n Diag(VDecl->getLocation(), VDecl->isInitCapture() ? diag::err_init_capture_deduction_failure_from_init_list : diag::err_auto_var_deduction_failure_from_init_list) << VDecl->getDeclName() << VDecl->getType() << Init->getSourceRange();"}} | ||
}, | }, | ||
["err_auto_var_init_multiple_expressions"]={ | ["err_auto_var_init_multiple_expressions"]={ | ||
Line 4,505: | Line 4,505: | ||
[h]=o, | [h]=o, | ||
[d]={wb,1298171975,vb}, | [d]={wb,1298171975,vb}, | ||
[k]={{q, | [k]={{q,12740,"QualType Sema::deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init) {\n if (DeduceInits.size() > 1) {\n Diag(DeduceInits[1]->getBeginLoc(), IsInitCapture ? diag::err_init_capture_multiple_expressions : diag::err_auto_var_init_multiple_expressions) << VN << Type << Range;"}} | ||
}, | }, | ||
["err_auto_var_init_no_expression"]={ | ["err_auto_var_init_no_expression"]={ | ||
Line 4,517: | Line 4,517: | ||
[h]=o, | [h]=o, | ||
[d]={"de30e523b40d",1325802848,"Tweak the fix to PR8977: an empty expression-list represents value initialization, not default initi..."}, | [d]={"de30e523b40d",1325802848,"Tweak the fix to PR8977: an empty expression-list represents value initialization, not default initi..."}, | ||
[k]={{q, | [k]={{q,12732,"QualType Sema::deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init) {\n // Deduction only works if we have exactly one source expression.\n if (DeduceInits.empty()) {\n Diag(Init->getBeginLoc(), IsInitCapture ? diag::err_init_capture_no_expression : diag::err_auto_var_init_no_expression) << VN << Type << Range;"}} | ||
}, | }, | ||
["err_auto_var_init_paren_braces"]={ | ["err_auto_var_init_paren_braces"]={ | ||
Line 4,529: | Line 4,529: | ||
[h]=o, | [h]=o, | ||
[d]={"66204ecff985",1394646165,"DR1346: a parenthesized braced-init-list cannot be used as the initializer when"}, | [d]={"66204ecff985",1394646165,"DR1346: a parenthesized braced-init-list cannot be used as the initializer when"}, | ||
[k]={{q, | [k]={{q,12749,"QualType Sema::deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init) {\n if (DirectInit && isa<InitListExpr>(DeduceInit)) {\n Diag(Init->getBeginLoc(), IsInitCapture ? diag::err_init_capture_paren_braces : diag::err_auto_var_init_paren_braces) << isa<InitListExpr>(Init) << VN << Type << Range;"}} | ||
}, | }, | ||
["err_auto_var_requires_init"]={ | ["err_auto_var_requires_init"]={ | ||
Line 4,541: | Line 4,541: | ||
[h]=o, | [h]=o, | ||
[d]={"ae01993a12d6",1247272479,"Implement more of C++0x \'auto\'. A variable with an auto type specifier must have an initializer. Als..."}, | [d]={"ae01993a12d6",1247272479,"Implement more of C++0x \'auto\'. A variable with an auto type specifier must have an initializer. Als..."}, | ||
[k]={{q, | [k]={{q,12696,"QualType Sema::deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init) {\n // C++11 [dcl.spec.auto]p3\n if (!Init) {\n // Except for class argument deduction, and then for an initializing\n // declaration only, i.e. no static at class scope or extern.\n if (!isa<DeducedTemplateSpecializationType>(Deduced) || VDecl->hasExternalStorage() || VDecl->isStaticDataMember()) {\n Diag(VDecl->getLocation(), diag::err_auto_var_requires_init) << VDecl->getDeclName() << Type;"}} | ||
}, | }, | ||
["err_auto_variable_cannot_appear_in_own_initializer"]={ | ["err_auto_variable_cannot_appear_in_own_initializer"]={ | ||
Line 4,553: | Line 4,553: | ||
[h]=o, | [h]=o, | ||
[d]={"364035d1a821",1246043767,"An auto variable can\'t appear in its own initializer."}, | [d]={"364035d1a821",1246043767,"An auto variable can\'t appear in its own initializer."}, | ||
[k]={{y, | [k]={{y,260,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // See if this is an auto-typed variable whose initializer we are parsing.\n if (ParsingInitForAutoVars.count(D)) {\n if (isa<BindingDecl>(D)) {\n } else {\n Diag(Loc, diag::err_auto_variable_cannot_appear_in_own_initializer) << D->getDeclName() << cast<VarDecl>(D)->getType();"}} | ||
}, | }, | ||
["err_avail_query_expected_platform_name"]={ | ["err_avail_query_expected_platform_name"]={ | ||
Line 4,565: | Line 4,565: | ||
[h]=B, | [h]=B, | ||
[d]={Gb,1468629323,Db}, | [d]={Gb,1468629323,Db}, | ||
[k]={{kb, | [k]={{kb,3773,"/// Parse availability query specification.\n///\n/// availability-spec:\n/// \'*\'\n/// identifier version-tuple\nstd::optional<AvailabilitySpec> Parser::ParseAvailabilitySpec() {\n if (Tok.is(tok::star)) {\n } else {\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_avail_query_expected_platform_name);"}} | ||
}, | }, | ||
["err_avail_query_unrecognized_platform_name"]={ | ["err_avail_query_unrecognized_platform_name"]={ | ||
Line 4,577: | Line 4,577: | ||
[h]=B, | [h]=B, | ||
[d]={Gb,1468629323,Db}, | [d]={Gb,1468629323,Db}, | ||
[k]={{kb, | [k]={{kb,3790,"/// Parse availability query specification.\n///\n/// availability-spec:\n/// \'*\'\n/// identifier version-tuple\nstd::optional<AvailabilitySpec> Parser::ParseAvailabilitySpec() {\n if (Tok.is(tok::star)) {\n } else {\n if (AvailabilityAttr::getPrettyPlatformName(Platform).empty()) {\n Diag(PlatformIdentifier->Loc, diag::err_avail_query_unrecognized_platform_name) << GivenPlatform;"}} | ||
}, | }, | ||
["err_availability_expected_change"]={ | ["err_availability_expected_change"]={ | ||
Line 4,589: | Line 4,589: | ||
[h]=B, | [h]=B, | ||
[d]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | [d]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | ||
[k]={{D, | [k]={{D,1187,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n do {\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_availability_expected_change);"}} | ||
}, | }, | ||
["err_availability_expected_platform"]={ | ["err_availability_expected_platform"]={ | ||
Line 4,601: | Line 4,601: | ||
[h]=B, | [h]=B, | ||
[d]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | [d]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | ||
[k]={{D, | [k]={{D,1146,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // Parse the platform name.\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_availability_expected_platform);"}} | ||
}, | }, | ||
["err_availability_query_repeated_platform"]={ | ["err_availability_query_repeated_platform"]={ | ||
Line 4,613: | Line 4,613: | ||
[h]=B, | [h]=B, | ||
[d]={Gb,1468629323,Db}, | [d]={Gb,1468629323,Db}, | ||
[k]={{kb, | [k]={{kb,3741,"/// Validate availability spec list, emitting diagnostics if necessary. Returns\n/// true if invalid.\nstatic bool CheckAvailabilitySpecList(Parser &P, ArrayRef<AvailabilitySpec> AvailSpecs) {\n for (const auto &Spec : AvailSpecs) {\n if (!Inserted) {\n P.Diag(Spec.getBeginLoc(), diag::err_availability_query_repeated_platform) << Spec.getEndLoc() << Platform;"}} | ||
}, | }, | ||
["err_availability_query_repeated_star"]={ | ["err_availability_query_repeated_star"]={ | ||
Line 4,625: | Line 4,625: | ||
[h]=B, | [h]=B, | ||
[d]={Gb,1468629323,Db}, | [d]={Gb,1468629323,Db}, | ||
[k]={{kb, | [k]={{kb,3727,"/// Validate availability spec list, emitting diagnostics if necessary. Returns\n/// true if invalid.\nstatic bool CheckAvailabilitySpecList(Parser &P, ArrayRef<AvailabilitySpec> AvailSpecs) {\n for (const auto &Spec : AvailSpecs) {\n if (Spec.isOtherPlatformSpec()) {\n if (HasOtherPlatformSpec) {\n P.Diag(Spec.getBeginLoc(), diag::err_availability_query_repeated_star);"}} | ||
}, | }, | ||
["err_availability_query_wildcard_required"]={ | ["err_availability_query_wildcard_required"]={ | ||
Line 4,637: | Line 4,637: | ||
[h]=B, | [h]=B, | ||
[d]={Gb,1468629323,Db}, | [d]={Gb,1468629323,Db}, | ||
[k]={{kb, | [k]={{kb,3749,"/// Validate availability spec list, emitting diagnostics if necessary. Returns\n/// true if invalid.\nstatic bool CheckAvailabilitySpecList(Parser &P, ArrayRef<AvailabilitySpec> AvailSpecs) {\n if (!HasOtherPlatformSpec) {\n P.Diag(InsertWildcardLoc, diag::err_availability_query_wildcard_required) << FixItHint::CreateInsertion(InsertWildcardLoc, \", *\");"}} | ||
}, | }, | ||
["err_availability_redundant"]={ | ["err_availability_redundant"]={ | ||
Line 4,649: | Line 4,649: | ||
[h]=B, | [h]=B, | ||
[d]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | [d]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | ||
[k]={{D, | [k]={{D,1196,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n do {\n if (Keyword == Ident_strict) {\n if (StrictLoc.isValid()) {\n Diag(KeywordLoc, diag::err_availability_redundant) << Keyword << SourceRange(StrictLoc);"},{D,1205,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n do {\n if (Keyword == Ident_unavailable) {\n if (UnavailableLoc.isValid()) {\n Diag(KeywordLoc, diag::err_availability_redundant) << Keyword << SourceRange(UnavailableLoc);"},{D,1216,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n do {\n if (Keyword == Ident_deprecated && Platform->Ident && Platform->Ident->isStr(\"swift\")) {\n // For swift, we deprecate for all versions.\n if (Changes[Deprecated].KeywordLoc.isValid()) {\n Diag(KeywordLoc, diag::err_availability_redundant) << Keyword << SourceRange(Changes[Deprecated].KeywordLoc);"},{D,1294,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n do {\n if (Index < Unknown) {\n if (!Changes[Index].KeywordLoc.isInvalid()) {\n Diag(KeywordLoc, diag::err_availability_redundant) << Keyword << SourceRange(Changes[Index].KeywordLoc, Changes[Index].VersionRange.getEnd());"}} | ||
}, | }, | ||
["err_availability_unknown_change"]={ | ["err_availability_unknown_change"]={ | ||
Line 4,661: | Line 4,661: | ||
[h]=B, | [h]=B, | ||
[d]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | [d]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | ||
[k]={{D, | [k]={{D,1304,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n do {\n if (Index < Unknown) {\n } else {\n Diag(KeywordLoc, diag::err_availability_unknown_change) << Keyword << VersionRange;"}} | ||
}, | }, | ||
["err_avx_calling_convention"]={ | ["err_avx_calling_convention"]={ | ||
Line 4,673: | Line 4,673: | ||
[h]=a, | [h]=a, | ||
[d]={"2831a317b689",1592939649,"Implement AVX ABI Warning/error"}, | [d]={"2831a317b689",1592939649,"Implement AVX ABI Warning/error"}, | ||
[k]={{"clang/lib/CodeGen/Targets/X86.cpp", | [k]={{"clang/lib/CodeGen/Targets/X86.cpp",1504,"static bool checkAVXParamFeature(DiagnosticsEngine &Diag, SourceLocation CallLoc, const llvm::StringMap<bool> &CallerMap, const llvm::StringMap<bool> &CalleeMap, QualType Ty, StringRef Feature, bool IsArgument) {\n // Mixing calling conventions here is very clearly an error.\n if (!CallerHasFeat || !CalleeHasFeat)\n return Diag.Report(CallLoc, diag::err_avx_calling_convention) << IsArgument << Ty << Feature;"}} | ||
}, | }, | ||
["err_await_suspend_invalid_return_type"]={ | ["err_await_suspend_invalid_return_type"]={ | ||
Line 4,685: | Line 4,685: | ||
[h]="Coroutines Issue", | [h]="Coroutines Issue", | ||
[d]={"d978e53c6d70",1495995672,"[coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing c..."}, | [d]={"d978e53c6d70",1495995672,"[coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing c..."}, | ||
[k]={{"clang/lib/Sema/SemaCoroutine.cpp", | [k]={{"clang/lib/Sema/SemaCoroutine.cpp",448,"/// Build calls to await_ready, await_suspend, and await_resume for a co_await\n/// expression.\n/// The generated AST tries to clean up temporary objects as early as\n/// possible so that they don\'t live across suspension points if possible.\n/// Having temporary objects living across suspension points unnecessarily can\n/// lead to large frame size, and also lead to memory corruptions if the\n/// coroutine frame is destroyed after coming back from suspension. This is done\n/// by wrapping both the await_ready call and the await_suspend call with\n/// ExprWithCleanups. In the end of this function, we also need to explicitly\n/// set cleanup state so that the CoawaitExpr is also wrapped with an\n/// ExprWithCleanups to clean up the awaiter associated with the co_await\n/// expression.\nstatic ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, SourceLocation Loc, Expr *E) {\n if (!AwaitSuspend->getType()->isDependentType()) {\n // Support for coroutine_handle returning await_suspend.\n if (Expr *TailCallSuspend = maybeTailCall(S, RetType, AwaitSuspend, Loc))\n else {\n // non-class prvalues always have cv-unqualified types\n if (RetType->isReferenceType() || (!RetType->isBooleanType() && !RetType->isVoidType())) {\n S.Diag(AwaitSuspend->getCalleeDecl()->getLocation(), diag::err_await_suspend_invalid_return_type) << RetType;"}} | ||
}, | }, | ||
["err_bad_cast_incomplete"]={ | ["err_bad_cast_incomplete"]={ | ||
Line 4,697: | Line 4,697: | ||
[h]=o, | [h]=o, | ||
[d]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles."}, | [d]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles."}, | ||
[k]={{w, | [k]={{w,816,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n if (DestPointee->isVoidType()) {\n } else if (DestRecord) {\n if (Self.RequireCompleteType(OpRange.getBegin(), DestPointee, diag::err_bad_cast_incomplete, DestRange)) {"},{w,861,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n if (SrcRecord) {\n if (Self.RequireCompleteType(OpRange.getBegin(), SrcPointee, diag::err_bad_cast_incomplete, SrcExpr.get())) {"},{w,1400,"/// TryStaticCast - Check if a static cast can be performed, and do so if\n/// possible. If @p CStyle, ignore access restrictions on hierarchy casting\n/// and casting away constness.\nstatic TryCastResult TryStaticCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, Sema::CheckedConversionKind CCK, SourceRange OpRange, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath, bool ListInitialization) {\n // Reverse integral promotion/conversion. All such conversions are themselves\n // again integral promotions or conversions and are thus already handled by\n // p2 (TryDirectInitialization above).\n // (Note: any data loss warnings should be suppressed.)\n // The exception is the reverse of enum->integer, i.e. integer->enum (and\n // enum->enum). See also C++ 5.2.9p7.\n // The same goes for reverse floating point promotion/conversion and\n // floating-integral conversions. Again, only floating->enum is relevant.\n if (DestType->isEnumeralType()) {\n if (Self.RequireCompleteType(OpRange.getBegin(), DestType, diag::err_bad_cast_incomplete)) {"},{w,1883,"/// TryStaticImplicitCast - Tests whether a conversion according to C++ 5.2.9p2\n/// is valid:\n///\n/// An expression e can be explicitly converted to a type T using a\n/// @c static_cast if the declaration \"T t(e);\" is well-formed [...].\nTryCastResult TryStaticImplicitCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, Sema::CheckedConversionKind CCK, SourceRange OpRange, unsigned &msg, CastKind &Kind, bool ListInitialization) {\n if (DestType->isRecordType()) {\n if (Self.RequireCompleteType(OpRange.getBegin(), DestType, diag::err_bad_cast_incomplete) || Self.RequireNonAbstractType(OpRange.getBegin(), DestType, diag::err_allocation_of_abstract_type)) {"}} | ||
}, | }, | ||
["err_bad_category_property_decl"]={ | ["err_bad_category_property_decl"]={ | ||
Line 4,709: | Line 4,709: | ||
[h]=o, | [h]=o, | ||
[d]={ub,1480718311,yb}, | [d]={ub,1480718311,yb}, | ||
[k]={{P, | [k]={{P,1194,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n if ((IC = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {\n } else if ((CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassImpDecl))) {\n if (!property) {\n Diag(PropertyLoc, diag::err_bad_category_property_decl) << Category->getDeclName();"}} | ||
}, | }, | ||
["err_bad_character_encoding"]={ | ["err_bad_character_encoding"]={ | ||
Line 4,721: | Line 4,721: | ||
[h]=gb, | [h]=gb, | ||
[d]={"8b2b677f390d",1326889624,"Improves support for Unicode in character literals"}, | [d]={"8b2b677f390d",1326889624,"Improves support for Unicode in character literals"}, | ||
[k]={{"clang/lib/Lex/LiteralSupport.cpp", | [k]={{"clang/lib/Lex/LiteralSupport.cpp",1745,"/// \\verbatim\n/// user-defined-character-literal: [C++11 lex.ext]\n/// character-literal ud-suffix\n/// ud-suffix:\n/// identifier\n/// character-literal: [C++11 lex.ccon]\n/// \' c-char-sequence \'\n/// u\' c-char-sequence \'\n/// U\' c-char-sequence \'\n/// L\' c-char-sequence \'\n/// u8\' c-char-sequence \' [C++1z lex.ccon]\n/// c-char-sequence:\n/// c-char\n/// c-char-sequence c-char\n/// c-char:\n/// any member of the source character set except the single-quote \',\n/// backslash \\, or new-line character\n/// escape-sequence\n/// universal-character-name\n/// escape-sequence:\n/// simple-escape-sequence\n/// octal-escape-sequence\n/// hexadecimal-escape-sequence\n/// simple-escape-sequence:\n/// one of \\\' \\\" \\? \\\\ \\a \\b \\f \\n \\r \\t \\v\n/// octal-escape-sequence:\n/// \\ octal-digit\n/// \\ octal-digit octal-digit\n/// \\ octal-digit octal-digit octal-digit\n/// hexadecimal-escape-sequence:\n/// \\x hexadecimal-digit\n/// hexadecimal-escape-sequence hexadecimal-digit\n/// universal-character-name: [C++11 lex.charset]\n/// \\u hex-quad\n/// \\U hex-quad hex-quad\n/// hex-quad:\n/// hex-digit hex-digit hex-digit hex-digit\n/// \\endverbatim\n///\nCharLiteralParser::CharLiteralParser(const char *begin, const char *end, SourceLocation Loc, Preprocessor &PP, tok::TokenKind kind) {\n while (begin != end) {\n // Is this a span of non-escape characters?\n if (begin[0] != \'\\\\\') {\n if (res != llvm::conversionOK) {\n unsigned Msg = diag::err_bad_character_encoding;"}} | ||
}, | }, | ||
["err_bad_const_cast_dest"]={ | ["err_bad_const_cast_dest"]={ | ||
Line 4,733: | Line 4,733: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,1998,"/// TryConstCast - See if a const_cast from source to destination is allowed,\n/// and perform it if it is.\nstatic TryCastResult TryConstCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, unsigned &msg) {\n if (!DestType->isPointerType() && !DestType->isMemberPointerType() && !DestType->isObjCObjectPointerType()) {\n // Cannot cast to non-pointer, non-reference type. Note that, if DestType\n // was a reference type, we converted it to a pointer above.\n // The status of rvalue references isn\'t entirely clear, but it looks like\n // conversion to them is simply invalid.\n // C++ 5.2.11p3: For two pointer types [...]\n if (!CStyle)\n msg = diag::err_bad_const_cast_dest;"},{w,2007,"/// TryConstCast - See if a const_cast from source to destination is allowed,\n/// and perform it if it is.\nstatic TryCastResult TryConstCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, unsigned &msg) {\n if (DestType->isFunctionPointerType() || DestType->isMemberFunctionPointerType()) {\n // Cannot cast direct function pointers.\n // C++ 5.2.11p2: [...] where T is any object type or the void type [...]\n // T is the ultimate pointee of source and target type.\n if (!CStyle)\n msg = diag::err_bad_const_cast_dest;"}} | ||
}, | }, | ||
["err_bad_cstyle_cast_overload"]={ | ["err_bad_cstyle_cast_overload"]={ | ||
Line 4,745: | Line 4,745: | ||
[h]=o, | [h]=o, | ||
[d]={"b491ed36b4ef",1298151169,"Handle the resolution of a reference to a function template (which"}, | [d]={"b491ed36b4ef",1298151169,"Handle the resolution of a reference to a function template (which"}, | ||
[k]={{w, | [k]={{w,2738,"void CastOperation::CheckCXXCStyleCast(bool FunctionalStyle, bool ListInitialization) {\n // C++ 5.2.9p4: Any expression can be explicitly converted to type \"cv void\".\n // This test is outside everything else because it\'s the only case where\n // a non-lvalue-reference target type does not lead to decay.\n if (DestType->isVoidType()) {\n if (claimPlaceholder(BuiltinType::Overload)) {\n Self.ResolveAndFixSingleFunctionTemplateSpecialization(SrcExpr, /* Decay Function to ptr */ false,\n /* Complain */ true, DestRange, DestType, diag::err_bad_cstyle_cast_overload);"},{w,2848,"void CastOperation::CheckCXXCStyleCast(bool FunctionalStyle, bool ListInitialization) {\n if (tcr != TC_Success && msg != 0) {\n if (SrcExpr.get()->getType() == Self.Context.OverloadTy) {\n if (Fn) {\n Self.Diag(OpRange.getBegin(), diag::err_bad_cstyle_cast_overload) << OE->getName() << DestType << OpRange << OE->getQualifierLoc().getSourceRange();"}} | ||
}, | }, | ||
["err_bad_cxx_cast_addr_space_mismatch"]={ | ["err_bad_cxx_cast_addr_space_mismatch"]={ | ||
Line 4,757: | Line 4,757: | ||
[h]=o, | [h]=o, | ||
[d]={"6f7c536e083b",1551978390,"[Sema] Change addr space diagnostics in casts to follow C++ style."}, | [d]={"6f7c536e083b",1551978390,"[Sema] Change addr space diagnostics in casts to follow C++ style."}, | ||
[k]={{w, | [k]={{w,2622,"static TryCastResult TryAddressSpaceCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, unsigned &msg, CastKind &Kind) {\n if (!DestPointeeType.isAddressSpaceOverlapping(SrcPointeeType)) {\n msg = diag::err_bad_cxx_cast_addr_space_mismatch;"}} | ||
}, | }, | ||
["err_bad_cxx_cast_bitfield"]={ | ["err_bad_cxx_cast_bitfield"]={ | ||
Line 4,769: | Line 4,769: | ||
[h]=o, | [h]=o, | ||
[d]={"d25db7ed0f8e",1367876352,"Grab-bag of bit-field fixes:"}, | [d]={"d25db7ed0f8e",1367876352,"Grab-bag of bit-field fixes:"}, | ||
[k]={{w, | [k]={{w,1978,"/// TryConstCast - See if a const_cast from source to destination is allowed,\n/// and perform it if it is.\nstatic TryCastResult TryConstCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, unsigned &msg) {\n if (const ReferenceType *DestTypeTmp = DestType->getAs<ReferenceType>()) {\n // It\'s not completely clear under the standard whether we can\n // const_cast bit-field gl-values. Doing so would not be\n // intrinsically complicated, but for now, we say no for\n // consistency with other compilers and await the word of the\n // committee.\n if (SrcExpr.get()->refersToBitField()) {\n msg = diag::err_bad_cxx_cast_bitfield;"},{w,2290,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (const ReferenceType *DestTypeTmp = DestType->getAs<ReferenceType>()) {\n case OK_BitField:\n msg = diag::err_bad_cxx_cast_bitfield;"}} | ||
}, | }, | ||
["err_bad_cxx_cast_generic"]={ | ["err_bad_cxx_cast_generic"]={ | ||
Line 4,781: | Line 4,781: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,521,"/// Diagnose a failed cast.\nstatic void diagnoseBadCast(Sema &S, unsigned msg, CastType castType, SourceRange opRange, Expr *src, QualType destType, bool listInitialization) {\n if (msg == diag::err_bad_cxx_cast_generic && tryDiagnoseOverloadedCast(S, castType, opRange, src, destType, listInitialization))"},{w,966,"/// CheckConstCast - Check that a const_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.11 for details. const_cast is typically used in code\n/// like this:\n/// const char *str = \"literal\";\n/// legacy_function(const_cast\\<char*\\>(str));\nvoid CastOperation::CheckConstCast() {\n unsigned msg = diag::err_bad_cxx_cast_generic;"},{w,977,"void CastOperation::CheckAddrspaceCast() {\n unsigned msg = diag::err_bad_cxx_cast_generic;"},{w,1193,"/// CheckReinterpretCast - Check that a reinterpret_cast\\<DestType\\>(SrcExpr) is\n/// valid.\n/// Refer to C++ 5.2.10 for details. reinterpret_cast is typically used in code\n/// like this:\n/// char *bytes = reinterpret_cast\\<char*\\>(int_ptr);\nvoid CastOperation::CheckReinterpretCast() {\n unsigned msg = diag::err_bad_cxx_cast_generic;"},{w,1265,"/// CheckStaticCast - Check that a static_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.9 for details. Static casts are mostly used for making\n/// implicit conversions explicit and getting rid of data loss warnings.\nvoid CastOperation::CheckStaticCast() {\n unsigned msg = diag::err_bad_cxx_cast_generic;"},{w,2798,"void CastOperation::CheckCXXCStyleCast(bool FunctionalStyle, bool ListInitialization) {\n unsigned msg = diag::err_bad_cxx_cast_generic;"}} | ||
}, | }, | ||
["err_bad_cxx_cast_member_pointer_size"]={ | ["err_bad_cxx_cast_member_pointer_size"]={ | ||
Line 4,793: | Line 4,793: | ||
[h]=o, | [h]=o, | ||
[d]={"ebab1ed5d30c",1281936644,"Error out if reinterpret_casting between member pointers of two different"}, | [d]={"ebab1ed5d30c",1281936644,"Error out if reinterpret_casting between member pointers of two different"}, | ||
[k]={{w, | [k]={{w,2340,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (DestMemPtr && SrcMemPtr) {\n // Don\'t allow casting between member pointers of different sizes.\n if (Self.Context.getTypeSize(DestMemPtr) != Self.Context.getTypeSize(SrcMemPtr)) {\n msg = diag::err_bad_cxx_cast_member_pointer_size;"}} | ||
}, | }, | ||
["err_bad_cxx_cast_qualifiers_away"]={ | ["err_bad_cxx_cast_qualifiers_away"]={ | ||
Line 4,805: | Line 4,805: | ||
[h]=o, | [h]=o, | ||
[d]={"b472e93af799",1302890394,"Implement appropriate semantics for C++ casting and conversion when"}, | [d]={"b472e93af799",1302890394,"Implement appropriate semantics for C++ casting and conversion when"}, | ||
[k]={{w, | [k]={{w,767,"static TryCastResult getCastAwayConstnessCastKind(CastAwayConstnessKind CACK, unsigned &DiagID) {\n case CastAwayConstnessKind::CACK_SimilarKind:\n DiagID = diag::err_bad_cxx_cast_qualifiers_away;"},{w,881,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n // C++ 5.2.7p1: The dynamic_cast operator shall not cast away constness.\n if (!DestPointee.isAtLeastAsQualifiedAs(SrcPointee)) {\n Self.Diag(OpRange.getBegin(), diag::err_bad_cxx_cast_qualifiers_away) << CT_Dynamic << OrigSrcType << this->DestType << OpRange;"},{w,1455,"/// TryStaticCast - Check if a static cast can be performed, and do so if\n/// possible. If @p CStyle, ignore access restrictions on hierarchy casting\n/// and casting away constness.\nstatic TryCastResult TryStaticCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, Sema::CheckedConversionKind CCK, SourceRange OpRange, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath, bool ListInitialization) {\n // Reverse pointer conversion to void*. C++ 4.10.p2 specifies conversion to\n // void*. C++ 5.2.9p10 specifies additional restrictions, which really is\n // just the usual constness stuff.\n if (const PointerType *SrcPointer = SrcType->getAs<PointerType>()) {\n if (SrcPointee->isVoidType()) {\n if (const PointerType *DestPointer = DestType->getAs<PointerType>()) {\n if (DestPointee->isIncompleteOrObjectType()) {\n // This is definitely the intended conversion, but it might fail due\n // to a qualifier violation. Note that we permit Objective-C lifetime\n // and GC qualifier mismatches here.\n if (!CStyle) {\n if (DestPointeeQuals != SrcPointeeQuals && !DestPointeeQuals.compatiblyIncludes(SrcPointeeQuals)) {\n msg = diag::err_bad_cxx_cast_qualifiers_away;"},{w,1687,"/// TryStaticDowncast - Common functionality of TryStaticReferenceDowncast and\n/// TryStaticPointerDowncast. Tests whether a static downcast from SrcType to\n/// DestType is possible and allowed.\nTryCastResult TryStaticDowncast(Sema &Self, CanQualType SrcType, CanQualType DestType, bool CStyle, SourceRange OpRange, QualType OrigSrcType, QualType OrigDestType, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath) {\n // Must preserve cv, as always, unless we\'re in C-style mode.\n if (!CStyle && !DestType.isAtLeastAsQualifiedAs(SrcType)) {\n msg = diag::err_bad_cxx_cast_qualifiers_away;"}} | ||
}, | }, | ||
["err_bad_cxx_cast_rvalue"]={ | ["err_bad_cxx_cast_rvalue"]={ | ||
Line 4,817: | Line 4,817: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,845,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n if (DestPointer) {\n } else if (DestReference->isLValueReferenceType()) {\n if (!SrcExpr.get()->isLValue()) {\n Self.Diag(OpRange.getBegin(), diag::err_bad_cxx_cast_rvalue) << CT_Dynamic << OrigSrcType << this->DestType << OpRange;"},{w,1595,"/// Tests whether a conversion according to C++ 5.2.9p5 is valid.\nTryCastResult TryStaticReferenceDowncast(Sema &Self, Expr *SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath) {\n if (!RValueRef && !SrcExpr->isLValue()) {\n msg = diag::err_bad_cxx_cast_rvalue;"},{w,1955,"/// TryConstCast - See if a const_cast from source to destination is allowed,\n/// and perform it if it is.\nstatic TryCastResult TryConstCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, unsigned &msg) {\n if (const ReferenceType *DestTypeTmp = DestType->getAs<ReferenceType>()) {\n if (isa<LValueReferenceType>(DestTypeTmp) && !SrcExpr.get()->isLValue()) {\n msg = diag::err_bad_cxx_cast_rvalue;"},{w,1963,"/// TryConstCast - See if a const_cast from source to destination is allowed,\n/// and perform it if it is.\nstatic TryCastResult TryConstCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, unsigned &msg) {\n if (const ReferenceType *DestTypeTmp = DestType->getAs<ReferenceType>()) {\n if (isa<RValueReferenceType>(DestTypeTmp) && SrcExpr.get()->isPRValue()) {\n if (!SrcType->isRecordType()) {\n msg = diag::err_bad_cxx_cast_rvalue;"},{w,2272,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (const ReferenceType *DestTypeTmp = DestType->getAs<ReferenceType>()) {\n if (!SrcExpr.get()->isGLValue()) {\n msg = diag::err_bad_cxx_cast_rvalue;"}} | ||
}, | }, | ||
["err_bad_cxx_cast_scalar_to_vector_different_size"]={ | ["err_bad_cxx_cast_scalar_to_vector_different_size"]={ | ||
Line 4,829: | Line 4,829: | ||
[h]=o, | [h]=o, | ||
[d]={"570af5d42678",1253128783,"Improve handling of vector casts in C++."}, | [d]={"570af5d42678",1253128783,"Improve handling of vector casts in C++."}, | ||
[k]={{w, | [k]={{w,2419,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (srcIsVector || destIsVector) {\n // Otherwise, pick a reasonable diagnostic.\n if (!destIsVector)\n else if (!srcIsVector)\n msg = diag::err_bad_cxx_cast_scalar_to_vector_different_size;"}} | ||
}, | }, | ||
["err_bad_cxx_cast_unrelated_class"]={ | ["err_bad_cxx_cast_unrelated_class"]={ | ||
Line 4,841: | Line 4,841: | ||
[h]=o, | [h]=o, | ||
[d]={"ffa7dc379f2e",1422480686,"PR 17456"}, | [d]={"ffa7dc379f2e",1422480686,"PR 17456"}, | ||
[k]={{w, | [k]={{w,1505,"/// TryStaticCast - Check if a static cast can be performed, and do so if\n/// possible. If @p CStyle, ignore access restrictions on hierarchy casting\n/// and casting away constness.\nstatic TryCastResult TryStaticCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, Sema::CheckedConversionKind CCK, SourceRange OpRange, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath, bool ListInitialization) {\n // See if it looks like the user is trying to convert between\n // related record types, and select a better diagnostic if so.\n if (auto SrcPointer = SrcType->getAs<PointerType>())\n if (auto DestPointer = DestType->getAs<PointerType>())\n if (SrcPointer->getPointeeType()->getAs<RecordType>() && DestPointer->getPointeeType()->getAs<RecordType>())\n msg = diag::err_bad_cxx_cast_unrelated_class;"}} | ||
}, | }, | ||
["err_bad_cxx_cast_vector_to_scalar_different_size"]={ | ["err_bad_cxx_cast_vector_to_scalar_different_size"]={ | ||
Line 4,853: | Line 4,853: | ||
[h]=o, | [h]=o, | ||
[d]={"570af5d42678",1253128783,"Improve handling of vector casts in C++."}, | [d]={"570af5d42678",1253128783,"Improve handling of vector casts in C++."}, | ||
[k]={{w, | [k]={{w,2417,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (srcIsVector || destIsVector) {\n // Otherwise, pick a reasonable diagnostic.\n if (!destIsVector)\n msg = diag::err_bad_cxx_cast_vector_to_scalar_different_size;"}} | ||
}, | }, | ||
["err_bad_cxx_cast_vector_to_vector_different_size"]={ | ["err_bad_cxx_cast_vector_to_vector_different_size"]={ | ||
Line 4,865: | Line 4,865: | ||
[h]=o, | [h]=o, | ||
[d]={"570af5d42678",1253128783,"Improve handling of vector casts in C++."}, | [d]={"570af5d42678",1253128783,"Improve handling of vector casts in C++."}, | ||
[k]={{w, | [k]={{w,2421,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (srcIsVector || destIsVector) {\n // Otherwise, pick a reasonable diagnostic.\n if (!destIsVector)\n else if (!srcIsVector)\n else\n msg = diag::err_bad_cxx_cast_vector_to_vector_different_size;"}} | ||
}, | }, | ||
["err_bad_dynamic_cast_not_class"]={ | ["err_bad_dynamic_cast_not_class"]={ | ||
Line 4,877: | Line 4,877: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,822,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n if (DestPointee->isVoidType()) {\n } else if (DestRecord) {\n } else {\n Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_class) << DestPointee.getUnqualifiedType() << DestRange;"},{w,867,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n if (SrcRecord) {\n } else {\n Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_class) << SrcPointee.getUnqualifiedType() << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_bad_dynamic_cast_not_polymorphic"]={ | ["err_bad_dynamic_cast_not_polymorphic"]={ | ||
Line 4,889: | Line 4,889: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,913,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n if (!cast<CXXRecordDecl>(SrcDecl)->isPolymorphic()) {\n Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_polymorphic) << SrcPointee.getUnqualifiedType() << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_bad_dynamic_cast_not_ptr"]={ | ["err_bad_dynamic_cast_not_ptr"]={ | ||
Line 4,901: | Line 4,901: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,838,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n if (DestPointer) {\n if (const PointerType *SrcPointer = SrcType->getAs<PointerType>()) {\n } else {\n Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_ptr) << OrigSrcType << this->DestType << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_bad_dynamic_cast_not_ref_or_ptr"]={ | ["err_bad_dynamic_cast_not_ref_or_ptr"]={ | ||
Line 4,913: | Line 4,913: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,805,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n if (DestPointer) {\n } else if ((DestReference = DestType->getAs<ReferenceType>())) {\n } else {\n Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_ref_or_ptr) << this->DestType << DestRange;"}} | ||
}, | }, | ||
["err_bad_kernel_param_type"]={ | ["err_bad_kernel_param_type"]={ | ||
Line 4,925: | Line 4,925: | ||
[h]=o, | [h]=o, | ||
[d]={"efb38192b0b2",1374542616,"Error on more illegal kernel argument types for OpenCL"}, | [d]={"efb38192b0b2",1374542616,"Error on more illegal kernel argument types for OpenCL"}, | ||
[k]={{q, | [k]={{q,9480,"static void checkIsValidOpenCLKernelParameter(Sema &S, Declarator &D, ParmVarDecl *Param, llvm::SmallPtrSetImpl<const Type *> &ValidTypes) {\n case InvalidKernelParam:\n // OpenCL v1.2 s6.8 n:\n // A kernel function argument cannot be declared\n // of event_t type.\n // Do not diagnose half type since it is diagnosed as invalid argument\n // type for any function elsewhere.\n if (!PT->isHalfType()) {\n S.Diag(Param->getLocation(), diag::err_bad_kernel_param_type) << PT;"},{q,9582,"static void checkIsValidOpenCLKernelParameter(Sema &S, Declarator &D, ParmVarDecl *Param, llvm::SmallPtrSetImpl<const Type *> &ValidTypes) {\n do {\n for (const auto *FD : RD->fields()) {\n // OpenCL v1.2 s6.9.p:\n // Arguments to kernel functions that are declared to be a struct or union\n // do not allow OpenCL objects to be passed as elements of the struct or\n // union. This restriction was lifted in OpenCL v2.0 with the introduction\n // of SVM.\n if (ParamType == PtrKernelParam || ParamType == PtrPtrKernelParam || ParamType == InvalidAddrSpacePtrKernelParam) {\n } else {\n S.Diag(Param->getLocation(), diag::err_bad_kernel_param_type) << PT;"}} | ||
}, | }, | ||
["err_bad_lvalue_to_rvalue_cast"]={ | ["err_bad_lvalue_to_rvalue_cast"]={ | ||
Line 4,937: | Line 4,937: | ||
[h]=o, | [h]=o, | ||
[d]={"e97585f7177e",1237761006,"Implement static_cast from lvalue to rvalue reference."}, | [d]={"e97585f7177e",1237761006,"Implement static_cast from lvalue to rvalue reference."}, | ||
[k]={{w, | [k]={{w,1553,"/// Tests whether a conversion according to N2844 is valid.\nTryCastResult TryLValueToRValueCast(Sema &Self, Expr *SrcExpr, QualType DestType, bool CStyle, CastKind &Kind, CXXCastPath &BasePath, unsigned &msg) {\n if (RefResult != Sema::Ref_Compatible) {\n msg = SrcExpr->isLValue() ? diag::err_bad_lvalue_to_rvalue_cast : diag::err_bad_rvalue_to_rvalue_cast;"}} | ||
}, | }, | ||
["err_bad_memptr_lhs"]={ | ["err_bad_memptr_lhs"]={ | ||
Line 4,949: | Line 4,949: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{x, | [k]={{x,6022,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n if (isIndirect) {\n if (const PointerType *Ptr = LHSType->getAs<PointerType>())\n else {\n Diag(Loc, diag::err_bad_memptr_lhs) << OpSpelling << 1 << LHSType << FixItHint::CreateReplacement(SourceRange(Loc), \".*\");"},{x,6031,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n if (!Context.hasSameUnqualifiedType(Class, LHSType)) {\n if (RequireCompleteType(Loc, LHSType, diag::err_bad_memptr_lhs, OpSpelling, (int)isIndirect)) {"},{x,6037,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n if (!Context.hasSameUnqualifiedType(Class, LHSType)) {\n if (!IsDerivedFrom(Loc, LHSType, Class)) {\n Diag(Loc, diag::err_bad_memptr_lhs) << OpSpelling << (int)isIndirect << LHS.get()->getType();"}} | ||
}, | }, | ||
["err_bad_memptr_rhs"]={ | ["err_bad_memptr_rhs"]={ | ||
Line 4,961: | Line 4,961: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{x, | [k]={{x,6000,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n if (!MemPtr) {\n Diag(Loc, diag::err_bad_memptr_rhs) << OpSpelling << RHSType << RHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_bad_multiversion_option"]={ | ["err_bad_multiversion_option"]={ | ||
Line 4,973: | Line 4,973: | ||
[h]=a, | [h]=a, | ||
[d]={"281d20b601c8",1515447257,"Implement Attribute Target MultiVersioning"}, | [d]={"281d20b601c8",1515447257,"Implement Attribute Target MultiVersioning"}, | ||
[k]={{q, | [k]={{q,10957,"/// Check the target or target_version attribute of the function for\n/// MultiVersion validity.\n///\n/// Returns true if there was an error, false otherwise.\nstatic bool CheckMultiVersionValue(Sema &S, const FunctionDecl *FD) {\n if (TA) {\n if (!ParseInfo.CPU.empty() && !TargetInfo.validateCpuIs(ParseInfo.CPU)) {\n S.Diag(FD->getLocation(), diag::err_bad_multiversion_option) << Architecture << ParseInfo.CPU;"},{q,10964,"/// Check the target or target_version attribute of the function for\n/// MultiVersion validity.\n///\n/// Returns true if there was an error, false otherwise.\nstatic bool CheckMultiVersionValue(Sema &S, const FunctionDecl *FD) {\n if (TA) {\n for (const auto &Feat : ParseInfo.Features) {\n if (Feat[0] == \'-\') {\n S.Diag(FD->getLocation(), diag::err_bad_multiversion_option) << Feature << (\"no-\" + BareFeat).str();"},{q,10971,"/// Check the target or target_version attribute of the function for\n/// MultiVersion validity.\n///\n/// Returns true if there was an error, false otherwise.\nstatic bool CheckMultiVersionValue(Sema &S, const FunctionDecl *FD) {\n if (TA) {\n for (const auto &Feat : ParseInfo.Features) {\n if (!TargetInfo.validateCpuSupports(BareFeat) || !TargetInfo.isValidFeatureName(BareFeat)) {\n S.Diag(FD->getLocation(), diag::err_bad_multiversion_option) << Feature << BareFeat;"},{q,10983,"/// Check the target or target_version attribute of the function for\n/// MultiVersion validity.\n///\n/// Returns true if there was an error, false otherwise.\nstatic bool CheckMultiVersionValue(Sema &S, const FunctionDecl *FD) {\n if (TVA) {\n for (const auto &Feat : Feats) {\n if (!TargetInfo.validateCpuSupports(Feat)) {\n S.Diag(FD->getLocation(), diag::err_bad_multiversion_option) << Feature << Feat;"}} | ||
}, | }, | ||
["err_bad_new_type"]={ | ["err_bad_new_type"]={ | ||
Line 4,985: | Line 4,985: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{x, | [k]={{x,2458,"/// Checks that a type is suitable as the allocated type\n/// in a new-expression.\nbool Sema::CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R) {\n // C++ 5.3.4p1: \"[The] type shall be a complete object type, but not an\n // abstract class type or array thereof.\n if (AllocType->isFunctionType())\n return Diag(Loc, diag::err_bad_new_type) << AllocType << 0 << R;"},{x,2461,"/// Checks that a type is suitable as the allocated type\n/// in a new-expression.\nbool Sema::CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R) {\n // C++ 5.3.4p1: \"[The] type shall be a complete object type, but not an\n // abstract class type or array thereof.\n if (AllocType->isFunctionType())\n else if (AllocType->isReferenceType())\n return Diag(Loc, diag::err_bad_new_type) << AllocType << 1 << R;"}} | ||
}, | }, | ||
["err_bad_parameter_name"]={ | ["err_bad_parameter_name"]={ | ||
Line 4,997: | Line 4,997: | ||
[h]=o, | [h]=o, | ||
[d]={"a56cbccfc413",1288746426,"Provide an error when a non-identifier name (such as an operator) is used as a"}, | [d]={"a56cbccfc413",1288746426,"Provide an error when a non-identifier name (such as an operator) is used as a"}, | ||
[k]={{q, | [k]={{q,14711,"/// Common checks for a parameter-declaration that should apply to both function\n/// parameters and non-type template parameters.\nvoid Sema::CheckFunctionOrTemplateParamDeclarator(Scope *S, Declarator &D) {\n case UnqualifiedIdKind::IK_DeductionGuideName:\n Diag(D.getIdentifierLoc(), diag::err_bad_parameter_name) << GetNameForDeclarator(D).getName();"}} | ||
}, | }, | ||
["err_bad_parameter_name_template_id"]={ | ["err_bad_parameter_name_template_id"]={ | ||
Line 5,009: | Line 5,009: | ||
[h]=o, | [h]=o, | ||
[d]={"da70fc0c5f5b",1560542514,"PR42071: Reject weird names for non-type template parameters."}, | [d]={"da70fc0c5f5b",1560542514,"PR42071: Reject weird names for non-type template parameters."}, | ||
[k]={{q, | [k]={{q,14718,"/// Common checks for a parameter-declaration that should apply to both function\n/// parameters and non-type template parameters.\nvoid Sema::CheckFunctionOrTemplateParamDeclarator(Scope *S, Declarator &D) {\n case UnqualifiedIdKind::IK_ConstructorTemplateId:\n Diag(D.getIdentifierLoc(), diag::err_bad_parameter_name_template_id);"}} | ||
}, | }, | ||
["err_bad_property_context"]={ | ["err_bad_property_context"]={ | ||
Line 5,021: | Line 5,021: | ||
[h]=o, | [h]=o, | ||
[d]={ub,1480718311,yb}, | [d]={ub,1480718311,yb}, | ||
[k]={{P, | [k]={{P,1199,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n if ((IC = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {\n } else if ((CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassImpDecl))) {\n } else {\n Diag(AtLoc, diag::err_bad_property_context);"}} | ||
}, | }, | ||
["err_bad_property_decl"]={ | ["err_bad_property_decl"]={ | ||
Line 5,033: | Line 5,033: | ||
[h]=o, | [h]=o, | ||
[d]={ub,1480718311,yb}, | [d]={ub,1480718311,yb}, | ||
[k]={{P, | [k]={{P,1114,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n if ((IC = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {\n if (!property) {\n Diag(PropertyLoc, diag::err_bad_property_decl) << IDecl->getDeclName();"}} | ||
}, | }, | ||
["err_bad_receiver_type"]={ | ["err_bad_receiver_type"]={ | ||
Line 5,045: | Line 5,045: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{G, | [k]={{G,3130,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n if (!Method) {\n if (receiverIsIdLike || ReceiverType->isBlockPointerType() || (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) {\n } else if (ReceiverType->isObjCClassOrClassKindOfType() || ReceiverType->isObjCQualifiedClassType()) {\n } else {\n // We allow sending a message to a qualified ID (\"id<foo>\"), which is ok as\n // long as one of the protocols implements the selector (if not, warn).\n // And as long as message is not deprecated/unavailable (warn if it is).\n if (const ObjCObjectPointerType *QIdTy = ReceiverType->getAsObjCQualifiedIdType()) {\n } else if (const ObjCObjectPointerType *OCIType = ReceiverType->getAsObjCInterfacePointerType()) {\n } else {\n Diag(Loc, diag::err_bad_receiver_type) << ReceiverType << RecRange;"}} | ||
}, | }, | ||
["err_bad_reinterpret_cast_overload"]={ | ["err_bad_reinterpret_cast_overload"]={ | ||
Line 5,057: | Line 5,057: | ||
[h]=o, | [h]=o, | ||
[d]={"e81f58e18011",1289187648,"Properly diagnose invalid casts to function references. Patch by"}, | [d]={"e81f58e18011",1289187648,"Properly diagnose invalid casts to function references. Patch by"}, | ||
[k]={{w, | [k]={{w,1202,"/// CheckReinterpretCast - Check that a reinterpret_cast\\<DestType\\>(SrcExpr) is\n/// valid.\n/// Refer to C++ 5.2.10 for details. reinterpret_cast is typically used in code\n/// like this:\n/// char *bytes = reinterpret_cast\\<char*\\>(int_ptr);\nvoid CastOperation::CheckReinterpretCast() {\n if (tcr != TC_Success && msg != 0) {\n if (SrcExpr.get()->getType() == Self.Context.OverloadTy) {\n Self.Diag(OpRange.getBegin(), diag::err_bad_reinterpret_cast_overload) << OverloadExpr::find(SrcExpr.get()).Expression->getName() << DestType << OpRange;"}} | ||
}, | }, | ||
["err_bad_reinterpret_cast_reference"]={ | ["err_bad_reinterpret_cast_reference"]={ | ||
Line 5,069: | Line 5,069: | ||
[h]=o, | [h]=o, | ||
[d]={"bf04231a7254",1303516677,"Don\'t allow reinterpret_cast to reference of vector element and property expression. Thanks goes to ..."}, | [d]={"bf04231a7254",1303516677,"Don\'t allow reinterpret_cast to reference of vector element and property expression. Thanks goes to ..."}, | ||
[k]={{w, | [k]={{w,2302,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (const ReferenceType *DestTypeTmp = DestType->getAs<ReferenceType>()) {\n if (inappropriate) {\n Self.Diag(OpRange.getBegin(), diag::err_bad_reinterpret_cast_reference) << inappropriate << DestType << OpRange << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_bad_reinterpret_cast_small_int"]={ | ["err_bad_reinterpret_cast_small_int"]={ | ||
Line 5,081: | Line 5,081: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{w, | [k]={{w,2367,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n // See below for the enumeral issue.\n if (SrcType->isNullPtrType() && DestType->isIntegralType(Self.Context)) {\n // C++0x 5.2.10p4: A pointer can be explicitly converted to any integral\n // type large enough to hold it. A value of std::nullptr_t can be\n // converted to an integral type; the conversion has the same meaning\n // and validity as a conversion of (void*)0 to the integral type.\n if (Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType)) {\n msg = diag::err_bad_reinterpret_cast_small_int;"},{w,2471,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (DestType->isIntegralType(Self.Context)) {\n // C++ 5.2.10p4: A pointer can be explicitly converted to any integral\n // type large enough to hold it; except in Microsoft mode, where the\n // integral type size doesn\'t matter (except we don\'t allow bool).\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType))) {\n if (MicrosoftException) {\n } else {\n msg = diag::err_bad_reinterpret_cast_small_int;"}} | ||
}, | }, | ||
["err_bad_rvalue_to_rvalue_cast"]={ | ["err_bad_rvalue_to_rvalue_cast"]={ | ||
Line 5,093: | Line 5,093: | ||
[h]=o, | [h]=o, | ||
[d]={"e4e9e281a1fb",1478139197,"[Sema] Allow static_cast<T&&>(e) to check explicit conversions for non-reference-related types."}, | [d]={"e4e9e281a1fb",1478139197,"[Sema] Allow static_cast<T&&>(e) to check explicit conversions for non-reference-related types."}, | ||
[k]={{w, | [k]={{w,1554,"/// Tests whether a conversion according to N2844 is valid.\nTryCastResult TryLValueToRValueCast(Sema &Self, Expr *SrcExpr, QualType DestType, bool CStyle, CastKind &Kind, CXXCastPath &BasePath, unsigned &msg) {\n if (RefResult != Sema::Ref_Compatible) {\n msg = SrcExpr->isLValue() ? diag::err_bad_lvalue_to_rvalue_cast : diag::err_bad_rvalue_to_rvalue_cast;"}} | ||
}, | }, | ||
["err_bad_static_cast_member_pointer_nonmp"]={ | ["err_bad_static_cast_member_pointer_nonmp"]={ | ||
Line 5,105: | Line 5,105: | ||
[h]=o, | [h]=o, | ||
[d]={"9f831dbbcdfa",1248536498,"Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conve..."}, | [d]={"9f831dbbcdfa",1248536498,"Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conve..."}, | ||
[k]={{w, | [k]={{w,1783,"/// TryStaticMemberPointerUpcast - Tests whether a conversion according to\n/// C++ 5.2.9p9 is valid:\n///\n/// An rvalue of type \"pointer to member of D of type cv1 T\" can be\n/// converted to an rvalue of type \"pointer to member of B of type cv2 T\",\n/// where B is a base class of D [...].\n///\nTryCastResult TryStaticMemberPointerUpcast(Sema &Self, ExprResult &SrcExpr, QualType SrcType, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath) {\n if (!SrcMemPtr) {\n msg = diag::err_bad_static_cast_member_pointer_nonmp;"}} | ||
}, | }, | ||
["err_bad_static_cast_overload"]={ | ["err_bad_static_cast_overload"]={ | ||
Line 5,117: | Line 5,117: | ||
[h]=o, | [h]=o, | ||
[d]={"e81f58e18011",1289187648,"Properly diagnose invalid casts to function references. Patch by"}, | [d]={"e81f58e18011",1289187648,"Properly diagnose invalid casts to function references. Patch by"}, | ||
[k]={{w, | [k]={{w,1249,"/// CheckStaticCast - Check that a static_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.9 for details. Static casts are mostly used for making\n/// implicit conversions explicit and getting rid of data loss warnings.\nvoid CastOperation::CheckStaticCast() {\n // This test is outside everything else because it\'s the only case where\n // a non-lvalue-reference target type does not lead to decay.\n // C++ 5.2.9p4: Any expression can be explicitly converted to type \"cv void\".\n if (DestType->isVoidType()) {\n if (claimPlaceholder(BuiltinType::Overload)) {\n Self.ResolveAndFixSingleFunctionTemplateSpecialization(SrcExpr,\n OpRange, DestType, diag::err_bad_static_cast_overload);"},{w,1274,"/// CheckStaticCast - Check that a static_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.9 for details. Static casts are mostly used for making\n/// implicit conversions explicit and getting rid of data loss warnings.\nvoid CastOperation::CheckStaticCast() {\n if (tcr != TC_Success && msg != 0) {\n if (SrcExpr.get()->getType() == Self.Context.OverloadTy) {\n Self.Diag(OpRange.getBegin(), diag::err_bad_static_cast_overload) << oe->getName() << DestType << OpRange << oe->getQualifierLoc().getSourceRange();"}} | ||
}, | }, | ||
["err_bad_static_cast_pointer_nonpointer"]={ | ["err_bad_static_cast_pointer_nonpointer"]={ | ||
Line 5,129: | Line 5,129: | ||
[h]=o, | [h]=o, | ||
[d]={"9f831dbbcdfa",1248536498,"Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conve..."}, | [d]={"9f831dbbcdfa",1248536498,"Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conve..."}, | ||
[k]={{w, | [k]={{w,1632,"/// Tests whether a conversion according to C++ 5.2.9p8 is valid.\nTryCastResult TryStaticPointerDowncast(Sema &Self, QualType SrcType, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath) {\n if (!SrcPointer) {\n msg = diag::err_bad_static_cast_pointer_nonpointer;"}} | ||
}, | }, | ||
["err_bad_string_encoding"]={ | ["err_bad_string_encoding"]={ | ||
Line 5,141: | Line 5,141: | ||
[h]=gb, | [h]=gb, | ||
[d]={"703e7153af87",1320113690,"Perform proper conversion for strings encoded in the source file as UTF-8. (For now, we are assumin..."}, | [d]={"703e7153af87",1320113690,"Perform proper conversion for strings encoded in the source file as UTF-8. (For now, we are assumin..."}, | ||
[k]={{"clang/lib/Lex/LiteralSupport.cpp", | [k]={{"clang/lib/Lex/LiteralSupport.cpp",2265,"/// This function copies from Fragment, which is a sequence of bytes\n/// within Tok\'s contents (which begin at TokBegin) into ResultPtr.\n/// Performs widening for multi-byte characters.\nbool StringLiteralParser::CopyStringFragment(const Token &Tok, const char *TokBegin, StringRef Fragment) {\n if (Diags) {\n const DiagnosticBuilder &Builder = Diag(Diags, Features, SourceLoc, TokBegin, ErrorPtr, resyncUTF8(ErrorPtr, Fragment.end()), NoErrorOnBadEncoding ? diag::warn_bad_string_encoding : diag::err_bad_string_encoding);"}} | ||
}, | }, | ||
["err_bad_variable_name"]={ | ["err_bad_variable_name"]={ | ||
Line 5,153: | Line 5,153: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{q, | [k]={{q,7462,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n if (D.isDecompositionDeclarator()) {\n } else if (!II) {\n Diag(D.getIdentifierLoc(), diag::err_bad_variable_name) << Name;"},{v,3545,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n if (isInstField) {\n // Data members must have identifiers for names.\n if (!Name.isIdentifier()) {\n Diag(Loc, diag::err_bad_variable_name) << Name;"}} | ||
}, | }, | ||
["err_base_class_has_flexible_array_member"]={ | ["err_base_class_has_flexible_array_member"]={ | ||
Line 5,165: | Line 5,165: | ||
[h]=o, | [h]=o, | ||
[d]={"9b1754d05840",1383393636,"Sema: Disallow inheriting from classes with flexible array members"}, | [d]={"9b1754d05840",1383393636,"Sema: Disallow inheriting from classes with flexible array members"}, | ||
[k]={{v, | [k]={{v,2771,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // A class which contains a flexible array member is not suitable for use as a\n // base class:\n // - If the layout determines that a base comes before another base,\n // the flexible array member would index into the subsequent base.\n // - If the layout determines that base comes before the derived class,\n // the flexible array member would index into the derived class.\n if (CXXBaseDecl->hasFlexibleArrayMember()) {\n Diag(BaseLoc, diag::err_base_class_has_flexible_array_member) << CXXBaseDecl->getDeclName();"}} | ||
}, | }, | ||
["err_base_clause_on_union"]={ | ["err_base_clause_on_union"]={ | ||
Line 5,177: | Line 5,177: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,2663,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // C++ [class.union]p1:\n // A union shall not have base classes.\n if (Class->isUnion()) {\n Diag(Class->getLocation(), diag::err_base_clause_on_union) << SpecifierRange;"}} | ||
}, | }, | ||
["err_base_init_direct_and_virtual"]={ | ["err_base_init_direct_and_virtual"]={ | ||
Line 5,189: | Line 5,189: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,4763,"MemInitResult Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc) {\n // C++ [base.class.init]p2:\n // If a mem-initializer-id is ambiguous because it designates both\n // a direct non-virtual base class and an inherited virtual base\n // class, the mem-initializer is ill-formed.\n if (DirectBaseSpec && VirtualBaseSpec)\n return Diag(BaseLoc, diag::err_base_init_direct_and_virtual) << BaseType << BaseTInfo->getTypeLoc().getLocalSourceRange();"}} | ||
}, | }, | ||
["err_base_init_does_not_name_class"]={ | ["err_base_init_does_not_name_class"]={ | ||
Line 5,201: | Line 5,201: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,4685,"MemInitResult Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc) {\n if (!BaseType->isDependentType() && !BaseType->isRecordType())\n return Diag(BaseLoc, diag::err_base_init_does_not_name_class) << BaseType << BaseTInfo->getTypeLoc().getSourceRange();"}} | ||
}, | }, | ||
["err_base_must_be_class"]={ | ["err_base_must_be_class"]={ | ||
Line 5,213: | Line 5,213: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,2711,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // Base specifiers must be record types.\n if (!BaseType->isRecordType()) {\n Diag(BaseLoc, diag::err_base_must_be_class) << SpecifierRange;"}} | ||
}, | }, | ||
["err_base_specifier_attribute"]={ | ["err_base_specifier_attribute"]={ | ||
Line 5,225: | Line 5,225: | ||
[h]=o, | [h]=o, | ||
[d]={"4c96e99235b3",1361317635,"PR15300: Support C++11 attributes on base-specifiers. We don\'t support any such"}, | [d]={"4c96e99235b3",1361317635,"PR15300: Support C++11 attributes on base-specifiers. We don\'t support any such"}, | ||
[k]={{v, | [k]={{v,2827,"/// ActOnBaseSpecifier - Parsed a base specifier. A base specifier is\n/// one entry in the base class list of a class specifier, for\n/// example:\n/// class foo : public bar, virtual private baz {\n/// \'public bar\' and \'virtual private baz\' are each base-specifiers.\nBaseResult Sema::ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange, const ParsedAttributesView &Attributes, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc) {\n // We do not support any C++11 attributes on base-specifiers yet.\n // Diagnose any attributes we see.\n for (const ParsedAttr &AL : Attributes) {\n if (AL.getKind() == ParsedAttr::UnknownAttribute)\n else\n Diag(AL.getLoc(), diag::err_base_specifier_attribute) << AL << AL.isRegularKeywordAttribute() << AL.getRange();"}} | ||
}, | }, | ||
["err_binding_cannot_appear_in_own_initializer"]={ | ["err_binding_cannot_appear_in_own_initializer"]={ | ||
Line 5,237: | Line 5,237: | ||
[h]=o, | [h]=o, | ||
[d]={"bdb84f374cde",1469230619,"P0217R3: Parsing support and framework for AST representation of C++1z"}, | [d]={"bdb84f374cde",1469230619,"P0217R3: Parsing support and framework for AST representation of C++1z"}, | ||
[k]={{y, | [k]={{y,257,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // See if this is an auto-typed variable whose initializer we are parsing.\n if (ParsingInitForAutoVars.count(D)) {\n if (isa<BindingDecl>(D)) {\n Diag(Loc, diag::err_binding_cannot_appear_in_own_initializer) << D->getDeclName();"}} | ||
}, | }, | ||
["err_bit_cast_non_trivially_copyable"]={ | ["err_bit_cast_non_trivially_copyable"]={ | ||
Line 5,249: | Line 5,249: | ||
[h]=a, | [h]=a, | ||
[d]={"eee944e7f9e6",1562092093,"[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast"}, | [d]={"eee944e7f9e6",1562092093,"[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast"}, | ||
[k]={{w, | [k]={{w,3278,"void CastOperation::CheckBuiltinBitCast() {\n if (!DestType.isTriviallyCopyableType(Self.Context)) {\n Self.Diag(OpRange.getBegin(), diag::err_bit_cast_non_trivially_copyable) << 1;"},{w,3285,"void CastOperation::CheckBuiltinBitCast() {\n if (!SrcType.isTriviallyCopyableType(Self.Context)) {\n Self.Diag(OpRange.getBegin(), diag::err_bit_cast_non_trivially_copyable) << 0;"}} | ||
}, | }, | ||
["err_bit_cast_type_size_mismatch"]={ | ["err_bit_cast_type_size_mismatch"]={ | ||
Line 5,261: | Line 5,261: | ||
[h]=a, | [h]=a, | ||
[d]={"eee944e7f9e6",1562092093,"[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast"}, | [d]={"eee944e7f9e6",1562092093,"[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast"}, | ||
[k]={{w, | [k]={{w,3271,"void CastOperation::CheckBuiltinBitCast() {\n if (DestSize != SourceSize) {\n Self.Diag(OpRange.getBegin(), diag::err_bit_cast_type_size_mismatch) << (int)SourceSize.getQuantity() << (int)DestSize.getQuantity();"}} | ||
}, | }, | ||
["err_bit_int_bad_size"]={ | ["err_bit_int_bad_size"]={ | ||
Line 5,273: | Line 5,273: | ||
[h]=a, | [h]=a, | ||
[d]={db,1616787805,cb}, | [d]={db,1616787805,cb}, | ||
[k]={{r, | [k]={{r,2359,"/// Build a bit-precise integer type.\n///\n/// \\param IsUnsigned Boolean representing the signedness of the type.\n///\n/// \\param BitWidth Size of this int type in bits, or an expression representing\n/// that.\n///\n/// \\param Loc Location of the keyword.\nQualType Sema::BuildBitIntType(bool IsUnsigned, Expr *BitWidth, SourceLocation Loc) {\n if (!IsUnsigned && NumBits < 2) {\n Diag(Loc, diag::err_bit_int_bad_size) << 0;"},{r,2364,"/// Build a bit-precise integer type.\n///\n/// \\param IsUnsigned Boolean representing the signedness of the type.\n///\n/// \\param BitWidth Size of this int type in bits, or an expression representing\n/// that.\n///\n/// \\param Loc Location of the keyword.\nQualType Sema::BuildBitIntType(bool IsUnsigned, Expr *BitWidth, SourceLocation Loc) {\n if (IsUnsigned && NumBits < 1) {\n Diag(Loc, diag::err_bit_int_bad_size) << 1;"}} | ||
}, | }, | ||
["err_bit_int_max_size"]={ | ["err_bit_int_max_size"]={ | ||
Line 5,285: | Line 5,285: | ||
[h]=a, | [h]=a, | ||
[d]={db,1616787805,cb}, | [d]={db,1616787805,cb}, | ||
[k]={{r, | [k]={{r,2370,"/// Build a bit-precise integer type.\n///\n/// \\param IsUnsigned Boolean representing the signedness of the type.\n///\n/// \\param BitWidth Size of this int type in bits, or an expression representing\n/// that.\n///\n/// \\param Loc Location of the keyword.\nQualType Sema::BuildBitIntType(bool IsUnsigned, Expr *BitWidth, SourceLocation Loc) {\n if (NumBits > TI.getMaxBitIntWidth()) {\n Diag(Loc, diag::err_bit_int_max_size) << IsUnsigned << static_cast<uint64_t>(TI.getMaxBitIntWidth());"}} | ||
}, | }, | ||
["err_bitfield_has_negative_width"]={ | ["err_bitfield_has_negative_width"]={ | ||
Line 5,297: | Line 5,297: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,17924,"// Note that FieldName may be null for anonymous bitfields.\nExprResult Sema::VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth) {\n if (Value.isSigned() && Value.isNegative()) {\n if (FieldName)\n return Diag(FieldLoc, diag::err_bitfield_has_negative_width) << FieldName << toString(Value, 10);"}} | ||
}, | }, | ||
["err_bitfield_has_zero_width"]={ | ["err_bitfield_has_zero_width"]={ | ||
Line 5,309: | Line 5,309: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,17920,"// Note that FieldName may be null for anonymous bitfields.\nExprResult Sema::VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth) {\n // Zero-width bitfield is ok for anonymous field.\n if (Value == 0 && FieldName)\n return Diag(FieldLoc, diag::err_bitfield_has_zero_width) << FieldName;"}} | ||
}, | }, | ||
["err_bitfield_too_wide"]={ | ["err_bitfield_too_wide"]={ | ||
Line 5,321: | Line 5,321: | ||
[h]=o, | [h]=o, | ||
[d]={fb,1590001902,eb}, | [d]={fb,1590001902,eb}, | ||
[k]={{q, | [k]={{q,17933,"// Note that FieldName may be null for anonymous bitfields.\nExprResult Sema::VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth) {\n // The size of the bit-field must not exceed our maximum permitted object\n // size.\n if (Value.getActiveBits() > ConstantArrayType::getMaxSizeBits(Context)) {\n return Diag(FieldLoc, diag::err_bitfield_too_wide) << !FieldName << FieldName << toString(Value, 10);"}} | ||
}, | }, | ||
["err_bitfield_width_exceeds_type_width"]={ | ["err_bitfield_width_exceeds_type_width"]={ | ||
Line 5,333: | Line 5,333: | ||
[h]=o, | [h]=o, | ||
[d]={"022bdc7d7361",1442266056,"C11 _Bool bitfield diagnostic"}, | [d]={"022bdc7d7361",1442266056,"C11 _Bool bitfield diagnostic"}, | ||
[k]={{q, | [k]={{q,17952,"// Note that FieldName may be null for anonymous bitfields.\nExprResult Sema::VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth) {\n if (!FieldTy->isDependentType()) {\n if (CStdConstraintViolation || MSBitfieldViolation) {\n return Diag(FieldLoc, diag::err_bitfield_width_exceeds_type_width) << (bool)FieldName << FieldName << toString(Value, 10) << !CStdConstraintViolation << DiagWidth;"}} | ||
}, | }, | ||
["err_block_decl_ref_not_modifiable_lvalue"]={ | ["err_block_decl_ref_not_modifiable_lvalue"]={ | ||
Line 5,345: | Line 5,345: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{y, | [k]={{y,14282,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n case Expr::MLV_ConstQualified:\n // Use a specialized diagnostic when we\'re assigning to an object\n // from an enclosing function or block.\n if (NonConstCaptureKind NCCK = isReferenceToNonConstCapture(S, E)) {\n if (NCCK == NCCK_Block)\n DiagID = diag::err_block_decl_ref_not_modifiable_lvalue;"}} | ||
}, | }, | ||
["err_block_extern_cant_init"]={ | ["err_block_extern_cant_init"]={ | ||
Line 5,357: | Line 5,357: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,13189,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // C99 6.7.8p5. If the declaration of an identifier has block scope, and\n // the identifier has external or internal linkage, the declaration shall\n // have no initializer for the identifier.\n // C++14 [dcl.init]p5 is the same restriction for C++.\n if (VDecl->isLocalVarDecl() && VDecl->hasExternalStorage()) {\n Diag(VDecl->getLocation(), diag::err_block_extern_cant_init);"}} | ||
}, | }, | ||
["err_block_on_nonlocal"]={ | ["err_block_on_nonlocal"]={ | ||
Line 5,369: | Line 5,369: | ||
[h]=o, | [h]=o, | ||
[d]={"e9efa80c003e",1241050780,"Sema checking for incorrect placement of __block. Radar 6441502"}, | [d]={"e9efa80c003e",1241050780,"Sema checking for incorrect placement of __block. Radar 6441502"}, | ||
[k]={{q, | [k]={{q,8742,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if (!NewVD->hasLocalStorage() && NewVD->hasAttr<BlocksAttr>()) {\n Diag(NewVD->getLocation(), diag::err_block_on_nonlocal);"},{q,14821,"/// ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator()\n/// to introduce parameters into function prototype scope.\nDecl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {\n if (New->hasAttr<BlocksAttr>()) {\n Diag(New->getLocation(), diag::err_block_on_nonlocal);"},{I,4813,"Decl *Sema::ActOnMethodDeclaration(Scope *S, SourceLocation MethodLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef<SourceLocation> SelectorLocs, Selector Sel,\n for (unsigned i = 0, e = Sel.getNumArgs(); i != e; ++i) {\n if (Param->hasAttr<BlocksAttr>()) {\n Diag(Param->getLocation(), diag::err_block_on_nonlocal);"},{I,5239,"Decl *Sema::ActOnObjCExceptionDecl(Scope *S, Declarator &D) {\n if (New->hasAttr<BlocksAttr>())\n Diag(New->getLocation(), diag::err_block_on_nonlocal);"}} | ||
}, | }, | ||
["err_block_on_vm"]={ | ["err_block_on_vm"]={ | ||
Line 5,381: | Line 5,381: | ||
[h]=o, | [h]=o, | ||
[d]={"a71286315f9d",1241221307,"Add Sema checking for __block on vm declarations. Radar 6441502"}, | [d]={"a71286315f9d",1241221307,"Add Sema checking for __block on vm declarations. Radar 6441502"}, | ||
[k]={{q, | [k]={{q,8755,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if (isVM && NewVD->hasAttr<BlocksAttr>()) {\n Diag(NewVD->getLocation(), diag::err_block_on_vm);"}} | ||
}, | }, | ||
["err_block_return_missing_expr"]={ | ["err_block_return_missing_expr"]={ | ||
Line 5,393: | Line 5,393: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{R, | [k]={{R,3693,"/// ActOnCapScopeReturnStmt - Utility routine to type-check return statements\n/// for capturing scopes.\n///\nStmtResult Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, NamedReturnInfo &NRInfo, bool SupressSimplerImplicitMoves) {\n // Otherwise, verify that this result type matches the previous one. We are\n // pickier with blocks than for normal functions because we don\'t have GCC\n // compatibility to worry about here.\n if (FnRetType->isDependentType()) {\n } else if (FnRetType->isVoidType()) {\n } else if (!RetValExp) {\n return StmtError(Diag(ReturnLoc, diag::err_block_return_missing_expr));"}} | ||
}, | }, | ||
["err_block_returning_array_function"]={ | ["err_block_returning_array_function"]={ | ||
Line 5,405: | Line 5,405: | ||
[h]=o, | [h]=o, | ||
[d]={"20ad245e3e22",1295997393,"Change error \"function cannot return array type\" -> \"blocks cannot return array type\" when blocks ar..."}, | [d]={"20ad245e3e22",1295997393,"Change error \"function cannot return array type\" -> \"blocks cannot return array type\" when blocks ar..."}, | ||
[k]={{y, | [k]={{y,21269,"/// Rebuilds a call expression which yielded __unknown_anytype.\nExprResult RebuildUnknownAnyExpr::VisitCallExpr(CallExpr *E) {\n // Verify that this is a legal result type of a function.\n if (DestType->isArrayType() || DestType->isFunctionType()) {\n if (Kind == FK_BlockPointer)\n diagID = diag::err_block_returning_array_function;"},{r,5272,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n case DeclaratorChunk::Function: {\n // C99 6.7.5.3p1: The return type may not be a function or array type.\n // For conversion functions, we\'ll diagnose this particular error later.\n if (!D.isInvalidType() && (T->isArrayType() || T->isFunctionType()) && (D.getName().getKind() != UnqualifiedIdKind::IK_ConversionFunctionId)) {\n // Last processing chunk in block context means this function chunk\n // represents the block.\n if (chunkIndex == 0 && D.getContext() == DeclaratorContext::BlockLiteral)\n diagID = diag::err_block_returning_array_function;"}} | ||
}, | }, | ||
["err_blocks_disable"]={ | ["err_blocks_disable"]={ | ||
Line 5,417: | Line 5,417: | ||
[h]=o, | [h]=o, | ||
[d]={"9eac931b5f29",1238127486,"Fix rdar://6719156 - clang should emit a better error when blocks are disabled but are used anyway"}, | [d]={"9eac931b5f29",1238127486,"Fix rdar://6719156 - clang should emit a better error when blocks are disabled but are used anyway"}, | ||
[k]={{y, | [k]={{y,17158,"/// ActOnBlockStmtExpr - This is called when the body of a block statement\n/// literal was successfully completed. ^(int x){...}\nExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, Stmt *Body, Scope *CurScope) {\n // If blocks are disabled, emit an error.\n if (!LangOpts.Blocks)\n Diag(CaretLoc, diag::err_blocks_disable) << LangOpts.OpenCL;"},{r,5034,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n case DeclaratorChunk::BlockPointer:\n // If blocks are disabled, emit an error.\n if (!LangOpts.Blocks)\n S.Diag(DeclType.Loc, diag::err_blocks_disable) << LangOpts.OpenCL;"}} | ||
}, | }, | ||
["err_bool_redeclaration"]={ | ["err_bool_redeclaration"]={ | ||
Line 5,429: | Line 5,429: | ||
[h]=B, | [h]=B, | ||
[d]={"20ee5ae8710a",1289931493,"Emit a specific diagnostic when typedefing C++ bool, mirroring gcc."}, | [d]={"20ee5ae8710a",1289931493,"Emit a specific diagnostic when typedefing C++ bool, mirroring gcc."}, | ||
[k]={{D, | [k]={{D,4255,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n while (true) {\n case tok::kw__Bool:\n if (Tok.is(tok::kw_bool) && DS.getTypeSpecType() != DeclSpec::TST_unspecified && DS.getStorageClassSpec() == DeclSpec::SCS_typedef) {\n DiagID = diag::err_bool_redeclaration;"},{D,4500,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (DiagID != diag::err_bool_redeclaration && ConsumedEnd.isInvalid())"}} | ||
}, | }, | ||
["err_bound_member_function"]={ | ["err_bound_member_function"]={ | ||
Line 5,441: | Line 5,441: | ||
[h]=o, | [h]=o, | ||
[d]={"50a2c2c19de5",1318374870,"Catch placeholder types in DefaultLvalueConversion"}, | [d]={"50a2c2c19de5",1318374870,"Catch placeholder types in DefaultLvalueConversion"}, | ||
[k]={{y, | [k]={{y,21549,"/// Check for operands with placeholder types and complain if found.\n/// Returns ExprError() if there was an error and no recovery was possible.\nExprResult Sema::CheckPlaceholderExpr(Expr *E) {\n // Bound member functions.\n case BuiltinType::BoundMember: {\n PartialDiagnostic PD = PDiag(diag::err_bound_member_function);"},{Q,12958,"// Resolve and fix an overloaded expression that can be resolved\n// because it identifies a single function template specialization.\n//\n// Last three arguments should only be supplied if Complain = true\n//\n// Return true if it was logically possible to so resolve the\n// expression, regardless of whether or not it succeeded. Always\n// returns true if \'complain\' is set.\nbool Sema::ResolveAndFixSingleFunctionTemplateSpecialization(ExprResult &SrcExpr, bool doFunctionPointerConversion, bool complain, SourceRange OpRangeForComplaining, QualType DestTypeForComplaining, unsigned DiagIDForComplaining) {\n if (FunctionDecl *fn = ResolveSingleFunctionTemplateSpecialization(ovl.Expression, /*complain*/ false, &found)) {\n // It is only correct to resolve to an instance method if we\'re\n // resolving a form that\'s permitted to be a pointer to member.\n // Otherwise we\'ll end up making a bound member expression, which\n // is illegal in all the contexts we resolve like this.\n if (!ovl.HasFormOfMemberPointer && isa<CXXMethodDecl>(fn) && cast<CXXMethodDecl>(fn)->isInstance()) {\n Diag(ovl.Expression->getExprLoc(), diag::err_bound_member_function) << 0 << ovl.Expression->getSourceRange();"}} | ||
}, | }, | ||
["err_box_literal_collection"]={ | ["err_box_literal_collection"]={ | ||
Line 5,453: | Line 5,453: | ||
[h]=o, | [h]=o, | ||
[d]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,"}, | [d]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,"}, | ||
[k]={{G, | [k]={{G,438,"/// Check that the given expression is a valid element of an Objective-C\n/// collection literal.\nstatic ExprResult CheckObjCCollectionLiteralElement(Sema &S, Expr *Element, QualType T, bool ArrayLiteral = false) {\n // Make sure that we have an Objective-C pointer type or block.\n if (!Element->getType()->isObjCObjectPointerType() && !Element->getType()->isBlockPointerType()) {\n // If this is potentially an Objective-C numeric literal, add the \'@\'.\n if (isa<IntegerLiteral>(OrigElement) || isa<CharacterLiteral>(OrigElement) || isa<FloatingLiteral>(OrigElement) || isa<ObjCBoolLiteralExpr>(OrigElement) || isa<CXXBoolLiteralExpr>(OrigElement)) {\n if (S.NSAPIObj->getNSNumberFactoryMethodKind(OrigElement->getType())) {\n S.Diag(OrigElement->getBeginLoc(), diag::err_box_literal_collection) << Which << OrigElement->getSourceRange() << FixItHint::CreateInsertion(OrigElement->getBeginLoc(), \"@\");"},{G,454,"/// Check that the given expression is a valid element of an Objective-C\n/// collection literal.\nstatic ExprResult CheckObjCCollectionLiteralElement(Sema &S, Expr *Element, QualType T, bool ArrayLiteral = false) {\n // Make sure that we have an Objective-C pointer type or block.\n if (!Element->getType()->isObjCObjectPointerType() && !Element->getType()->isBlockPointerType()) {\n }\n // If this is potentially an Objective-C string literal, add the \'@\'.\n else if (StringLiteral *String = dyn_cast<StringLiteral>(OrigElement)) {\n if (String->isOrdinary()) {\n S.Diag(OrigElement->getBeginLoc(), diag::err_box_literal_collection) << 0 << OrigElement->getSourceRange() << FixItHint::CreateInsertion(OrigElement->getBeginLoc(), \"@\");"}} | ||
}, | }, | ||
["err_bracket_depth_exceeded"]={ | ["err_bracket_depth_exceeded"]={ | ||
Line 5,465: | Line 5,465: | ||
[h]=B, | [h]=B, | ||
[d]={"b3a145293dc8",1361498391,"Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,"}, | [d]={"b3a145293dc8",1361498391,"Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,"}, | ||
[k]={{Jb, | [k]={{Jb,2696,"bool BalancedDelimiterTracker::diagnoseOverflow() {\n P.Diag(P.Tok, diag::err_bracket_depth_exceeded) << P.getLangOpts().BracketDepth;"}} | ||
}, | }, | ||
["err_brackets_go_after_unqualified_id"]={ | ["err_brackets_go_after_unqualified_id"]={ | ||
Line 5,477: | Line 5,477: | ||
[h]=B, | [h]=B, | ||
[d]={"f4b81d002965",1403651664,"Provide a better diagnostic when braces are put before the identifier."}, | [d]={"f4b81d002965",1403651664,"Provide a better diagnostic when braces are put before the identifier."}, | ||
[k]={{D, | [k]={{D,7725,"/// Diagnose brackets before an identifier.\nvoid Parser::ParseMisplacedBracketDeclarator(Declarator &D) {\n if (NeedParens) {\n Diag(EndLoc, diag::err_brackets_go_after_unqualified_id) << getLangOpts().CPlusPlus << FixItHint::CreateInsertion(SuggestParenLoc, \"(\") << FixItHint::CreateInsertion(EndLoc, \")\") << FixItHint::CreateInsertionFromRange(EndLoc, CharSourceRange(BracketRange, true)) << FixItHint::CreateRemoval(BracketRange);"},{D,7733,"/// Diagnose brackets before an identifier.\nvoid Parser::ParseMisplacedBracketDeclarator(Declarator &D) {\n if (NeedParens) {\n } else {\n Diag(EndLoc, diag::err_brackets_go_after_unqualified_id) << getLangOpts().CPlusPlus << FixItHint::CreateInsertionFromRange(EndLoc, CharSourceRange(BracketRange, true)) << FixItHint::CreateRemoval(BracketRange);"}} | ||
}, | }, | ||
["err_break_not_in_loop_or_switch"]={ | ["err_break_not_in_loop_or_switch"]={ | ||
Line 5,489: | Line 5,489: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{R, | [k]={{R,3349,"StmtResult Sema::ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope) {\n if (!S) {\n return StmtError(Diag(BreakLoc, diag::err_break_not_in_loop_or_switch));"}} | ||
}, | }, | ||
["err_btf_type_id_not_const"]={ | ["err_btf_type_id_not_const"]={ | ||
Line 5,501: | Line 5,501: | ||
[h]=a, | [h]=a, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{s, | [k]={{s,3514,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n if (!Value) {\n if (BuiltinID == BPF::BI__builtin_preserve_field_info)\n else if (BuiltinID == BPF::BI__builtin_btf_type_id)\n kind = diag::err_btf_type_id_not_const;"}} | ||
}, | }, | ||
["err_builtin_annotation_first_arg"]={ | ["err_builtin_annotation_first_arg"]={ | ||
Line 5,513: | Line 5,513: | ||
[h]=o, | [h]=o, | ||
[d]={"4a5b4443711e",1335634756,"Currently __builtin_annotation() only annotates an i32."}, | [d]={"4a5b4443711e",1335634756,"Currently __builtin_annotation() only annotates an i32."}, | ||
[k]={{s, | [k]={{s,198,"/// Check that the first argument to __builtin_annotation is an integer\n/// and the second argument is a non-wide string literal.\nstatic bool SemaBuiltinAnnotation(Sema &S, CallExpr *TheCall) {\n if (!Ty->isIntegerType()) {\n S.Diag(ValArg->getBeginLoc(), diag::err_builtin_annotation_first_arg) << ValArg->getSourceRange();"}} | ||
}, | }, | ||
["err_builtin_annotation_second_arg"]={ | ["err_builtin_annotation_second_arg"]={ | ||
Line 5,525: | Line 5,525: | ||
[h]=o, | [h]=o, | ||
[d]={"4a5b4443711e",1335634756,"Currently __builtin_annotation() only annotates an i32."}, | [d]={"4a5b4443711e",1335634756,"Currently __builtin_annotation() only annotates an i32."}, | ||
[k]={{s, | [k]={{s,207,"/// Check that the first argument to __builtin_annotation is an integer\n/// and the second argument is a non-wide string literal.\nstatic bool SemaBuiltinAnnotation(Sema &S, CallExpr *TheCall) {\n if (!Literal || !Literal->isOrdinary()) {\n S.Diag(StrArg->getBeginLoc(), diag::err_builtin_annotation_second_arg) << StrArg->getSourceRange();"}} | ||
}, | }, | ||
["err_builtin_definition"]={ | ["err_builtin_definition"]={ | ||
Line 5,537: | Line 5,537: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{q, | [k]={{q,15334,"Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, SkipBodyInfo *SkipBody, FnBodyKind BodyKind) {\n // Builtin functions cannot be defined.\n if (unsigned BuiltinID = FD->getBuiltinID()) {\n if (!Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID) && !Context.BuiltinInfo.isPredefinedRuntimeFunction(BuiltinID)) {\n Diag(FD->getLocation(), diag::err_builtin_definition) << FD;"}} | ||
}, | }, | ||
["err_builtin_fn_use"]={ | ["err_builtin_fn_use"]={ | ||
Line 5,549: | Line 5,549: | ||
[h]=o, | [h]=o, | ||
[d]={"34866c7719f8",1346372047,"Change the representation of builtin functions in the AST"}, | [d]={"34866c7719f8",1346372047,"Change the representation of builtin functions in the AST"}, | ||
[k]={{y, | [k]={{y,21629,"/// Check for operands with placeholder types and complain if found.\n/// Returns ExprError() if there was an error and no recovery was possible.\nExprResult Sema::CheckPlaceholderExpr(Expr *E) {\n case BuiltinType::BuiltinFn: {\n Diag(E->getBeginLoc(), diag::err_builtin_fn_use);"}} | ||
}, | }, | ||
["err_builtin_func_cast_more_than_one_arg"]={ | ["err_builtin_func_cast_more_than_one_arg"]={ | ||
Line 5,561: | Line 5,561: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{E, | [k]={{E,9814,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_TooManyInitsForScalar: {\n if (Kind.isCStyleOrFunctionalCast())\n S.Diag(Kind.getLocation(), diag::err_builtin_func_cast_more_than_one_arg) << R;"}} | ||
}, | }, | ||
["err_builtin_invalid_arg_type"]={ | ["err_builtin_invalid_arg_type"]={ | ||
Line 5,573: | Line 5,573: | ||
[h]=a, | [h]=a, | ||
[d]={db,1616787805,cb}, | [d]={db,1616787805,cb}, | ||
[k]={{s, | [k]={{s,2045,"// Check if \\p Ty is a valid type for the elementwise math builtins. If it is\n// not a valid type, emit an error message and return true. Otherwise return\n// false.\nstatic bool checkMathBuiltinElementType(Sema &S, SourceLocation Loc, QualType Ty) {\n if (!Ty->getAs<VectorType>() && !ConstantMatrixType::isValidElementType(Ty)) {\n return S.Diag(Loc, diag::err_builtin_invalid_arg_type) << 1 << /* vector, integer or float ty*/ 0 << Ty;"},{s,2059,"static bool checkFPMathBuiltinElementType(Sema &S, SourceLocation Loc, QualType ArgTy, int ArgIndex) {\n if (!EltTy->isRealFloatingType()) {\n return S.Diag(Loc, diag::err_builtin_invalid_arg_type) << ArgIndex << /* vector or float ty*/ 5 << ArgTy;"},{s,2623,"#include \"clang/Basic/Builtins.def\"\n // __builtin_elementwise_abs restricts the element type to signed integers or\n // floating point types only.\n case Builtin::BI__builtin_elementwise_abs: {\n if (EltTy->isUnsignedIntegerType()) {\n Diag(TheCall->getArg(0)->getBeginLoc(), diag::err_builtin_invalid_arg_type) << 1 << /* signed integer or float ty*/ 3 << ArgTy;"},{s,2692,"#include \"clang/Basic/Builtins.def\"\n case Builtin::BI__builtin_elementwise_sub_sat: {\n if (!EltTy->isIntegerType()) {\n Diag(Arg->getBeginLoc(), diag::err_builtin_invalid_arg_type) << 1 << /* integer ty */ 6 << ArgTy;"},{s,2741,"#include \"clang/Basic/Builtins.def\"\n case Builtin::BI__builtin_reduce_min: {\n if (!TyA) {\n Diag(Arg->getBeginLoc(), diag::err_builtin_invalid_arg_type) << 1 << /* vector ty*/ 4 << Arg->getType();"},{s,2763,"#include \"clang/Basic/Builtins.def\"\n case Builtin::BI__builtin_reduce_and: {\n if (!TyA || !TyA->getElementType()->isIntegerType()) {\n Diag(Arg->getBeginLoc(), diag::err_builtin_invalid_arg_type) << 1 << /* vector of integers */ 6 << Arg->getType();"},{s,18725,"bool Sema::SemaBuiltinNonDeterministicValue(CallExpr *TheCall) {\n if (!TyArg->isBuiltinType() && !TyArg->isVectorType())\n return Diag(TheCall->getArg(0)->getBeginLoc(), diag::err_builtin_invalid_arg_type) << 1 << /*vector, integer or floating point ty*/ 0 << TyArg;"},{s,18744,"ExprResult Sema::SemaBuiltinMatrixTranspose(CallExpr *TheCall, ExprResult CallResult) {\n if (!MType) {\n Diag(Matrix->getBeginLoc(), diag::err_builtin_invalid_arg_type) << 1 << /* matrix ty*/ 1 << Matrix->getType();"},{s,18816,"ExprResult Sema::SemaBuiltinMatrixColumnMajorLoad(CallExpr *TheCall, ExprResult CallResult) {\n if (!PtrTy) {\n Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type) << PtrArgIdx + 1 << /*pointer to element ty*/ 2 << PtrExpr->getType();"},{s,18823,"ExprResult Sema::SemaBuiltinMatrixColumnMajorLoad(CallExpr *TheCall, ExprResult CallResult) {\n if (!PtrTy) {\n } else {\n if (!ConstantMatrixType::isValidElementType(ElementTy)) {\n Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type) << PtrArgIdx + 1 << /* pointer to element ty*/ 2 << PtrExpr->getType();"},{s,18924,"ExprResult Sema::SemaBuiltinMatrixColumnMajorStore(CallExpr *TheCall, ExprResult CallResult) {\n if (!MatrixTy) {\n Diag(MatrixExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type) << 1 << /*matrix ty */ 1 << MatrixExpr->getType();"},{s,18944,"ExprResult Sema::SemaBuiltinMatrixColumnMajorStore(CallExpr *TheCall, ExprResult CallResult) {\n if (!PtrTy) {\n Diag(PtrExpr->getBeginLoc(), diag::err_builtin_invalid_arg_type) << PtrArgIdx + 1 << /*pointer to element ty*/ 2 << PtrExpr->getType();"}} | ||
}, | }, | ||
["err_builtin_launder_invalid_arg"]={ | ["err_builtin_launder_invalid_arg"]={ | ||
Line 5,585: | Line 5,585: | ||
[h]=a, | [h]=a, | ||
[d]={"261875054e5e",1544821888,"[Clang] Add __builtin_launder"}, | [d]={"261875054e5e",1544821888,"[Clang] Add __builtin_launder"}, | ||
[k]={{s, | [k]={{s,1925,"static ExprResult SemaBuiltinLaunder(Sema &S, CallExpr *TheCall) {\n if (DiagSelect) {\n S.Diag(TheCall->getBeginLoc(), diag::err_builtin_launder_invalid_arg) << *DiagSelect << TheCall->getSourceRange();"}} | ||
}, | }, | ||
["err_builtin_longjmp_invalid_val"]={ | ["err_builtin_longjmp_invalid_val"]={ | ||
Line 5,597: | Line 5,597: | ||
[h]=o, | [h]=o, | ||
[d]={"7903ca0993a4",1241326928,"Add diagnostic for r70658."}, | [d]={"7903ca0993a4",1241326928,"Add diagnostic for r70658."}, | ||
[k]={{s, | [k]={{s,9321,"/// SemaBuiltinLongjmp - Handle __builtin_longjmp(void *env[5], int val).\n/// This checks that the target supports __builtin_longjmp and\n/// that val is a constant 1.\nbool Sema::SemaBuiltinLongjmp(CallExpr *TheCall) {\n if (Result != 1)\n return Diag(TheCall->getBeginLoc(), diag::err_builtin_longjmp_invalid_val) << SourceRange(Arg->getBeginLoc(), Arg->getEndLoc());"}} | ||
}, | }, | ||
["err_builtin_longjmp_unsupported"]={ | ["err_builtin_longjmp_unsupported"]={ | ||
Line 5,609: | Line 5,609: | ||
[h]=o, | [h]=o, | ||
[d]={"27173288c296",1426117592,"Under duress, move check for target support of __builtin_setjmp/"}, | [d]={"27173288c296",1426117592,"Under duress, move check for target support of __builtin_setjmp/"}, | ||
[k]={{s, | [k]={{s,9310,"/// SemaBuiltinLongjmp - Handle __builtin_longjmp(void *env[5], int val).\n/// This checks that the target supports __builtin_longjmp and\n/// that val is a constant 1.\nbool Sema::SemaBuiltinLongjmp(CallExpr *TheCall) {\n if (!Context.getTargetInfo().hasSjLjLowering())\n return Diag(TheCall->getBeginLoc(), diag::err_builtin_longjmp_unsupported) << SourceRange(TheCall->getBeginLoc(), TheCall->getEndLoc());"}} | ||
}, | }, | ||
["err_builtin_matrix_disabled"]={ | ["err_builtin_matrix_disabled"]={ | ||
Line 5,621: | Line 5,621: | ||
[h]=a, | [h]=a, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{s, | [k]={{s,18785,"ExprResult Sema::SemaBuiltinMatrixColumnMajorLoad(CallExpr *TheCall, ExprResult CallResult) {\n if (!getLangOpts().MatrixTypes) {\n Diag(TheCall->getBeginLoc(), diag::err_builtin_matrix_disabled);"},{r,8456,"/// HandleMatrixTypeAttr - \"matrix_type\" attribute, like ext_vector_type\nstatic void HandleMatrixTypeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S) {\n if (!S.getLangOpts().MatrixTypes) {\n S.Diag(Attr.getLoc(), diag::err_builtin_matrix_disabled);"}} | ||
}, | }, | ||
["err_builtin_matrix_invalid_dimension"]={ | ["err_builtin_matrix_invalid_dimension"]={ | ||
Line 5,633: | Line 5,633: | ||
[h]=a, | [h]=a, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{s, | [k]={{s,18775,"// Get and verify the matrix dimensions.\nstatic std::optional<unsigned> getAndVerifyMatrixDimension(Expr *Expr, StringRef Name, Sema &S) {\n if (!ConstantMatrixType::isDimensionValid(Dim)) {\n S.Diag(Expr->getBeginLoc(), diag::err_builtin_matrix_invalid_dimension) << Name << ConstantMatrixType::getMaxElementsPerDimension();"}} | ||
}, | }, | ||
["err_builtin_matrix_pointer_arg_mismatch"]={ | ["err_builtin_matrix_pointer_arg_mismatch"]={ | ||
Line 5,645: | Line 5,645: | ||
[h]=a, | [h]=a, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{s, | [k]={{s,18957,"ExprResult Sema::SemaBuiltinMatrixColumnMajorStore(CallExpr *TheCall, ExprResult CallResult) {\n if (!PtrTy) {\n } else {\n if (MatrixTy && !Context.hasSameType(ElementTy, MatrixTy->getElementType())) {\n Diag(PtrExpr->getBeginLoc(), diag::err_builtin_matrix_pointer_arg_mismatch) << ElementTy << MatrixTy->getElementType();"}} | ||
}, | }, | ||
["err_builtin_matrix_scalar_unsigned_arg"]={ | ["err_builtin_matrix_scalar_unsigned_arg"]={ | ||
Line 5,657: | Line 5,657: | ||
[h]=a, | [h]=a, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{s, | [k]={{s,18769,"// Get and verify the matrix dimensions.\nstatic std::optional<unsigned> getAndVerifyMatrixDimension(Expr *Expr, StringRef Name, Sema &S) {\n if (!Value) {\n S.Diag(Expr->getBeginLoc(), diag::err_builtin_matrix_scalar_unsigned_arg) << Name;"}} | ||
}, | }, | ||
["err_builtin_matrix_store_to_const"]={ | ["err_builtin_matrix_store_to_const"]={ | ||
Line 5,669: | Line 5,669: | ||
[h]=a, | [h]=a, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{s, | [k]={{s,18950,"ExprResult Sema::SemaBuiltinMatrixColumnMajorStore(CallExpr *TheCall, ExprResult CallResult) {\n if (!PtrTy) {\n } else {\n if (ElementTy.isConstQualified()) {\n Diag(PtrExpr->getBeginLoc(), diag::err_builtin_matrix_store_to_const);"}} | ||
}, | }, | ||
["err_builtin_matrix_stride_too_small"]={ | ["err_builtin_matrix_stride_too_small"]={ | ||
Line 5,681: | Line 5,681: | ||
[h]=a, | [h]=a, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{s, | [k]={{s,18884,"ExprResult Sema::SemaBuiltinMatrixColumnMajorLoad(CallExpr *TheCall, ExprResult CallResult) {\n if (MaybeRows) {\n if (std::optional<llvm::APSInt> Value = StrideExpr->getIntegerConstantExpr(Context)) {\n if (Stride < *MaybeRows) {\n Diag(StrideExpr->getBeginLoc(), diag::err_builtin_matrix_stride_too_small);"},{s,18984,"ExprResult Sema::SemaBuiltinMatrixColumnMajorStore(CallExpr *TheCall, ExprResult CallResult) {\n // Check stride argument.\n if (MatrixTy) {\n if (std::optional<llvm::APSInt> Value = StrideExpr->getIntegerConstantExpr(Context)) {\n if (Stride < MatrixTy->getNumRows()) {\n Diag(StrideExpr->getBeginLoc(), diag::err_builtin_matrix_stride_too_small);"}} | ||
}, | }, | ||
["err_builtin_move_forward_unsupported"]={ | ["err_builtin_move_forward_unsupported"]={ | ||
Line 5,693: | Line 5,693: | ||
[h]=o, | [h]=o, | ||
[d]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | [d]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | ||
[k]={{s, | [k]={{s,2512,"#include \"clang/Basic/Builtins.def\"\n case Builtin::BIas_const: {\n if (!(Param->isReferenceType() && (ReturnsPointer ? Result->isAnyPointerType() : Result->isReferenceType()) && Context.hasSameUnqualifiedType(Param->getPointeeType(), Result->getPointeeType()))) {\n Diag(TheCall->getBeginLoc(), diag::err_builtin_move_forward_unsupported) << FDecl;"}} | ||
}, | }, | ||
["err_builtin_needs_feature"]={ | ["err_builtin_needs_feature"]={ | ||
Line 5,705: | Line 5,705: | ||
[h]=a, | [h]=a, | ||
[d]={"15709991d09d",1444952831,"Add an error when calling a builtin that requires features that don\'t"}, | [d]={"15709991d09d",1444952831,"Add an error when calling a builtin that requires features that don\'t"}, | ||
[k]={{"clang/lib/CodeGen/CodeGenFunction.cpp", | [k]={{"clang/lib/CodeGen/CodeGenFunction.cpp",2603,"// Emits an error if we don\'t have a valid set of target features for the\n// called function.\nvoid CodeGenFunction::checkTargetFeatures(SourceLocation Loc, const FunctionDecl *TargetDecl) {\n if (BuiltinID) {\n if (!Builtin::evaluateRequiredTargetFeatures(FeatureList, CallerFeatureMap)) {\n CGM.getDiags().Report(Loc, diag::err_builtin_needs_feature) << TargetDecl->getDeclName() << FeatureList;"}} | ||
}, | }, | ||
["err_builtin_operator_new_delete_not_usual"]={ | ["err_builtin_operator_new_delete_not_usual"]={ | ||
Line 5,717: | Line 5,717: | ||
[h]=o, | [h]=o, | ||
[d]={"fa752f23cc20",1521659988,"[Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocati..."}, | [d]={"fa752f23cc20",1521659988,"[Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocati..."}, | ||
[k]={{x, | [k]={{x,3859,"static bool resolveBuiltinNewDeleteOverload(Sema &S, CallExpr *TheCall, bool IsDelete, FunctionDecl *&Operator) {\n case OR_Success: {\n if (!FnDecl->isReplaceableGlobalAllocationFunction()) {\n S.Diag(R.getNameLoc(), diag::err_builtin_operator_new_delete_not_usual) << (IsDelete ? 1 : 0) << Range;"}} | ||
}, | }, | ||
["err_builtin_pass_in_regs_non_class"]={ | ["err_builtin_pass_in_regs_non_class"]={ | ||
Line 5,729: | Line 5,729: | ||
[h]=a, | [h]=a, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{x, | [k]={{x,5393,"static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, SourceLocation KeyLoc, QualType T) {\n case UTT_CanPassInRegs:\n Self.Diag(KeyLoc, diag::err_builtin_pass_in_regs_non_class) << T;"}} | ||
}, | }, | ||
["err_builtin_redeclare"]={ | ["err_builtin_redeclare"]={ | ||
Line 5,741: | Line 5,741: | ||
[h]=o, | [h]=o, | ||
[d]={"41af97137572",1523914208,"Limit types of builtins that can be redeclared."}, | [d]={"41af97137572",1523914208,"Limit types of builtins that can be redeclared."}, | ||
[k]={{q, | [k]={{q,3678,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // Disallow redeclaration of some builtins.\n if (!getASTContext().canBuiltinBeRedeclared(Old)) {\n Diag(New->getLocation(), diag::err_builtin_redeclare) << Old->getDeclName();"}} | ||
}, | }, | ||
["err_builtin_requires_language"]={ | ["err_builtin_requires_language"]={ | ||
Line 5,753: | Line 5,753: | ||
[h]=o, | [h]=o, | ||
[d]={"760520bcb78d",1401838064,"Add __builtin_operator_new and __builtin_operator_delete, which act like calls"}, | [d]={"760520bcb78d",1401838064,"Add __builtin_operator_new and __builtin_operator_delete, which act like calls"}, | ||
[k]={{x, | [k]={{x,3902,"ExprResult Sema::SemaBuiltinOperatorNewDeleteOverloaded(ExprResult TheCallResult, bool IsDelete) {\n if (!getLangOpts().CPlusPlus) {\n Diag(TheCall->getExprLoc(), diag::err_builtin_requires_language) << (IsDelete ? \"__builtin_operator_delete\" : \"__builtin_operator_new\") << \"C++\";"}} | ||
}, | }, | ||
["err_builtin_setjmp_unsupported"]={ | ["err_builtin_setjmp_unsupported"]={ | ||
Line 5,765: | Line 5,765: | ||
[h]=o, | [h]=o, | ||
[d]={"27173288c296",1426117592,"Under duress, move check for target support of __builtin_setjmp/"}, | [d]={"27173288c296",1426117592,"Under duress, move check for target support of __builtin_setjmp/"}, | ||
[k]={{s, | [k]={{s,9331,"/// SemaBuiltinSetjmp - Handle __builtin_setjmp(void *env[5]).\n/// This checks that the target supports __builtin_setjmp.\nbool Sema::SemaBuiltinSetjmp(CallExpr *TheCall) {\n if (!Context.getTargetInfo().hasSjLjLowering())\n return Diag(TheCall->getBeginLoc(), diag::err_builtin_setjmp_unsupported) << SourceRange(TheCall->getBeginLoc(), TheCall->getEndLoc());"}} | ||
}, | }, | ||
["err_builtin_target_unsupported"]={ | ["err_builtin_target_unsupported"]={ | ||
Line 5,777: | Line 5,777: | ||
[h]=o, | [h]=o, | ||
[d]={"aa46ed927860",1528407544,"[MS] Re-add support for the ARM interlocked bittest intrinscs"}, | [d]={"aa46ed927860",1528407544,"[MS] Re-add support for the ARM interlocked bittest intrinscs"}, | ||
[k]={{s, | [k]={{s,1962,"// Emit an error and return true if the current object format type is in the\n// list of unsupported types.\nstatic bool CheckBuiltinTargetNotInUnsupported(Sema &S, unsigned BuiltinID, CallExpr *TheCall, ArrayRef<llvm::Triple::ObjectFormatType> UnsupportedObjectFormatTypes) {\n if (llvm::is_contained(UnsupportedObjectFormatTypes, CurObjFormat)) {\n S.Diag(TheCall->getBeginLoc(), diag::err_builtin_target_unsupported) << TheCall->getSourceRange();"},{s,1978,"// Emit an error and return true if the current architecture is not in the list\n// of supported architectures.\nstatic bool CheckBuiltinTargetInSupported(Sema &S, unsigned BuiltinID, CallExpr *TheCall, ArrayRef<llvm::Triple::ArchType> SupportedArchs) {\n S.Diag(TheCall->getBeginLoc(), diag::err_builtin_target_unsupported) << TheCall->getSourceRange();"},{s,8577,"/// SemaBuiltinArithmeticFence - Handle __arithmetic_fence.\nbool Sema::SemaBuiltinArithmeticFence(CallExpr *TheCall) {\n if (!Context.getTargetInfo().checkArithmeticFenceSupported())\n return Diag(TheCall->getBeginLoc(), diag::err_builtin_target_unsupported) << SourceRange(TheCall->getBeginLoc(), TheCall->getEndLoc());"}} | ||
}, | }, | ||
["err_builtin_x64_aarch64_only"]={ | ["err_builtin_x64_aarch64_only"]={ | ||
Line 5,789: | Line 5,789: | ||
[h]=o, | [h]=o, | ||
[d]={"022e782e7576",1500324585,"[AArch64] Add support for __builtin_ms_va_list on aarch64"}, | [d]={"022e782e7576",1500324585,"[AArch64] Add support for __builtin_ms_va_list on aarch64"}, | ||
[k]={{s, | [k]={{s,8059,"/// Check that the user is calling the appropriate va_start builtin for the\n/// target and calling convention.\nstatic bool checkVAStartABI(Sema &S, unsigned BuiltinID, Expr *Fn) {\n if (IsMSVAStart)\n return S.Diag(Fn->getBeginLoc(), diag::err_builtin_x64_aarch64_only);"}} | ||
}, | }, | ||
["err_c11_noreturn_misplaced"]={ | ["err_c11_noreturn_misplaced"]={ | ||
Line 5,801: | Line 5,801: | ||
[h]=B, | [h]=B, | ||
[d]={"99c464c3f377",1415653832,"Improve diagnostics if _Noreturn is placed after a function declarator. (This sometimes happens when..."}, | [d]={"99c464c3f377",1415653832,"Improve diagnostics if _Noreturn is placed after a function declarator. (This sometimes happens when..."}, | ||
[k]={{D, | [k]={{D,2155,"/// ParseDeclGroup - Having concluded that this is either a function\n/// definition or a group of object declarations, actually parse the\n/// result.\nParser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS, DeclaratorContext Context, ParsedAttributes &Attrs, SourceLocation *DeclEnd, ForRangeInit *FRI) {\n if (D.isFunctionDeclarator()) {\n // The _Noreturn keyword can\'t appear here, unlike the GNU noreturn\n // attribute. If we find the keyword here, tell the user to put it\n // at the start instead.\n if (Tok.is(tok::kw__Noreturn)) {\n Diag(Loc, diag::err_c11_noreturn_misplaced) << (Fixit ? FixItHint::CreateRemoval(Loc) : FixItHint()) << (Fixit ? FixItHint::CreateInsertion(D.getBeginLoc(), \"_Noreturn \") : FixItHint());"}} | ||
}, | }, | ||
["err_c99_array_usage_cxx"]={ | ["err_c99_array_usage_cxx"]={ | ||
Line 5,813: | Line 5,813: | ||
[h]=o, | [h]=o, | ||
[d]={"73341c4e6319",1252628338,"Diagnose VLAs as an error in C++."}, | [d]={"73341c4e6319",1252628338,"Diagnose VLAs as an error in C++."}, | ||
[k]={{r, | [k]={{r,2680,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // If this is not C99, diagnose array size modifiers on non-VLAs.\n if (!getLangOpts().C99 && !T->isVariableArrayType() && (ASM != ArrayType::Normal || Quals != 0)) {\n Diag(Loc, getLangOpts().CPlusPlus ? diag::err_c99_array_usage_cxx : diag::ext_c99_array_usage) << ASM;"}} | ||
}, | }, | ||
["err_call_function_incomplete_return"]={ | ["err_call_function_incomplete_return"]={ | ||
Line 5,825: | Line 5,825: | ||
[h]=o, | [h]=o, | ||
[d]={"7f84ed928721",1255132315,"Add CheckCallReturnType and start using it for regular call expressions. This will improve error mes..."}, | [d]={"7f84ed928721",1255132315,"Add CheckCallReturnType and start using it for regular call expressions. This will improve error mes..."}, | ||
[k]={{y, | [k]={{y,20821,"bool Sema::CheckCallReturnType(QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD) {\n class CallReturnIncompleteDiagnoser : public TypeDiagnoser {\n void diagnose(Sema &S, SourceLocation Loc, QualType T) override {\n S.Diag(Loc, diag::err_call_function_incomplete_return) << CE->getSourceRange() << FD << T;"}} | ||
}, | }, | ||
["err_call_incomplete_argument"]={ | ["err_call_incomplete_argument"]={ | ||
Line 5,837: | Line 5,837: | ||
[h]=o, | [h]=o, | ||
[d]={"3164fb15e286",1237759250,"Check that the return/argument types of calls are complete."}, | [d]={"3164fb15e286",1237759250,"Check that the return/argument types of calls are complete."}, | ||
[k]={{y, | [k]={{y,1092,"/// DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but\n/// will create a trap if the resulting type is not a POD type.\nExprResult Sema::DefaultVariadicArgumentPromotion(Expr *E, VariadicCallType CT, FunctionDecl *FDecl) {\n if (!getLangOpts().CPlusPlus && RequireCompleteType(E->getExprLoc(), E->getType(), diag::err_call_incomplete_argument))"},{y,6655,"bool Sema::GatherArgumentsForCall(SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef<Expr *> Args, SmallVectorImpl<Expr *> &AllArgs, VariadicCallType CallType, bool AllowExplicit, bool IsListInitialization) {\n // Continue to check argument types (even if we have too few/many args).\n for (unsigned i = FirstParam; i < NumParams; i++) {\n if (ArgIx < Args.size()) {\n if (RequireCompleteType(Arg->getBeginLoc(), ProtoArgType, diag::err_call_incomplete_argument, Arg))"},{y,7594,"/// BuildResolvedCallExpr - Build a call to a resolved expression,\n/// i.e. an expression not of \\p OverloadTy. The expression should\n/// unary-convert to an expression of function-pointer or\n/// block-pointer type.\n///\n/// \\param NDecl the declaration being called, if available\nExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef<Expr *> Args, SourceLocation RParenLoc, Expr *Config, bool IsExecConfig, ADLCallKind UsesADL) {\n if (Proto) {\n } else {\n // Promote the arguments (C99 6.5.2.2p6).\n for (unsigned i = 0, e = Args.size(); i != e; i++) {\n if (RequireCompleteType(Arg->getBeginLoc(), Arg->getType(), diag::err_call_incomplete_argument, Arg))"},{G,1861,"bool Sema::CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef<SourceLocation> SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) {\n for (unsigned i = 0; i < NumNamedArgs; i++) {\n if (RequireCompleteType(argExpr->getSourceRange().getBegin(), paramType, diag::err_call_incomplete_argument, argExpr))"},{E,6837,"/// Make a (potentially elidable) temporary copy of the object\n/// provided by the given initializer by calling the appropriate copy\n/// constructor.\n///\n/// \\param S The Sema object used for type-checking.\n///\n/// \\param T The type of the temporary object, which must either be\n/// the type of the initializer expression or a superclass thereof.\n///\n/// \\param Entity The entity being initialized.\n///\n/// \\param CurInit The initializer expression.\n///\n/// \\param IsExtraneousCopy Whether this is an \"extraneous\" copy that\n/// is permitted in C++03 (but not C++0x) when binding a reference to\n/// an rvalue.\n///\n/// \\returns An expression that copies the initializer expression into\n/// a temporary object, or an error expression if a copy could not be\n/// created.\nstatic ExprResult CopyObject(Sema &S, QualType T, const InitializedEntity &Entity, ExprResult CurInit, bool IsExtraneousCopy) {\n if (IsExtraneousCopy) {\n // Instantiate the default arguments of any extra parameters in\n // the selected copy constructor, as if we were going to create a\n // proper call to the copy constructor.\n for (unsigned I = 1, N = Constructor->getNumParams(); I != N; ++I) {\n if (S.RequireCompleteType(Loc, Parm->getType(), diag::err_call_incomplete_argument))"}} | ||
}, | }, | ||
["err_call_incomplete_return"]={ | ["err_call_incomplete_return"]={ | ||
Line 5,849: | Line 5,849: | ||
[h]=o, | [h]=o, | ||
[d]={"3164fb15e286",1237759250,"Check that the return/argument types of calls are complete."}, | [d]={"3164fb15e286",1237759250,"Check that the return/argument types of calls are complete."}, | ||
[k]={{y, | [k]={{y,20819,"bool Sema::CheckCallReturnType(QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD) {\n class CallReturnIncompleteDiagnoser : public TypeDiagnoser {\n void diagnose(Sema &S, SourceLocation Loc, QualType T) override {\n if (!FD) {\n S.Diag(Loc, diag::err_call_incomplete_return) << T << CE->getSourceRange();"}} | ||
}, | }, | ||
["err_callback_attribute_argument_unknown"]={ | ["err_callback_attribute_argument_unknown"]={ | ||
Line 5,861: | Line 5,861: | ||
[h]=o, | [h]=o, | ||
[d]={nb,1547876214,mb}, | [d]={nb,1547876214,mb}, | ||
[k]={{p, | [k]={{p,4084,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned I = 0, E = AL.getNumArgs(); I < E; ++I) {\n if (AL.isArgIdent(I)) {\n if (It == UnknownName) {\n S.Diag(AL.getLoc(), diag::err_callback_attribute_argument_unknown) << IdLoc->Ident << IdLoc->Loc;"}} | ||
}, | }, | ||
["err_callback_attribute_invalid_callee"]={ | ["err_callback_attribute_invalid_callee"]={ | ||
Line 5,873: | Line 5,873: | ||
[h]=o, | [h]=o, | ||
[d]={nb,1547876214,mb}, | [d]={nb,1547876214,mb}, | ||
[k]={{p, | [k]={{p,4133,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Check if the callee index is proper, thus not \"this\" and not \"unknown\".\n // This means the \"CalleeIdx\" has to be non-negative if \"HasImplicitThisParam\"\n // is false and positive if \"HasImplicitThisParam\" is true.\n if (CalleeIdx < (int)HasImplicitThisParam) {\n S.Diag(AL.getLoc(), diag::err_callback_attribute_invalid_callee) << AL.getRange();"}} | ||
}, | }, | ||
["err_callback_attribute_multiple"]={ | ["err_callback_attribute_multiple"]={ | ||
Line 5,885: | Line 5,885: | ||
[h]=o, | [h]=o, | ||
[d]={nb,1547876214,mb}, | [d]={nb,1547876214,mb}, | ||
[k]={{p, | [k]={{p,4180,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Do not allow multiple callback attributes.\n if (D->hasAttr<CallbackAttr>()) {\n S.Diag(AL.getLoc(), diag::err_callback_attribute_multiple) << AL.getRange();"}} | ||
}, | }, | ||
["err_callback_attribute_no_callee"]={ | ["err_callback_attribute_no_callee"]={ | ||
Line 5,897: | Line 5,897: | ||
[h]=o, | [h]=o, | ||
[d]={nb,1547876214,mb}, | [d]={nb,1547876214,mb}, | ||
[k]={{p, | [k]={{p,4053,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // The index that identifies the callback callee is mandatory.\n if (AL.getNumArgs() == 0) {\n S.Diag(AL.getLoc(), diag::err_callback_attribute_no_callee) << AL.getRange();"}} | ||
}, | }, | ||
["err_callback_callee_is_variadic"]={ | ["err_callback_callee_is_variadic"]={ | ||
Line 5,909: | Line 5,909: | ||
[h]=o, | [h]=o, | ||
[d]={nb,1547876214,mb}, | [d]={nb,1547876214,mb}, | ||
[k]={{p, | [k]={{p,4174,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (CalleeFnProtoType->isVariadic()) {\n S.Diag(AL.getLoc(), diag::err_callback_callee_is_variadic) << AL.getRange();"}} | ||
}, | }, | ||
["err_callback_callee_no_function_type"]={ | ["err_callback_callee_no_function_type"]={ | ||
Line 5,921: | Line 5,921: | ||
[h]=o, | [h]=o, | ||
[d]={nb,1547876214,mb}, | [d]={nb,1547876214,mb}, | ||
[k]={{p, | [k]={{p,4144,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!CalleeType || !CalleeType->isFunctionPointerType()) {\n S.Diag(AL.getLoc(), diag::err_callback_callee_no_function_type) << AL.getRange();"},{p,4156,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!CalleeFnProtoType) {\n S.Diag(AL.getLoc(), diag::err_callback_callee_no_function_type) << AL.getRange();"}} | ||
}, | }, | ||
["err_callback_implicit_this_not_available"]={ | ["err_callback_implicit_this_not_available"]={ | ||
Line 5,933: | Line 5,933: | ||
[h]=o, | [h]=o, | ||
[d]={nb,1547876214,mb}, | [d]={nb,1547876214,mb}, | ||
[k]={{p, | [k]={{p,4115,"/// Handle __attribute__((callback(CalleeIdx, PayloadIdx0, ...))) attributes.\nstatic void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n for (unsigned I = 0, E = AL.getNumArgs(); I < E; ++I) {\n if (ArgIdx == 0 && !HasImplicitThisParam) {\n S.Diag(AL.getLoc(), diag::err_callback_implicit_this_not_available) << (I + 1) << SR;"}} | ||
}, | }, | ||
["err_called_once_attribute_wrong_type"]={ | ["err_called_once_attribute_wrong_type"]={ | ||
Line 5,945: | Line 5,945: | ||
[h]=o, | [h]=o, | ||
[d]={fb,1590001902,eb}, | [d]={fb,1590001902,eb}, | ||
[k]={{p, | [k]={{p,4201,"/// Handle \'called_once\' attribute.\nstatic void handleCalledOnceAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!isFunctionLike(*T)) {\n S.Diag(AL.getLoc(), diag::err_called_once_attribute_wrong_type);"}} | ||
}, | }, | ||
["err_cannot_find_suitable_accessor"]={ | ["err_cannot_find_suitable_accessor"]={ | ||
Line 5,957: | Line 5,957: | ||
[h]=o, | [h]=o, | ||
[d]={ub,1480718311,yb}, | [d]={ub,1480718311,yb}, | ||
[k]={{"clang/lib/Sema/SemaPseudoObject.cpp", | [k]={{"clang/lib/Sema/SemaPseudoObject.cpp",1487,"ExprResult MSPropertyOpBuilder::buildGet() {\n if (GetterExpr.isInvalid()) {\n S.Diag(RefExpr->getMemberLoc(), diag::err_cannot_find_suitable_accessor) << 0 /* getter */"},{"clang/lib/Sema/SemaPseudoObject.cpp",1516,"ExprResult MSPropertyOpBuilder::buildSet(Expr *op, SourceLocation sl, bool captureSetValueAsResult) {\n if (SetterExpr.isInvalid()) {\n S.Diag(RefExpr->getMemberLoc(), diag::err_cannot_find_suitable_accessor) << 1 /* setter */"}} | ||
}, | }, | ||
["err_cannot_form_pointer_to_member_of_reference_type"]={ | ["err_cannot_form_pointer_to_member_of_reference_type"]={ | ||
Line 5,969: | Line 5,969: | ||
[h]=o, | [h]=o, | ||
[d]={"0b675f5ad5b6",1247089558,"It\'s not allowed to form member pointers to members that have reference type. Add a test for this an..."}, | [d]={"0b675f5ad5b6",1247089558,"It\'s not allowed to form member pointers to members that have reference type. Add a test for this an..."}, | ||
[k]={{y, | [k]={{y,15062,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n if (lval == Expr::LV_ClassTemporary || lval == Expr::LV_ArrayTemporary) {\n } else if (isa<ObjCSelectorExpr>(op)) {\n } else if (lval == Expr::LV_MemberFunction) {\n } else if (lval != Expr::LV_Valid && lval != Expr::LV_IncompleteVoidType) {\n } else if (op->getObjectKind() == OK_BitField) { // C99 6.5.3.2p1\n } else if (op->getObjectKind() == OK_VectorComponent) {\n } else if (op->getObjectKind() == OK_MatrixComponent) {\n } else if (dcl) { // C99 6.5.3.2p1\n // We have an lvalue with a decl. Make sure the decl is not declared\n // with the register storage-class specifier.\n if (const VarDecl *vd = dyn_cast<VarDecl>(dcl)) {\n } else if (isa<MSPropertyDecl>(dcl)) {\n } else if (isa<FunctionTemplateDecl>(dcl)) {\n } else if (isa<FieldDecl>(dcl) || isa<IndirectFieldDecl>(dcl)) {\n // Okay: we can take the address of a field.\n // Could be a pointer to member, though, if there is an explicit\n // scope qualifier for the class.\n if (isa<DeclRefExpr>(op) && cast<DeclRefExpr>(op)->getQualifier()) {\n if (Ctx && Ctx->isRecord()) {\n if (dcl->getType()->isReferenceType()) {\n Diag(OpLoc, diag::err_cannot_form_pointer_to_member_of_reference_type) << dcl->getDeclName() << dcl->getType();"}} | ||
}, | }, | ||
["err_cannot_open_file"]={ | ["err_cannot_open_file"]={ | ||
Line 5,981: | Line 5,981: | ||
[h]=a, | [h]=a, | ||
[d]={"802b77601e50",1268693692,"Introduce a new BufferResult class to act as the return type of"}, | [d]={"802b77601e50",1268693692,"Introduce a new BufferResult class to act as the return type of"}, | ||
[k]={{"clang/lib/Basic/SourceManager.cpp", | [k]={{"clang/lib/Basic/SourceManager.cpp",127,"std::optional<llvm::MemoryBufferRef> ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, SourceLocation Loc) const {\n // If we were unable to open the file, then we are in an inconsistent\n // situation where the content cache referenced a file which no longer\n // exists. Most likely, we were using a stat cache with an invalid entry but\n // the file could also have been removed during processing. Since we can\'t\n // really deal with this situation, just create an empty buffer.\n if (!BufferOrError) {\n if (Diag.isDiagnosticInFlight())\n Diag.SetDelayedDiagnostic(diag::err_cannot_open_file, ContentsEntry->getName(), BufferOrError.getError().message());"},{"clang/lib/Basic/SourceManager.cpp",131,"std::optional<llvm::MemoryBufferRef> ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, SourceLocation Loc) const {\n // If we were unable to open the file, then we are in an inconsistent\n // situation where the content cache referenced a file which no longer\n // exists. Most likely, we were using a stat cache with an invalid entry but\n // the file could also have been removed during processing. Since we can\'t\n // really deal with this situation, just create an empty buffer.\n if (!BufferOrError) {\n if (Diag.isDiagnosticInFlight())\n else\n Diag.Report(Loc, diag::err_cannot_open_file) << ContentsEntry->getName() << BufferOrError.getError().message();"},{"clang/lib/CodeGen/CGCUDANV.cpp",735,"/// Creates a global constructor function for the module:\n///\n/// For CUDA:\n/// \\code\n/// void __cuda_module_ctor() {\n/// Handle = __cudaRegisterFatBinary(GpuBinaryBlob);\n/// __cuda_register_globals(Handle);\n/// }\n/// \\endcode\n///\n/// For HIP:\n/// \\code\n/// void __hip_module_ctor() {\n/// if (__hip_gpubin_handle == 0) {\n/// __hip_gpubin_handle = __hipRegisterFatBinary(GpuBinaryBlob);\n/// __hip_register_globals(__hip_gpubin_handle);\n/// }\n/// }\n/// \\endcode\nllvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() {\n if (!CudaGpuBinaryFileName.empty()) {\n if (std::error_code EC = CudaGpuBinaryOrErr.getError()) {\n CGM.getDiags().Report(diag::err_cannot_open_file) << CudaGpuBinaryFileName << EC.message();"},{"clang/lib/CodeGen/CodeGenAction.cpp",95,"static void reportOptRecordError(Error E, DiagnosticsEngine &Diags, const CodeGenOptions &CodeGenOpts) {\n handleAllErrors(\n std::move(E), [&](const LLVMRemarkSetupFileError &E) { Diags.Report(diag::err_cannot_open_file) << CodeGenOpts.OptRecordFile << E.message(); }, [&](const LLVMRemarkSetupPatternError &E) { Diags.Report(diag::err_drv_optimization_remark_pattern) << E.message() << CodeGenOpts.OptRecordPasses; }, [&](const LLVMRemarkSetupFormatError &E) { Diags.Report(diag::err_drv_optimization_remark_format) << CodeGenOpts.OptRecordFormat; });"},{"clang/lib/CodeGen/CodeGenAction.cpp",1005,"bool CodeGenAction::loadLinkModules(CompilerInstance &CI) {\n for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) {\n if (!BCBuf) {\n CI.getDiagnostics().Report(diag::err_cannot_open_file) << F.Filename << BCBuf.getError().message();"},{"clang/lib/CodeGen/CodeGenAction.cpp",1015,"bool CodeGenAction::loadLinkModules(CompilerInstance &CI) {\n for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) {\n if (!ModuleOrErr) {\n handleAllErrors(ModuleOrErr.takeError(), [&](ErrorInfoBase &EIB) { CI.getDiagnostics().Report(diag::err_cannot_open_file) << F.Filename << EIB.message(); });"},{"clang/lib/CodeGen/CodeGenModule.cpp",7440,"void CodeGenModule::printPostfixForExternalizedDecl(llvm::raw_ostream &OS, const Decl *D) const {\n // If the CUID is not specified we try to generate a unique postfix.\n if (getLangOpts().CUID.empty()) {\n if (auto EC = llvm::sys::fs::getUniqueID(PLoc.getFilename(), ID)) {\n if (auto EC = llvm::sys::fs::getUniqueID(PLoc.getFilename(), ID))\n SM.getDiagnostics().Report(diag::err_cannot_open_file) << PLoc.getFilename() << EC.message();"},{"clang/lib/Lex/HeaderSearch.cpp",432,"OptionalFileEntryRef HeaderSearch::getFileAndSuggestModule(StringRef FileName, SourceLocation IncludeLoc, const DirectoryEntry *Dir, bool IsSystemHeaderDir, Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, bool OpenFile /*=true*/, bool CacheFailures /*=true*/) {\n if (!File) {\n if (EC != llvm::errc::no_such_file_or_directory && EC != llvm::errc::invalid_argument && EC != llvm::errc::is_a_directory && EC != llvm::errc::not_a_directory) {\n Diags.Report(IncludeLoc, diag::err_cannot_open_file) << FileName << EC.message();"},{"clang/unittests/Basic/DiagnosticTest.cpp",45,"// Check that DiagnosticErrorTrap works with SuppressAllDiagnostics.\nTEST(DiagnosticTest, suppressAndTrap) {\n {\n Diags.Report(diag::err_cannot_open_file) << \"file\""},{"clang/unittests/Basic/DiagnosticTest.cpp",70,"// Check that FatalsAsError works as intended\nTEST(DiagnosticTest, fatalsAsError) {\n for (unsigned FatalsAsError = 0; FatalsAsError != 2; ++FatalsAsError) {\n Diags.Report(diag::err_cannot_open_file) << \"file\""},{"clang/unittests/Basic/DiagnosticTest.cpp",117,"TEST(DiagnosticTest, diagnosticError) {\n llvm::Expected<std::pair<int, int>> Value = DiagnosticError::create(SourceLocation(), PartialDiagnostic(diag::err_cannot_open_file, Alloc) << \"file\""},{"clang/unittests/Basic/DiagnosticTest.cpp",126,"TEST(DiagnosticTest, diagnosticError) {\n EXPECT_EQ(ErrDiag->second.getDiagID(), diag::err_cannot_open_file);"}} | ||
}, | }, | ||
["err_cannot_pass_non_trivial_c_struct_to_vararg"]={ | ["err_cannot_pass_non_trivial_c_struct_to_vararg"]={ | ||
Line 5,993: | Line 5,993: | ||
[h]=o, | [h]=o, | ||
[d]={"7275da0f2ee2",1519802155,"[ObjC] Allow declaring __strong pointer fields in structs in Objective-C"}, | [d]={"7275da0f2ee2",1519802155,"[ObjC] Allow declaring __strong pointer fields in structs in Objective-C"}, | ||
[k]={{y, | [k]={{y,1020,"void Sema::checkVariadicArgument(const Expr *E, VariadicCallType CT) {\n case VAK_Invalid:\n if (Ty.isDestructedType() == QualType::DK_nontrivial_c_struct)\n Diag(E->getBeginLoc(), diag::err_cannot_pass_non_trivial_c_struct_to_vararg) << Ty << CT;"}} | ||
}, | }, | ||
["err_cannot_pass_objc_interface_to_vararg"]={ | ["err_cannot_pass_objc_interface_to_vararg"]={ | ||
Line 6,005: | Line 6,005: | ||
[h]=o, | [h]=o, | ||
[d]={"a8a7d0f37161",1239523880,"implement rdar://6780761, making sema reject some code that otherwise"}, | [d]={"a8a7d0f37161",1239523880,"implement rdar://6780761, making sema reject some code that otherwise"}, | ||
[k]={{y, | [k]={{y,1024,"void Sema::checkVariadicArgument(const Expr *E, VariadicCallType CT) {\n case VAK_Invalid:\n if (Ty.isDestructedType() == QualType::DK_nontrivial_c_struct)\n else if (Ty->isObjCObjectType())\n DiagRuntimeBehavior(E->getBeginLoc(), nullptr, PDiag(diag::err_cannot_pass_objc_interface_to_vararg) << Ty << CT);"}} | ||
}, | }, | ||
["err_cannot_pass_objc_interface_to_vararg_format"]={ | ["err_cannot_pass_objc_interface_to_vararg_format"]={ | ||
Line 6,017: | Line 6,017: | ||
[h]=o, | [h]=o, | ||
[d]={"3e0ec58c09eb",1342721423,"For varargs, diagnose passing ObjC objects by value like other non-POD types."}, | [d]={"3e0ec58c09eb",1342721423,"For varargs, diagnose passing ObjC objects by value like other non-POD types."}, | ||
[k]={{s, | [k]={{s,11399,"bool CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, const char *StartSpecifier, unsigned SpecifierLen, const Expr *E) {\n if (Success) {\n } else {\n case Sema::VAK_Invalid:\n if (CallType == Sema::VariadicDoesNotApply)\n else if (ExprTy->isObjCObjectType())\n EmitFormatDiagnostic(S.PDiag(diag::err_cannot_pass_objc_interface_to_vararg_format) << S.getLangOpts().CPlusPlus11 << ExprTy << CallType << AT.getRepresentativeTypeName(S.Context) << CSR << E->getSourceRange(), E->getBeginLoc(), /*IsStringLocation*/ false, CSR);"}} | ||
}, | }, | ||
["err_cannot_pass_to_vararg"]={ | ["err_cannot_pass_to_vararg"]={ | ||
Line 6,029: | Line 6,029: | ||
[h]=o, | [h]=o, | ||
[d]={"d7293d7fcb60",1375728583,"Implement C++\'s restrictions on the type of an expression passed to a vararg"}, | [d]={"d7293d7fcb60",1375728583,"Implement C++\'s restrictions on the type of an expression passed to a vararg"}, | ||
[k]={{y, | [k]={{y,1027,"void Sema::checkVariadicArgument(const Expr *E, VariadicCallType CT) {\n case VAK_Invalid:\n if (Ty.isDestructedType() == QualType::DK_nontrivial_c_struct)\n else if (Ty->isObjCObjectType())\n else\n Diag(E->getBeginLoc(), diag::err_cannot_pass_to_vararg) << isa<InitListExpr>(E) << Ty << CT;"}} | ||
}, | }, | ||
["err_cannot_pass_to_vararg_format"]={ | ["err_cannot_pass_to_vararg_format"]={ | ||
Line 6,041: | Line 6,041: | ||
[h]=o, | [h]=o, | ||
[d]={"d7293d7fcb60",1375728583,"Implement C++\'s restrictions on the type of an expression passed to a vararg"}, | [d]={"d7293d7fcb60",1375728583,"Implement C++\'s restrictions on the type of an expression passed to a vararg"}, | ||
[k]={{s, | [k]={{s,11407,"bool CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, const char *StartSpecifier, unsigned SpecifierLen, const Expr *E) {\n if (Success) {\n } else {\n case Sema::VAK_Invalid:\n if (CallType == Sema::VariadicDoesNotApply)\n else if (ExprTy->isObjCObjectType())\n else\n S.Diag(E->getBeginLoc(), diag::err_cannot_pass_to_vararg_format) << isa<InitListExpr>(E) << ExprTy << CallType << AT.getRepresentativeTypeName(S.Context) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_capture_bad_target"]={ | ["err_capture_bad_target"]={ | ||
Line 6,053: | Line 6,053: | ||
[h]=o, | [h]=o, | ||
[d]={T,1582847864,U}, | [d]={T,1582847864,U}, | ||
[k]={{"clang/lib/Sema/SemaCUDA.cpp", | [k]={{"clang/lib/Sema/SemaCUDA.cpp",883,"// Check the wrong-sided reference capture of lambda for CUDA/HIP.\n// A lambda function may capture a stack variable by reference when it is\n// defined and uses the capture by reference when the lambda is called. When\n// the capture and use happen on different sides, the capture is invalid and\n// should be diagnosed.\nvoid Sema::CUDACheckLambdaCapture(CXXMethodDecl *Callee, const sema::Capture &Capture) {\n if (Capture.isVariableCapture()) {\n SemaDiagnosticBuilder(DiagKind, Capture.getLocation(), diag::err_capture_bad_target, Callee, *this) << Capture.getVariable();"}} | ||
}, | }, | ||
["err_capture_binding_openmp"]={ | ["err_capture_binding_openmp"]={ | ||
Line 6,065: | Line 6,065: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{y, | [k]={{y,19347,"/// Capture the given variable in the lambda.\nstatic bool captureInLambda(LambdaScopeInfo *LSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool RefersToCapturedVariable, const Sema::TryCaptureKind Kind, SourceLocation EllipsisLoc, const bool IsTopScope, Sema &S, bool Invalid) {\n // FIXME: We should support capturing structured bindings in OpenMP.\n if (!Invalid && BD && S.LangOpts.OpenMP) {\n if (BuildAndDiagnose) {\n S.Diag(Loc, diag::err_capture_binding_openmp) << Var;"}} | ||
}, | }, | ||
["err_capture_block_variable"]={ | ["err_capture_block_variable"]={ | ||
Line 6,077: | Line 6,077: | ||
[h]=o, | [h]=o, | ||
[d]={"3b4c30b7e77e",1368127031,"CodeGen for CapturedStmts"}, | [d]={"3b4c30b7e77e",1368127031,"CodeGen for CapturedStmts"}, | ||
[k]={{y, | [k]={{y,19189,"// Certain capturing entities (lambdas, blocks etc.) are not allowed to capture\n// certain types of variables (unnamed, variably modified types etc.)\n// so check for eligibility.\nstatic bool isVariableCapturable(CapturingScopeInfo *CSI, ValueDecl *Var, SourceLocation Loc, const bool Diagnose, Sema &S) {\n // Lambdas and captured statements are not allowed to capture __block\n // variables; they don\'t support the expected semantics.\n if (HasBlocksAttr && (IsLambda || isa<CapturedRegionScopeInfo>(CSI))) {\n if (Diagnose) {\n S.Diag(Loc, diag::err_capture_block_variable) << Var << !IsLambda;"}} | ||
}, | }, | ||
["err_capture_default_first"]={ | ["err_capture_default_first"]={ | ||
Line 6,089: | Line 6,089: | ||
[h]=B, | [h]=B, | ||
[d]={"ee05167cc42b",1594102083,"[OpenMP] Allow traits for the OpenMP context selector `isa`"}, | [d]={"ee05167cc42b",1594102083,"[OpenMP] Allow traits for the OpenMP context selector `isa`"}, | ||
[k]={{"clang/lib/Parse/ParseExprCXX.cpp", | [k]={{"clang/lib/Parse/ParseExprCXX.cpp",945,"/// Parse a lambda introducer.\n/// \\param Intro A LambdaIntroducer filled in with information about the\n/// contents of the lambda-introducer.\n/// \\param Tentative If non-null, we are disambiguating between a\n/// lambda-introducer and some other construct. In this mode, we do not\n/// produce any diagnostics or take any other irreversible action unless\n/// we\'re sure that this is a lambda-expression.\n/// \\return \\c true if parsing (or disambiguation) failed with a diagnostic and\n/// the caller should bail out / recover.\nbool Parser::ParseLambdaIntroducer(LambdaIntroducer &Intro, LambdaIntroducerTentativeParse *Tentative) {\n while (Tok.isNot(tok::r_square)) {\n if (Tok.is(tok::star)) {\n } else if (Tok.is(tok::kw_this)) {\n } else if (Tok.isOneOf(tok::amp, tok::equal) && NextToken().isOneOf(tok::comma, tok::r_square) && Intro.Default == LCD_None) {\n return Invalid([&] { Diag(Tok.getLocation(), diag::err_capture_default_first); });"}} | ||
}, | }, | ||
["err_capture_default_non_local"]={ | ["err_capture_default_non_local"]={ | ||
Line 6,101: | Line 6,101: | ||
[h]=o, | [h]=o, | ||
[d]={"3d584b0ced40",1391723348,"PR18128: a lambda capture-default is not permitted for a non-local lambda"}, | [d]={"3d584b0ced40",1391723348,"PR18128: a lambda capture-default is not permitted for a non-local lambda"}, | ||
[k]={{lb, | [k]={{lb,1247,"void Sema::ActOnLambdaClosureQualifiers(LambdaIntroducer &Intro, SourceLocation MutableLoc) {\n // C++11 [expr.prim.lambda]p9:\n // A lambda-expression whose smallest enclosing scope is a block scope is a\n // local lambda expression; any other lambda expression shall not have a\n // capture-default or simple-capture in its lambda-introducer.\n //\n // For simple-captures, this is covered by the check below that any named\n // entity is a variable that can be captured.\n //\n // For DR1632, we also allow a capture-default in any context where we can\n // odr-use \'this\' (in particular, in a default initializer for a non-static\n // data member).\n if (Intro.Default != LCD_None && !LSI->Lambda->getParent()->isFunctionOrMethod() &&\n Diag(Intro.DefaultLoc, diag::err_capture_default_non_local);"}} | ||
}, | }, | ||
["err_capture_does_not_name_variable"]={ | ["err_capture_does_not_name_variable"]={ | ||
Line 6,113: | Line 6,113: | ||
[h]="Lambda Issue", | [h]="Lambda Issue", | ||
[d]={"44803326d4e8",1325898497,"Lambdas: semantic analysis of explicit captures."}, | [d]={"44803326d4e8",1325898497,"Lambdas: semantic analysis of explicit captures."}, | ||
[k]={{lb, | [k]={{lb,1157,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n // C++11 [expr.prim.lambda]p10:\n // [...] each such lookup shall find a variable with automatic storage\n // duration declared in the reaching scope of the local lambda expression.\n // Note that the \'reaching scope\' check happens in tryCaptureVariable().\n if (!Var) {\n Diag(C->Loc, diag::err_capture_does_not_name_variable) << C->Id;"}} | ||
}, | }, | ||
["err_capture_more_than_once"]={ | ["err_capture_more_than_once"]={ | ||
Line 6,125: | Line 6,125: | ||
[h]="Lambda Issue", | [h]="Lambda Issue", | ||
[d]={"44803326d4e8",1325898497,"Lambdas: semantic analysis of explicit captures."}, | [d]={"44803326d4e8",1325898497,"Lambdas: semantic analysis of explicit captures."}, | ||
[k]={{lb, | [k]={{lb,1029,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n if (C->Kind == LCK_This || C->Kind == LCK_StarThis) {\n // C++11 [expr.prim.lambda]p8:\n // An identifier or this shall not appear more than once in a\n // lambda-capture.\n if (LSI->isCXXThisCaptured()) {\n Diag(C->Loc, diag::err_capture_more_than_once) << \"\'this\'\" << SourceRange(LSI->getCXXThisCapture().getLocation()) << FixItHint::CreateRemoval(SourceRange(getLocForEndOfToken(PrevCaptureLoc), C->Loc));"},{lb,1168,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n // C++11 [expr.prim.lambda]p8:\n // An identifier or this shall not appear more than once in a\n // lambda-capture.\n if (auto [It, Inserted] = CaptureNames.insert(std::pair{C->Id, Var}); !Inserted) {\n if (C->InitKind == LambdaCaptureInitKind::NoInit && !Var->isInitCapture()) {\n Diag(C->Loc, diag::err_capture_more_than_once) << C->Id << It->second->getBeginLoc() << FixItHint::CreateRemoval(SourceRange(getLocForEndOfToken(PrevCaptureLoc), C->Loc));"},{lb,1175,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n // C++11 [expr.prim.lambda]p8:\n // An identifier or this shall not appear more than once in a\n // lambda-capture.\n if (auto [It, Inserted] = CaptureNames.insert(std::pair{C->Id, Var}); !Inserted) {\n if (C->InitKind == LambdaCaptureInitKind::NoInit && !Var->isInitCapture()) {\n } else\n Diag(C->Loc, diag::err_capture_more_than_once) << C->Id;"}} | ||
}, | }, | ||
["err_capture_non_automatic_variable"]={ | ["err_capture_non_automatic_variable"]={ | ||
Line 6,137: | Line 6,137: | ||
[h]="Lambda Issue", | [h]="Lambda Issue", | ||
[d]={"44803326d4e8",1325898497,"Lambdas: semantic analysis of explicit captures."}, | [d]={"44803326d4e8",1325898497,"Lambdas: semantic analysis of explicit captures."}, | ||
[k]={{lb, | [k]={{lb,1186,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n if (!Underlying->hasLocalStorage()) {\n Diag(C->Loc, diag::err_capture_non_automatic_variable) << C->Id;"}} | ||
}, | }, | ||
["err_capture_of_abstract_type"]={ | ["err_capture_of_abstract_type"]={ | ||
Line 6,149: | Line 6,149: | ||
[h]=o, | [h]=o, | ||
[d]={"71fe0e8a832b",1381465521,"Diagnose by-copy captures of abstract classes."}, | [d]={"71fe0e8a832b",1381465521,"Diagnose by-copy captures of abstract classes."}, | ||
[k]={{y, | [k]={{y,19480,"/// Capture the given variable in the lambda.\nstatic bool captureInLambda(LambdaScopeInfo *LSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool RefersToCapturedVariable, const Sema::TryCaptureKind Kind, SourceLocation EllipsisLoc, const bool IsTopScope, Sema &S, bool Invalid) {\n // Compute the type of the field that will capture this variable.\n if (ByRef) {\n } else {\n // Make sure that by-copy captures are of a complete and non-abstract type.\n if (!Invalid && BuildAndDiagnose) {\n else if (S.RequireNonAbstractType(Loc, CaptureType, diag::err_capture_of_abstract_type))"}} | ||
}, | }, | ||
["err_capture_of_incomplete_or_sizeless_type"]={ | ["err_capture_of_incomplete_or_sizeless_type"]={ | ||
Line 6,161: | Line 6,161: | ||
[h]=o, | [h]=o, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{y, | [k]={{y,19411,"/// Capture the given variable in the lambda.\nstatic bool captureInLambda(LambdaScopeInfo *LSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool RefersToCapturedVariable, const Sema::TryCaptureKind Kind, SourceLocation EllipsisLoc, const bool IsTopScope, Sema &S, bool Invalid) {\n // Compute the type of the field that will capture this variable.\n if (ByRef) {\n } else {\n // Make sure that by-copy captures are of a complete and non-abstract type.\n if (!Invalid && BuildAndDiagnose) {\n if (!CaptureType->isDependentType() && S.RequireCompleteSizedType(Loc, CaptureType, diag::err_capture_of_incomplete_or_sizeless_type, Var->getDeclName()))"}} | ||
}, | }, | ||
["err_carries_dependency_missing_on_first_decl"]={ | ["err_carries_dependency_missing_on_first_decl"]={ | ||
Line 6,173: | Line 6,173: | ||
[h]=o, | [h]=o, | ||
[d]={"e233fbfc16fe",1359412965,"Finish semantic analysis for [[carries_dependency]] attribute."}, | [d]={"e233fbfc16fe",1359412965,"Finish semantic analysis for [[carries_dependency]] attribute."}, | ||
[k]={{q, | [k]={{q,3341,"/// mergeParamDeclAttributes - Copy attributes from the old parameter\n/// to the new one.\nstatic void mergeParamDeclAttributes(ParmVarDecl *newDecl, const ParmVarDecl *oldDecl, Sema &S) {\n if (CDA && !oldDecl->hasAttr<CarriesDependencyAttr>()) {\n S.Diag(CDA->getLocation(), diag::err_carries_dependency_missing_on_first_decl) << 1 /*Param*/;"},{q,4055,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n if (getLangOpts().CPlusPlus) {\n if (CDA && !Old->hasAttr<CarriesDependencyAttr>()) {\n Diag(CDA->getLocation(), diag::err_carries_dependency_missing_on_first_decl) << 0 /*Function*/;"}} | ||
}, | }, | ||
["err_carries_dependency_param_not_function_decl"]={ | ["err_carries_dependency_param_not_function_decl"]={ | ||
Line 6,185: | Line 6,185: | ||
[h]=o, | [h]=o, | ||
[d]={"e233fbfc16fe",1359412965,"Finish semantic analysis for [[carries_dependency]] attribute."}, | [d]={"e233fbfc16fe",1359412965,"Finish semantic analysis for [[carries_dependency]] attribute."}, | ||
[k]={{p, | [k]={{p,2322,"static void handleDependencyAttr(Sema &S, Scope *Scope, Decl *D, const ParsedAttr &AL) {\n if (isa<ParmVarDecl>(D)) {\n // [[carries_dependency]] can only be applied to a parameter if it is a\n // parameter of a function declaration or lambda.\n if (!(Scope->getFlags() & clang::Scope::FunctionDeclarationScope)) {\n S.Diag(AL.getLoc(), diag::err_carries_dependency_param_not_function_decl);"}} | ||
}, | }, | ||
["err_case_not_in_switch"]={ | ["err_case_not_in_switch"]={ | ||
Line 6,197: | Line 6,197: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{R, | [k]={{R,521,"StmtResult Sema::ActOnCaseStmt(SourceLocation CaseLoc, ExprResult LHSVal, SourceLocation DotDotDotLoc, ExprResult RHSVal, SourceLocation ColonLoc) {\n if (getCurFunction()->SwitchStack.empty()) {\n Diag(CaseLoc, diag::err_case_not_in_switch);"}} | ||
}, | }, | ||
["err_cast_from_randomized_struct"]={ | ["err_cast_from_randomized_struct"]={ | ||
Line 6,209: | Line 6,209: | ||
[h]=a, | [h]=a, | ||
[d]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | [d]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | ||
[k]={{w, | [k]={{w,3235,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n if (isa<PointerType>(SrcType) && isa<PointerType>(DestType)) {\n if (SrcRD && DestRD && SrcRD->hasAttr<RandomizeLayoutAttr>() && SrcRD != DestRD) {\n Self.Diag(OpRange.getBegin(), diag::err_cast_from_randomized_struct) << SrcType << DestType;"}} | ||
}, | }, | ||
["err_cast_pointer_from_non_pointer_int"]={ | ["err_cast_pointer_from_non_pointer_int"]={ | ||
Line 6,221: | Line 6,221: | ||
[h]=o, | [h]=o, | ||
[d]={"f4e3ad6500ca",1241144638,"PR4013 and PR4105: pointer-like types can only be cast to/from integers "}, | [d]={"f4e3ad6500ca",1241144638,"PR4013 and PR4105: pointer-like types can only be cast to/from integers "}, | ||
[k]={{w, | [k]={{w,3144,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // If either type is a pointer, the other type has to be either an\n // integer or a pointer.\n if (!DestType->isArithmeticType()) {\n if (!SrcType->isIntegralType(Self.Context) && SrcType->isArithmeticType()) {\n Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_cast_pointer_from_non_pointer_int) << SrcType << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_cast_pointer_to_non_pointer_int"]={ | ["err_cast_pointer_to_non_pointer_int"]={ | ||
Line 6,233: | Line 6,233: | ||
[h]=o, | [h]=o, | ||
[d]={"f4e3ad6500ca",1241144638,"PR4013 and PR4105: pointer-like types can only be cast to/from integers "}, | [d]={"f4e3ad6500ca",1241144638,"PR4013 and PR4105: pointer-like types can only be cast to/from integers "}, | ||
[k]={{w, | [k]={{w,3155,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // If either type is a pointer, the other type has to be either an\n // integer or a pointer.\n if (!DestType->isArithmeticType()) {\n } else if (!SrcType->isArithmeticType()) {\n if (!DestType->isIntegralType(Self.Context) && DestType->isArithmeticType()) {\n Self.Diag(SrcExpr.get()->getBeginLoc(), diag::err_cast_pointer_to_non_pointer_int) << DestType << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_cast_selector_expr"]={ | ["err_cast_selector_expr"]={ | ||
Line 6,245: | Line 6,245: | ||
[h]=o, | [h]=o, | ||
[d]={"88fead8c4821",1243028572,"Cannot type cast @selector expressions."}, | [d]={"88fead8c4821",1243028572,"Cannot type cast @selector expressions."}, | ||
[k]={{w, | [k]={{w,3134,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n if (isa<ObjCSelectorExpr>(SrcExpr.get())) {\n Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_cast_selector_expr);"}} | ||
}, | }, | ||
["err_catch_incomplete"]={ | ["err_catch_incomplete"]={ | ||
Line 6,257: | Line 6,257: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,16634,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n unsigned DK = diag::err_catch_incomplete;"}} | ||
}, | }, | ||
["err_catch_incomplete_ptr"]={ | ["err_catch_incomplete_ptr"]={ | ||
Line 6,269: | Line 6,269: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,16638,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n if (const PointerType *Ptr = BaseType->getAs<PointerType>()) {\n DK = diag::err_catch_incomplete_ptr;"}} | ||
}, | }, | ||
["err_catch_incomplete_ref"]={ | ["err_catch_incomplete_ref"]={ | ||
Line 6,281: | Line 6,281: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,16643,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n if (const PointerType *Ptr = BaseType->getAs<PointerType>()) {\n } else if (const ReferenceType *Ref = BaseType->getAs<ReferenceType>()) {\n DK = diag::err_catch_incomplete_ref;"}} | ||
}, | }, | ||
["err_catch_param_not_objc_type"]={ | ["err_catch_param_not_objc_type"]={ | ||
Line 6,293: | Line 6,293: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{I, | [k]={{I,5168,"/// Build a type-check a new Objective-C exception variable declaration.\nVarDecl *Sema::BuildObjCExceptionDecl(TypeSourceInfo *TInfo, QualType T, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid) {\n // An @catch parameter must be an unqualified object pointer type;\n // FIXME: Recover from \"NSObject foo\" by inserting the * in \"NSObject *foo\"?\n if (Invalid) {\n } else if (T->isDependentType()) {\n } else if (T->isObjCQualifiedIdType()) {\n } else if (T->isObjCIdType()) {\n } else if (!T->isObjCObjectPointerType()) {\n Diag(IdLoc, diag::err_catch_param_not_objc_type);"},{I,5171,"/// Build a type-check a new Objective-C exception variable declaration.\nVarDecl *Sema::BuildObjCExceptionDecl(TypeSourceInfo *TInfo, QualType T, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid) {\n // An @catch parameter must be an unqualified object pointer type;\n // FIXME: Recover from \"NSObject foo\" by inserting the * in \"NSObject *foo\"?\n if (Invalid) {\n } else if (T->isDependentType()) {\n } else if (T->isObjCQualifiedIdType()) {\n } else if (T->isObjCIdType()) {\n } else if (!T->isObjCObjectPointerType()) {\n } else if (!T->castAs<ObjCObjectPointerType>()->getInterfaceType()) {\n Diag(IdLoc, diag::err_catch_param_not_objc_type);"}} | ||
}, | }, | ||
["err_catch_rvalue_ref"]={ | ["err_catch_rvalue_ref"]={ | ||
Line 6,305: | Line 6,305: | ||
[h]=o, | [h]=o, | ||
[d]={"b28b40712121",1237765767,"Disallow catching exceptions by rvalue reference."}, | [d]={"b28b40712121",1237765767,"Disallow catching exceptions by rvalue reference."}, | ||
[k]={{v, | [k]={{v,16623,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n // C++ 15.3p1: The exception-declaration shall not denote an incomplete type.\n // The exception-declaration shall not denote a pointer or reference to an\n // incomplete type, other than [cv] void*.\n // N2844 forbids rvalue references.\n if (!ExDeclType->isDependentType() && ExDeclType->isRValueReferenceType()) {\n Diag(Loc, diag::err_catch_rvalue_ref);"}} | ||
}, | }, | ||
["err_catch_sizeless"]={ | ["err_catch_sizeless"]={ | ||
Line 6,317: | Line 6,317: | ||
[h]=o, | [h]=o, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{v, | [k]={{v,16655,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n if (!Invalid && Mode != 1 && BaseType->isSizelessType()) {\n Diag(Loc, diag::err_catch_sizeless) << (Mode == 2 ? 1 : 0) << BaseType;"}} | ||
}, | }, | ||
["err_catch_variably_modified"]={ | ["err_catch_variably_modified"]={ | ||
Line 6,329: | Line 6,329: | ||
[h]=o, | [h]=o, | ||
[d]={"e56d1a0d5000",1465401907,"[Sema] Don\'t permit catching variably modified types"}, | [d]={"e56d1a0d5000",1465401907,"[Sema] Don\'t permit catching variably modified types"}, | ||
[k]={{v, | [k]={{v,16628,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n if (ExDeclType->isVariablyModifiedType()) {\n Diag(Loc, diag::err_catch_variably_modified) << ExDeclType;"}} | ||
}, | }, | ||
["err_category_forward_interface"]={ | ["err_category_forward_interface"]={ | ||
Line 6,341: | Line 6,341: | ||
[h]=o, | [h]=o, | ||
[d]={"4123a86faebb",1321308601,"Use Sema::RequireCompleteType to check for the completeness of"}, | [d]={"4123a86faebb",1321308601,"Use Sema::RequireCompleteType to check for the completeness of"}, | ||
[k]={{I, | [k]={{I,1833,"ObjCCategoryDecl *Sema::ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList) {\n if (!IDecl || RequireCompleteType(ClassLoc, Context.getObjCInterfaceType(IDecl), diag::err_category_forward_interface, CategoryName == nullptr)) {"}} | ||
}, | }, | ||
["err_category_property"]={ | ["err_category_property"]={ | ||
Line 6,353: | Line 6,353: | ||
[h]=o, | [h]=o, | ||
[d]={ub,1480718311,yb}, | [d]={ub,1480718311,yb}, | ||
[k]={{P, | [k]={{P,1134,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n if ((IC = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {\n if (const ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(property->getDeclContext())) {\n if (!CD->IsClassExtension()) {\n Diag(PropertyLoc, diag::err_category_property) << CD->getDeclName();"}} | ||
}, | }, | ||
["err_cc1_round_trip_fail_then_ok"]={ | ["err_cc1_round_trip_fail_then_ok"]={ | ||
Line 6,365: | Line 6,365: | ||
[h]=a, | [h]=a, | ||
[d]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee"}, | [d]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee"}, | ||
[k]={{O, | [k]={{O,727,"#endif\n // Run the first parse on the original arguments with the dummy invocation and\n // diagnostics.\n if (!Parse(DummyInvocation, CommandLineArgs, DummyDiags, Argv0) || DummyDiags.getNumWarnings() != 0) {\n Diags.Report(diag::err_cc1_round_trip_fail_then_ok);"}} | ||
}, | }, | ||
["err_cc1_round_trip_mismatch"]={ | ["err_cc1_round_trip_mismatch"]={ | ||
Line 6,377: | Line 6,377: | ||
[h]=a, | [h]=a, | ||
[d]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee"}, | [d]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee"}, | ||
[k]={{O, | [k]={{O,783,"#endif\n // If we generated different arguments from what we assume are two\n // semantically equivalent CompilerInvocations, the Generate function may\n // be non-deterministic.\n if (!Equal(GeneratedArgs, ComparisonArgs)) {\n Diags.Report(diag::err_cc1_round_trip_mismatch);"}} | ||
}, | }, | ||
["err_cc1_round_trip_ok_then_fail"]={ | ["err_cc1_round_trip_ok_then_fail"]={ | ||
Line 6,389: | Line 6,389: | ||
[h]=a, | [h]=a, | ||
[d]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee"}, | [d]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee"}, | ||
[k]={{O, | [k]={{O,755,"#endif\n // The first parse on original arguments succeeded, but second parse of\n // generated arguments failed. Something must be wrong with the generator.\n if (!Success2) {\n Diags.Report(diag::err_cc1_round_trip_ok_then_fail);"}} | ||
}, | }, | ||
["err_cc1_unbounded_vscale_min"]={ | ["err_cc1_unbounded_vscale_min"]={ | ||
Line 6,401: | Line 6,401: | ||
[h]=a, | [h]=a, | ||
[d]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths."}, | [d]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths."}, | ||
[k]={{O, | [k]={{O,4053,"#include \"clang/Driver/Options.inc\"\n // Error if -mvscale-min is unbounded.\n if (Arg *A = Args.getLastArg(options::OPT_mvscale_min_EQ)) {\n if (StringRef(A->getValue()).getAsInteger(10, VScaleMin) || VScaleMin == 0)\n Diags.Report(diag::err_cc1_unbounded_vscale_min);"}} | ||
}, | }, | ||
["err_cconv_change"]={ | ["err_cconv_change"]={ | ||
Line 6,413: | Line 6,413: | ||
[h]=o, | [h]=o, | ||
[d]={"ab26cfa58de5",1265405516,"Standardize the parsing of function type attributes in a way that"}, | [d]={"ab26cfa58de5",1265405516,"Standardize the parsing of function type attributes in a way that"}, | ||
[k]={{q, | [k]={{q,3809,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n if (OldTypeInfo.getCC() != NewTypeInfo.getCC()) {\n if (!NewCCExplicit) {\n } else if (Old->getBuiltinID()) {\n } else {\n Diag(New->getLocation(), diag::err_cconv_change) << FunctionType::getNameForCallConv(NewTypeInfo.getCC()) << !FirstCCExplicit << (!FirstCCExplicit ? \"\" : FunctionType::getNameForCallConv(FI.getCC()));"}} | ||
}, | }, | ||
["err_cconv_incomplete_param_type"]={ | ["err_cconv_incomplete_param_type"]={ | ||
Line 6,425: | Line 6,425: | ||
[h]=o, | [h]=o, | ||
[d]={"e78333a0105d",1560207192,"Require stdcall etc parameters to be complete on ODR use"}, | [d]={"e78333a0105d",1560207192,"Require stdcall etc parameters to be complete on ODR use"}, | ||
[k]={{y, | [k]={{y,19011,"/// Require that all of the parameter types of function be complete. Normally,\n/// parameter types are only required to be complete when a function is called\n/// or defined, but to mangle functions with certain calling conventions, the\n/// mangler needs to know the size of the parameter list. In this situation,\n/// MSVC doesn\'t emit an error or instantiate templates. Instead, MSVC mangles\n/// the function as _foo@0, i.e. zero bytes of parameters, which will usually\n/// result in a linker error. Clang doesn\'t implement this behavior, and instead\n/// attempts to error at compile time.\nstatic void CheckCompleteParameterTypesForMangler(Sema &S, FunctionDecl *FD, SourceLocation Loc) {\n class ParamIncompleteTypeDiagnoser : public Sema::TypeDiagnoser {\n void diagnose(Sema &S, SourceLocation Loc, QualType T) override {\n S.Diag(Loc, diag::err_cconv_incomplete_param_type) << Param->getDeclName() << FD->getDeclName() << CCName;"}} | ||
}, | }, | ||
["err_cconv_knr"]={ | ["err_cconv_knr"]={ | ||
Line 6,437: | Line 6,437: | ||
[h]=o, | [h]=o, | ||
[d]={"4976fd4ea971",1257305769,"Diagnose the use of \'fastcall\' on functions without prototypes or with"}, | [d]={"4976fd4ea971",1257305769,"Diagnose the use of \'fastcall\' on functions without prototypes or with"}, | ||
[k]={{q, | [k]={{q,10321,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (!getLangOpts().CPlusPlus) {\n if (isa<FunctionNoProtoType>(FT) && !D.isFunctionDefinition()) {\n if (!supportsVariadicCall(CC)) {\n int DiagID = CC == CC_X86StdCall ? diag::warn_cconv_knr : diag::err_cconv_knr;"}} | ||
}, | }, | ||
["err_cconv_varargs"]={ | ["err_cconv_varargs"]={ | ||
Line 6,449: | Line 6,449: | ||
[h]=o, | [h]=o, | ||
[d]={"4976fd4ea971",1257305769,"Diagnose the use of \'fastcall\' on functions without prototypes or with"}, | [d]={"4976fd4ea971",1257305769,"Diagnose the use of \'fastcall\' on functions without prototypes or with"}, | ||
[k]={{r, | [k]={{r,7999,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // Diagnose use of variadic functions with calling conventions that\n // don\'t support them (e.g. because they\'re callee-cleanup).\n // We delay warning about this on unprototyped function declarations\n // until after redeclaration checking, just in case we pick up a\n // prototype that way. And apparently we also \"delay\" warning about\n // unprototyped function types in general, despite not necessarily having\n // much ability to diagnose it later.\n if (!supportsVariadicCall(CC)) {\n if (FnP && FnP->isVariadic()) {\n return S.Diag(attr.getLoc(), diag::err_cconv_varargs) << FunctionType::getNameForCallConv(CC);"}} | ||
}, | }, | ||
["err_cfstring_literal_not_string_constant"]={ | ["err_cfstring_literal_not_string_constant"]={ | ||
Line 6,461: | Line 6,461: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{s, | [k]={{s,7978,"/// CheckObjCString - Checks that the argument to the builtin\n/// CFString constructor is correct\n/// Note: It might also make sense to do the UTF-16 conversion here (would\n/// simplify the backend).\nbool Sema::CheckObjCString(Expr *Arg) {\n if (!Literal || !Literal->isOrdinary()) {\n Diag(Arg->getBeginLoc(), diag::err_cfstring_literal_not_string_constant) << Arg->getSourceRange();"},{G,56,"ExprResult Sema::ParseObjCStringLiteral(SourceLocation *AtLocs, ArrayRef<Expr *> Strings) {\n // If we have a multi-part string, merge it all together.\n if (Strings.size() != 1) {\n for (Expr *E : Strings) {\n // ObjC strings can\'t be wide or UTF.\n if (!S->isOrdinary()) {\n Diag(S->getBeginLoc(), diag::err_cfstring_literal_not_string_constant) << S->getSourceRange();"}} | ||
}, | }, | ||
["err_character_not_allowed"]={ | ["err_character_not_allowed"]={ | ||
Line 6,473: | Line 6,473: | ||
[h]=gb, | [h]=gb, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{zb, | [k]={{zb,1691,"static void diagnoseInvalidUnicodeCodepointInIdentifier(DiagnosticsEngine &Diags, const LangOptions &LangOpts, uint32_t CodePoint, CharSourceRange Range, bool IsFirst) {\n if (!IsFirst || InvalidOnlyAtStart) {\n } else {\n Diags.Report(Range.getBegin(), diag::err_character_not_allowed) << Range << codepointAsHexString(CodePoint) << FixItHint::CreateRemoval(Range);"}} | ||
}, | }, | ||
["err_character_not_allowed_identifier"]={ | ["err_character_not_allowed_identifier"]={ | ||
Line 6,485: | Line 6,485: | ||
[h]=gb, | [h]=gb, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{zb, | [k]={{zb,1687,"static void diagnoseInvalidUnicodeCodepointInIdentifier(DiagnosticsEngine &Diags, const LangOptions &LangOpts, uint32_t CodePoint, CharSourceRange Range, bool IsFirst) {\n if (!IsFirst || InvalidOnlyAtStart) {\n Diags.Report(Range.getBegin(), diag::err_character_not_allowed_identifier) << Range << codepointAsHexString(CodePoint) << int(InvalidOnlyAtStart) << FixItHint::CreateRemoval(Range);"}} | ||
}, | }, | ||
["err_character_too_large"]={ | ["err_character_too_large"]={ | ||
Line 6,497: | Line 6,497: | ||
[h]=gb, | [h]=gb, | ||
[d]={"8b2b677f390d",1326889624,"Improves support for Unicode in character literals"}, | [d]={"8b2b677f390d",1326889624,"Improves support for Unicode in character literals"}, | ||
[k]={{"clang/lib/Lex/LiteralSupport.cpp", | [k]={{"clang/lib/Lex/LiteralSupport.cpp",1761,"/// \\verbatim\n/// user-defined-character-literal: [C++11 lex.ext]\n/// character-literal ud-suffix\n/// ud-suffix:\n/// identifier\n/// character-literal: [C++11 lex.ccon]\n/// \' c-char-sequence \'\n/// u\' c-char-sequence \'\n/// U\' c-char-sequence \'\n/// L\' c-char-sequence \'\n/// u8\' c-char-sequence \' [C++1z lex.ccon]\n/// c-char-sequence:\n/// c-char\n/// c-char-sequence c-char\n/// c-char:\n/// any member of the source character set except the single-quote \',\n/// backslash \\, or new-line character\n/// escape-sequence\n/// universal-character-name\n/// escape-sequence:\n/// simple-escape-sequence\n/// octal-escape-sequence\n/// hexadecimal-escape-sequence\n/// simple-escape-sequence:\n/// one of \\\' \\\" \\? \\\\ \\a \\b \\f \\n \\r \\t \\v\n/// octal-escape-sequence:\n/// \\ octal-digit\n/// \\ octal-digit octal-digit\n/// \\ octal-digit octal-digit octal-digit\n/// hexadecimal-escape-sequence:\n/// \\x hexadecimal-digit\n/// hexadecimal-escape-sequence hexadecimal-digit\n/// universal-character-name: [C++11 lex.charset]\n/// \\u hex-quad\n/// \\U hex-quad hex-quad\n/// hex-quad:\n/// hex-digit hex-digit hex-digit hex-digit\n/// \\endverbatim\n///\nCharLiteralParser::CharLiteralParser(const char *begin, const char *end, SourceLocation Loc, Preprocessor &PP, tok::TokenKind kind) {\n while (begin != end) {\n // Is this a span of non-escape characters?\n if (begin[0] != \'\\\\\') {\n if (res != llvm::conversionOK) {\n } else {\n for (; tmp_out_start < buffer_begin; ++tmp_out_start) {\n if (*tmp_out_start > largest_character_for_kind) {\n PP.Diag(Loc, diag::err_character_too_large);"},{"clang/lib/Lex/LiteralSupport.cpp",1777,"/// \\verbatim\n/// user-defined-character-literal: [C++11 lex.ext]\n/// character-literal ud-suffix\n/// ud-suffix:\n/// identifier\n/// character-literal: [C++11 lex.ccon]\n/// \' c-char-sequence \'\n/// u\' c-char-sequence \'\n/// U\' c-char-sequence \'\n/// L\' c-char-sequence \'\n/// u8\' c-char-sequence \' [C++1z lex.ccon]\n/// c-char-sequence:\n/// c-char\n/// c-char-sequence c-char\n/// c-char:\n/// any member of the source character set except the single-quote \',\n/// backslash \\, or new-line character\n/// escape-sequence\n/// universal-character-name\n/// escape-sequence:\n/// simple-escape-sequence\n/// octal-escape-sequence\n/// hexadecimal-escape-sequence\n/// simple-escape-sequence:\n/// one of \\\' \\\" \\? \\\\ \\a \\b \\f \\n \\r \\t \\v\n/// octal-escape-sequence:\n/// \\ octal-digit\n/// \\ octal-digit octal-digit\n/// \\ octal-digit octal-digit octal-digit\n/// hexadecimal-escape-sequence:\n/// \\x hexadecimal-digit\n/// hexadecimal-escape-sequence hexadecimal-digit\n/// universal-character-name: [C++11 lex.charset]\n/// \\u hex-quad\n/// \\U hex-quad hex-quad\n/// hex-quad:\n/// hex-digit hex-digit hex-digit hex-digit\n/// \\endverbatim\n///\nCharLiteralParser::CharLiteralParser(const char *begin, const char *end, SourceLocation Loc, Preprocessor &PP, tok::TokenKind kind) {\n while (begin != end) {\n // Is this a Universal Character Name escape?\n if (begin[1] == \'u\' || begin[1] == \'U\' || begin[1] == \'N\') {\n if (!ProcessUCNEscape(TokBegin, begin, end, *buffer_begin, UcnLen, FullSourceLoc(Loc, PP.getSourceManager()), &PP.getDiagnostics(), PP.getLangOpts(), true)) {\n } else if (*buffer_begin > largest_character_for_kind) {\n PP.Diag(Loc, diag::err_character_too_large);"}} | ||
}, | }, | ||
["err_circular_inheritance"]={ | ["err_circular_inheritance"]={ | ||
Line 6,509: | Line 6,509: | ||
[h]=o, | [h]=o, | ||
[d]={"620047011211",1352510297,"Diagnostic circular inheritance involving dependent base classes. We"}, | [d]={"620047011211",1352510297,"Diagnostic circular inheritance involving dependent base classes. We"}, | ||
[k]={{v, | [k]={{v,2685,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n if (BaseType->isDependentType()) {\n // Make sure that we don\'t have circular inheritance among our dependent\n // bases. For non-dependent bases, the check for completeness below handles\n // this.\n if (CXXRecordDecl *BaseDecl = BaseType->getAsCXXRecordDecl()) {\n if (BaseDecl->getCanonicalDecl() == Class->getCanonicalDecl() || ((BaseDecl = BaseDecl->getDefinition()) && findCircularInheritance(Class, BaseDecl))) {\n Diag(BaseLoc, diag::err_circular_inheritance) << BaseType << Context.getTypeDeclType(Class);"}} | ||
}, | }, | ||
["err_class_extension_after_impl"]={ | ["err_class_extension_after_impl"]={ | ||
Line 6,521: | Line 6,521: | ||
[h]=o, | [h]=o, | ||
[d]={"e16cdb407a3f",1270241585,"diagnose declaring class extension after its implementation"}, | [d]={"e16cdb407a3f",1270241585,"diagnose declaring class extension after its implementation"}, | ||
[k]={{I, | [k]={{I,1851,"ObjCCategoryDecl *Sema::ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList) {\n if (!CategoryName && IDecl->getImplementation()) {\n Diag(ClassLoc, diag::err_class_extension_after_impl) << ClassName;"}} | ||
}, | }, | ||
["err_class_marked_final_used_as_base"]={ | ["err_class_marked_final_used_as_base"]={ | ||
Line 6,533: | Line 6,533: | ||
[h]=o, | [h]=o, | ||
[d]={"fc1eef48980e",1295718713,"Mark classes as final or explicit. Diagnose when a class marked \'final\' is used as a base."}, | [d]={"fc1eef48980e",1295718713,"Mark classes as final or explicit. Diagnose when a class marked \'final\' is used as a base."}, | ||
[k]={{v, | [k]={{v,2780,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // C++ [class]p3:\n // If a class is marked final and it appears as a base-type-specifier in\n // base-clause, the program is ill-formed.\n if (FinalAttr *FA = CXXBaseDecl->getAttr<FinalAttr>()) {\n Diag(BaseLoc, diag::err_class_marked_final_used_as_base) << CXXBaseDecl->getDeclName() << FA->isSpelledAsSealed();"}} | ||
}, | }, | ||
["err_class_on_template_template_param"]={ | ["err_class_on_template_template_param"]={ | ||
Line 6,545: | Line 6,545: | ||
[h]=B, | [h]=B, | ||
[d]={"cbd8125a6ad2",1333690003,"Restrict fixit for missing \'class\' in template template parameters."}, | [d]={"cbd8125a6ad2",1333690003,"Restrict fixit for missing \'class\' in template template parameters."}, | ||
[k]={{Hb, | [k]={{Hb,941,"/// ParseTemplateTemplateParameter - Handle the parsing of template\n/// template parameters.\n///\n/// type-parameter: [C++ temp.param]\n/// template-head type-parameter-key ...[opt] identifier[opt]\n/// template-head type-parameter-key identifier[opt] = id-expression\n/// type-parameter-key:\n/// \'class\'\n/// \'typename\' [C++1z]\n/// template-head: [C++2a]\n/// \'template\' \'<\' template-parameter-list \'>\'\n/// requires-clause[opt]\nNamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) {\n // Provide an ExtWarn if the C++1z feature of using \'typename\' here is used.\n // Generate a meaningful error if the user forgot to put class before the\n // identifier, comma, or greater. Provide a fixit if the identifier, comma,\n // or greater appear immediately or after \'struct\'. In the latter case,\n // replace the keyword with \'class\'.\n if (!TryConsumeToken(tok::kw_class)) {\n if (Tok.is(tok::kw_typename)) {\n } else if (Next.isOneOf(tok::identifier, tok::comma, tok::greater, tok::greatergreater, tok::ellipsis)) {\n Diag(Tok.getLocation(), diag::err_class_on_template_template_param) << getLangOpts().CPlusPlus17 << (Replace ? FixItHint::CreateReplacement(Tok.getLocation(), \"class\") : FixItHint::CreateInsertion(Tok.getLocation(), \"class \"));"},{Hb,947,"/// ParseTemplateTemplateParameter - Handle the parsing of template\n/// template parameters.\n///\n/// type-parameter: [C++ temp.param]\n/// template-head type-parameter-key ...[opt] identifier[opt]\n/// template-head type-parameter-key identifier[opt] = id-expression\n/// type-parameter-key:\n/// \'class\'\n/// \'typename\' [C++1z]\n/// template-head: [C++2a]\n/// \'template\' \'<\' template-parameter-list \'>\'\n/// requires-clause[opt]\nNamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) {\n // Provide an ExtWarn if the C++1z feature of using \'typename\' here is used.\n // Generate a meaningful error if the user forgot to put class before the\n // identifier, comma, or greater. Provide a fixit if the identifier, comma,\n // or greater appear immediately or after \'struct\'. In the latter case,\n // replace the keyword with \'class\'.\n if (!TryConsumeToken(tok::kw_class)) {\n if (Tok.is(tok::kw_typename)) {\n } else if (Next.isOneOf(tok::identifier, tok::comma, tok::greater, tok::greatergreater, tok::ellipsis)) {\n } else\n Diag(Tok.getLocation(), diag::err_class_on_template_template_param) << getLangOpts().CPlusPlus17;"}} | ||
}, | }, | ||
["err_class_property_found"]={ | ["err_class_property_found"]={ | ||
Line 6,557: | Line 6,557: | ||
[h]=o, | [h]=o, | ||
[d]={"2b2b1a920087",1467154909,"ObjC Class Property: diagnostics when accessing a class property using instance."}, | [d]={"2b2b1a920087",1467154909,"ObjC Class Property: diagnostics when accessing a class property using instance."}, | ||
[k]={{G, | [k]={{G,2117,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(MemberName, MemberLoc), LookupOrdinaryName, nullptr, nullptr, CCC, CTK_ErrorRecovery, IFace, false, OPT)) {\n if (TypoResult.isIdentifier() && TypoResult.getAsIdentifierInfo() == Member) {\n if (ChosenDecl && isa<ObjCPropertyDecl>(ChosenDecl))\n if (cast<ObjCPropertyDecl>(ChosenDecl)->isClassProperty()) {\n Diag(MemberLoc, diag::err_class_property_found) << MemberName << OPT->getInterfaceDecl()->getName() << FixItHint::CreateReplacement(BaseExpr->getSourceRange(), OPT->getInterfaceDecl()->getName());"}} | ||
}, | }, | ||
["err_class_redeclared_with_different_access"]={ | ["err_class_redeclared_with_different_access"]={ | ||
Line 6,569: | Line 6,569: | ||
[h]=o, | [h]=o, | ||
[d]={"2ed6ceba1d90",1238027057,"Check that the access specifier of a member redeclaration is the same as the original declaration."}, | [d]={"2ed6ceba1d90",1238027057,"Check that the access specifier of a member redeclaration is the same as the original declaration."}, | ||
[k]={{S, | [k]={{S,53,"/// SetMemberAccessSpecifier - Set the access specifier of a member.\n/// Returns true on error (when the previous member decl access specifier\n/// is different from the new member decl access specifier).\nbool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS) {\n // C++ [class.access.spec]p3: When a member is redeclared its access\n // specifier must be same as its initial declaration.\n if (LexicalAS != AS_none && LexicalAS != PrevMemberDecl->getAccess()) {\n Diag(MemberDecl->getLocation(), diag::err_class_redeclared_with_different_access) << MemberDecl << LexicalAS;"}} | ||
}, | }, | ||
["err_class_stub_subclassing_mismatch"]={ | ["err_class_stub_subclassing_mismatch"]={ | ||
Line 6,581: | Line 6,581: | ||
[h]=o, | [h]=o, | ||
[d]={"2c91c3b7af7c",1559189341,"Add the `objc_class_stub` attribute."}, | [d]={"2c91c3b7af7c",1559189341,"Add the `objc_class_stub` attribute."}, | ||
[k]={{I, | [k]={{I,4204,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n } else if (ObjCCategoryImplDecl *CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassDecl)) {\n } else if (const auto *IntfDecl = dyn_cast<ObjCInterfaceDecl>(ClassDecl)) {\n if (IntfDecl->hasAttr<ObjCClassStubAttr>() && !IntfDecl->hasAttr<ObjCSubclassingRestrictedAttr>())\n Diag(IntfDecl->getLocation(), diag::err_class_stub_subclassing_mismatch);"}} | ||
}, | }, | ||
["err_cmse_pi_are_incompatible"]={ | ["err_cmse_pi_are_incompatible"]={ | ||
Line 6,593: | Line 6,593: | ||
[h]=a, | [h]=a, | ||
[d]={tb,1534346725,rb}, | [d]={tb,1534346725,rb}, | ||
[k]={{"clang/lib/Driver/ToolChains/Clang.cpp", | [k]={{"clang/lib/Driver/ToolChains/Clang.cpp",5263,"#endif\n if (Args.hasArg(options::OPT_mcmse) && !Args.hasArg(options::OPT_fallow_unsupported)) {\n if (IsROPI)\n D.Diag(diag::err_cmse_pi_are_incompatible) << IsROPI;"},{"clang/lib/Driver/ToolChains/Clang.cpp",5265,"#endif\n if (Args.hasArg(options::OPT_mcmse) && !Args.hasArg(options::OPT_fallow_unsupported)) {\n if (IsRWPI)\n D.Diag(diag::err_cmse_pi_are_incompatible) << !IsRWPI;"}} | ||
}, | }, | ||
["err_cocoa_naming_owned_rule"]={ | ["err_cocoa_naming_owned_rule"]={ | ||
Line 6,605: | Line 6,605: | ||
[h]=o, | [h]=o, | ||
[d]={"65b13779118c",1389315228,"ObjectiveC. 1) Warn when @dynamic (as well as synthesize) "}, | [d]={"65b13779118c",1389315228,"ObjectiveC. 1) Warn when @dynamic (as well as synthesize) "}, | ||
[k]={{P, | [k]={{P,2275,"void Sema::DiagnoseOwningPropertyGetterSynthesis(const ObjCImplementationDecl *D) {\n for (const auto *PID : D->property_impls()) {\n if (PD && !PD->hasAttr<NSReturnsNotRetainedAttr>() && !PD->isClassProperty()) {\n if (family == OMF_alloc || family == OMF_copy || family == OMF_mutableCopy || family == OMF_new) {\n if (getLangOpts().ObjCAutoRefCount)\n Diag(PD->getLocation(), diag::err_cocoa_naming_owned_rule);"}} | ||
}, | }, | ||
["err_collection_expr_type"]={ | ["err_collection_expr_type"]={ | ||
Line 6,617: | Line 6,617: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{R, | [k]={{R,2231,"ExprResult Sema::CheckObjCForCollectionOperand(SourceLocation forLoc, Expr *collection) {\n if (!pointerType)\n return Diag(forLoc, diag::err_collection_expr_type) << collection->getType() << collection->getSourceRange();"}} | ||
}, | }, | ||
["err_complex_mode_vector_type"]={ | ["err_complex_mode_vector_type"]={ | ||
Line 6,629: | Line 6,629: | ||
[h]=o, | [h]=o, | ||
[d]={"326057d0da96",1434699981,"[ATTRIBUTE] Support base vector types of __attribute__((mode)), patch by Alexey Frolov"}, | [d]={"326057d0da96",1434699981,"[ATTRIBUTE] Support base vector types of __attribute__((mode)), patch by Alexey Frolov"}, | ||
[k]={{p, | [k]={{p,4853,"void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name, bool InInstantiation) {\n if (VectorSize.getBoolValue()) {\n } else if (const auto *OldVT = OldTy->getAs<VectorType>()) {\n // Complex machine mode does not support base vector types.\n if (ComplexMode) {\n Diag(AttrLoc, diag::err_complex_mode_vector_type);"}} | ||
}, | }, | ||
["err_compound_literal_with_address_space"]={ | ["err_compound_literal_with_address_space"]={ | ||
Line 6,641: | Line 6,641: | ||
[h]=o, | [h]=o, | ||
[d]={"7fa8af0abee8",1536175360,"Forbid address spaces on compound literals in local scope."}, | [d]={"7fa8af0abee8",1536175360,"Forbid address spaces on compound literals in local scope."}, | ||
[k]={{y, | [k]={{y,7793,"ExprResult Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr) {\n if (isFileScope) {\n } else if (literalType.getAddressSpace() != LangAS::opencl_private && literalType.getAddressSpace() != LangAS::Default) {\n Diag(LParenLoc, diag::err_compound_literal_with_address_space) << SourceRange(LParenLoc, LiteralExpr->getSourceRange().getEnd());"}} | ||
}, | }, | ||
["err_compound_qualified_function_type"]={ | ["err_compound_qualified_function_type"]={ | ||
Line 6,653: | Line 6,653: | ||
[h]=o, | [h]=o, | ||
[d]={"63168c75333b",1328871911,"PR11684, core issue 1417:"}, | [d]={"63168c75333b",1328871911,"PR11684, core issue 1417:"}, | ||
[k]={{r, | [k]={{r,2133,"/// Check whether the type T is a qualified function type, and if it is,\n/// diagnose that it cannot be contained within the given kind of declarator.\nstatic bool checkQualifiedFunction(Sema &S, QualType T, SourceLocation Loc, QualifiedFunctionKind QFK) {\n S.Diag(Loc, diag::err_compound_qualified_function_type) << QFK << isa<FunctionType>(T.IgnoreParens()) << T << getFunctionQualifiersAsString(FPT);"}} | ||
}, | }, | ||
["err_concept_decls_may_only_appear_in_global_namespace_scope"]={ | ["err_concept_decls_may_only_appear_in_global_namespace_scope"]={ | ||
Line 6,665: | Line 6,665: | ||
[h]=o, | [h]=o, | ||
[d]={"d7aae33a9513",1562793949,"[Concepts] Concept definitions (D40381)"}, | [d]={"d7aae33a9513",1562793949,"[Concepts] Concept definitions (D40381)"}, | ||
[k]={{Cb, | [k]={{Cb,8990,"Decl *Sema::ActOnConceptDefinition(Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr) {\n if (!DC->getRedeclContext()->isFileContext()) {\n Diag(NameLoc, diag::err_concept_decls_may_only_appear_in_global_namespace_scope);"}} | ||
}, | }, | ||
["err_concept_definition_not_identifier"]={ | ["err_concept_definition_not_identifier"]={ | ||
Line 6,677: | Line 6,677: | ||
[h]="Concepts Issue", | [h]="Concepts Issue", | ||
[d]={"d7aae33a9513",1562793949,"[Concepts] Concept definitions (D40381)"}, | [d]={"d7aae33a9513",1562793949,"[Concepts] Concept definitions (D40381)"}, | ||
[k]={{Hb, | [k]={{Hb,417,"/// \\brief Parse a single declaration that declares a concept.\n///\n/// \\param DeclEnd will receive the source location of the last token\n/// within this declaration.\n///\n/// \\returns the new declaration.\nDecl *Parser::ParseConceptDefinition(const ParsedTemplateInfo &TemplateInfo, SourceLocation &DeclEnd) {\n if (SS.isNotEmpty())\n Diag(SS.getBeginLoc(), diag::err_concept_definition_not_identifier);"},{Hb,431,"/// \\brief Parse a single declaration that declares a concept.\n///\n/// \\param DeclEnd will receive the source location of the last token\n/// within this declaration.\n///\n/// \\returns the new declaration.\nDecl *Parser::ParseConceptDefinition(const ParsedTemplateInfo &TemplateInfo, SourceLocation &DeclEnd) {\n if (Result.getKind() != UnqualifiedIdKind::IK_Identifier) {\n Diag(Result.getBeginLoc(), diag::err_concept_definition_not_identifier);"}} | ||
}, | }, | ||
["err_concept_extra_headers"]={ | ["err_concept_extra_headers"]={ | ||
Line 6,689: | Line 6,689: | ||
[h]=o, | [h]=o, | ||
[d]={"936de9d66600",1524624146,"[c++2a] [concepts] Add rudimentary parsing support for template concept declarations"}, | [d]={"936de9d66600",1524624146,"[c++2a] [concepts] Add rudimentary parsing support for template concept declarations"}, | ||
[k]={{Cb, | [k]={{Cb,8995,"Decl *Sema::ActOnConceptDefinition(Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr) {\n if (TemplateParameterLists.size() > 1) {\n Diag(NameLoc, diag::err_concept_extra_headers);"}} | ||
}, | }, | ||
["err_concept_legacy_bool_keyword"]={ | ["err_concept_legacy_bool_keyword"]={ | ||
Line 6,701: | Line 6,701: | ||
[h]="Concepts Issue", | [h]="Concepts Issue", | ||
[d]={"9061928ebbb1",1669659698,"Stop accepting \'bool\' in a concept declaration as an extension."}, | [d]={"9061928ebbb1",1669659698,"Stop accepting \'bool\' in a concept declaration as an extension."}, | ||
[k]={{Hb, | [k]={{Hb,399,"/// \\brief Parse a single declaration that declares a concept.\n///\n/// \\param DeclEnd will receive the source location of the last token\n/// within this declaration.\n///\n/// \\returns the new declaration.\nDecl *Parser::ParseConceptDefinition(const ParsedTemplateInfo &TemplateInfo, SourceLocation &DeclEnd) {\n if (TryConsumeToken(tok::kw_bool, BoolKWLoc))\n Diag(Tok.getLocation(), diag::err_concept_legacy_bool_keyword) << FixItHint::CreateRemoval(SourceLocation(BoolKWLoc));"}} | ||
}, | }, | ||
["err_concept_no_associated_constraints"]={ | ["err_concept_no_associated_constraints"]={ | ||
Line 6,713: | Line 6,713: | ||
[h]=o, | [h]=o, | ||
[d]={"936de9d66600",1524624146,"[c++2a] [concepts] Add rudimentary parsing support for template concept declarations"}, | [d]={"936de9d66600",1524624146,"[c++2a] [concepts] Add rudimentary parsing support for template concept declarations"}, | ||
[k]={{Cb, | [k]={{Cb,9030,"Decl *Sema::ActOnConceptDefinition(Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr) {\n if (NewDecl->hasAssociatedConstraints()) {\n Diag(NameLoc, diag::err_concept_no_associated_constraints);"}} | ||
}, | }, | ||
["err_concept_no_parameters"]={ | ["err_concept_no_parameters"]={ | ||
Line 6,725: | Line 6,725: | ||
[h]=o, | [h]=o, | ||
[d]={"d7aae33a9513",1562793949,"[Concepts] Concept definitions (D40381)"}, | [d]={"d7aae33a9513",1562793949,"[Concepts] Concept definitions (D40381)"}, | ||
[k]={{Cb, | [k]={{Cb,9002,"Decl *Sema::ActOnConceptDefinition(Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr) {\n if (Params->size() == 0) {\n Diag(NameLoc, diag::err_concept_no_parameters);"}} | ||
}, | }, | ||
["err_cond_voidptr_arc"]={ | ["err_cond_voidptr_arc"]={ | ||
Line 6,737: | Line 6,737: | ||
[h]=o, | [h]=o, | ||
[d]={"8a78a58188b7",1330129424,"Improve the diagnostic in ARC mode when a conditional with an Objective-C type and void* is used. <..."}, | [d]={"8a78a58188b7",1330129424,"Improve the diagnostic in ARC mode when a conditional with an Objective-C type and void* is used. <..."}, | ||
[k]={{y, | [k]={{y,9372,"/// FindCompositeObjCPointerType - Helper method to find composite type of\n/// two objective-c pointer types of the two input expressions.\nQualType Sema::FindCompositeObjCPointerType(ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n // Check Objective-C object pointer types and \'void *\'\n if (LHSTy->isVoidPointerType() && RHSTy->isObjCObjectPointerType()) {\n if (getLangOpts().ObjCAutoRefCount) {\n Diag(QuestionLoc, diag::err_cond_voidptr_arc) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{y,9507,"/// FindCompositeObjCPointerType - Helper method to find composite type of\n/// two objective-c pointer types of the two input expressions.\nQualType Sema::FindCompositeObjCPointerType(ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (LHSTy->isObjCObjectPointerType() && RHSTy->isVoidPointerType()) {\n if (getLangOpts().ObjCAutoRefCount) {\n Diag(QuestionLoc, diag::err_cond_voidptr_arc) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_conditional_ambiguous"]={ | ["err_conditional_ambiguous"]={ | ||
Line 6,749: | Line 6,749: | ||
[h]=o, | [h]=o, | ||
[d]={"1a99f441e64c",1239904287,"Fix a crash bug when comparing overload quality of conversion operators with conversion constructors..."}, | [d]={"1a99f441e64c",1239904287,"Fix a crash bug when comparing overload quality of conversion operators with conversion constructors..."}, | ||
[k]={{x, | [k]={{x,6625,"/// Check the operands of ?: under C++ semantics.\n///\n/// See C++ [expr.cond]. Note that LHS is never null, even for the GNU x ?: y\n/// extension. In this case, LHS == Cond. (But they\'re not aliases.)\n///\n/// This function also implements GCC\'s vector extension and the\n/// OpenCL/ext_vector_type extension for conditionals. The vector extensions\n/// permit the use of a?b:c where the type of a is that of a integer vector with\n/// the same number of elements and size as the vectors of b and c. If one of\n/// either b or c is a scalar it is implicitly converted to match the type of\n/// the vector. Otherwise the expression is ill-formed. If both b and c are\n/// scalars, then b and c are checked and converted to the type of a if\n/// possible.\n///\n/// The expressions are evaluated differently for GCC\'s and OpenCL\'s extensions.\n/// For the GCC extension, the ?: operator is evaluated as\n/// (a[0] != 0 ? b[0] : c[0], .. , a[n] != 0 ? b[n] : c[n]).\n/// For the OpenCL extensions, the ?: operator is evaluated as\n/// (most-significant-bit-set(a[0]) ? b[0] : c[0], .. ,\n/// most-significant-bit-set(a[n]) ? b[n] : c[n]).\nQualType Sema::CXXCheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n // C++11 [expr.cond]p3\n // Otherwise, if the second and third operand have different types, and\n // either has (cv) class type [...] an attempt is made to convert each of\n // those operands to the type of the other.\n if (!Context.hasSameType(LTy, RTy) && (LTy->isRecordType() || RTy->isRecordType())) {\n // If both can be converted, [...] the program is ill-formed.\n if (HaveL2R && HaveR2L) {\n Diag(QuestionLoc, diag::err_conditional_ambiguous) << LTy << RTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_conditional_ambiguous_ovl"]={ | ["err_conditional_ambiguous_ovl"]={ | ||
Line 6,761: | Line 6,761: | ||
[h]=o, | [h]=o, | ||
[d]={"1a99f441e64c",1239904287,"Fix a crash bug when comparing overload quality of conversion operators with conversion constructors..."}, | [d]={"1a99f441e64c",1239904287,"Fix a crash bug when comparing overload quality of conversion operators with conversion constructors..."}, | ||
[k]={{x, | [k]={{x,6267,"/// Try to find a common type for two according to C++0x 5.16p5.\n///\n/// This is part of the parameter validation for the ? operator. If either\n/// value operand is a class type, overload resolution is used to find a\n/// conversion to a common type.\nstatic bool FindConditionalOverload(Sema &Self, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n case OR_Ambiguous:\n Self.Diag(QuestionLoc, diag::err_conditional_ambiguous_ovl) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_conditional_vector_cond_result_mismatch"]={ | ["err_conditional_vector_cond_result_mismatch"]={ | ||
Line 6,773: | Line 6,773: | ||
[h]=o, | [h]=o, | ||
[d]={fb,1590001902,eb}, | [d]={fb,1590001902,eb}, | ||
[k]={{x, | [k]={{x,6338,"QualType Sema::CheckVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (LHSVT && RHSVT) {\n if (isa<ExtVectorType>(CondVT) != isa<ExtVectorType>(LHSVT)) {\n Diag(QuestionLoc, diag::err_conditional_vector_cond_result_mismatch) << /*isExtVector*/ isa<ExtVectorType>(CondVT);"}} | ||
}, | }, | ||
["err_conditional_vector_element_size"]={ | ["err_conditional_vector_element_size"]={ | ||
Line 6,785: | Line 6,785: | ||
[h]=o, | [h]=o, | ||
[d]={"e8d2aaf32021",1423031898,"OpenCL: handle ternary operator when the condition is a vector"}, | [d]={"e8d2aaf32021",1423031898,"OpenCL: handle ternary operator when the condition is a vector"}, | ||
[k]={{y, | [k]={{y,8963,"/// Convert scalar operands to a vector that matches the\n/// condition in length.\n///\n/// Used when handling the OpenCL conditional operator where the\n/// condition is a vector while the other operands are scalar.\n///\n/// We first compute the \"result type\" for the scalar operands\n/// according to OpenCL v1.1 s6.3.i. Both operands are then converted\n/// into a vector of that type where the length matches the condition\n/// vector type. s6.11.6 requires that the element types of the result\n/// and the condition must have the same number of bits.\nstatic QualType OpenCLConvertScalarsToVectors(Sema &S, ExprResult &LHS, ExprResult &RHS, QualType CondTy, SourceLocation QuestionLoc) {\n // Ensure that all types have the same number of bits\n if (S.Context.getTypeSize(CV->getElementType()) != S.Context.getTypeSize(ResTy)) {\n S.Diag(QuestionLoc, diag::err_conditional_vector_element_size) << CondTy << OS.str();"},{y,9044,"/// Return false if the vector condition type and the vector\n/// result type are compatible.\n///\n/// OpenCL v1.1 s6.11.6 requires that both vector types have the same\n/// number of elements, and their element types have the same number\n/// of bits.\nstatic bool checkVectorResult(Sema &S, QualType CondTy, QualType VecResTy, SourceLocation QuestionLoc) {\n if (S.Context.getTypeSize(CVE) != S.Context.getTypeSize(RVE)) {\n S.Diag(QuestionLoc, diag::err_conditional_vector_element_size) << CondTy << VecResTy;"},{x,6399,"QualType Sema::CheckVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (Context.getTypeSize(ResultElementTy) != Context.getTypeSize(CondElementTy)) {\n Diag(QuestionLoc, diag::err_conditional_vector_element_size) << CondType << ResultType;"},{x,6482,"QualType Sema::CheckSizelessVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (Context.getTypeSize(ResultElementTy) != Context.getTypeSize(CondElementTy)) {\n Diag(QuestionLoc, diag::err_conditional_vector_element_size) << CondType << ResultType;"}} | ||
}, | }, | ||
["err_conditional_vector_has_void"]={ | ["err_conditional_vector_has_void"]={ | ||
Line 6,797: | Line 6,797: | ||
[h]=o, | [h]=o, | ||
[d]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension."}, | [d]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension."}, | ||
[k]={{x, | [k]={{x,6569,"/// Check the operands of ?: under C++ semantics.\n///\n/// See C++ [expr.cond]. Note that LHS is never null, even for the GNU x ?: y\n/// extension. In this case, LHS == Cond. (But they\'re not aliases.)\n///\n/// This function also implements GCC\'s vector extension and the\n/// OpenCL/ext_vector_type extension for conditionals. The vector extensions\n/// permit the use of a?b:c where the type of a is that of a integer vector with\n/// the same number of elements and size as the vectors of b and c. If one of\n/// either b or c is a scalar it is implicitly converted to match the type of\n/// the vector. Otherwise the expression is ill-formed. If both b and c are\n/// scalars, then b and c are checked and converted to the type of a if\n/// possible.\n///\n/// The expressions are evaluated differently for GCC\'s and OpenCL\'s extensions.\n/// For the GCC extension, the ?: operator is evaluated as\n/// (a[0] != 0 ? b[0] : c[0], .. , a[n] != 0 ? b[n] : c[n]).\n/// For the OpenCL extensions, the ?: operator is evaluated as\n/// (most-significant-bit-set(a[0]) ? b[0] : c[0], .. ,\n/// most-significant-bit-set(a[n]) ? b[n] : c[n]).\nQualType Sema::CXXCheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n if (LVoid || RVoid) {\n // Void expressions aren\'t legal in the vector-conditional expressions.\n if (IsVectorConditional) {\n Diag(DiagLoc.getBegin(), diag::err_conditional_vector_has_void) << DiagLoc << IsThrow;"}} | ||
}, | }, | ||
["err_conditional_vector_mismatched"]={ | ["err_conditional_vector_mismatched"]={ | ||
Line 6,809: | Line 6,809: | ||
[h]=o, | [h]=o, | ||
[d]={fb,1590001902,eb}, | [d]={fb,1590001902,eb}, | ||
[k]={{x, | [k]={{x,6345,"QualType Sema::CheckVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (LHSVT && RHSVT) {\n // If both are vector types, they must be the same type.\n if (!Context.hasSameType(LHSType, RHSType)) {\n Diag(QuestionLoc, diag::err_conditional_vector_mismatched) << LHSType << RHSType;"},{x,6432,"QualType Sema::CheckSizelessVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (LHSBT && RHSBT) {\n // If both are sizeless vector types, they must be the same type.\n if (!Context.hasSameType(LHSType, RHSType)) {\n Diag(QuestionLoc, diag::err_conditional_vector_mismatched) << LHSType << RHSType;"}} | ||
}, | }, | ||
["err_conditional_vector_operand_type"]={ | ["err_conditional_vector_operand_type"]={ | ||
Line 6,821: | Line 6,821: | ||
[h]=o, | [h]=o, | ||
[d]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension."}, | [d]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension."}, | ||
[k]={{x, | [k]={{x,6369,"QualType Sema::CheckVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (LHSVT && RHSVT) {\n } else if (LHSVT || RHSVT) {\n } else {\n if (ResultElementTy->isEnumeralType()) {\n Diag(QuestionLoc, diag::err_conditional_vector_operand_type) << ResultElementTy;"},{x,6455,"QualType Sema::CheckSizelessVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (LHSBT && RHSBT) {\n } else if (LHSBT || RHSBT) {\n } else {\n if (ResultElementTy->isEnumeralType()) {\n Diag(QuestionLoc, diag::err_conditional_vector_operand_type) << ResultElementTy;"}} | ||
}, | }, | ||
["err_conditional_vector_size"]={ | ["err_conditional_vector_size"]={ | ||
Line 6,833: | Line 6,833: | ||
[h]=o, | [h]=o, | ||
[d]={"e8d2aaf32021",1423031898,"OpenCL: handle ternary operator when the condition is a vector"}, | [d]={"e8d2aaf32021",1423031898,"OpenCL: handle ternary operator when the condition is a vector"}, | ||
[k]={{y, | [k]={{y,8990,"/// Return false if the vector condition type and the vector\n/// result type are compatible.\n///\n/// OpenCL v1.1 s6.11.6 requires that both vector types have the same\n/// number of elements, and their element types have the same number\n/// of bits.\nstatic bool checkVectorResult(Sema &S, QualType CondTy, QualType VecResTy, SourceLocation QuestionLoc) {\n if (CV->getNumElements() != RV->getNumElements()) {\n S.Diag(QuestionLoc, diag::err_conditional_vector_size) << CondTy << VecResTy;"},{x,6392,"QualType Sema::CheckVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (ResultElementCount != CondElementCount) {\n Diag(QuestionLoc, diag::err_conditional_vector_size) << CondType << ResultType;"},{x,6475,"QualType Sema::CheckSizelessVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n if (ResultElementCount != CondElementCount) {\n Diag(QuestionLoc, diag::err_conditional_vector_size) << CondType << ResultType;"}} | ||
}, | }, | ||
["err_conditional_void_nonvoid"]={ | ["err_conditional_void_nonvoid"]={ | ||
Line 6,845: | Line 6,845: | ||
[h]=o, | [h]=o, | ||
[d]={"1a99f441e64c",1239904287,"Fix a crash bug when comparing overload quality of conversion operators with conversion constructors..."}, | [d]={"1a99f441e64c",1239904287,"Fix a crash bug when comparing overload quality of conversion operators with conversion constructors..."}, | ||
[k]={{x, | [k]={{x,6589,"/// Check the operands of ?: under C++ semantics.\n///\n/// See C++ [expr.cond]. Note that LHS is never null, even for the GNU x ?: y\n/// extension. In this case, LHS == Cond. (But they\'re not aliases.)\n///\n/// This function also implements GCC\'s vector extension and the\n/// OpenCL/ext_vector_type extension for conditionals. The vector extensions\n/// permit the use of a?b:c where the type of a is that of a integer vector with\n/// the same number of elements and size as the vectors of b and c. If one of\n/// either b or c is a scalar it is implicitly converted to match the type of\n/// the vector. Otherwise the expression is ill-formed. If both b and c are\n/// scalars, then b and c are checked and converted to the type of a if\n/// possible.\n///\n/// The expressions are evaluated differently for GCC\'s and OpenCL\'s extensions.\n/// For the GCC extension, the ?: operator is evaluated as\n/// (a[0] != 0 ? b[0] : c[0], .. , a[n] != 0 ? b[n] : c[n]).\n/// For the OpenCL extensions, the ?: operator is evaluated as\n/// (most-significant-bit-set(a[0]) ? b[0] : c[0], .. ,\n/// most-significant-bit-set(a[n]) ? b[n] : c[n]).\nQualType Sema::CXXCheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n if (LVoid || RVoid) {\n Diag(QuestionLoc, diag::err_conditional_void_nonvoid) << (LVoid ? RTy : LTy) << (LVoid ? 0 : 1) << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_config_scalar_return"]={ | ["err_config_scalar_return"]={ | ||
Line 6,857: | Line 6,857: | ||
[h]=o, | [h]=o, | ||
[d]={"9e2c81f00a0a",1297285472,"AST, Sema, Serialization: keep track of cudaConfigureCall"}, | [d]={"9e2c81f00a0a",1297285472,"AST, Sema, Serialization: keep track of cudaConfigureCall"}, | ||
[k]={{q, | [k]={{q,10667,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (getLangOpts().CUDA) {\n if (II && II->isStr(getCudaConfigureFuncName()) && !NewFD->isInvalidDecl() && NewFD->getDeclContext()->getRedeclContext()->isTranslationUnit()) {\n if (!R->castAs<FunctionType>()->getReturnType()->isScalarType())\n Diag(NewFD->getLocation(), diag::err_config_scalar_return) << getCudaConfigureFuncName();"}} | ||
}, | }, | ||
["err_conflict_marker"]={ | ["err_conflict_marker"]={ | ||
Line 6,869: | Line 6,869: | ||
[h]=gb, | [h]=gb, | ||
[d]={"7c027ee4c272",1260771417,"teach clang to recover gracefully from conflict markers left in source"}, | [d]={"7c027ee4c272",1260771417,"teach clang to recover gracefully from conflict markers left in source"}, | ||
[k]={{zb, | [k]={{zb,3162,"/// IsStartOfConflictMarker - If the specified pointer is the start of a version\n/// control conflict marker like \'<<<<<<<\', recognize it as such, emit an error\n/// and recover nicely. This returns true if it is a conflict marker and false\n/// if not.\nbool Lexer::IsStartOfConflictMarker(const char *CurPtr) {\n // Check to see if there is an ending marker somewhere in the buffer at the\n // start of a line to terminate this conflict marker.\n if (FindConflictEnd(CurPtr, BufferEnd, Kind)) {\n Diag(CurPtr, diag::err_conflict_marker);"}} | ||
}, | }, | ||
["err_conflicting_aliasing_type"]={ | ["err_conflicting_aliasing_type"]={ | ||
Line 6,881: | Line 6,881: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{I, | [k]={{I,1156,"/// ActOnCompatibilityAlias - this action is called after complete parsing of\n/// a \\@compatibility_alias declaration. It sets up the alias relationships.\nDecl *Sema::ActOnCompatibilityAlias(SourceLocation AtLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation) {\n if (ADecl) {\n Diag(AliasLocation, diag::err_conflicting_aliasing_type) << AliasName;"}} | ||
}, | }, | ||
["err_conflicting_aligned_options"]={ | ["err_conflicting_aligned_options"]={ | ||
Line 6,904: | Line 6,904: | ||
[h]=o, | [h]=o, | ||
[d]={"64144eb194c8",1526479037,"Add support for __declspec(code_seg(\"segname\"))"}, | [d]={"64144eb194c8",1526479037,"Add support for __declspec(code_seg(\"segname\"))"}, | ||
[k]={{p, | [k]={{p,3401,"static void handleCodeSegAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (const auto *ExistingAttr = D->getAttr<CodeSegAttr>()) {\n if (!ExistingAttr->isImplicit()) {\n S.Diag(AL.getLoc(), ExistingAttr->getName() == Str ? diag::warn_duplicate_codeseg_attribute : diag::err_conflicting_codeseg_attribute);"}} | ||
}, | }, | ||
["err_conflicting_ivar_bitwidth"]={ | ["err_conflicting_ivar_bitwidth"]={ | ||
Line 6,916: | Line 6,916: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{I, | [k]={{I,2215,"void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **ivars, unsigned numIvars, SourceLocation RBrace) {\n for (; numIvars > 0 && IVI != IVE; ++IVI) {\n // First, make sure the types match.\n if (!Context.hasSameType(ImplIvar->getType(), ClsIvar->getType())) {\n } else if (ImplIvar->isBitField() && ClsIvar->isBitField() && ImplIvar->getBitWidthValue(Context) != ClsIvar->getBitWidthValue(Context)) {\n Diag(ImplIvar->getBitWidth()->getBeginLoc(), diag::err_conflicting_ivar_bitwidth) << ImplIvar->getIdentifier();"}} | ||
}, | }, | ||
["err_conflicting_ivar_name"]={ | ["err_conflicting_ivar_name"]={ | ||
Line 6,928: | Line 6,928: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{I, | [k]={{I,2222,"void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **ivars, unsigned numIvars, SourceLocation RBrace) {\n for (; numIvars > 0 && IVI != IVE; ++IVI) {\n // Make sure the names are identical.\n if (ImplIvar->getIdentifier() != ClsIvar->getIdentifier()) {\n Diag(ImplIvar->getLocation(), diag::err_conflicting_ivar_name) << ImplIvar->getIdentifier() << ClsIvar->getIdentifier();"}} | ||
}, | }, | ||
["err_conflicting_ivar_type"]={ | ["err_conflicting_ivar_type"]={ | ||
Line 6,940: | Line 6,940: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{I, | [k]={{I,2207,"void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **ivars, unsigned numIvars, SourceLocation RBrace) {\n for (; numIvars > 0 && IVI != IVE; ++IVI) {\n // First, make sure the types match.\n if (!Context.hasSameType(ImplIvar->getType(), ClsIvar->getType())) {\n Diag(ImplIvar->getLocation(), diag::err_conflicting_ivar_type) << ImplIvar->getIdentifier() << ImplIvar->getType() << ClsIvar->getType();"}} | ||
}, | }, | ||
["err_conflicting_overriding_cc_attributes"]={ | ["err_conflicting_overriding_cc_attributes"]={ | ||
Line 6,952: | Line 6,952: | ||
[h]=o, | [h]=o, | ||
[d]={"02df2e08720f",1355075141,"Virtual method overrides can no longer have mismatched calling conventions. This fixes PR14339."}, | [d]={"02df2e08720f",1355075141,"Virtual method overrides can no longer have mismatched calling conventions. This fixes PR14339."}, | ||
[k]={{v, | [k]={{v,18013,"bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n Diag(New->getLocation(), diag::err_conflicting_overriding_cc_attributes) << New->getDeclName() << New->getType() << Old->getType();"}} | ||
}, | }, | ||
["err_conflicting_super_class"]={ | ["err_conflicting_super_class"]={ | ||
Line 6,964: | Line 6,964: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{I, | [k]={{I,2039,"ObjCImplementationDecl *Sema::ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &Attrs) {\n if (SuperClassname) {\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n } else {\n if (!SDecl)\n else if (IDecl && !declaresSameEntity(IDecl->getSuperClass(), SDecl)) {\n Diag(SuperClassLoc, diag::err_conflicting_super_class) << SDecl->getDeclName();"}} | ||
}, | }, | ||
["err_conflicting_types"]={ | ["err_conflicting_types"]={ | ||
Line 6,976: | Line 6,976: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,4130,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // C: Function types need to be compatible, not identical. This handles\n // duplicate function decls like \"void f(int); void f(enum X);\" properly.\n if (!getLangOpts().CPlusPlus) {\n // C99 6.7.5.3p15: ...If one type has a parameter type list and the other\n // type is specified by a function definition that contains a (possibly\n // empty) identifier list, both shall agree in the number of parameters\n // and the type of each parameter shall be compatible with the type that\n // results from the application of default argument promotions to the\n // type of the corresponding identifier. ...\n // This cannot be handled by ASTContext::typesAreCompatible() because that\n // doesn\'t know whether the function type is for a definition or not when\n // eventually calling ASTContext::mergeFunctionTypes(). The only situation\n // we need to cover here is that the number of arguments agree as the\n // default argument promotion rules were already checked by\n // ASTContext::typesAreCompatible().\n if (Old->hasPrototype() && !New->hasWrittenPrototype() && NewDeclIsDefn && Old->getNumParams() != New->getNumParams() && !Old->isImplicit()) {\n Diag(New->getLocation(), diag::err_conflicting_types) << New;"},{q,4305,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n Diag(New->getLocation(), diag::err_conflicting_types) << New->getDeclName();"}} | ||
}, | }, | ||
["err_constant_integer_arg_type"]={ | ["err_constant_integer_arg_type"]={ | ||
Line 6,988: | Line 6,988: | ||
[h]=o, | [h]=o, | ||
[d]={"8d0c621ca600",1271471183,"Consolidate most of the integer constant expression builtin requirement"}, | [d]={"8d0c621ca600",1271471183,"Consolidate most of the integer constant expression builtin requirement"}, | ||
[k]={{s, | [k]={{s,8784,"/// SemaBuiltinConstantArg - Handle a check if argument ArgNum of CallExpr\n/// TheCall is a constant expression.\nbool Sema::SemaBuiltinConstantArg(CallExpr *TheCall, int ArgNum, llvm::APSInt &Result) {\n if (!(R = Arg->getIntegerConstantExpr(Context)))\n return Diag(TheCall->getBeginLoc(), diag::err_constant_integer_arg_type) << FDecl->getDeclName() << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_consteval_override"]={ | ["err_consteval_override"]={ | ||
Line 7,000: | Line 7,000: | ||
[h]=o, | [h]=o, | ||
[d]={W,1576908663,V}, | [d]={W,1576908663,V}, | ||
[k]={{v, | [k]={{v,7040,"/// Perform semantic checks on a class definition that has been\n/// completing, introducing implicitly-declared members, checking for\n/// abstract types, etc.\n///\n/// \\param S The scope in which the class was parsed. Null if we didn\'t just\n/// parse a class definition.\n/// \\param Record The completed class.\nvoid Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {\n // Perform checks that can\'t be done until we know all the properties of a\n // member function (whether it\'s defaulted, deleted, virtual, overriding,\n // ...).\n auto CheckCompletedMemberFunction = [&](CXXMethodDecl *MD) {\n if (ReportOverrides(*this, MD->isConsteval() ? diag::err_consteval_override : diag::err_non_consteval_override, MD, [&](const CXXMethodDecl *V) { return MD->isConsteval() != V->isConsteval(); })) {"}} | ||
}, | }, | ||
["err_constexpr_body_invalid_stmt"]={ | ["err_constexpr_body_invalid_stmt"]={ | ||
Line 7,012: | Line 7,012: | ||
[h]=o, | [h]=o, | ||
[d]={ab,1317436288,bb}, | [d]={ab,1317436288,bb}, | ||
[k]={{v, | [k]={{v,1990,"/// Check the given declaration statement is legal within a constexpr function\n/// body. C++11 [dcl.constexpr]p3,p4, and C++1y [dcl.constexpr]p3.\n///\n/// \\return true if the body is OK (maybe only as an extension), false if we\n/// have diagnosed a problem.\nstatic bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl, DeclStmt *DS, SourceLocation &Cxx1yLoc, Sema::CheckConstexprKind Kind) {\n // C++11 [dcl.constexpr]p3 and p4:\n // The definition of a constexpr function(p3) or constructor(p4) [...] shall\n // contain only\n for (const auto *DclIt : DS->decls()) {\n default:\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(DS->getBeginLoc(), diag::err_constexpr_body_invalid_stmt) << isa<CXXConstructorDecl>(Dcl) << Dcl->isConsteval();"},{v,2220,"/// Check the provided statement is allowed in a constexpr function\n/// definition.\nstatic bool CheckConstexprFunctionStmt(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *S, SmallVectorImpl<SourceLocation> &ReturnStmts, SourceLocation &Cxx1yLoc, SourceLocation &Cxx2aLoc, SourceLocation &Cxx2bLoc, Sema::CheckConstexprKind Kind) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(S->getBeginLoc(), diag::err_constexpr_body_invalid_stmt) << isa<CXXConstructorDecl>(Dcl) << Dcl->isConsteval();"}} | ||
}, | }, | ||
["err_constexpr_body_no_return"]={ | ["err_constexpr_body_no_return"]={ | ||
Line 7,024: | Line 7,024: | ||
[h]=o, | [h]=o, | ||
[d]={ab,1317436288,bb}, | [d]={ab,1317436288,bb}, | ||
[k]={{v, | [k]={{v,2379,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n if (const CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Dcl)) {\n } else {\n if (ReturnStmts.empty()) {\n case Sema::CheckConstexprKind::Diagnose:\n SemaRef.Diag(Dcl->getLocation(), OK ? diag::warn_cxx11_compat_constexpr_body_no_return : diag::err_constexpr_body_no_return) << Dcl->isConsteval();"}} | ||
}, | }, | ||
["err_constexpr_dtor"]={ | ["err_constexpr_dtor"]={ | ||
Line 7,036: | Line 7,036: | ||
[h]=o, | [h]=o, | ||
[d]={"a77a0a6bf221",1313442247,"Track in the AST whether a function is constexpr."}, | [d]={"a77a0a6bf221",1313442247,"Track in the AST whether a function is constexpr."}, | ||
[k]={{q, | [k]={{q,9963,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (getLangOpts().CPlusPlus) {\n if (ConstexprKind != ConstexprSpecKind::Unspecified) {\n // C++11 [dcl.constexpr]p3: functions declared constexpr are required to\n // be either constructors or to return a literal type. Therefore,\n // destructors cannot be declared constexpr.\n if (isa<CXXDestructorDecl>(NewFD) && (!getLangOpts().CPlusPlus20 || ConstexprKind == ConstexprSpecKind::Consteval)) {\n Diag(D.getDeclSpec().getConstexprSpecLoc(), diag::err_constexpr_dtor) << static_cast<int>(ConstexprKind);"}} | ||
}, | }, | ||
["err_constexpr_dtor_subobject"]={ | ["err_constexpr_dtor_subobject"]={ | ||
Line 7,048: | Line 7,048: | ||
[h]=o, | [h]=o, | ||
[d]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias))."}, | [d]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias))."}, | ||
[k]={{v, | [k]={{v,1697,"/// Determine whether a destructor cannot be constexpr due to\nstatic bool CheckConstexprDestructorSubobjects(Sema &SemaRef, const CXXDestructorDecl *DD, Sema::CheckConstexprKind Kind) {\n auto Check = [&](SourceLocation Loc, QualType T, const FieldDecl *FD) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(DD->getLocation(), diag::err_constexpr_dtor_subobject) << static_cast<int>(DD->getConstexprKind()) << !FD << (FD ? FD->getDeclName() : DeclarationName()) << T;"}} | ||
}, | }, | ||
["err_constexpr_if_condition_expression_is_not_constant"]={ | ["err_constexpr_if_condition_expression_is_not_constant"]={ | ||
Line 7,060: | Line 7,060: | ||
[h]=o, | [h]=o, | ||
[d]={Lb,1615397021,Kb}, | [d]={Lb,1615397021,Kb}, | ||
[k]={{x, | [k]={{x,4058,"/// CheckCXXBooleanCondition - Returns true if a conversion to bool is invalid.\nExprResult Sema::CheckCXXBooleanCondition(Expr *CondExpr, bool IsConstexpr) {\n E = VerifyIntegerConstantExpression(E.get(), &Cond, diag::err_constexpr_if_condition_expression_is_not_constant);"}} | ||
}, | }, | ||
["err_constexpr_invalid_template_arg"]={ | ["err_constexpr_invalid_template_arg"]={ | ||
Line 7,072: | Line 7,072: | ||
[h]=a, | [h]=a, | ||
[d]={"7b3515880c22",1603602504,"For P0732R2, P1907R1: ensure that template parameter objects don\'t refer"}, | [d]={"7b3515880c22",1603602504,"For P0732R2, P1907R1: ensure that template parameter objects don\'t refer"}, | ||
[k]={{Q, | [k]={{Q,5990,"/// EvaluateConvertedConstantExpression - Evaluate an Expression\n/// That is a converted constant expression\n/// (which was built with BuildConvertedConstantExpression)\nstatic ExprResult EvaluateConvertedConstantExpression(Sema &S, Expr *E, QualType T, APValue &Value, Sema::CCEKind CCE, bool RequireInt, const APValue &PreNarrowingValue) {\n // It\'s not a constant expression. Produce an appropriate diagnostic.\n if (Notes.size() == 1 && Notes[0].second.getDiagID() == diag::note_invalid_subexpr_in_const_expr) {\n } else if (!Notes.empty() && Notes[0].second.getDiagID() == diag::note_constexpr_invalid_template_arg) {\n Notes[0].second.setDiagID(diag::err_constexpr_invalid_template_arg);"}} | ||
}, | }, | ||
["err_constexpr_local_var_non_literal_type"]={ | ["err_constexpr_local_var_non_literal_type"]={ | ||
Line 7,084: | Line 7,084: | ||
[h]=o, | [h]=o, | ||
[d]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | [d]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | ||
[k]={{v, | [k]={{v,1949,"/// Check the given declaration statement is legal within a constexpr function\n/// body. C++11 [dcl.constexpr]p3,p4, and C++1y [dcl.constexpr]p3.\n///\n/// \\return true if the body is OK (maybe only as an extension), false if we\n/// have diagnosed a problem.\nstatic bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl, DeclStmt *DS, SourceLocation &Cxx1yLoc, Sema::CheckConstexprKind Kind) {\n // C++11 [dcl.constexpr]p3 and p4:\n // The definition of a constexpr function(p3) or constructor(p4) [...] shall\n // contain only\n for (const auto *DclIt : DS->decls()) {\n case Decl::Decomposition: {\n if (VD->isThisDeclarationADefinition()) {\n } else if (CheckLiteralType(SemaRef, Kind, VD->getLocation(), VD->getType(), diag::err_constexpr_local_var_non_literal_type, isa<CXXConstructorDecl>(Dcl))) {"}} | ||
}, | }, | ||
["err_constexpr_main"]={ | ["err_constexpr_main"]={ | ||
Line 7,096: | Line 7,096: | ||
[h]=o, | [h]=o, | ||
[d]={"3f333f2edf49",1328335817,"Disallow constexpr main."}, | [d]={"3f333f2edf49",1328335817,"Disallow constexpr main."}, | ||
[k]={{q, | [k]={{q,12090,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n if (FD->isConstexpr()) {\n Diag(DS.getConstexprSpecLoc(), diag::err_constexpr_main) << FD->isConsteval() << FixItHint::CreateRemoval(DS.getConstexprSpecLoc());"}} | ||
}, | }, | ||
["err_constexpr_non_literal_param"]={ | ["err_constexpr_non_literal_param"]={ | ||
Line 7,108: | Line 7,108: | ||
[h]=o, | [h]=o, | ||
[d]={ab,1317436288,bb}, | [d]={ab,1317436288,bb}, | ||
[k]={{v, | [k]={{v,1730,"/// Check whether a function\'s parameter types are all literal types. If so,\n/// return true. If not, produce a suitable diagnostic and return false.\nstatic bool CheckConstexprParameterTypes(Sema &SemaRef, const FunctionDecl *FD, Sema::CheckConstexprKind Kind) {\n for (FunctionProtoType::param_type_iterator i = FT->param_type_begin(), e = FT->param_type_end(); i != e; ++i, ++ArgIndex) {\n if (CheckLiteralType(SemaRef, Kind, ParamLoc, *i, diag::err_constexpr_non_literal_param, ArgIndex + 1, PD->getSourceRange(), isa<CXXConstructorDecl>(FD), FD->isConsteval()))"}} | ||
}, | }, | ||
["err_constexpr_non_literal_return"]={ | ["err_constexpr_non_literal_return"]={ | ||
Line 7,120: | Line 7,120: | ||
[h]=o, | [h]=o, | ||
[d]={ab,1317436288,bb}, | [d]={ab,1317436288,bb}, | ||
[k]={{v, | [k]={{v,1743,"/// Check whether a function\'s return type is a literal type. If so, return\n/// true. If not, produce a suitable diagnostic and return false.\nstatic bool CheckConstexprReturnType(Sema &SemaRef, const FunctionDecl *FD, Sema::CheckConstexprKind Kind) {\n if (CheckLiteralType(SemaRef, Kind, FD->getLocation(), FD->getReturnType(), diag::err_constexpr_non_literal_return, FD->isConsteval()))"}} | ||
}, | }, | ||
["err_constexpr_redecl_mismatch"]={ | ["err_constexpr_redecl_mismatch"]={ | ||
Line 7,132: | Line 7,132: | ||
[h]=o, | [h]=o, | ||
[d]={ab,1317436288,bb}, | [d]={ab,1317436288,bb}, | ||
[k]={{v, | [k]={{v,672,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // C++11 [dcl.constexpr]p1: If any declaration of a function or function\n // template has a constexpr specifier then all its declarations shall\n // contain the constexpr specifier.\n if (New->getConstexprKind() != Old->getConstexprKind()) {\n Diag(New->getLocation(), diag::err_constexpr_redecl_mismatch) << New << static_cast<int>(New->getConstexprKind()) << static_cast<int>(Old->getConstexprKind());"}} | ||
}, | }, | ||
["err_constexpr_return_missing_expr"]={ | ["err_constexpr_return_missing_expr"]={ | ||
Line 7,144: | Line 7,144: | ||
[h]=o, | [h]=o, | ||
[d]={"2887ad35c58d",1418458376,"Sema: Constexpr functions must have return statements which have an expr"}, | [d]={"2887ad35c58d",1418458376,"Sema: Constexpr functions must have return statements which have an expr"}, | ||
[k]={{R, | [k]={{R,4134,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n if (FnRetType->isVoidType()) {\n } else if (!RetValExp && !HasDependentReturnType) {\n if ((FD && FD->isInvalidDecl()) || FnRetType->containsErrors()) {\n } else if (getLangOpts().CPlusPlus11 && FD && FD->isConstexpr()) {\n Diag(ReturnLoc, diag::err_constexpr_return_missing_expr) << FD << FD->isConsteval();"}} | ||
}, | }, | ||
["err_constexpr_static_mem_var_requires_init"]={ | ["err_constexpr_static_mem_var_requires_init"]={ | ||
Line 7,156: | Line 7,156: | ||
[h]=o, | [h]=o, | ||
[d]={"eda3c8469827",1320704177,"constexpr: static data members declared constexpr are required to have an"}, | [d]={"eda3c8469827",1320704177,"constexpr: static data members declared constexpr are required to have an"}, | ||
[k]={{q, | [k]={{q,13686,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // C++11 [class.static.data]p3: A static data member can be declared with\n // the constexpr specifier; if so, its declaration shall specify\n // a brace-or-equal-initializer.\n // C++11 [dcl.constexpr]p1: The constexpr specifier shall be applied only to\n // the definition of a variable [...] or the declaration of a static data\n // member.\n if (Var->isConstexpr() && !Var->isThisDeclarationADefinition() && !Var->isThisDeclarationADemotedDefinition()) {\n if (Var->isStaticDataMember()) {\n // C++1z removes the relevant rule; the in-class declaration is always\n // a definition there.\n if (!getLangOpts().CPlusPlus17 && !Context.getTargetInfo().getCXXABI().isMicrosoft()) {\n Diag(Var->getLocation(), diag::err_constexpr_static_mem_var_requires_init) << Var;"}} | ||
}, | }, | ||
["err_constexpr_tag"]={ | ["err_constexpr_tag"]={ | ||
Line 7,168: | Line 7,168: | ||
[h]=o, | [h]=o, | ||
[d]={"a77a0a6bf221",1313442247,"Track in the AST whether a function is constexpr."}, | [d]={"a77a0a6bf221",1313442247,"Track in the AST whether a function is constexpr."}, | ||
[k]={{q, | [k]={{q,5123,"/// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with\n/// no declarator (e.g. \"struct foo;\") is parsed. It also accepts template\n/// parameters to cope with template friend declarations.\nDecl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord) {\n if (DS.hasConstexprSpecifier()) {\n // C++0x [dcl.constexpr]p1: constexpr can only be applied to declarations\n // and definitions of functions and variables.\n // C++2a [dcl.constexpr]p1: The consteval specifier shall be applied only to\n // the declaration of a function or function template\n if (Tag)\n Diag(DS.getConstexprSpecLoc(), diag::err_constexpr_tag) << GetDiagnosticTypeSpecifierID(DS) << static_cast<int>(DS.getConstexprSpecifier());"}} | ||
}, | }, | ||
["err_constexpr_var_non_literal"]={ | ["err_constexpr_var_non_literal"]={ | ||
Line 7,180: | Line 7,180: | ||
[h]=o, | [h]=o, | ||
[d]={"3607ffee5cca",1329105243,"Update constexpr implementation to match CWG\'s chosen approach for core issues"}, | [d]={"3607ffee5cca",1329105243,"Update constexpr implementation to match CWG\'s chosen approach for core issues"}, | ||
[k]={{q, | [k]={{q,8762,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if (NewVD->isConstexpr() && !T->isDependentType() && RequireLiteralType(NewVD->getLocation(), T, diag::err_constexpr_var_non_literal)) {"}} | ||
}, | }, | ||
["err_constexpr_var_requires_const_destruction"]={ | ["err_constexpr_var_requires_const_destruction"]={ | ||
Line 7,192: | Line 7,192: | ||
[h]=o, | [h]=o, | ||
[d]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias))."}, | [d]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias))."}, | ||
[k]={{v, | [k]={{v,15886,"void Sema::FinalizeVarWithDestructor(VarDecl *VD, const RecordType *Record) {\n // If the destructor is constexpr, check whether the variable has constant\n // destruction now.\n if (Destructor->isConstexpr()) {\n if (!VD->evaluateDestruction(Notes) && VD->isConstexpr() && HasConstantInit) {\n Diag(VD->getLocation(), diag::err_constexpr_var_requires_const_destruction) << VD;"}} | ||
}, | }, | ||
["err_constexpr_var_requires_const_init"]={ | ["err_constexpr_var_requires_const_init"]={ | ||
Line 7,204: | Line 7,204: | ||
[h]=o, | [h]=o, | ||
[d]={"2316cd8b798b",1317323497,"constexpr: semantic checking for constexpr variables."}, | [d]={"2316cd8b798b",1317323497,"constexpr: semantic checking for constexpr variables."}, | ||
[k]={{q, | [k]={{q,13830,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // Provide a specific diagnostic for uninitialized variable\n // definitions with incomplete array type.\n if (Type->isIncompleteArrayType()) {\n if (Var->isConstexpr())\n Diag(Var->getLocation(), diag::err_constexpr_var_requires_const_init) << Var;"},{q,14221,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // Check whether the initializer is sufficiently constant.\n if (getLangOpts().CPlusPlus && !type->isDependentType() && Init && !Init->isValueDependent() && (GlobalStorage || var->isConstexpr() || var->mightBeUsableInConstantExpressions(Context))) {\n if (HasConstInit) {\n } else if (var->isConstexpr()) {\n Diag(DiagLoc, diag::err_constexpr_var_requires_const_init) << var << Init->getSourceRange();"},{E,8530,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n if (!ZeroInitializationFixit.empty()) {\n // The initialization would have succeeded with this fixit. Since the fixit\n // is on the error, we need to build a valid AST in this case, so this isn\'t\n // handled in the Failed() branch above.\n if (!DestType->isRecordType() && VD && VD->isConstexpr()) {\n S.Diag(Kind.getLocation(), diag::err_constexpr_var_requires_const_init) << VD << FixItHint::CreateInsertion(ZeroInitializationFixitLoc, ZeroInitializationFixit);"},{E,9966,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_DefaultInitOfConst:\n if (Entity.getKind() == InitializedEntity::EK_Member && isa<CXXConstructorDecl>(S.CurContext)) {\n } else if (const auto *VD = dyn_cast_if_present<VarDecl>(Entity.getDecl()); VD && VD->isConstexpr()) {\n S.Diag(Kind.getLocation(), diag::err_constexpr_var_requires_const_init) << VD;"}} | ||
}, | }, | ||
["err_constexpr_virtual"]={ | ["err_constexpr_virtual"]={ | ||
Line 7,216: | Line 7,216: | ||
[h]=o, | [h]=o, | ||
[d]={ab,1317436288,bb}, | [d]={ab,1317436288,bb}, | ||
[k]={{v, | [k]={{v,1814,"// Check whether a function declaration satisfies the requirements of a\n// constexpr function definition or a constexpr constructor definition. If so,\n// return true. If not, produce appropriate diagnostics (unless asked not to by\n// Kind) and return false.\n//\n// This implements C++11 [dcl.constexpr]p3,4, as amended by DR1360.\nbool Sema::CheckConstexprFunctionDefinition(const FunctionDecl *NewFD, CheckConstexprKind Kind) {\n if (!isa<CXXConstructorDecl>(NewFD)) {\n if (Method && Method->isVirtual()) {\n if (getLangOpts().CPlusPlus20) {\n } else {\n Diag(Method->getLocation(), diag::err_constexpr_virtual);"}} | ||
}, | }, | ||
["err_constexpr_virtual_base"]={ | ["err_constexpr_virtual_base"]={ | ||
Line 7,228: | Line 7,228: | ||
[h]=o, | [h]=o, | ||
[d]={ab,1317436288,bb}, | [d]={ab,1317436288,bb}, | ||
[k]={{v, | [k]={{v,1789,"// Check whether a function declaration satisfies the requirements of a\n// constexpr function definition or a constexpr constructor definition. If so,\n// return true. If not, produce appropriate diagnostics (unless asked not to by\n// Kind) and return false.\n//\n// This implements C++11 [dcl.constexpr]p3,4, as amended by DR1360.\nbool Sema::CheckConstexprFunctionDefinition(const FunctionDecl *NewFD, CheckConstexprKind Kind) {\n if (MD && MD->isInstance()) {\n if (RD->getNumVBases()) {\n Diag(NewFD->getLocation(), diag::err_constexpr_virtual_base) << isa<CXXConstructorDecl>(NewFD) << getRecordDiagFromTagKind(RD->getTagKind()) << RD->getNumVBases();"}} | ||
}, | }, | ||
["err_constexpr_vla"]={ | ["err_constexpr_vla"]={ | ||
Line 7,240: | Line 7,240: | ||
[h]=o, | [h]=o, | ||
[d]={ab,1317436288,bb}, | [d]={ab,1317436288,bb}, | ||
[k]={{v, | [k]={{v,1890,"/// Check the given declaration statement is legal within a constexpr function\n/// body. C++11 [dcl.constexpr]p3,p4, and C++1y [dcl.constexpr]p3.\n///\n/// \\return true if the body is OK (maybe only as an extension), false if we\n/// have diagnosed a problem.\nstatic bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl, DeclStmt *DS, SourceLocation &Cxx1yLoc, Sema::CheckConstexprKind Kind) {\n // C++11 [dcl.constexpr]p3 and p4:\n // The definition of a constexpr function(p3) or constructor(p4) [...] shall\n // contain only\n for (const auto *DclIt : DS->decls()) {\n case Decl::TypeAlias: {\n if (TN->getUnderlyingType()->isVariablyModifiedType()) {\n // Don\'t allow variably-modified types in constexpr functions.\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(TL.getBeginLoc(), diag::err_constexpr_vla) << TL.getSourceRange() << TL.getType() << isa<CXXConstructorDecl>(Dcl);"}} | ||
}, | }, | ||
["err_constexpr_wrong_decl_kind"]={ | ["err_constexpr_wrong_decl_kind"]={ | ||
Line 7,252: | Line 7,252: | ||
[h]=o, | [h]=o, | ||
[d]={"796ed03b8412",1560502580,"[C++20] add Basic consteval specifier"}, | [d]={"796ed03b8412",1560502580,"[C++20] add Basic consteval specifier"}, | ||
[k]={{q, | [k]={{q,5127,"/// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with\n/// no declarator (e.g. \"struct foo;\") is parsed. It also accepts template\n/// parameters to cope with template friend declarations.\nDecl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord) {\n if (DS.hasConstexprSpecifier()) {\n // C++0x [dcl.constexpr]p1: constexpr can only be applied to declarations\n // and definitions of functions and variables.\n // C++2a [dcl.constexpr]p1: The consteval specifier shall be applied only to\n // the declaration of a function or function template\n if (Tag)\n else\n Diag(DS.getConstexprSpecLoc(), diag::err_constexpr_wrong_decl_kind) << static_cast<int>(DS.getConstexprSpecifier());"},{q,7790,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n case ConstexprSpecKind::Consteval:\n Diag(D.getDeclSpec().getConstexprSpecLoc(), diag::err_constexpr_wrong_decl_kind) << static_cast<int>(D.getDeclSpec().getConstexprSpecifier());"},{q,9181,"static FunctionDecl *CreateNewFunctionDecl(Sema &SemaRef, Declarator &D, DeclContext *DC, QualType &R, TypeSourceInfo *TInfo, StorageClass SC, bool &IsVirtualOkay) {\n if (ConstexprKind == ConstexprSpecKind::Constinit) {\n SemaRef.Diag(D.getDeclSpec().getConstexprSpecLoc(), diag::err_constexpr_wrong_decl_kind) << static_cast<int>(ConstexprKind);"}} | ||
}, | }, | ||
["err_constinit_added_too_late"]={ | ["err_constinit_added_too_late"]={ | ||
Line 7,264: | Line 7,264: | ||
[h]=o, | [h]=o, | ||
[d]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias))."}, | [d]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias))."}, | ||
[k]={{q, | [k]={{q,3172,"static void diagnoseMissingConstinit(Sema &S, const VarDecl *InitDecl, const ConstInitAttr *CIAttr, bool AttrBeforeInit) {\n if (AttrBeforeInit) {\n } else {\n S.Diag(CIAttr->getLocation(), CIAttr->isConstinit() ? diag::err_constinit_added_too_late : diag::warn_require_const_init_added_too_late) << FixItHint::CreateRemoval(SourceRange(CIAttr->getLocation()));"}} | ||
}, | }, | ||
["err_constinit_local_variable"]={ | ["err_constinit_local_variable"]={ | ||
Line 7,276: | Line 7,276: | ||
[h]=o, | [h]=o, | ||
[d]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias))."}, | [d]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias))."}, | ||
[k]={{q, | [k]={{q,7808,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n case ConstexprSpecKind::Constinit:\n if (!NewVD->hasGlobalStorage())\n Diag(D.getDeclSpec().getConstexprSpecLoc(), diag::err_constinit_local_variable);"}} | ||
}, | }, | ||
["err_constrained_non_templated_function"]={ | ["err_constrained_non_templated_function"]={ | ||
Line 7,288: | Line 7,288: | ||
[h]=o, | [h]=o, | ||
[d]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | [d]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | ||
[k]={{q, | [k]={{q,11984,"/// Perform semantic checking of a new function declaration.\n///\n/// Performs semantic analysis of the new function declaration\n/// NewFD. This routine performs all semantic checking that does not\n/// require the actual declarator involved in the declaration, and is\n/// used both for the declaration of functions as they are parsed\n/// (called via ActOnDeclarator) and for the declaration of functions\n/// that have been instantiated via C++ template instantiation (called\n/// via InstantiateDecl).\n///\n/// \\param IsMemberSpecialization whether this new function declaration is\n/// a member specialization (that replaces any definition provided by the\n/// previous declaration).\n///\n/// This sets NewFD->isInvalidDecl() to true if there was an error.\n///\n/// \\returns true if the function declaration is a redeclaration.\nbool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization, bool DeclIsDefn) {\n if (getLangOpts().CPlusPlus) {\n // C++20: dcl.decl.general p4:\n // The optional requires-clause ([temp.pre]) in an init-declarator or\n // member-declarator shall be present only if the declarator declares a\n // templated function ([dcl.fct]).\n if (Expr *TRC = NewFD->getTrailingRequiresClause()) {\n if (!NewFD->getDescribedFunctionTemplate() && // -a template\n Diag(TRC->getBeginLoc(), diag::err_constrained_non_templated_function);"},{lb,1415,"void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, Declarator &ParamInfo, const DeclSpec &DS) {\n // C++20: dcl.decl.general p4:\n // The optional requires-clause ([temp.pre]) in an init-declarator or\n // member-declarator shall be present only if the declarator declares a\n // templated function ([dcl.fct]).\n if (Expr *TRC = Method->getTrailingRequiresClause()) {\n // Note: we only have to check if this is defined in a template entity, OR\n // if we are a template, since the rest don\'t apply. The requires clause\n // applies to the call operator, which we already know is a member function,\n // AND defined.\n if (!Method->getDescribedFunctionTemplate() && !Method->isTemplated()) {\n Diag(TRC->getBeginLoc(), diag::err_constrained_non_templated_function);"}} | ||
}, | }, | ||
["err_constrained_virtual_method"]={ | ["err_constrained_virtual_method"]={ | ||
Line 7,300: | Line 7,300: | ||
[h]=o, | [h]=o, | ||
[d]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension."}, | [d]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension."}, | ||
[k]={{q, | [k]={{q,11948,"/// Perform semantic checking of a new function declaration.\n///\n/// Performs semantic analysis of the new function declaration\n/// NewFD. This routine performs all semantic checking that does not\n/// require the actual declarator involved in the declaration, and is\n/// used both for the declaration of functions as they are parsed\n/// (called via ActOnDeclarator) and for the declaration of functions\n/// that have been instantiated via C++ template instantiation (called\n/// via InstantiateDecl).\n///\n/// \\param IsMemberSpecialization whether this new function declaration is\n/// a member specialization (that replaces any definition provided by the\n/// previous declaration).\n///\n/// This sets NewFD->isInvalidDecl() to true if there was an error.\n///\n/// \\returns true if the function declaration is a redeclaration.\nbool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization, bool DeclIsDefn) {\n if (getLangOpts().CPlusPlus) {\n // Find any virtual functions that this function overrides.\n if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(NewFD)) {\n if (Method->isVirtual() && NewFD->getTrailingRequiresClause())\n Diag(NewFD->getTrailingRequiresClause()->getBeginLoc(), diag::err_constrained_virtual_method);"}} | ||
}, | }, | ||
["err_constraint_depends_on_self"]={ | ["err_constraint_depends_on_self"]={ | ||
Line 7,312: | Line 7,312: | ||
[h]=o, | [h]=o, | ||
[d]={N,1625925174,M}, | [d]={N,1625925174,M}, | ||
[k]={{"clang/lib/Sema/SemaConcept.cpp", | [k]={{"clang/lib/Sema/SemaConcept.cpp",309,"static bool DiagRecursiveConstraintEval(Sema &S, llvm::FoldingSetNodeID &ID, const NamedDecl *Templ, const Expr *E, const MultiLevelTemplateArgumentList &MLTAL) {\n // Note that we have to do this with our own collection, because there are\n // times where a constraint-expression check can cause us to need to evaluate\n // other constriants that are unrelated, such as when evaluating a recovery\n // expression, or when trying to determine the constexpr-ness of special\n // members. Otherwise we could just use the\n // Sema::InstantiatingTemplate::isAlreadyBeingInstantiated function.\n if (S.SatisfactionStackContains(Templ, ID)) {\n S.Diag(E->getExprLoc(), diag::err_constraint_depends_on_self) << const_cast<Expr *>(E) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_constructor_bad_name"]={ | ["err_constructor_bad_name"]={ | ||
Line 7,324: | Line 7,324: | ||
[h]=B, | [h]=B, | ||
[d]={"fb8b7b9a1c52",1381795226,"PR17567: Improve diagnostic for a mistyped constructor name. If we see something"}, | [d]={"fb8b7b9a1c52",1381795226,"PR17567: Improve diagnostic for a mistyped constructor name. If we see something"}, | ||
[k]={{D, | [k]={{D,2877,"/// ParseImplicitInt - This method is called when we have an non-typename\n/// identifier in a declspec (which normally terminates the decl spec) when\n/// the declspec has no type specifier. In this case, the declspec is either\n/// malformed or is \"implicit int\" (in K&R and C89).\n///\n/// This method handles diagnosing this prettily and returns false if the\n/// declspec is done being processed. If it recovers and thinks there may be\n/// other pieces of declspec after it, it returns true.\n///\nbool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC, ParsedAttributes &Attrs) {\n // Determine whether this identifier could plausibly be the name of something\n // being declared (with a missing type).\n if (!isTypeSpecifier(DSC) && (!SS || DSC == DeclSpecContext::DSC_top_level || DSC == DeclSpecContext::DSC_class)) {\n case tok::l_paren: {\n // If we\'re in a context where we could be declaring a constructor,\n // check whether this is a constructor declaration with a bogus name.\n if (DSC == DeclSpecContext::DSC_class || (DSC == DeclSpecContext::DSC_top_level && SS)) {\n if (Actions.isCurrentClassNameTypo(II, SS)) {\n Diag(Loc, diag::err_constructor_bad_name) << Tok.getIdentifierInfo() << II << FixItHint::CreateReplacement(Tok.getLocation(), II->getName());"}} | ||
}, | }, | ||
["err_constructor_byvalue_arg"]={ | ["err_constructor_byvalue_arg"]={ | ||
Line 7,336: | Line 7,336: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{v, | [k]={{v,10792,"/// CheckConstructor - Checks a fully-formed constructor for\n/// well-formedness, issuing any diagnostics required. Returns true if\n/// the constructor declarator is invalid.\nvoid Sema::CheckConstructor(CXXConstructorDecl *Constructor) {\n // C++ [class.copy]p3:\n // A declaration of a constructor for a class X is ill-formed if\n // its first parameter is of type (optionally cv-qualified) X and\n // either there are no other parameters or else all other\n // parameters have default arguments.\n if (!Constructor->isInvalidDecl() && Constructor->hasOneParamOrDefaultArgs() && Constructor->getTemplateSpecializationKind() != TSK_ImplicitInstantiation) {\n if (Context.getCanonicalType(ParamType).getUnqualifiedType() == ClassTy) {\n Diag(ParamLoc, diag::err_constructor_byvalue_arg) << FixItHint::CreateInsertion(ParamLoc, ConstRef);"}} | ||
}, | }, | ||
["err_constructor_cannot_be"]={ | ["err_constructor_cannot_be"]={ | ||
Line 7,348: | Line 7,348: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{v, | [k]={{v,10718,"/// CheckConstructorDeclarator - Called by ActOnDeclarator to check\n/// the well-formedness of the constructor declarator @p D with type @p\n/// R. If there are any errors in the declarator, this routine will\n/// emit diagnostics and set the invalid bit to true. In any case, the type\n/// will be updated to reflect a well-formed type for the constructor and\n/// returned.\nQualType Sema::CheckConstructorDeclarator(Declarator &D, QualType R, StorageClass &SC) {\n // C++ [class.ctor]p3:\n // A constructor shall not be virtual (10.3) or static (9.4). A\n // constructor can be invoked for a const, volatile or const\n // volatile object. A constructor shall not be declared const,\n // volatile, or const volatile (9.3.2).\n if (isVirtual) {\n if (!D.isInvalidType())\n Diag(D.getIdentifierLoc(), diag::err_constructor_cannot_be) << \"virtual\" << SourceRange(D.getDeclSpec().getVirtualSpecLoc()) << SourceRange(D.getIdentifierLoc());"},{v,10725,"/// CheckConstructorDeclarator - Called by ActOnDeclarator to check\n/// the well-formedness of the constructor declarator @p D with type @p\n/// R. If there are any errors in the declarator, this routine will\n/// emit diagnostics and set the invalid bit to true. In any case, the type\n/// will be updated to reflect a well-formed type for the constructor and\n/// returned.\nQualType Sema::CheckConstructorDeclarator(Declarator &D, QualType R, StorageClass &SC) {\n if (SC == SC_Static) {\n if (!D.isInvalidType())\n Diag(D.getIdentifierLoc(), diag::err_constructor_cannot_be) << \"static\" << SourceRange(D.getDeclSpec().getStorageClassSpecLoc()) << SourceRange(D.getIdentifierLoc());"}} | ||
}, | }, | ||
["err_constructor_redeclared"]={ | ["err_constructor_redeclared"]={ | ||
Line 7,360: | Line 7,360: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{q, | [k]={{q,3999,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n if (getLangOpts().CPlusPlus) {\n if (OldMethod && NewMethod) {\n if (!isFriend && NewMethod->getLexicalDeclContext()->isRecord() && !IsClassScopeExplicitSpecialization) {\n // C++ [class.mem]p1:\n // [...] A member shall not be declared twice in the\n // member-specification, except that a nested class or member\n // class template can be declared and then later defined.\n if (!inTemplateInstantiation()) {\n if (isa<CXXConstructorDecl>(OldMethod))\n NewDiag = diag::err_constructor_redeclared;"}} | ||
}, | }, | ||
["err_constructor_return_type"]={ | ["err_constructor_return_type"]={ | ||
Line 7,372: | Line 7,372: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{q, | [k]={{q,9271,"static FunctionDecl *CreateNewFunctionDecl(Sema &SemaRef, Declarator &D, DeclContext *DC, QualType &R, TypeSourceInfo *TInfo, StorageClass SC, bool &IsVirtualOkay) {\n if (Name.getNameKind() == DeclarationName::CXXConstructorName) {\n } else if (Name.getNameKind() == DeclarationName::CXXDestructorName) {\n } else if (Name.getNameKind() == DeclarationName::CXXConversionFunctionName) {\n } else if (Name.getNameKind() == DeclarationName::CXXDeductionGuideName) {\n } else if (DC->isRecord()) {\n // If the name of the function is the same as the name of the record,\n // then this must be an invalid constructor that has a return type.\n // (The parser checks for a return type and makes the declarator a\n // constructor if it has no return type).\n if (Name.getAsIdentifierInfo() && Name.getAsIdentifierInfo() == cast<CXXRecordDecl>(DC)->getIdentifier()) {\n SemaRef.Diag(D.getIdentifierLoc(), diag::err_constructor_return_type) << SourceRange(D.getDeclSpec().getTypeSpecTypeLoc()) << SourceRange(D.getIdentifierLoc());"},{v,10734,"/// CheckConstructorDeclarator - Called by ActOnDeclarator to check\n/// the well-formedness of the constructor declarator @p D with type @p\n/// R. If there are any errors in the declarator, this routine will\n/// emit diagnostics and set the invalid bit to true. In any case, the type\n/// will be updated to reflect a well-formed type for the constructor and\n/// returned.\nQualType Sema::CheckConstructorDeclarator(Declarator &D, QualType R, StorageClass &SC) {\n if (unsigned TypeQuals = D.getDeclSpec().getTypeQualifiers()) {\n diagnoseIgnoredQualifiers(diag::err_constructor_return_type, TypeQuals, SourceLocation(), D.getDeclSpec().getConstSpecLoc(), D.getDeclSpec().getVolatileSpecLoc(), D.getDeclSpec().getRestrictSpecLoc(), D.getDeclSpec().getAtomicSpecLoc());"}} | ||
}, | }, | ||
["err_continuation_class"]={ | ["err_continuation_class"]={ | ||
Line 7,384: | Line 7,384: | ||
[h]=o, | [h]=o, | ||
[d]={A,1236199783,z}, | [d]={A,1236199783,z}, | ||
[k]={{P, | [k]={{P,429,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // We need to look in the @interface to see if the @property was\n // already declared.\n if (!CCPrimary) {\n Diag(CDecl->getLocation(), diag::err_continuation_class);"}} | ||
}, | }, | ||
["err_continue_from_cond_var_init"]={ | ["err_continue_from_cond_var_init"]={ | ||
Line 7,396: | Line 7,396: | ||
[h]=o, | [h]=o, | ||
[d]={fb,1590001902,eb}, | [d]={fb,1590001902,eb}, | ||
[k]={{R, | [k]={{R,3337,"StmtResult Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) {\n if (S->isConditionVarScope()) {\n return StmtError(Diag(ContinueLoc, diag::err_continue_from_cond_var_init));"}} | ||
}, | }, | ||
["err_continue_not_in_loop"]={ | ["err_continue_not_in_loop"]={ | ||
Line 7,408: | Line 7,408: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{R, | [k]={{R,3331,"StmtResult Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) {\n if (!S) {\n return StmtError(Diag(ContinueLoc, diag::err_continue_not_in_loop));"}} | ||
}, | }, | ||
["err_conv_function_not_member"]={ | ["err_conv_function_not_member"]={ | ||
Line 7,420: | Line 7,420: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,9239,"static FunctionDecl *CreateNewFunctionDecl(Sema &SemaRef, Declarator &D, DeclContext *DC, QualType &R, TypeSourceInfo *TInfo, StorageClass SC, bool &IsVirtualOkay) {\n if (Name.getNameKind() == DeclarationName::CXXConstructorName) {\n } else if (Name.getNameKind() == DeclarationName::CXXDestructorName) {\n } else if (Name.getNameKind() == DeclarationName::CXXConversionFunctionName) {\n if (!DC->isRecord()) {\n SemaRef.Diag(D.getIdentifierLoc(), diag::err_conv_function_not_member);"},{v,10990,"/// CheckConversionDeclarator - Called by ActOnDeclarator to check the\n/// well-formednes of the conversion function declarator @p D with\n/// type @p R. If there are any errors in the declarator, this routine\n/// will emit diagnostics and return true. Otherwise, it will return\n/// false. Either way, the type @p R will be updated to reflect a\n/// well-formed type for the conversion operator.\nvoid Sema::CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC) {\n // C++ [class.conv.fct]p1:\n // Neither parameter types nor return type can be specified. The\n // type of a conversion function (8.3.5) is \"function taking no\n // parameter returning conversion-type-id.\"\n if (SC == SC_Static) {\n if (!D.isInvalidType())\n Diag(D.getIdentifierLoc(), diag::err_conv_function_not_member) << SourceRange(D.getDeclSpec().getStorageClassSpecLoc()) << D.getName().getSourceRange();"}} | ||
}, | }, | ||
["err_conv_function_redeclared"]={ | ["err_conv_function_redeclared"]={ | ||
Line 7,432: | Line 7,432: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{q, | [k]={{q,4003,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n if (getLangOpts().CPlusPlus) {\n if (OldMethod && NewMethod) {\n if (!isFriend && NewMethod->getLexicalDeclContext()->isRecord() && !IsClassScopeExplicitSpecialization) {\n // C++ [class.mem]p1:\n // [...] A member shall not be declared twice in the\n // member-specification, except that a nested class or member\n // class template can be declared and then later defined.\n if (!inTemplateInstantiation()) {\n if (isa<CXXConstructorDecl>(OldMethod))\n else if (isa<CXXDestructorDecl>(NewMethod))\n else if (isa<CXXConversionDecl>(NewMethod))\n NewDiag = diag::err_conv_function_redeclared;"}} | ||
}, | }, | ||
["err_conv_function_return_type"]={ | ["err_conv_function_return_type"]={ | ||
Line 7,444: | Line 7,444: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,11011,"/// CheckConversionDeclarator - Called by ActOnDeclarator to check the\n/// well-formednes of the conversion function declarator @p D with\n/// type @p R. If there are any errors in the declarator, this routine\n/// will emit diagnostics and return true. Otherwise, it will return\n/// false. Either way, the type @p R will be updated to reflect a\n/// well-formed type for the conversion operator.\nvoid Sema::CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC) {\n if (DS.hasTypeSpecifier() && !D.isInvalidType()) {\n Diag(D.getIdentifierLoc(), diag::err_conv_function_return_type) << SourceRange(DS.getTypeSpecTypeLoc()) << SourceRange(D.getIdentifierLoc());"}} | ||
}, | }, | ||
["err_conv_function_to_array"]={ | ["err_conv_function_to_array"]={ | ||
Line 7,456: | Line 7,456: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,11120,"/// CheckConversionDeclarator - Called by ActOnDeclarator to check the\n/// well-formednes of the conversion function declarator @p D with\n/// type @p R. If there are any errors in the declarator, this routine\n/// will emit diagnostics and return true. Otherwise, it will return\n/// false. Either way, the type @p R will be updated to reflect a\n/// well-formed type for the conversion operator.\nvoid Sema::CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC) {\n // C++ [class.conv.fct]p4:\n // The conversion-type-id shall not represent a function type nor\n // an array type.\n if (ConvType->isArrayType()) {\n Diag(D.getIdentifierLoc(), diag::err_conv_function_to_array);"}} | ||
}, | }, | ||
["err_conv_function_to_function"]={ | ["err_conv_function_to_function"]={ | ||
Line 7,468: | Line 7,468: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,11124,"/// CheckConversionDeclarator - Called by ActOnDeclarator to check the\n/// well-formednes of the conversion function declarator @p D with\n/// type @p R. If there are any errors in the declarator, this routine\n/// will emit diagnostics and return true. Otherwise, it will return\n/// false. Either way, the type @p R will be updated to reflect a\n/// well-formed type for the conversion operator.\nvoid Sema::CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC) {\n // C++ [class.conv.fct]p4:\n // The conversion-type-id shall not represent a function type nor\n // an array type.\n if (ConvType->isArrayType()) {\n } else if (ConvType->isFunctionType()) {\n Diag(D.getIdentifierLoc(), diag::err_conv_function_to_function);"}} | ||
}, | }, | ||
["err_conv_function_variadic"]={ | ["err_conv_function_variadic"]={ | ||
Line 7,480: | Line 7,480: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,11036,"/// CheckConversionDeclarator - Called by ActOnDeclarator to check the\n/// well-formednes of the conversion function declarator @p D with\n/// type @p R. If there are any errors in the declarator, this routine\n/// will emit diagnostics and return true. Otherwise, it will return\n/// false. Either way, the type @p R will be updated to reflect a\n/// well-formed type for the conversion operator.\nvoid Sema::CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC) {\n // Make sure we don\'t have any parameters.\n if (Proto->getNumParams() > 0) {\n } else if (Proto->isVariadic()) {\n Diag(D.getIdentifierLoc(), diag::err_conv_function_variadic);"}} | ||
}, | }, | ||
["err_conv_function_with_complex_decl"]={ | ["err_conv_function_with_complex_decl"]={ | ||
Line 7,492: | Line 7,492: | ||
[h]=o, | [h]=o, | ||
[d]={"212fa2efb700",1271117071,"Diagnose declarations of conversion functions with declarators other than \'()\'."}, | [d]={"212fa2efb700",1271117071,"Diagnose declarations of conversion functions with declarators other than \'()\'."}, | ||
[k]={{v, | [k]={{v,11021,"/// CheckConversionDeclarator - Called by ActOnDeclarator to check the\n/// well-formednes of the conversion function declarator @p D with\n/// type @p R. If there are any errors in the declarator, this routine\n/// will emit diagnostics and return true. Otherwise, it will return\n/// false. Either way, the type @p R will be updated to reflect a\n/// well-formed type for the conversion operator.\nvoid Sema::CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC) {\n if (DS.hasTypeSpecifier() && !D.isInvalidType()) {\n } else if (DS.getTypeQualifiers() && !D.isInvalidType()) {\n Diag(D.getIdentifierLoc(), diag::err_conv_function_with_complex_decl) << SourceRange(D.getIdentifierLoc()) << 0;"},{v,11084,"/// CheckConversionDeclarator - Called by ActOnDeclarator to check the\n/// well-formednes of the conversion function declarator @p D with\n/// type @p R. If there are any errors in the declarator, this routine\n/// will emit diagnostics and return true. Otherwise, it will return\n/// false. Either way, the type @p R will be updated to reflect a\n/// well-formed type for the conversion operator.\nvoid Sema::CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC) {\n // Diagnose \"&operator bool()\" and other such nonsense. This\n // is actually a gcc extension which we don\'t support.\n if (Proto->getReturnType() != ConvType) {\n auto &&DB = Diag(Loc, diag::err_conv_function_with_complex_decl);"}} | ||
}, | }, | ||
["err_conv_function_with_params"]={ | ["err_conv_function_with_params"]={ | ||
Line 7,504: | Line 7,504: | ||
[h]=o, | [h]=o, | ||
[d]={u,1237025389,t}, | [d]={u,1237025389,t}, | ||
[k]={{v, | [k]={{v,11030,"/// CheckConversionDeclarator - Called by ActOnDeclarator to check the\n/// well-formednes of the conversion function declarator @p D with\n/// type @p R. If there are any errors in the declarator, this routine\n/// will emit diagnostics and return true. Otherwise, it will return\n/// false. Either way, the type @p R will be updated to reflect a\n/// well-formed type for the conversion operator.\nvoid Sema::CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC) {\n // Make sure we don\'t have any parameters.\n if (Proto->getNumParams() > 0) {\n Diag(D.getIdentifierLoc(), diag::err_conv_function_with_params);"}} | ||
}, | }, | ||
["err_convertvector_incompatible_vector"]={ | ["err_convertvector_incompatible_vector"]={ | ||
Line 7,516: | Line 7,516: | ||
[h]=o, | [h]=o, | ||
[d]={"c4d7c82c7f73",1379474985,"Add the intrinsic __builtin_convertvector"}, | [d]={"c4d7c82c7f73",1379474985,"Add the intrinsic __builtin_convertvector"}, | ||
[k]={{s, | [k]={{s,8546,"/// SemaConvertVectorExpr - Handle __builtin_convertvector\nExprResult Sema::SemaConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc) {\n if (!SrcTy->isDependentType() && !DstTy->isDependentType()) {\n if (SrcElts != DstElts)\n return ExprError(Diag(BuiltinLoc, diag::err_convertvector_incompatible_vector) << E->getSourceRange());"}} | ||
} | } | ||
}; | }; |
edits