Bots, Bureaucrats, Interface administrators, smwadministrator, smwcurator, smweditor, Administrators
2,557
edits
Timo.stripf (talk | contribs) (Created page with "local a="prefix"; local b="type"; local c="message"; local d="regex1"; local e="title"; local f="regex2"; local g="regex3"; local h="category"; local i="commit"; local j="source"; local k="groups"; local l="maingroup"; local m="Semantic Issue"; local n="warning: "; local o="Warning"; local p="(?:warning|error|fatal error)\\: "; local q=""; local r="error: "; local s="(?:error|fatal error)\\: "; local t="Error"; local u="pedantic"; local v="defaultactive"; local w="clang/...") |
Timo.stripf (talk | contribs) No edit summary |
||
Line 148: | Line 148: | ||
[h]=m, | [h]=m, | ||
[i]={"62559bd7ce0c",1485984998,"Fix hole in our enforcement of rule requiring \'typename\' prior to a dependent"}, | [i]={"62559bd7ce0c",1485984998,"Fix hole in our enforcement of rule requiring \'typename\' prior to a dependent"}, | ||
[j]={{E, | [j]={{E,4153,"TypeResult Sema::ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, bool IsCtorOrDtorName, bool IsClassName, ImplicitTypenameContext AllowImplicitTypename) {\n if (!IsCtorOrDtorName && !IsClassName && SS.isSet()) {\n // C++ [temp.res]p3:\n // A qualified-id that refers to a type and in which the\n // nested-name-specifier depends on a template-parameter (14.6.2)\n // shall be prefixed by the keyword typename to indicate that the\n // qualified-id denotes a type, forming an\n // elaborated-type-specifier (7.1.5.3).\n if (!LookupCtx && isDependentScopeSpecifier(SS)) {\n // C++2a relaxes some of those restrictions in [temp.res]p5.\n if (AllowImplicitTypename == ImplicitTypenameContext::Yes) {\n } else\n Diag(SS.getBeginLoc(), diag::err_typename_missing_template) << SS.getScopeRep() << TemplateII->getName();"}} | ||
}, | }, | ||
["err_typename_nested_not_found"]={ | ["err_typename_nested_not_found"]={ | ||
Line 160: | Line 160: | ||
[h]=m, | [h]=m, | ||
[i]={"333489bba35d",1238195448,"Initial implementation of parsing, semantic analysis, and template"}, | [i]={"333489bba35d",1238195448,"Initial implementation of parsing, semantic analysis, and template"}, | ||
[j]={{w, | [j]={{w,813,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n if (!SS || (!SS->isSet() && !SS->isInvalid()))\n else if (DeclContext *DC = computeDeclContext(*SS, false))\n Diag(IILoc, IsTemplateName ? diag::err_no_member_template : diag::err_typename_nested_not_found) << II << DC << SS->getRange();"},{E,11058,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::NotFound: {\n DiagID = Ctx ? diag::err_typename_nested_not_found : diag::err_unknown_typename;"}} | ||
}, | }, | ||
["err_typename_nested_not_found_enable_if"]={ | ["err_typename_nested_not_found_enable_if"]={ | ||
Line 172: | Line 172: | ||
[h]=m, | [h]=m, | ||
[i]={"6f8d2c6c9c34",1336540620,"A little tweak to the SFINAE condition reporting. Don\'t say:"}, | [i]={"6f8d2c6c9c34",1336540620,"A little tweak to the SFINAE condition reporting. Don\'t say:"}, | ||
[j]={{Jb, | [j]={{Jb,11263,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n case Sema::TDK_SubstitutionFailure: {\n if (PDiag && PDiag->second.getDiagID() == diag::err_typename_nested_not_found_enable_if) {"},{E,3941,"QualType Sema::CheckTemplateIdType(TemplateName Name, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs) {\n if (TypeAliasTemplateDecl *AliasTemplate = dyn_cast<TypeAliasTemplateDecl>(Template)) {\n if (CanonType.isNull()) {\n // If this was enable_if and we failed to find the nested type\n // within enable_if in a SFINAE context, dig out the specific\n // enable_if condition that failed and present that instead.\n if (isEnableIfAliasTemplate(AliasTemplate)) {\n if (auto DeductionInfo = isSFINAEContext()) {\n if (*DeductionInfo && (*DeductionInfo)->hasSFINAEDiagnostic() && (*DeductionInfo)->peekSFINAEDiagnostic().second.getDiagID() == diag::err_typename_nested_not_found_enable_if && TemplateArgs[0].getArgument().getKind() == TemplateArgument::Expression) {"},{E,11053,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::NotFound: {\n if (Ctx && isEnableIf(QualifierLoc, II, CondRange, Cond)) {\n Diag(CondRange.getBegin(), diag::err_typename_nested_not_found_enable_if) << Ctx << CondRange;"}} | ||
}, | }, | ||
["err_typename_nested_not_found_requirement"]={ | ["err_typename_nested_not_found_requirement"]={ | ||
Line 184: | Line 184: | ||
[h]=m, | [h]=m, | ||
[i]={"00fa10b43f25",1499286014,"Customize the SFINAE diagnostics for enable_if to provide the failed condition."}, | [i]={"00fa10b43f25",1499286014,"Customize the SFINAE diagnostics for enable_if to provide the failed condition."}, | ||
[j]={{Jb, | [j]={{Jb,11273,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n case Sema::TDK_SubstitutionFailure: {\n if (PDiag && PDiag->second.getDiagID() == diag::err_typename_nested_not_found_requirement) {"},{E,3958,"QualType Sema::CheckTemplateIdType(TemplateName Name, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs) {\n if (TypeAliasTemplateDecl *AliasTemplate = dyn_cast<TypeAliasTemplateDecl>(Template)) {\n if (CanonType.isNull()) {\n // If this was enable_if and we failed to find the nested type\n // within enable_if in a SFINAE context, dig out the specific\n // enable_if condition that failed and present that instead.\n if (isEnableIfAliasTemplate(AliasTemplate)) {\n if (auto DeductionInfo = isSFINAEContext()) {\n if (*DeductionInfo && (*DeductionInfo)->hasSFINAEDiagnostic() && (*DeductionInfo)->peekSFINAEDiagnostic().second.getDiagID() == diag::err_typename_nested_not_found_enable_if && TemplateArgs[0].getArgument().getKind() == TemplateArgument::Expression) {\n (*DeductionInfo)->addSFINAEDiagnostic(OldDiag.first, PDiag(diag::err_typename_nested_not_found_requirement) << FailedDescription << FailedCond->getSourceRange());"},{E,11046,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::NotFound: {\n if (Ctx && isEnableIf(QualifierLoc, II, CondRange, Cond)) {\n // If we have a condition, narrow it down to the specific failed\n // condition.\n if (Cond) {\n Diag(FailedCond->getExprLoc(), diag::err_typename_nested_not_found_requirement) << FailedDescription << FailedCond->getSourceRange();"}} | ||
}, | }, | ||
["err_typename_nested_not_type"]={ | ["err_typename_nested_not_type"]={ | ||
Line 196: | Line 196: | ||
[h]=m, | [h]=m, | ||
[i]={"333489bba35d",1238195448,"Initial implementation of parsing, semantic analysis, and template"}, | [i]={"333489bba35d",1238195448,"Initial implementation of parsing, semantic analysis, and template"}, | ||
[j]={{E, | [j]={{E,11145,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::Found:\n DiagID = Ctx ? diag::err_typename_nested_not_type : diag::err_typename_not_type;"},{E,11151,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::FoundOverloaded:\n DiagID = Ctx ? diag::err_typename_nested_not_type : diag::err_typename_not_type;"}} | ||
}, | }, | ||
["err_typename_not_type"]={ | ["err_typename_not_type"]={ | ||
Line 208: | Line 208: | ||
[h]=m, | [h]=m, | ||
[i]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk"}, | [i]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk"}, | ||
[j]={{E, | [j]={{E,11146,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::Found:\n DiagID = Ctx ? diag::err_typename_nested_not_type : diag::err_typename_not_type;"},{E,11152,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::FoundOverloaded:\n DiagID = Ctx ? diag::err_typename_nested_not_type : diag::err_typename_not_type;"}} | ||
}, | }, | ||
["err_typename_refers_to_non_type_template"]={ | ["err_typename_refers_to_non_type_template"]={ | ||
Line 220: | Line 220: | ||
[h]=x, | [h]=x, | ||
[i]={"dce2b62b7006",1238545739,"Parsing, semantic analysis, and template instantiation for typename"}, | [i]={"dce2b62b7006",1238545739,"Parsing, semantic analysis, and template instantiation for typename"}, | ||
[j]={{wb, | [j]={{wb,2017,"/// TryAnnotateTypeOrScopeToken - If the current token position is on a\n/// typename (possibly qualified in C++) or a C++ scope specifier not followed\n/// by a typename, TryAnnotateTypeOrScopeToken will replace one or more tokens\n/// with a single annotation token representing the typename or C++ scope\n/// respectively.\n/// This simplifies handling of C++ scope specifiers and allows efficient\n/// backtracking without the need to re-parse and resolve nested-names and\n/// typenames.\n/// It will mainly be called when we expect to treat identifiers as typenames\n/// (if they are typenames). For example, in C we do not expect identifiers\n/// inside expressions to be treated as typenames so it will not be called\n/// for expressions in C.\n/// The benefit for C/ObjC is that a typename will be annotated and\n/// Actions.getTypeName will not be needed to be called again (e.g. getTypeName\n/// will not be called twice, once to check whether we have a declaration\n/// specifier, and another one to get the actual type inside\n/// ParseDeclarationSpecifiers).\n///\n/// This returns true if an error occurred.\n///\n/// Note that this routine emits an error if you call it with ::new or ::delete\n/// as the current tokens, so only call it in contexts where these are invalid.\nbool Parser::TryAnnotateTypeOrScopeToken(ImplicitTypenameContext AllowImplicitTypename) {\n if (Tok.is(tok::kw_typename)) {\n if (Tok.is(tok::identifier)) {\n } else if (Tok.is(tok::annot_template_id)) {\n if (!TemplateId->mightBeType()) {\n Diag(Tok, diag::err_typename_refers_to_non_type_template) << Tok.getAnnotationRange();"}} | ||
}, | }, | ||
["err_typename_refers_to_using_value_decl"]={ | ["err_typename_refers_to_using_value_decl"]={ | ||
Line 232: | Line 232: | ||
[h]=m, | [h]=m, | ||
[i]={"aed2efbbb54f",1291853187,"A typename specifier can end up referring to a unresolved using"}, | [i]={"aed2efbbb54f",1291853187,"A typename specifier can end up referring to a unresolved using"}, | ||
[j]={{E, | [j]={{E,11068,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::FoundUnresolvedValue: {\n Diag(IILoc, diag::err_typename_refers_to_using_value_decl) << Name << Ctx << FullRange;"}} | ||
}, | }, | ||
["err_typename_requires_specqual"]={ | ["err_typename_requires_specqual"]={ | ||
Line 244: | Line 244: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{F, | [j]={{F,2658,"/// ParseSpecifierQualifierList\n/// specifier-qualifier-list:\n/// type-specifier specifier-qualifier-list[opt]\n/// type-qualifier specifier-qualifier-list[opt]\n/// [GNU] attributes specifier-qualifier-list[opt]\n///\nvoid Parser::ParseSpecifierQualifierList(DeclSpec &DS, ImplicitTypenameContext AllowImplicitTypename, AccessSpecifier AS, DeclSpecContext DSC) {\n if (isTypeSpecifier(DSC) && !DS.hasTypeSpecifier()) {\n } else if (Specs == DeclSpec::PQ_None && !DS.hasAttributes()) {\n Diag(Tok, diag::err_typename_requires_specqual);"}} | ||
}, | }, | ||
["err_ucn_control_character"]={ | ["err_ucn_control_character"]={ | ||
Line 256: | Line 256: | ||
[h]=A, | [h]=A, | ||
[i]={"2a70e65436c7",1331332071,"Improve diagnostics for UCNs referring to control characters and members of the"}, | [i]={"2a70e65436c7",1331332071,"Improve diagnostics for UCNs referring to control characters and members of the"}, | ||
[j]={{Z, | [j]={{Z,3509,"uint32_t Lexer::tryReadUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // C++11 [lex.charset]p2: If the hexadecimal value for a\n // universal-character-name corresponds to a surrogate code point (in the\n // range 0xD800-0xDFFF, inclusive), the program is ill-formed. Additionally,\n // if the hexadecimal value for a universal-character-name outside the\n // c-char-sequence, s-char-sequence, or r-char-sequence of a character or\n // string literal corresponds to a control character (in either of the\n // ranges 0x00-0x1F or 0x7F-0x9F, both inclusive) or to a character in the\n // basic source character set, the program is ill-formed.\n if (CodePoint < 0xA0) {\n // We don\'t use isLexingRawMode() here because we need to warn about bad\n // UCNs even when skipping preprocessing tokens in a #if block.\n if (Result && PP) {\n if (CodePoint < 0x20 || CodePoint >= 0x7F)\n Diag(BufferPtr, diag::err_ucn_control_character);"},{cb,684,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // C2x and C++11 allow UCNs that refer to control characters\n // and basic source characters inside character and string literals\n if (UcnVal < 0xa0 &&\n if (Diags) {\n if (UcnVal >= 0x20 && UcnVal < 0x7f)\n else\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, IsError ? diag::err_ucn_control_character : Features.CPlusPlus ? diag::warn_cxx98_compat_literal_ucn_control_character : diag::warn_c2x_compat_literal_ucn_control_character);"}} | ||
}, | }, | ||
["err_ucn_escape_basic_scs"]={ | ["err_ucn_escape_basic_scs"]={ | ||
Line 268: | Line 268: | ||
[h]=A, | [h]=A, | ||
[i]={"2a70e65436c7",1331332071,"Improve diagnostics for UCNs referring to control characters and members of the"}, | [i]={"2a70e65436c7",1331332071,"Improve diagnostics for UCNs referring to control characters and members of the"}, | ||
[j]={{Z, | [j]={{Z,3512,"uint32_t Lexer::tryReadUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // C++11 [lex.charset]p2: If the hexadecimal value for a\n // universal-character-name corresponds to a surrogate code point (in the\n // range 0xD800-0xDFFF, inclusive), the program is ill-formed. Additionally,\n // if the hexadecimal value for a universal-character-name outside the\n // c-char-sequence, s-char-sequence, or r-char-sequence of a character or\n // string literal corresponds to a control character (in either of the\n // ranges 0x00-0x1F or 0x7F-0x9F, both inclusive) or to a character in the\n // basic source character set, the program is ill-formed.\n if (CodePoint < 0xA0) {\n // We don\'t use isLexingRawMode() here because we need to warn about bad\n // UCNs even when skipping preprocessing tokens in a #if block.\n if (Result && PP) {\n if (CodePoint < 0x20 || CodePoint >= 0x7F)\n else {\n Diag(BufferPtr, diag::err_ucn_escape_basic_scs) << StringRef(&C, 1);"},{cb,677,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // C2x and C++11 allow UCNs that refer to control characters\n // and basic source characters inside character and string literals\n if (UcnVal < 0xa0 &&\n if (Diags) {\n if (UcnVal >= 0x20 && UcnVal < 0x7f)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, IsError ? diag::err_ucn_escape_basic_scs : Features.CPlusPlus ? diag::warn_cxx98_compat_literal_ucn_escape_basic_scs : diag::warn_c2x_compat_literal_ucn_escape_basic_scs) << StringRef(&BasicSCSChar, 1);"}} | ||
}, | }, | ||
["err_ucn_escape_incomplete"]={ | ["err_ucn_escape_incomplete"]={ | ||
Line 280: | Line 280: | ||
[h]=A, | [h]=A, | ||
[i]={"7b753d21b54d",1238456763,"Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller ..."}, | [i]={"7b753d21b54d",1238456763,"Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller ..."}, | ||
[j]={{cb, | [j]={{cb,523,"static bool ProcessNumericUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, bool &Delimited, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // If we didn\'t consume the proper number of digits, there is a problem.\n if (Count == 0 || (!Delimited && Count != UcnLen)) {\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, Delimited ? diag::err_delimited_escape_empty : diag::err_ucn_escape_incomplete);"},{cb,610,"static bool ProcessNamedUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features) {\n if (Incomplete || Empty) {\n if (Diags) {\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, Incomplete ? diag::err_ucn_escape_incomplete : diag::err_delimited_escape_empty) << StringRef(&UcnBegin[1], 1);"}} | ||
}, | }, | ||
["err_ucn_escape_invalid"]={ | ["err_ucn_escape_invalid"]={ | ||
Line 292: | Line 292: | ||
[h]=A, | [h]=A, | ||
[i]={"7b753d21b54d",1238456763,"Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller ..."}, | [i]={"7b753d21b54d",1238456763,"Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller ..."}, | ||
[j]={{Z, | [j]={{Z,3525,"uint32_t Lexer::tryReadUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // C++11 [lex.charset]p2: If the hexadecimal value for a\n // universal-character-name corresponds to a surrogate code point (in the\n // range 0xD800-0xDFFF, inclusive), the program is ill-formed. Additionally,\n // if the hexadecimal value for a universal-character-name outside the\n // c-char-sequence, s-char-sequence, or r-char-sequence of a character or\n // string literal corresponds to a control character (in either of the\n // ranges 0x00-0x1F or 0x7F-0x9F, both inclusive) or to a character in the\n // basic source character set, the program is ill-formed.\n if (CodePoint < 0xA0) {\n } else if (CodePoint >= 0xD800 && CodePoint <= 0xDFFF) {\n // C++03 allows UCNs representing surrogate characters. C99 and C++11 don\'t.\n // We don\'t use isLexingRawMode() here because we need to diagnose bad\n // UCNs even when skipping preprocessing tokens in a #if block.\n if (Result && PP) {\n if (LangOpts.CPlusPlus && !LangOpts.CPlusPlus11)\n else\n Diag(BufferPtr, diag::err_ucn_escape_invalid);"},{cb,662,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // Check UCN constraints (C99 6.4.3p2) [C++11 lex.charset p2]\n if ((0xD800 <= UcnVal && UcnVal <= 0xDFFF) || // surrogate codepoints\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, diag::err_ucn_escape_invalid);"}} | ||
}, | }, | ||
["err_unable_to_make_temp"]={ | ["err_unable_to_make_temp"]={ | ||
Line 304: | Line 304: | ||
[h]=q, | [h]=q, | ||
[i]={"3ef9c44747fb",1337201758,"Pulls diagnostics for temp file handling into the common diagnostic kinds."}, | [i]={"3ef9c44747fb",1337201758,"Pulls diagnostics for temp file handling into the common diagnostic kinds."}, | ||
[j]={{"clang/lib/Driver/Driver.cpp", | [j]={{"clang/lib/Driver/Driver.cpp",5715,"const char *Driver::CreateTempFile(Compilation &C, StringRef Prefix, StringRef Suffix, bool MultipleArchs, StringRef BoundArch, bool NeedUniqueDirectory) const {\n if (CrashDirectory) {\n if (std::error_code EC = llvm::sys::fs::createUniqueFile(Path + Middle + Suffix, TmpName)) {\n Diag(clang::diag::err_unable_to_make_temp) << EC.message();"},{"clang/lib/Driver/Driver.cpp",6119,"std::string Driver::GetTemporaryPath(StringRef Prefix, StringRef Suffix) const {\n if (EC) {\n Diag(clang::diag::err_unable_to_make_temp) << EC.message();"},{"clang/lib/Driver/Driver.cpp",6130,"std::string Driver::GetTemporaryDirectory(StringRef Prefix) const {\n if (EC) {\n Diag(clang::diag::err_unable_to_make_temp) << EC.message();"},{"clang/lib/Driver/ToolChains/HIPUtility.cpp",160,"/// Add Generated HIP Object File which has device images embedded into the\n/// host to the argument list for linking. Using MC directives, embed the\n/// device code and also define symbols required by the code generation so that\n/// the image can be retrieved at runtime.\nvoid HIP::constructGenerateObjFileFromHIPFatBinary(Compilation &C, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const JobAction &JA, const Tool &T) {\n if (EC) {\n C.getDriver().Diag(clang::diag::err_unable_to_make_temp) << EC.message();"}} | ||
}, | }, | ||
["err_unable_to_rename_temp"]={ | ["err_unable_to_rename_temp"]={ | ||
Line 316: | Line 316: | ||
[h]=q, | [h]=q, | ||
[i]={"3ef9c44747fb",1337201758,"Pulls diagnostics for temp file handling into the common diagnostic kinds."}, | [i]={"3ef9c44747fb",1337201758,"Pulls diagnostics for temp file handling into the common diagnostic kinds."}, | ||
[j]={{"clang/lib/Frontend/CompilerInstance.cpp", | [j]={{"clang/lib/Frontend/CompilerInstance.cpp",793,"void CompilerInstance::clearOutputFiles(bool EraseFiles) {\n // Ignore errors that occur when trying to discard the temp file.\n for (OutputFile &OF : OutputFiles) {\n getDiagnostics().Report(diag::err_unable_to_rename_temp) << OF.File->TmpName << OF.Filename << std::move(E);"}} | ||
}, | }, | ||
["err_unavailable"]={ | ["err_unavailable"]={ | ||
Line 328: | Line 328: | ||
[h]=m, | [h]=m, | ||
[i]={"1ddd6d2b6b80",1279744991,"Upgrade \"\'X\' is unavailable\" from a warning to an error. This matches GCC\'s behavior. Note that"}, | [i]={"1ddd6d2b6b80",1279744991,"Upgrade \"\'X\' is unavailable\" from a warning to an error. This matches GCC\'s behavior. Note that"}, | ||
[j]={{"clang/lib/ARCMigrate/TransAPIUses.cpp", | [j]={{"clang/lib/ARCMigrate/TransAPIUses.cpp",90,"class APIChecker : public RecursiveASTVisitor<APIChecker> {\n bool VisitObjCMessageExpr(ObjCMessageExpr *E) {\n if (E->isInstanceMessage() && E->getInstanceReceiver() && E->getSelector() == zoneSel && Pass.TA.hasDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0))) {"},{"clang/lib/ARCMigrate/TransAPIUses.cpp",95,"class APIChecker : public RecursiveASTVisitor<APIChecker> {\n bool VisitObjCMessageExpr(ObjCMessageExpr *E) {\n // -zone.\n if (E->isInstanceMessage() && E->getInstanceReceiver() && E->getSelector() == zoneSel && Pass.TA.hasDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0))) {\n Pass.TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0));"},{"clang/lib/ARCMigrate/TransAutoreleasePool.cpp",220,"class AutoreleasePoolRewriter : public RecursiveASTVisitor<AutoreleasePoolRewriter> {\n void clearUnavailableDiags(Stmt *S) {\n if (S)\n Pass.TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message, S->getSourceRange());"},{"clang/lib/ARCMigrate/TransGCCalls.cpp",54,"class GCCollectableCallsChecker : public RecursiveASTVisitor<GCCollectableCallsChecker> {\n bool VisitCallExpr(CallExpr *E) {\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) {\n if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(DRE->getDecl())) {\n if (FD->getIdentifier() == NSMakeCollectableII) {\n TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message,"},{"clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp",391,"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); }"},{zc,844,"bool DiagnosticIDs::isUnrecoverable(unsigned DiagID) const {\n if (DiagID == diag::err_unavailable || DiagID == diag::err_unavailable_message)"},{"clang/lib/Sema/SemaAvailability.cpp",447,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n case AR_Unavailable:\n diag = !ObjCPropertyAccess ? diag::err_unavailable : diag::err_property_method_unavailable;"}} | ||
}, | }, | ||
["err_unavailable_in_arc"]={ | ["err_unavailable_in_arc"]={ | ||
Line 340: | Line 340: | ||
[h]="ARC Restrictions", | [h]="ARC Restrictions", | ||
[i]={"c6af8c606dae",1446008599,"Refine r251469 to give better (and more localizable) diagnostics"}, | [i]={"c6af8c606dae",1446008599,"Refine r251469 to give better (and more localizable) diagnostics"}, | ||
[j]={{"clang/lib/Sema/SemaAvailability.cpp", | [j]={{"clang/lib/Sema/SemaAvailability.cpp",462,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n case AR_Unavailable:\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // Most of these failures are due to extra restrictions in ARC;\n // reflect that in the primary diagnostic when applicable.\n auto flagARCError = [&] {\n if (S.getLangOpts().ObjCAutoRefCount && S.getSourceManager().isInSystemHeader(OffendingDecl->getLocation()))\n diag = diag::err_unavailable_in_arc;"}} | ||
}, | }, | ||
["err_unavailable_message"]={ | ["err_unavailable_message"]={ | ||
Line 352: | Line 352: | ||
[h]=m, | [h]=m, | ||
[i]={"c74073cd2045",1286406752,"Patch for adding message to unavailable attribute."}, | [i]={"c74073cd2045",1286406752,"Patch for adding message to unavailable attribute."}, | ||
[j]={{"clang/lib/ARCMigrate/TransAPIUses.cpp", | [j]={{"clang/lib/ARCMigrate/TransAPIUses.cpp",91,"class APIChecker : public RecursiveASTVisitor<APIChecker> {\n bool VisitObjCMessageExpr(ObjCMessageExpr *E) {\n if (E->isInstanceMessage() && E->getInstanceReceiver() && E->getSelector() == zoneSel && Pass.TA.hasDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0))) {"},{"clang/lib/ARCMigrate/TransAPIUses.cpp",96,"class APIChecker : public RecursiveASTVisitor<APIChecker> {\n bool VisitObjCMessageExpr(ObjCMessageExpr *E) {\n // -zone.\n if (E->isInstanceMessage() && E->getInstanceReceiver() && E->getSelector() == zoneSel && Pass.TA.hasDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0))) {\n Pass.TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0));"},{"clang/lib/ARCMigrate/TransAutoreleasePool.cpp",221,"class AutoreleasePoolRewriter : public RecursiveASTVisitor<AutoreleasePoolRewriter> {\n void clearUnavailableDiags(Stmt *S) {\n if (S)\n Pass.TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message, S->getSourceRange());"},{"clang/lib/ARCMigrate/TransGCCalls.cpp",55,"class GCCollectableCallsChecker : public RecursiveASTVisitor<GCCollectableCallsChecker> {\n bool VisitCallExpr(CallExpr *E) {\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) {\n if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(DRE->getDecl())) {\n if (FD->getIdentifier() == NSMakeCollectableII) {\n TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message,"},{"clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp",392,"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); }"},{zc,845,"bool DiagnosticIDs::isUnrecoverable(unsigned DiagID) const {\n if (DiagID == diag::err_unavailable || DiagID == diag::err_unavailable_message)"},{"clang/lib/Sema/SemaAvailability.cpp",449,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n case AR_Unavailable:\n diag_message = diag::err_unavailable_message;"}} | ||
}, | }, | ||
["err_uncasted_call_of_unknown_any"]={ | ["err_uncasted_call_of_unknown_any"]={ | ||
Line 364: | Line 364: | ||
[h]=m, | [h]=m, | ||
[i]={"2d2e870745c2",1302505370,"More __unknown_anytype work."}, | [i]={"2d2e870745c2",1302505370,"More __unknown_anytype work."}, | ||
[j]={{y, | [j]={{y,21484,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n while (true) {\n if (CallExpr *call = dyn_cast<CallExpr>(E)) {\n diagID = diag::err_uncasted_call_of_unknown_any;"},{y,21488,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n if (DeclRefExpr *ref = dyn_cast<DeclRefExpr>(E)) {\n } else if (MemberExpr *mem = dyn_cast<MemberExpr>(E)) {\n } else if (ObjCMessageExpr *msg = dyn_cast<ObjCMessageExpr>(E)) {\n diagID = diag::err_uncasted_call_of_unknown_any;"}} | ||
}, | }, | ||
["err_uncasted_send_to_unknown_any_method"]={ | ["err_uncasted_send_to_unknown_any_method"]={ | ||
Line 376: | Line 376: | ||
[h]=m, | [h]=m, | ||
[i]={"fa6f5d6ab8c3",1314824256,"Don\'t assert when diagnosing a missing cast of an unknown-anytype"}, | [i]={"fa6f5d6ab8c3",1314824256,"Don\'t assert when diagnosing a missing cast of an unknown-anytype"}, | ||
[j]={{y, | [j]={{y,21494,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n if (DeclRefExpr *ref = dyn_cast<DeclRefExpr>(E)) {\n } else if (MemberExpr *mem = dyn_cast<MemberExpr>(E)) {\n } else if (ObjCMessageExpr *msg = dyn_cast<ObjCMessageExpr>(E)) {\n if (!d) {\n S.Diag(loc, diag::err_uncasted_send_to_unknown_any_method) << static_cast<unsigned>(msg->isClassMessage()) << msg->getSelector() << orig->getSourceRange();"}} | ||
}, | }, | ||
["err_uncasted_use_of_unknown_any"]={ | ["err_uncasted_use_of_unknown_any"]={ | ||
Line 388: | Line 388: | ||
[h]=m, | [h]=m, | ||
[i]={"2d2e870745c2",1302505370,"More __unknown_anytype work."}, | [i]={"2d2e870745c2",1302505370,"More __unknown_anytype work."}, | ||
[j]={{y, | [j]={{y,21469,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n unsigned diagID = diag::err_uncasted_use_of_unknown_any;"}} | ||
}, | }, | ||
["err_undeclared_boxing_method"]={ | ["err_undeclared_boxing_method"]={ | ||
Line 400: | Line 400: | ||
[h]=m, | [h]=m, | ||
[i]={"890f4577b11a",1336838021,"Don\'t crash on boxed strings when +stringWithUTF8String: is missing."}, | [i]={"890f4577b11a",1336838021,"Don\'t crash on boxed strings when +stringWithUTF8String: is missing."}, | ||
[j]={{Zb, | [j]={{Zb,154,"/// Emits an error if the given method does not exist, or if the return\n/// type is not an Objective-C object.\nstatic bool validateBoxingMethod(Sema &S, SourceLocation Loc, const ObjCInterfaceDecl *Class, Selector Sel, const ObjCMethodDecl *Method) {\n if (!Method) {\n S.Diag(Loc, diag::err_undeclared_boxing_method) << Sel << Class->getName();"}} | ||
}, | }, | ||
["err_undeclared_destructor_name"]={ | ["err_undeclared_destructor_name"]={ | ||
Line 412: | Line 412: | ||
[h]=m, | [h]=m, | ||
[i]={yc,1576809732,Ac}, | [i]={yc,1576809732,Ac}, | ||
[j]={{V, | [j]={{V,438,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n if (FoundDecls.empty()) {\n Diag(NameLoc, diag::err_undeclared_destructor_name) << &II << MakeFixItHint();"}} | ||
}, | }, | ||
["err_undeclared_label_use"]={ | ["err_undeclared_label_use"]={ | ||
Line 424: | Line 424: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,2222,"static void CheckPoppedLabel(LabelDecl *L, Sema &S, Sema::DiagReceiverTy DiagReceiver) {\n if (Diagnose)\n DiagReceiver(L->getLocation(), S.PDiag(diag::err_undeclared_label_use) << L);"}} | ||
}, | }, | ||
["err_undeclared_objc_literal_class"]={ | ["err_undeclared_objc_literal_class"]={ | ||
Line 436: | Line 436: | ||
[h]=m, | [h]=m, | ||
[i]={"b7d8563973fe",1437714580,"Cleanup ObjCInterfaceDecl lookup for ObjC literals"}, | [i]={"b7d8563973fe",1437714580,"Cleanup ObjCInterfaceDecl lookup for ObjC literals"}, | ||
[j]={{Zb, | [j]={{Zb,204,"/// Validates ObjCInterfaceDecl availability.\n/// ObjCInterfaceDecl, used to create ObjC literals, should be defined\n/// if clang not in a debugger mode.\nstatic bool ValidateObjCLiteralInterfaceDecl(Sema &S, ObjCInterfaceDecl *Decl, SourceLocation Loc, Sema::ObjCLiteralKind LiteralKind) {\n if (!Decl) {\n S.Diag(Loc, diag::err_undeclared_objc_literal_class) << II->getName() << LiteralKind;"},{Zb,208,"/// Validates ObjCInterfaceDecl availability.\n/// ObjCInterfaceDecl, used to create ObjC literals, should be defined\n/// if clang not in a debugger mode.\nstatic bool ValidateObjCLiteralInterfaceDecl(Sema &S, ObjCInterfaceDecl *Decl, SourceLocation Loc, Sema::ObjCLiteralKind LiteralKind) {\n if (!Decl) {\n } else if (!Decl->hasDefinition() && !S.getLangOpts().DebuggerObjCLiteral) {\n S.Diag(Loc, diag::err_undeclared_objc_literal_class) << Decl->getName() << LiteralKind;"}} | ||
}, | }, | ||
["err_undeclared_protocol"]={ | ["err_undeclared_protocol"]={ | ||
Line 448: | Line 448: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{ob, | [j]={{ob,1331,"/// FindProtocolDeclaration - This routine looks up protocols and\n/// issues an error if they are not declared. It returns list of\n/// protocol declarations in its \'Protocols\' argument.\nvoid Sema::FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef<IdentifierLocPair> ProtocolId, SmallVectorImpl<Decl *> &Protocols) {\n for (const IdentifierLocPair &Pair : ProtocolId) {\n if (!PDecl) {\n Diag(Pair.second, diag::err_undeclared_protocol) << Pair.first;"},{ob,1745,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n Diag(identifierLocs[i], (lookupKind == LookupAnyName ? diag::err_objc_type_arg_missing : lookupKind == LookupObjCProtocolName ? diag::err_undeclared_protocol : diag::err_unknown_typename)) << identifiers[i];"},{Zb,1393,"ExprResult Sema::ParseObjCProtocolExpression(IdentifierInfo *ProtocolId, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc) {\n if (!PDecl) {\n Diag(ProtoLoc, diag::err_undeclared_protocol) << ProtocolId;"}} | ||
}, | }, | ||
["err_undeclared_protocol_suggest"]={ | ["err_undeclared_protocol_suggest"]={ | ||
Line 460: | Line 460: | ||
[h]=m, | [h]=m, | ||
[i]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific"}, | [i]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific"}, | ||
[j]={{ob, | [j]={{ob,1326,"/// FindProtocolDeclaration - This routine looks up protocols and\n/// issues an error if they are not declared. It returns list of\n/// protocol declarations in its \'Protocols\' argument.\nvoid Sema::FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef<IdentifierLocPair> ProtocolId, SmallVectorImpl<Decl *> &Protocols) {\n for (const IdentifierLocPair &Pair : ProtocolId) {\n if (!PDecl) {\n if ((PDecl = Corrected.getCorrectionDeclAs<ObjCProtocolDecl>()))\n diagnoseTypo(Corrected, PDiag(diag::err_undeclared_protocol_suggest) << Pair.first);"},{ob,1711,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n if (corrected) {\n // Did we find a protocol?\n if (auto proto = corrected.getCorrectionDeclAs<ObjCProtocolDecl>()) {\n diagnoseTypo(corrected, PDiag(diag::err_undeclared_protocol_suggest) << identifiers[i]);"}} | ||
}, | }, | ||
["err_undeclared_use"]={ | ["err_undeclared_use"]={ | ||
Line 472: | Line 472: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{"clang/lib/Sema/SemaAttr.cpp", | [j]={{"clang/lib/Sema/SemaAttr.cpp",805,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n for (auto &Function : Functions) {\n if (!ND) {\n Diag(Loc, diag::err_undeclared_use) << II->getName();"},{y,2381,"/// Diagnose an empty lookup.\n///\n/// \\return false if new lookup candidates were found\nbool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, TypoExpr **Out) {\n if (Name.getNameKind() == DeclarationName::CXXOperatorName || Name.getNameKind() == DeclarationName::CXXLiteralOperatorName || Name.getNameKind() == DeclarationName::CXXConversionFunctionName) {\n diagnostic = diag::err_undeclared_use;"},{E,5162,"/// Form a template name from a name that is syntactically required to name a\n/// template, either due to use of the \'template\' keyword or because a name in\n/// this syntactic context is assumed to name a template (C++ [temp.names]p2-4).\n///\n/// This action forms a template name given the name of the template and its\n/// optional scope specifier. This is used when the \'template\' keyword is used\n/// or when the parsing context unambiguously treats a following \'<\' as\n/// introducing a template argument list. Note that this may produce a\n/// non-dependent template name if we can perform the lookup now and identify\n/// the named template.\n///\n/// For example, given \"x.MetaFun::template apply\", the scope specifier\n/// \\p SS will be \"MetaFun::\", \\p TemplateKWLoc contains the location\n/// of the \"template\" keyword, and \"apply\" is the \\p Name.\nTemplateNameKind Sema::ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Result, bool AllowInjectedClassName) {\n if (!MemberOfUnknownSpecialization) {\n if (!LookupTemplateName(R, S, SS, ObjectType.get(), EnteringContext, MOUS, RTK, nullptr, /*AllowTypoCorrection=*/false) && !R.isAmbiguous()) {\n if (LookupCtx)\n else\n Diag(Name.getBeginLoc(), diag::err_undeclared_use) << DNI.getName() << SS.getRange();"}} | ||
}, | }, | ||
["err_undeclared_use_of_module"]={ | ["err_undeclared_use_of_module"]={ | ||
Line 484: | Line 484: | ||
[h]=A, | [h]=A, | ||
[i]={"11152dd55f7a",1424304628,"Allow errors on use of a private module header to be disabled, to better support incremental transit..."}, | [i]={"11152dd55f7a",1424304628,"Allow errors on use of a private module header to be disabled, to better support incremental transit..."}, | ||
[j]={{"clang/lib/Lex/ModuleMap.cpp", | [j]={{"clang/lib/Lex/ModuleMap.cpp",540,"void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, StringRef Filename, FileEntryRef File) {\n if (RequestingModule && LangOpts.ModulesStrictDeclUse) {\n Diags.Report(FilenameLoc, diag::err_undeclared_use_of_module) << RequestingModule->getTopLevelModule()->Name << Filename;"}} | ||
}, | }, | ||
["err_undeclared_use_of_module_indirect"]={ | ["err_undeclared_use_of_module_indirect"]={ | ||
Line 496: | Line 496: | ||
[h]=A, | [h]=A, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{"clang/lib/Lex/ModuleMap.cpp", | [j]={{"clang/lib/Lex/ModuleMap.cpp",528,"void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, StringRef Filename, FileEntryRef File) {\n // We have found a module, but we don\'t use it.\n if (NotUsed) {\n Diags.Report(FilenameLoc, diag::err_undeclared_use_of_module_indirect) << RequestingModule->getTopLevelModule()->Name << Filename << NotUsed->Name;"}} | ||
}, | }, | ||
["err_undeclared_use_suggest"]={ | ["err_undeclared_use_suggest"]={ | ||
Line 508: | Line 508: | ||
[h]=m, | [h]=m, | ||
[i]={"598b08f8182e",1262236813,"Implement typo correction for id-expressions, e.g.,"}, | [i]={"598b08f8182e",1262236813,"Implement typo correction for id-expressions, e.g.,"}, | ||
[j]={{y, | [j]={{y,2382,"/// Diagnose an empty lookup.\n///\n/// \\return false if new lookup candidates were found\nbool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, TypoExpr **Out) {\n if (Name.getNameKind() == DeclarationName::CXXOperatorName || Name.getNameKind() == DeclarationName::CXXLiteralOperatorName || Name.getNameKind() == DeclarationName::CXXConversionFunctionName) {\n diagnostic_suggest = diag::err_undeclared_use_suggest;"}} | ||
}, | }, | ||
["err_undeclared_var_use"]={ | ["err_undeclared_var_use"]={ | ||
Line 520: | Line 520: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{"clang/lib/Sema/SemaCUDA.cpp", | [j]={{"clang/lib/Sema/SemaCUDA.cpp",56,"ExprResult Sema::ActOnCUDAExecConfigExpr(Scope *S, SourceLocation LLLLoc, MultiExprArg ExecConfig, SourceLocation GGGLoc) {\n if (!ConfigDecl)\n return ExprError(Diag(LLLLoc, diag::err_undeclared_var_use) << getCudaConfigureFuncName());"},{"clang/lib/Sema/SemaCXXScopeSpec.cpp",826,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n if (!Found.empty()) {\n } else if (SS.isSet())\n else\n Diag(IdInfo.IdentifierLoc, diag::err_undeclared_var_use) << IdInfo.Identifier;"},{y,2376,"/// Diagnose an empty lookup.\n///\n/// \\return false if new lookup candidates were found\nbool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, TypoExpr **Out) {\n unsigned diagnostic = diag::err_undeclared_var_use;"},{Cc,1591,"/// 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) {\n if (getLangOpts().ObjCDefaultSynthProperties && getLangOpts().ObjCRuntime.isNonFragile() && !IDecl->isObjCRequiresPropertyDefs()) {\n // Issue diagnostics only if Ivar belongs to current class.\n if (Ivar && Ivar->getSynthesize() && declaresSameEntity(IC->getClassInterface(), ClassDeclared)) {\n Diag(Ivar->getLocation(), diag::err_undeclared_var_use) << PropertyId;"},{Ec,3053,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n if (!Lookup.isSingleResult()) {\n if (TypoCorrection Corrected = CorrectTypo(Id, LookupOrdinaryName, CurScope, nullptr, CCC, CTK_ErrorRecovery)) {\n } else {\n Diag(Id.getLoc(), Lookup.empty() ? diag::err_undeclared_var_use : diag::err_omp_expected_var_arg) << Id.getName();"},{Ec,23037,"NamedDecl *Sema::lookupOpenMPDeclareTargetName(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id) {\n if (!Lookup.isSingleResult()) {\n Diag(Id.getLoc(), diag::err_undeclared_var_use) << Id.getName();"}} | ||
}, | }, | ||
["err_undeclared_var_use_suggest"]={ | ["err_undeclared_var_use_suggest"]={ | ||
Line 532: | Line 532: | ||
[h]=m, | [h]=m, | ||
[i]={"598b08f8182e",1262236813,"Implement typo correction for id-expressions, e.g.,"}, | [i]={"598b08f8182e",1262236813,"Implement typo correction for id-expressions, e.g.,"}, | ||
[j]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp", | [j]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",627,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n if (Found.empty() && !ErrorRecoveryLookup && !getLangOpts().MSVCCompat) {\n if (TypoCorrection Corrected = CorrectTypo(Found.getLookupNameInfo(), Found.getLookupKind(), S, &SS, CCC, CTK_ErrorRecovery, LookupCtx, EnteringContext)) {\n if (LookupCtx) {\n } else\n diagnoseTypo(Corrected, PDiag(diag::err_undeclared_var_use_suggest) << Name);"},{w,1009,"Corrected:\n case LookupResult::NotFound:\n // Perform typo correction to determine if there is another name that is\n // close to this name.\n if (!SecondTry && CCC) {\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, &SS, *CCC, CTK_ErrorRecovery)) {\n unsigned UnqualifiedDiag = diag::err_undeclared_var_use_suggest;"},{y,2377,"/// Diagnose an empty lookup.\n///\n/// \\return false if new lookup candidates were found\nbool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, TypoExpr **Out) {\n unsigned diagnostic_suggest = diag::err_undeclared_var_use_suggest;"},{Ec,3048,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n if (!Lookup.isSingleResult()) {\n if (TypoCorrection Corrected = CorrectTypo(Id, LookupOrdinaryName, CurScope, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(Corrected, PDiag(Lookup.empty() ? diag::err_undeclared_var_use_suggest : diag::err_omp_expected_var_arg_suggest) << Id.getName());"},{Ec,23031,"NamedDecl *Sema::lookupOpenMPDeclareTargetName(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id) {\n if (!Lookup.isSingleResult()) {\n if (TypoCorrection Corrected = CorrectTypo(Id, LookupOrdinaryName, CurScope, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(Corrected, PDiag(diag::err_undeclared_var_use_suggest) << Id.getName());"}} | ||
}, | }, | ||
["err_undef_interface"]={ | ["err_undef_interface"]={ | ||
Line 544: | Line 544: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{ob, | [j]={{ob,1845,"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)) {\n if (!IDecl)\n Diag(ClassLoc, diag::err_undef_interface) << ClassName;"},{ob,1941,"/// ActOnStartCategoryImplementation - Perform semantic checks on the\n/// category implementation declaration and build an ObjCCategoryImplDecl\n/// object.\nObjCCategoryImplDecl *Sema::ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &Attrs) {\n /// Check that class of this category is already completely declared.\n if (!IDecl) {\n Diag(ClassLoc, diag::err_undef_interface) << ClassName;"},{ob,1944,"/// ActOnStartCategoryImplementation - Perform semantic checks on the\n/// category implementation declaration and build an ObjCCategoryImplDecl\n/// object.\nObjCCategoryImplDecl *Sema::ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &Attrs) {\n } else if (RequireCompleteType(ClassLoc, Context.getObjCInterfaceType(IDecl), diag::err_undef_interface)) {"},{ob,5106,"/// 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 (!Class) {\n Diag(DeclStart, diag::err_undef_interface) << ClassName;"}} | ||
}, | }, | ||
["err_undef_interface_suggest"]={ | ["err_undef_interface_suggest"]={ | ||
Line 556: | Line 556: | ||
[h]=m, | [h]=m, | ||
[i]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific"}, | [i]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific"}, | ||
[j]={{w, | [j]={{w,2330,"/// Look for an Objective-C class in the translation unit.\n///\n/// \\param Id The name of the Objective-C class we\'re looking for. If\n/// typo-correction fixes this name, the Id will be updated\n/// to the fixed name.\n///\n/// \\param IdLoc The location of the name in the translation unit.\n///\n/// \\param DoTypoCorrection If true, this routine will attempt typo correction\n/// if there is no class with the given name.\n///\n/// \\returns The declaration of the named Objective-C class, or NULL if the\n/// class could not be found.\nObjCInterfaceDecl *Sema::getObjCInterfaceDecl(IdentifierInfo *&Id, SourceLocation IdLoc, bool DoTypoCorrection) {\n if (!IDecl && DoTypoCorrection) {\n if (TypoCorrection C = CorrectTypo(DeclarationNameInfo(Id, IdLoc), LookupOrdinaryName, TUScope, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(C, PDiag(diag::err_undef_interface_suggest) << Id);"}} | ||
}, | }, | ||
["err_undef_superclass"]={ | ["err_undef_superclass"]={ | ||
Line 568: | Line 568: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{ob, | [j]={{ob,617,"void Sema::ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange) {\n if (declaresSameEntity(PrevDecl, IDecl)) {\n } else {\n if (!isa_and_nonnull<TypedefNameDecl>(PrevDecl)) {\n if (!SuperClassDecl)\n Diag(SuperLoc, diag::err_undef_superclass) << SuperName << ClassName << SourceRange(AtInterfaceLoc, ClassLoc);"},{ob,2034,"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 Diag(SuperClassLoc, diag::err_undef_superclass) << SuperClassname << ClassName;"}} | ||
}, | }, | ||
["err_undef_superclass_suggest"]={ | ["err_undef_superclass_suggest"]={ | ||
Line 580: | Line 580: | ||
[h]=m, | [h]=m, | ||
[i]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific"}, | [i]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific"}, | ||
[j]={{ob, | [j]={{ob,563,"void Sema::ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange) {\n if (!PrevDecl) {\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(SuperName, SuperLoc), LookupOrdinaryName, TUScope, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(Corrected, PDiag(diag::err_undef_superclass_suggest) << SuperName << ClassName);"}} | ||
}, | }, | ||
["err_undefined_inline_var"]={ | ["err_undefined_inline_var"]={ | ||
Line 592: | Line 592: | ||
[h]=m, | [h]=m, | ||
[i]={"62f19e700d31",1466813756,"Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a"}, | [i]={"62f19e700d31",1466813756,"Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a"}, | ||
[j]={{"clang/lib/Sema/Sema.cpp", | [j]={{"clang/lib/Sema/Sema.cpp",915,"/// checkUndefinedButUsed - Check for undefined objects with internal linkage\n/// or that are inline.\nstatic void checkUndefinedButUsed(Sema &S) {\n for (const auto &Undef : Undefined) {\n if (S.isExternalWithNoLinkageType(VD)) {\n } else if (!VD->isExternallyVisible()) {\n } else if (auto *FD = dyn_cast<FunctionDecl>(VD)) {\n } else {\n S.Diag(VD->getLocation(), diag::err_undefined_inline_var) << VD;"}} | ||
}, | }, | ||
["err_undefined_internal_type"]={ | ["err_undefined_internal_type"]={ | ||
Line 604: | Line 604: | ||
[h]=m, | [h]=m, | ||
[i]={"405e2dbf3767",1505892120,"Implement C++ [basic.link]p8."}, | [i]={"405e2dbf3767",1505892120,"Implement C++ [basic.link]p8."}, | ||
[j]={{"clang/lib/Sema/Sema.cpp", | [j]={{"clang/lib/Sema/Sema.cpp",885,"/// checkUndefinedButUsed - Check for undefined objects with internal linkage\n/// or that are inline.\nstatic void checkUndefinedButUsed(Sema &S) {\n for (const auto &Undef : Undefined) {\n if (S.isExternalWithNoLinkageType(VD)) {\n S.Diag(VD->getLocation(), isExternallyVisible(VD->getType()->getLinkage()) ? diag::ext_undefined_internal_type : diag::err_undefined_internal_type) << isa<VarDecl>(VD) << VD;"}} | ||
}, | }, | ||
["err_underlying_type_of_incomplete_enum"]={ | ["err_underlying_type_of_incomplete_enum"]={ | ||
Line 616: | Line 616: | ||
[h]=m, | [h]=m, | ||
[i]={"29d0e6b60116",1402531305,"PR19966: don\'t crash/assert when __underlying_type is applied to an incomplete"}, | [i]={"29d0e6b60116",1402531305,"PR19966: don\'t crash/assert when __underlying_type is applied to an incomplete"}, | ||
[j]={{R, | [j]={{R,9530,"QualType Sema::BuiltinEnumUnderlyingType(QualType BaseType, SourceLocation Loc) {\n if (BaseType->isIncompleteType(&FwdDecl)) {\n Diag(Loc, diag::err_underlying_type_of_incomplete_enum) << BaseType;"}} | ||
}, | }, | ||
["err_unevaluated_string_invalid_escape_sequence"]={ | ["err_unevaluated_string_invalid_escape_sequence"]={ | ||
Line 628: | Line 628: | ||
[h]=A, | [h]=A, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{cb, | [j]={{cb,365,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n if (EvalMethod == StringLiteralEvalMethod::Unevaluated && !IsEscapeValidInUnevaluatedStringLiteral(Escape)) {\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::err_unevaluated_string_invalid_escape_sequence) << StringRef(EscapeBegin, ThisTokBuf - EscapeBegin);"}} | ||
}, | }, | ||
["err_unevaluated_string_prefix"]={ | ["err_unevaluated_string_prefix"]={ | ||
Line 640: | Line 640: | ||
[h]=A, | [h]=A, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{cb, | [j]={{cb,1953,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n /// (C99 5.1.1.2p1). The common case is only one string fragment.\n for (const Token &Tok : StringToks) {\n // Remember if we see any wide or utf-8/16/32 strings.\n // Also check for illegal concatenations.\n if (isUnevaluated() && Tok.getKind() != tok::string_literal) {\n if (Diags) {\n Diags->Report(Tok.getLocation(), Features.CPlusPlus26 ? diag::err_unevaluated_string_prefix : diag::warn_unevaluated_string_prefix) << Prefix << Features.CPlusPlus << FixItHint::CreateRemoval(Range);"}} | ||
}, | }, | ||
["err_unevaluated_string_udl"]={ | ["err_unevaluated_string_udl"]={ | ||
Line 652: | Line 652: | ||
[h]=A, | [h]=A, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{cb, | [j]={{cb,2047,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n for (unsigned i = 0, e = StringToks.size(); i != e; ++i) {\n // Remove an optional ud-suffix.\n if (ThisTokEnd[-1] != \'\"\') {\n if (UDSuffixBuf.empty()) {\n } else {\n if (UDSuffixBuf != UDSuffix || UnevaluatedStringHasUDL) {\n if (Diags) {\n if (UnevaluatedStringHasUDL) {\n Diags->Report(TokLoc, diag::err_unevaluated_string_udl) << SourceRange(TokLoc, TokLoc);"}} | ||
}, | }, | ||
["err_unexpanded_parameter_pack"]={ | ["err_unexpanded_parameter_pack"]={ | ||
Line 664: | Line 664: | ||
[h]=m, | [h]=m, | ||
[i]={"506bd56484a5",1292280562,"Variadic templates: extend Type, NestedNameSpecifier, TemplateName,"}, | [i]={"506bd56484a5",1292280562,"Variadic templates: extend Type, NestedNameSpecifier, TemplateName,"}, | ||
[j]={{"clang/lib/Sema/SemaTemplateVariadic.cpp", | [j]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",372,"/// Diagnose all of the unexpanded parameter packs in the given\n/// vector.\nbool Sema::DiagnoseUnexpandedParameterPacks(SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef<UnexpandedParameterPack> Unexpanded) {\n auto DB = Diag(Loc, diag::err_unexpanded_parameter_pack) << (int)UPPC << (int)Names.size();"}} | ||
}, | }, | ||
["err_unexpected_at"]={ | ["err_unexpected_at"]={ | ||
Line 676: | Line 676: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{F, | [j]={{F,4694,"/// ParseStructUnionBody\n/// struct-contents:\n/// struct-declaration-list\n/// [EXT] empty\n/// [GNU] \"struct-declaration-list\" without terminating \';\'\n/// struct-declaration-list:\n/// struct-declaration\n/// struct-declaration-list struct-declaration\n/// [OBC] \'@\' \'defs\' \'(\' class-name \')\'\n///\nvoid Parser::ParseStructUnionBody(SourceLocation RecordLoc, DeclSpec::TST TagType, RecordDecl *TagDecl) {\n // While we still have something to read, read the declarations in the struct.\n while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {\n if (!Tok.is(tok::at)) {\n } else { // Handle @defs\n if (!Tok.isObjCAtKeyword(tok::objc_defs)) {\n Diag(Tok, diag::err_unexpected_at);"},{Xb,107,"/// 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 default:\n Diag(AtLoc, diag::err_unexpected_at);"},{Xb,2902,"ExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) {\n default:\n if (Tok.getIdentifierInfo() == nullptr)\n return ExprError(Diag(AtLoc, diag::err_unexpected_at));"},{Xb,2928,"ExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) {\n default:\n default: {\n if (str) {\n return ExprError(Diag(AtLoc, diag::err_unexpected_at) << FixItHint::CreateReplacement(kwLoc, str));"},{Xb,2932,"ExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) {\n default:\n default: {\n if (str) {\n } else\n return ExprError(Diag(AtLoc, diag::err_unexpected_at));"}} | ||
}, | }, | ||
["err_unexpected_colon_in_nested_name_spec"]={ | ["err_unexpected_colon_in_nested_name_spec"]={ | ||
Line 688: | Line 688: | ||
[h]=x, | [h]=x, | ||
[i]={"6a7ffbed8ab4",1397407923,"Improve error recovery around colon."}, | [i]={"6a7ffbed8ab4",1397407923,"Improve error recovery around colon."}, | ||
[j]={{vb, | [j]={{vb,406,"/// Parse global scope or nested-name-specifier if present.\n///\n/// Parses a C++ global scope specifier (\'::\') or nested-name-specifier (which\n/// may be preceded by \'::\'). Note that this routine will not parse ::new or\n/// ::delete; it will just leave them in the token stream.\n///\n/// \'::\'[opt] nested-name-specifier\n/// \'::\'\n///\n/// nested-name-specifier:\n/// type-name \'::\'\n/// namespace-name \'::\'\n/// nested-name-specifier identifier \'::\'\n/// nested-name-specifier \'template\'[opt] simple-template-id \'::\'\n///\n///\n/// \\param SS the scope specifier that will be set to the parsed\n/// nested-name-specifier (or empty)\n///\n/// \\param ObjectType if this nested-name-specifier is being parsed following\n/// the \".\" or \"->\" of a member access expression, this parameter provides the\n/// type of the object whose members are being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we will be entering into the context of\n/// the nested-name-specifier after parsing it.\n///\n/// \\param MayBePseudoDestructor When non-NULL, points to a flag that\n/// indicates whether this nested-name-specifier may be part of a\n/// pseudo-destructor name. In this case, the flag will be set false\n/// if we don\'t actually end up parsing a destructor name. Moreover,\n/// if we do end up determining that we are parsing a destructor name,\n/// the last component of the nested-name-specifier is not parsed as\n/// part of the scope specifier.\n///\n/// \\param IsTypename If \\c true, this nested-name-specifier is known to be\n/// part of a type name. This is used to improve error recovery.\n///\n/// \\param LastII When non-NULL, points to an IdentifierInfo* that will be\n/// filled in with the leading identifier in the last component of the\n/// nested-name-specifier, if any.\n///\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n///\n/// \\returns true if there was an error parsing a scope specifier\nbool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool *MayBePseudoDestructor, bool IsTypename, IdentifierInfo **LastII, bool OnlyNamespace, bool InUsingDeclaration) {\n while (true) {\n // If we get foo:bar, this is almost certainly a typo for foo::bar. Recover\n // and emit a fixit hint for it.\n if (Next.is(tok::colon) && !ColonIsSacred) {\n if (Actions.IsInvalidUnlessNestedName(getCurScope(), SS, IdInfo, EnteringContext) &&\n Diag(Next, diag::err_unexpected_colon_in_nested_name_spec) << FixItHint::CreateReplacement(Next.getLocation(), \"::\");"}} | ||
}, | }, | ||
["err_unexpected_friend"]={ | ["err_unexpected_friend"]={ | ||
Line 700: | Line 700: | ||
[h]=m, | [h]=m, | ||
[i]={"07e91c04ba33",1249524943,"First pass at friend semantics."}, | [i]={"07e91c04ba33",1249524943,"First pass at friend semantics."}, | ||
[j]={{z, | [j]={{z,17499,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // C++ [class.friend]p1\n // A friend of a class is a function or class....\n // Note that this sees through typedefs, which is intended.\n // It *doesn\'t* see through dependent types, which is correct\n // according to [temp.arg.type]p3:\n // If a declaration acquires a function type through a\n // type dependent on a template-parameter and this causes\n // a declaration that does not use the syntactic form of a\n // function declarator to have a function type, the program\n // is ill-formed.\n if (!TInfo->getType()->isFunctionType()) {\n Diag(Loc, diag::err_unexpected_friend);"}} | ||
}, | }, | ||
["err_unexpected_interface"]={ | ["err_unexpected_interface"]={ | ||
Line 712: | Line 712: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,3301,"/// Diagnoses obvious problems with the use of the given declaration\n/// as an expression. This is only actually called for lookups that\n/// were not overloaded, and it doesn\'t promise that the declaration\n/// will in fact be used.\nstatic bool CheckDeclInExpr(Sema &S, SourceLocation Loc, NamedDecl *D, bool AcceptInvalid) {\n if (isa<ObjCInterfaceDecl>(D)) {\n S.Diag(Loc, diag::err_unexpected_interface) << D->getDeclName();"}} | ||
}, | }, | ||
["err_unexpected_module_decl"]={ | ["err_unexpected_module_decl"]={ | ||
Line 724: | Line 724: | ||
[h]=xc, | [h]=xc, | ||
[i]={"bbcc9f0462c1",1472170478,"C++ Modules TS: add frontend support for building pcm files from module"}, | [i]={"bbcc9f0462c1",1472170478,"C++ Modules TS: add frontend support for building pcm files from module"}, | ||
[j]={{wb, | [j]={{wb,1025,"/// ParseExternalDeclaration:\n///\n/// The `Attrs` that are passed in are C++11 attributes and appertain to the\n/// declaration.\n///\n/// external-declaration: [C99 6.9], declaration: [C++ dcl.dcl]\n/// function-definition\n/// declaration\n/// [GNU] asm-definition\n/// [GNU] __extension__ external-declaration\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\n/// [C++] linkage-specification\n/// [GNU] asm-definition:\n/// simple-asm-expr \';\'\n/// [C++11] empty-declaration\n/// [C++11] attribute-declaration\n///\n/// [C++11] empty-declaration:\n/// \';\'\n///\n/// [C++0x/GNU] \'extern\' \'template\' declaration\n///\n/// [C++20] module-import-declaration\n///\nParser::DeclGroupPtrTy Parser::ParseExternalDeclaration(ParsedAttributes &Attrs, ParsedAttributes &DeclSpecAttrs, ParsingDeclSpec *DS) {\n case tok::kw_module:\n Diag(Tok, diag::err_unexpected_module_decl);"}} | ||
}, | }, | ||
["err_unexpected_namespace"]={ | ["err_unexpected_namespace"]={ | ||
Line 736: | Line 736: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,3306,"/// Diagnoses obvious problems with the use of the given declaration\n/// as an expression. This is only actually called for lookups that\n/// were not overloaded, and it doesn\'t promise that the declaration\n/// will in fact be used.\nstatic bool CheckDeclInExpr(Sema &S, SourceLocation Loc, NamedDecl *D, bool AcceptInvalid) {\n if (isa<NamespaceDecl>(D)) {\n S.Diag(Loc, diag::err_unexpected_namespace) << D->getDeclName();"}} | ||
}, | }, | ||
["err_unexpected_namespace_attributes_alias"]={ | ["err_unexpected_namespace_attributes_alias"]={ | ||
Line 748: | Line 748: | ||
[h]=x, | [h]=x, | ||
[i]={"6b6bba4a2087",1245268140,"Diagnose the use of attributes on namespace aliases, from Anis Ahmad"}, | [i]={"6b6bba4a2087",1245268140,"Diagnose the use of attributes on namespace aliases, from Anis Ahmad"}, | ||
[j]={{L, | [j]={{L,144,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n if (Tok.is(tok::equal)) {\n if (attrLoc.isValid())\n Diag(attrLoc, diag::err_unexpected_namespace_attributes_alias);"}} | ||
}, | }, | ||
["err_unexpected_nested_namespace_attribute"]={ | ["err_unexpected_nested_namespace_attribute"]={ | ||
Line 760: | Line 760: | ||
[h]=x, | [h]=x, | ||
[i]={"c0ae7dfe75e5",1415466435,"Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensur..."}, | [i]={"c0ae7dfe75e5",1415466435,"Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensur..."}, | ||
[j]={{L, | [j]={{L,134,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // A nested namespace definition cannot have attributes.\n if (!ExtraNSs.empty() && attrLoc.isValid())\n Diag(attrLoc, diag::err_unexpected_nested_namespace_attribute);"}} | ||
}, | }, | ||
["err_unexpected_protocol_qualifier"]={ | ["err_unexpected_protocol_qualifier"]={ | ||
Line 772: | Line 772: | ||
[h]=x, | [h]=x, | ||
[i]={"46ed4d978e1c",1366845827,"Objective-C parsing [qoi]: Recover gracefully with good diagnostic"}, | [i]={"46ed4d978e1c",1366845827,"Objective-C parsing [qoi]: Recover gracefully with good diagnostic"}, | ||
[j]={{Xb, | [j]={{Xb,2195,"/// objc-implementation:\n/// objc-class-implementation-prologue\n/// objc-category-implementation-prologue\n///\n/// objc-class-implementation-prologue:\n/// @implementation identifier objc-superclass[opt]\n/// objc-class-instance-variables[opt]\n///\n/// objc-category-implementation-prologue:\n/// @implementation identifier ( identifier )\nParser::DeclGroupPtrTy Parser::ParseObjCAtImplementationDeclaration(SourceLocation AtLoc, ParsedAttributes &Attrs) {\n // Neither a type parameter list nor a list of protocol references is\n // permitted here. Parse and diagnose them.\n if (Tok.is(tok::less)) {\n if (parseObjCTypeParamListOrProtocolRefs(typeParamScope, lAngleLoc, protocolIdents, rAngleLoc)) {\n } else if (lAngleLoc.isValid()) {\n Diag(lAngleLoc, diag::err_unexpected_protocol_qualifier) << FixItHint::CreateRemoval(SourceRange(lAngleLoc, rAngleLoc));"},{Xb,2227,"/// objc-implementation:\n/// objc-class-implementation-prologue\n/// objc-category-implementation-prologue\n///\n/// objc-class-implementation-prologue:\n/// @implementation identifier objc-superclass[opt]\n/// objc-class-instance-variables[opt]\n///\n/// objc-category-implementation-prologue:\n/// @implementation identifier ( identifier )\nParser::DeclGroupPtrTy Parser::ParseObjCAtImplementationDeclaration(SourceLocation AtLoc, ParsedAttributes &Attrs) {\n if (Tok.is(tok::l_paren)) {\n if (Tok.is(tok::less)) { // we have illegal \'<\' try to recover\n Diag(Tok, diag::err_unexpected_protocol_qualifier);"},{Xb,2257,"/// objc-implementation:\n/// objc-class-implementation-prologue\n/// objc-category-implementation-prologue\n///\n/// objc-class-implementation-prologue:\n/// @implementation identifier objc-superclass[opt]\n/// objc-class-instance-variables[opt]\n///\n/// objc-category-implementation-prologue:\n/// @implementation identifier ( identifier )\nParser::DeclGroupPtrTy Parser::ParseObjCAtImplementationDeclaration(SourceLocation AtLoc, ParsedAttributes &Attrs) {\n if (Tok.is(tok::l_paren)) {\n } else {\n if (Tok.is(tok::l_brace)) // we have ivars\n else if (Tok.is(tok::less)) { // we have illegal \'<\' try to recover\n Diag(Tok, diag::err_unexpected_protocol_qualifier);"}} | ||
}, | }, | ||
["err_unexpected_scope_on_base_decltype"]={ | ["err_unexpected_scope_on_base_decltype"]={ | ||
Line 784: | Line 784: | ||
[h]=x, | [h]=x, | ||
[i]={"afa155fb8879",1319566678,"Fix erroneous name-specifiers prior to decltypes better/correctly as per Doug\'s feedback."}, | [i]={"afa155fb8879",1319566678,"Fix erroneous name-specifiers prior to decltypes better/correctly as per Doug\'s feedback."}, | ||
[j]={{L, | [j]={{L,1284,"/// ParseBaseTypeSpecifier - Parse a C++ base-type-specifier which is either a\n/// class name or decltype-specifier. Note that we only check that the result\n/// names a type; semantic analysis will need to verify that the type names a\n/// class. The result is either a type or null, depending on whether a type\n/// name was found.\n///\n/// base-type-specifier: [C++11 class.derived]\n/// class-or-decltype\n/// class-or-decltype: [C++11 class.derived]\n/// nested-name-specifier[opt] class-name\n/// decltype-specifier\n/// class-name: [C++ class.name]\n/// identifier\n/// simple-template-id\n///\n/// In C++98, instead of base-type-specifier, we have:\n///\n/// ::[opt] nested-name-specifier[opt] class-name\nTypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc, SourceLocation &EndLocation) {\n // Parse decltype-specifier\n // tok == kw_decltype is just error recovery, it can only happen when SS\n // isn\'t empty\n if (Tok.isOneOf(tok::kw_decltype, tok::annot_decltype)) {\n if (SS.isNotEmpty())\n Diag(SS.getBeginLoc(), diag::err_unexpected_scope_on_base_decltype) << FixItHint::CreateRemoval(SS.getRange());"}} | ||
}, | }, | ||
["err_unexpected_semi"]={ | ["err_unexpected_semi"]={ | ||
Line 807: | Line 807: | ||
[h]=x, | [h]=x, | ||
[i]={"2efd30571bcc",1556753629,"Consume unexpected \"template\" keywords after \"using\""}, | [i]={"2efd30571bcc",1556753629,"Consume unexpected \"template\" keywords after \"using\""}, | ||
[j]={{L, | [j]={{L,494,"/// ParseUsingDirectiveOrDeclaration - Parse C++ using using-declaration or\n/// using-directive. Assumes that current token is \'using\'.\nParser::DeclGroupPtrTy Parser::ParseUsingDirectiveOrDeclaration(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, SourceLocation &DeclEnd, ParsedAttributes &Attrs) {\n // Consume unexpected \'template\' keywords.\n while (Tok.is(tok::kw_template)) {\n Diag(TemplateLoc, diag::err_unexpected_template_after_using) << FixItHint::CreateRemoval(TemplateLoc);"},{L,2797,"/// 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::kw_using)) {\n // Consume unexpected \'template\' keywords.\n while (Tok.is(tok::kw_template)) {\n Diag(TemplateLoc, diag::err_unexpected_template_after_using) << FixItHint::CreateRemoval(TemplateLoc);"}} | ||
}, | }, | ||
["err_unexpected_template_in_destructor_name"]={ | ["err_unexpected_template_in_destructor_name"]={ | ||
Line 819: | Line 819: | ||
[h]=x, | [h]=x, | ||
[i]={"f08df464ae89",1582039343,"[OPENMP50]Add initial support for OpenMP 5.0 iterator."}, | [i]={"f08df464ae89",1582039343,"[OPENMP50]Add initial support for OpenMP 5.0 iterator."}, | ||
[j]={{vb, | [j]={{vb,3050,"/// Parse a C++ unqualified-id (or a C identifier), which describes the\n/// name of an entity.\n///\n/// \\code\n/// unqualified-id: [C++ expr.prim.general]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// [C++0x] literal-operator-id [TODO]\n/// ~ class-name\n/// template-id\n///\n/// \\endcode\n///\n/// \\param SS The nested-name-specifier that preceded this unqualified-id. If\n/// non-empty, then we are parsing the unqualified-id of a qualified-id.\n///\n/// \\param ObjectType if this unqualified-id occurs within a member access\n/// expression, the type of the base object whose member is being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we are entering the scope of the\n/// nested-name-specifier.\n///\n/// \\param AllowDestructorName whether we allow parsing of a destructor name.\n///\n/// \\param AllowConstructorName whether we allow parsing a constructor name.\n///\n/// \\param AllowDeductionGuide whether we allow parsing a deduction guide name.\n///\n/// \\param Result on a successful parse, contains the parsed unqualified-id.\n///\n/// \\returns true if parsing fails, false otherwise.\nbool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool AllowDestructorName, bool AllowConstructorName, bool AllowDeductionGuide, SourceLocation *TemplateKWLoc, UnqualifiedId &Result) {\n if (getLangOpts().CPlusPlus && (AllowDestructorName || SS.isSet()) && Tok.is(tok::tilde)) {\n if (TemplateSpecified) {\n Diag(*TemplateKWLoc, diag::err_unexpected_template_in_destructor_name) << Tok.getLocation();"}} | ||
}, | }, | ||
["err_unexpected_template_in_unqualified_id"]={ | ["err_unexpected_template_in_unqualified_id"]={ | ||
Line 831: | Line 831: | ||
[h]=x, | [h]=x, | ||
[i]={"c08b693e309b",1524794413,"Parse A::template B as an identifier rather than as a template-id with no"}, | [i]={"c08b693e309b",1524794413,"Parse A::template B as an identifier rather than as a template-id with no"}, | ||
[j]={{vb, | [j]={{vb,2885,"/// Parse a C++ unqualified-id (or a C identifier), which describes the\n/// name of an entity.\n///\n/// \\code\n/// unqualified-id: [C++ expr.prim.general]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// [C++0x] literal-operator-id [TODO]\n/// ~ class-name\n/// template-id\n///\n/// \\endcode\n///\n/// \\param SS The nested-name-specifier that preceded this unqualified-id. If\n/// non-empty, then we are parsing the unqualified-id of a qualified-id.\n///\n/// \\param ObjectType if this unqualified-id occurs within a member access\n/// expression, the type of the base object whose member is being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we are entering the scope of the\n/// nested-name-specifier.\n///\n/// \\param AllowDestructorName whether we allow parsing of a destructor name.\n///\n/// \\param AllowConstructorName whether we allow parsing a constructor name.\n///\n/// \\param AllowDeductionGuide whether we allow parsing a deduction guide name.\n///\n/// \\param Result on a successful parse, contains the parsed unqualified-id.\n///\n/// \\returns true if parsing fails, false otherwise.\nbool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool AllowDestructorName, bool AllowConstructorName, bool AllowDeductionGuide, SourceLocation *TemplateKWLoc, UnqualifiedId &Result) {\n if (Tok.is(tok::kw_template)) {\n if (TemplateKWLoc && (ObjectType || SS.isSet())) {\n } else {\n Diag(TemplateLoc, diag::err_unexpected_template_in_unqualified_id) << FixItHint::CreateRemoval(TemplateLoc);"},{vb,2992,"/// Parse a C++ unqualified-id (or a C identifier), which describes the\n/// name of an entity.\n///\n/// \\code\n/// unqualified-id: [C++ expr.prim.general]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// [C++0x] literal-operator-id [TODO]\n/// ~ class-name\n/// template-id\n///\n/// \\endcode\n///\n/// \\param SS The nested-name-specifier that preceded this unqualified-id. If\n/// non-empty, then we are parsing the unqualified-id of a qualified-id.\n///\n/// \\param ObjectType if this unqualified-id occurs within a member access\n/// expression, the type of the base object whose member is being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we are entering the scope of the\n/// nested-name-specifier.\n///\n/// \\param AllowDestructorName whether we allow parsing of a destructor name.\n///\n/// \\param AllowConstructorName whether we allow parsing a constructor name.\n///\n/// \\param AllowDeductionGuide whether we allow parsing a deduction guide name.\n///\n/// \\param Result on a successful parse, contains the parsed unqualified-id.\n///\n/// \\returns true if parsing fails, false otherwise.\nbool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool AllowDestructorName, bool AllowConstructorName, bool AllowDeductionGuide, SourceLocation *TemplateKWLoc, UnqualifiedId &Result) {\n // unqualified-id:\n // template-id (already parsed and annotated)\n if (Tok.is(tok::annot_template_id)) {\n if (TemplateLoc.isValid()) {\n if (TemplateKWLoc && (ObjectType || SS.isSet()))\n else\n Diag(TemplateLoc, diag::err_unexpected_template_in_unqualified_id) << FixItHint::CreateRemoval(TemplateLoc);"}} | ||
}, | }, | ||
["err_unexpected_token_in_nested_name_spec"]={ | ["err_unexpected_token_in_nested_name_spec"]={ | ||
Line 843: | Line 843: | ||
[h]=x, | [h]=x, | ||
[i]={"6a7ffbed8ab4",1397407923,"Improve error recovery around colon."}, | [i]={"6a7ffbed8ab4",1397407923,"Improve error recovery around colon."}, | ||
[j]={{vb, | [j]={{vb,434,"/// Parse global scope or nested-name-specifier if present.\n///\n/// Parses a C++ global scope specifier (\'::\') or nested-name-specifier (which\n/// may be preceded by \'::\'). Note that this routine will not parse ::new or\n/// ::delete; it will just leave them in the token stream.\n///\n/// \'::\'[opt] nested-name-specifier\n/// \'::\'\n///\n/// nested-name-specifier:\n/// type-name \'::\'\n/// namespace-name \'::\'\n/// nested-name-specifier identifier \'::\'\n/// nested-name-specifier \'template\'[opt] simple-template-id \'::\'\n///\n///\n/// \\param SS the scope specifier that will be set to the parsed\n/// nested-name-specifier (or empty)\n///\n/// \\param ObjectType if this nested-name-specifier is being parsed following\n/// the \".\" or \"->\" of a member access expression, this parameter provides the\n/// type of the object whose members are being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we will be entering into the context of\n/// the nested-name-specifier after parsing it.\n///\n/// \\param MayBePseudoDestructor When non-NULL, points to a flag that\n/// indicates whether this nested-name-specifier may be part of a\n/// pseudo-destructor name. In this case, the flag will be set false\n/// if we don\'t actually end up parsing a destructor name. Moreover,\n/// if we do end up determining that we are parsing a destructor name,\n/// the last component of the nested-name-specifier is not parsed as\n/// part of the scope specifier.\n///\n/// \\param IsTypename If \\c true, this nested-name-specifier is known to be\n/// part of a type name. This is used to improve error recovery.\n///\n/// \\param LastII When non-NULL, points to an IdentifierInfo* that will be\n/// filled in with the leading identifier in the last component of the\n/// nested-name-specifier, if any.\n///\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n///\n/// \\returns true if there was an error parsing a scope specifier\nbool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool *MayBePseudoDestructor, bool IsTypename, IdentifierInfo **LastII, bool OnlyNamespace, bool InUsingDeclaration) {\n while (true) {\n if (Next.is(tok::coloncolon)) {\n if (ColonIsSacred) {\n if (Next2.is(tok::kw_private) || Next2.is(tok::kw_protected) || Next2.is(tok::kw_public) || Next2.is(tok::kw_virtual)) {\n Diag(Next2, diag::err_unexpected_token_in_nested_name_spec) << Next2.getName() << FixItHint::CreateReplacement(Next.getLocation(), \":\");"}} | ||
}, | }, | ||
["err_unexpected_typedef"]={ | ["err_unexpected_typedef"]={ | ||
Line 855: | Line 855: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,3296,"/// Diagnoses obvious problems with the use of the given declaration\n/// as an expression. This is only actually called for lookups that\n/// were not overloaded, and it doesn\'t promise that the declaration\n/// will in fact be used.\nstatic bool CheckDeclInExpr(Sema &S, SourceLocation Loc, NamedDecl *D, bool AcceptInvalid) {\n if (isa<TypedefNameDecl>(D)) {\n S.Diag(Loc, diag::err_unexpected_typedef) << D->getDeclName();"}} | ||
}, | }, | ||
["err_unexpected_typedef_ident"]={ | ["err_unexpected_typedef_ident"]={ | ||
Line 867: | Line 867: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{F, | [j]={{F,7237,"/// ParseFunctionDeclaratorIdentifierList - While parsing a function declarator\n/// we found a K&R-style identifier list instead of a typed parameter list.\n///\n/// After returning, ParamInfo will hold the parsed parameters.\n///\n/// identifier-list: [C99 6.7.5]\n/// identifier\n/// identifier-list \',\' identifier\n///\nvoid Parser::ParseFunctionDeclaratorIdentifierList(Declarator &D, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo) {\n do {\n // Reject \'typedef int y; int test(x, y)\', but continue parsing.\n if (Actions.getTypeName(*ParmII, Tok.getLocation(), getCurScope()))\n Diag(Tok, diag::err_unexpected_typedef_ident) << ParmII;"}} | ||
}, | }, | ||
["err_unexpected_unqualified_id"]={ | ["err_unexpected_unqualified_id"]={ | ||
Line 879: | Line 879: | ||
[h]=x, | [h]=x, | ||
[i]={"9ce302ed9c29",1373519421,"PR5066: If a declarator cannot have an identifier, and cannot possibly be"}, | [i]={"9ce302ed9c29",1373519421,"PR5066: If a declarator cannot have an identifier, and cannot possibly be"}, | ||
[j]={{F, | [j]={{F,6541,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n if (getLangOpts().CPlusPlus && D.mayHaveIdentifier()) {\n } else if (Tok.is(tok::identifier) && D.mayHaveIdentifier()) {\n } else if (Tok.is(tok::identifier) && !D.mayHaveIdentifier()) {\n if (DiagnoseIdentifier) {\n Diag(Tok.getLocation(), diag::err_unexpected_unqualified_id) << FixItHint::CreateRemoval(Tok.getLocation());"}} | ||
}, | }, | ||
["err_unimplemented_conversion_with_fixed_point_type"]={ | ["err_unimplemented_conversion_with_fixed_point_type"]={ | ||
Line 891: | Line 891: | ||
[h]=q, | [h]=q, | ||
[i]={"99bda375a14e",1539619622,"[Fixed Point Arithmetic] FixedPointCast"}, | [i]={"99bda375a14e",1539619622,"[Fixed Point Arithmetic] FixedPointCast"}, | ||
[j]={{y, | [j]={{y,8060,"/// Prepares for a scalar cast, performing all the necessary stages\n/// except the final cast and returning the kind required.\nCastKind Sema::PrepareScalarCast(ExprResult &Src, QualType DestTy) {\n case Type::STK_FixedPoint:\n case Type::STK_FloatingComplex:\n Diag(Src.get()->getExprLoc(), diag::err_unimplemented_conversion_with_fixed_point_type) << DestTy;"},{y,8094,"/// Prepares for a scalar cast, performing all the necessary stages\n/// except the final cast and returning the kind required.\nCastKind Sema::PrepareScalarCast(ExprResult &Src, QualType DestTy) {\n case Type::STK_FloatingComplex:\n case Type::STK_FixedPoint:\n Diag(Src.get()->getExprLoc(), diag::err_unimplemented_conversion_with_fixed_point_type) << SrcTy;"},{y,8278,"/// Prepares for a scalar cast, performing all the necessary stages\n/// except the final cast and returning the kind required.\nCastKind Sema::PrepareScalarCast(ExprResult &Src, QualType DestTy) {\n case Type::STK_IntegralComplex:\n case Type::STK_FixedPoint:\n Diag(Src.get()->getExprLoc(), diag::err_unimplemented_conversion_with_fixed_point_type) << SrcTy;"}} | ||
}, | }, | ||
["err_uninitialized_member_for_assign"]={ | ["err_uninitialized_member_for_assign"]={ | ||
Line 903: | Line 903: | ||
[h]=m, | [h]=m, | ||
[i]={"24a175b37c87",1246060156,"Patch to mark destructors when they are used."}, | [i]={"24a175b37c87",1246060156,"Patch to mark destructors when they are used."}, | ||
[j]={{z, | [j]={{z,14859,"void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *CopyAssignOperator) {\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // Check for members of reference type; we can\'t copy those.\n if (Field->getType()->isReferenceType()) {\n Diag(ClassDecl->getLocation(), diag::err_uninitialized_member_for_assign) << Context.getTagDeclType(ClassDecl) << 0 << Field->getDeclName();"},{z,14869,"void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *CopyAssignOperator) {\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n if (!BaseType->getAs<RecordType>() && BaseType.isConstQualified()) {\n Diag(ClassDecl->getLocation(), diag::err_uninitialized_member_for_assign) << Context.getTagDeclType(ClassDecl) << 1 << Field->getDeclName();"},{z,15234,"void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MoveAssignOperator) {\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // Check for members of reference type; we can\'t move those.\n if (Field->getType()->isReferenceType()) {\n Diag(ClassDecl->getLocation(), diag::err_uninitialized_member_for_assign) << Context.getTagDeclType(ClassDecl) << 0 << Field->getDeclName();"},{z,15244,"void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MoveAssignOperator) {\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n if (!BaseType->getAs<RecordType>() && BaseType.isConstQualified()) {\n Diag(ClassDecl->getLocation(), diag::err_uninitialized_member_for_assign) << Context.getTagDeclType(ClassDecl) << 1 << Field->getDeclName();"}} | ||
}, | }, | ||
["err_uninitialized_member_in_ctor"]={ | ["err_uninitialized_member_in_ctor"]={ | ||
Line 915: | Line 915: | ||
[h]=m, | [h]=m, | ||
[i]={"7ae2d7758f3f",1264929171,"Rework base and member initialization in constructors, with several"}, | [i]={"7ae2d7758f3f",1264929171,"Rework base and member initialization in constructors, with several"}, | ||
[j]={{z, | [j]={{z,5048,"static bool BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor, ImplicitInitializerKind ImplicitInitKind, FieldDecl *Field, IndirectFieldDecl *Indirect, CXXCtorInitializer *&CXXMemberInit) {\n if (!Field->getParent()->isUnion()) {\n if (FieldBaseElementType->isReferenceType()) {\n SemaRef.Diag(Constructor->getLocation(), diag::err_uninitialized_member_in_ctor) << (int)Constructor->isImplicit() << SemaRef.Context.getTagDeclType(Constructor->getParent()) << 0 << Field->getDeclName();"},{z,5058,"static bool BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor, ImplicitInitializerKind ImplicitInitKind, FieldDecl *Field, IndirectFieldDecl *Indirect, CXXCtorInitializer *&CXXMemberInit) {\n if (!Field->getParent()->isUnion()) {\n if (FieldBaseElementType.isConstQualified()) {\n SemaRef.Diag(Constructor->getLocation(), diag::err_uninitialized_member_in_ctor) << (int)Constructor->isImplicit() << SemaRef.Context.getTagDeclType(Constructor->getParent()) << 1 << Field->getDeclName();"},{T,9956,"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 S.Diag(Kind.getLocation(), diag::err_uninitialized_member_in_ctor) << (Constructor->getInheritedConstructor() ? 2 : Constructor->isImplicit() ? 1 : 0) << S.Context.getTypeDeclType(Constructor->getParent()) << /*const=*/1 << Entity.getName();"}} | ||
}, | }, | ||
["err_union_as_base_class"]={ | ["err_union_as_base_class"]={ | ||
Line 927: | Line 927: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{z, | [j]={{z,2718,"/// 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 be used as a base class.\n if (BaseType->isUnionType()) {\n Diag(BaseLoc, diag::err_union_as_base_class) << SpecifierRange;"}} | ||
}, | }, | ||
["err_union_member_of_reference_type"]={ | ["err_union_member_of_reference_type"]={ | ||
Line 939: | Line 939: | ||
[h]=m, | [h]=m, | ||
[i]={"2ceb347e8bce",1289157235,"A union cannot contain static data members or data members of reference type."}, | [i]={"2ceb347e8bce",1289157235,"A union cannot contain static data members or data members of reference type."}, | ||
[j]={{w, | [j]={{w,18241,"/// 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 && getLangOpts().CPlusPlus) {\n if (Record->isUnion()) {\n // C++ [class.union]p1: If a union contains a member of reference type,\n // the program is ill-formed, except when compiling with MSVC extensions\n // enabled.\n if (EltTy->isReferenceType()) {\n Diag(NewFD->getLocation(), getLangOpts().MicrosoftExt ? diag::ext_union_member_of_reference_type : diag::err_union_member_of_reference_type) << NewFD->getDeclName() << EltTy;"}} | ||
}, | }, | ||
["err_unknown_analyzer_checker_or_package"]={ | ["err_unknown_analyzer_checker_or_package"]={ | ||
Line 951: | Line 951: | ||
[h]=q, | [h]=q, | ||
[i]={"a079a4270851",1565920394,"[analyzer] Analysis: Silence checkers"}, | [i]={"a079a4270851",1565920394,"[analyzer] Analysis: Silence checkers"}, | ||
[j]={{"clang/lib/Frontend/CompilerInvocation.cpp", | [j]={{"clang/lib/Frontend/CompilerInvocation.cpp",1169,"#include \"clang/StaticAnalyzer/Core/AnalyzerOptions.def\"\n // FIXME: Here we try to validate the silenced checkers or packages are valid.\n // The current approach only validates the registered checkers which does not\n // contain the runtime enabled checkers and optimally we would validate both.\n if (!AnOpts.RawSilencedCheckersAndPackages.empty()) {\n for (const StringRef &CheckerOrPackage : CheckersAndPackages) {\n if (Diags) {\n if (!IsValidName)\n Diags->Report(diag::err_unknown_analyzer_checker_or_package) << CheckerOrPackage;"},{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",178,"#endif\n // Parse \'-analyzer-checker\' and \'-analyzer-disable-checker\' options from the\n // command line.\n for (const std::pair<std::string, bool> &Opt : AnOpts.CheckersAndPackages) {\n if (CheckerForCmdLineArg.begin() == CheckerForCmdLineArg.end()) {\n Diags.Report(diag::err_unknown_analyzer_checker_or_package) << Opt.first;"},{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",525,"void CheckerRegistry::validateCheckerOptions() const {\n for (const auto &Config : AnOpts.Config) {\n Diags.Report(diag::err_unknown_analyzer_checker_or_package) << SuppliedCheckerOrPackage;"}} | ||
}, | }, | ||
["err_unknown_any_addrof"]={ | ["err_unknown_any_addrof"]={ | ||
Line 963: | Line 963: | ||
[h]=m, | [h]=m, | ||
[i]={"2979fe01da2c",1302568968,"After some discussion with Doug, we decided that it made a lot more sense"}, | [i]={"2979fe01da2c",1302568968,"After some discussion with Doug, we decided that it made a lot more sense"}, | ||
[j]={{y, | [j]={{y,21132,"/// A visitor for rebuilding an expression of type __unknown_anytype\n/// into one which resolves the type directly on the referring\n/// expression. Strict preservation of the original source\n/// structure is not a goal.\nstruct RebuildUnknownAnyExpr : StmtVisitor<RebuildUnknownAnyExpr, ExprResult> {\n ExprResult VisitUnaryAddrOf(UnaryOperator *E) {\n if (!Ptr) {\n S.Diag(E->getOperatorLoc(), diag::err_unknown_any_addrof) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_unknown_any_addrof_call"]={ | ["err_unknown_any_addrof_call"]={ | ||
Line 975: | Line 975: | ||
[h]=m, | [h]=m, | ||
[i]={"f7d563c76c40",1479514383,"[Sema] Don\'t allow applying address-of operator to a call to a function"}, | [i]={"f7d563c76c40",1479514383,"[Sema] Don\'t allow applying address-of operator to a call to a function"}, | ||
[j]={{y, | [j]={{y,21190,"/// A visitor for rebuilding an expression of type __unknown_anytype\n/// into one which resolves the type directly on the referring\n/// expression. Strict preservation of the original source\n/// structure is not a goal.\nstruct RebuildUnknownAnyExpr : StmtVisitor<RebuildUnknownAnyExpr, ExprResult> {\n ExprResult VisitUnaryAddrOf(UnaryOperator *E) {\n if (isa<CallExpr>(E->getSubExpr())) {\n S.Diag(E->getOperatorLoc(), diag::err_unknown_any_addrof_call) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_unknown_any_function"]={ | ["err_unknown_any_function"]={ | ||
Line 987: | Line 987: | ||
[h]=m, | [h]=m, | ||
[i]={"9a877fef910f",1312949543,"Change an assert into a check. I\'m pretty sure there was a point"}, | [i]={"9a877fef910f",1312949543,"Change an assert into a check. I\'m pretty sure there was a point"}, | ||
[j]={{y, | [j]={{y,21393,"ExprResult RebuildUnknownAnyExpr::resolveDecl(Expr *E, ValueDecl *VD) {\n // - functions\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(VD)) {\n if (!Type->isFunctionType()) {\n S.Diag(E->getExprLoc(), diag::err_unknown_any_function) << VD << E->getSourceRange();"}} | ||
}, | }, | ||
["err_unknown_any_var_function_type"]={ | ["err_unknown_any_var_function_type"]={ | ||
Line 999: | Line 999: | ||
[h]=m, | [h]=m, | ||
[i]={"2979fe01da2c",1302568968,"After some discussion with Doug, we decided that it made a lot more sense"}, | [i]={"2979fe01da2c",1302568968,"After some discussion with Doug, we decided that it made a lot more sense"}, | ||
[j]={{y, | [j]={{y,21400,"ExprResult RebuildUnknownAnyExpr::resolveDecl(Expr *E, ValueDecl *VD) {\n // - functions\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(VD)) {\n } else if (isa<VarDecl>(VD)) {\n if (const ReferenceType *RefTy = Type->getAs<ReferenceType>()) {\n } else if (Type->isFunctionType()) {\n S.Diag(E->getExprLoc(), diag::err_unknown_any_var_function_type) << VD << E->getSourceRange();"}} | ||
}, | }, | ||
["err_unknown_hlsl_semantic"]={ | ["err_unknown_hlsl_semantic"]={ | ||
Line 1,011: | Line 1,011: | ||
[h]=q, | [h]=q, | ||
[i]={"1fdf952deeb9",1648668015,"[HLSL] Add Semantic syntax, and SV_GroupIndex"}, | [i]={"1fdf952deeb9",1648668015,"[HLSL] Add Semantic syntax, and SV_GroupIndex"}, | ||
[j]={{"clang/lib/Parse/ParseHLSL.cpp", | [j]={{"clang/lib/Parse/ParseHLSL.cpp",189,"void Parser::ParseHLSLSemantics(ParsedAttributes &Attrs, SourceLocation *EndLoc) {\n case ParsedAttr::UnknownAttribute:\n Diag(Loc, diag::err_unknown_hlsl_semantic) << II;"}} | ||
}, | }, | ||
["err_unknown_nested_typename_suggest"]={ | ["err_unknown_nested_typename_suggest"]={ | ||
Line 1,023: | Line 1,023: | ||
[h]=m, | [h]=m, | ||
[i]={"2d435306e524",1262192684,"Typo correction for type names when they appear in declarations, e.g., given"}, | [i]={"2d435306e524",1262192684,"Typo correction for type names when they appear in declarations, e.g., given"}, | ||
[j]={{w, | [j]={{w,765,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(II, IILoc), LookupOrdinaryName, S, SS, CCC, CTK_ErrorRecovery)) {\n if (Corrected.isKeyword()) {\n } else {\n // We found a similarly-named type or interface; suggest that.\n if (!SS || !SS->isSet()) {\n } else if (DeclContext *DC = computeDeclContext(*SS, false)) {\n diagnoseTypo(Corrected, PDiag(IsTemplateName ? diag::err_no_member_template_suggest : diag::err_unknown_nested_typename_suggest) << II << DC << DroppedSpecifier << SS->getRange(), CanRecover);"},{w,1023,"Corrected:\n case LookupResult::NotFound:\n // Perform typo correction to determine if there is another name that is\n // close to this name.\n if (!SecondTry && CCC) {\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, &SS, *CCC, CTK_ErrorRecovery)) {\n if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && UnderlyingFirstDecl && isa<TemplateDecl>(UnderlyingFirstDecl)) {\n } else if (UnderlyingFirstDecl && (isa<TypeDecl>(UnderlyingFirstDecl) || isa<ObjCInterfaceDecl>(UnderlyingFirstDecl) || isa<ObjCCompatibleAliasDecl>(UnderlyingFirstDecl))) {\n QualifiedDiag = diag::err_unknown_nested_typename_suggest;"}} | ||
}, | }, | ||
["err_unknown_receiver_suggest"]={ | ["err_unknown_receiver_suggest"]={ | ||
Line 1,035: | Line 1,035: | ||
[h]=m, | [h]=m, | ||
[i]={"8aa4ebf0bcf7",1271213197,"Implement typo correction for Objective-C message sends when the"}, | [i]={"8aa4ebf0bcf7",1271213197,"Implement typo correction for Objective-C message sends when the"}, | ||
[j]={{Zb, | [j]={{Zb,2362,"Sema::ObjCMessageKind Sema::getObjCMessageKind(Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType) {\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, nullptr, CCC, CTK_ErrorRecovery, nullptr, false, nullptr, false)) {\n if (Corrected.isKeyword()) {\n diagnoseTypo(Corrected, PDiag(diag::err_unknown_receiver_suggest) << Name);"},{Zb,2369,"Sema::ObjCMessageKind Sema::getObjCMessageKind(Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType) {\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, nullptr, CCC, CTK_ErrorRecovery, nullptr, false, nullptr, false)) {\n if (Corrected.isKeyword()) {\n } else if (ObjCInterfaceDecl *Class = Corrected.getCorrectionDeclAs<ObjCInterfaceDecl>()) {\n diagnoseTypo(Corrected, PDiag(diag::err_unknown_receiver_suggest) << Name);"}} | ||
}, | }, | ||
["err_unknown_template_name"]={ | ["err_unknown_template_name"]={ | ||
Line 1,047: | Line 1,047: | ||
[h]=x, | [h]=x, | ||
[i]={"18473f329dbd",1263331724,"Improve recovery for template-ids whose template-name doesn\'t actually"}, | [i]={"18473f329dbd",1263331724,"Improve recovery for template-ids whose template-name doesn\'t actually"}, | ||
[j]={{L, | [j]={{L,1330,"/// ParseBaseTypeSpecifier - Parse a C++ base-type-specifier which is either a\n/// class name or decltype-specifier. Note that we only check that the result\n/// names a type; semantic analysis will need to verify that the type names a\n/// class. The result is either a type or null, depending on whether a type\n/// name was found.\n///\n/// base-type-specifier: [C++11 class.derived]\n/// class-or-decltype\n/// class-or-decltype: [C++11 class.derived]\n/// nested-name-specifier[opt] class-name\n/// decltype-specifier\n/// class-name: [C++ class.name]\n/// identifier\n/// simple-template-id\n///\n/// In C++98, instead of base-type-specifier, we have:\n///\n/// ::[opt] nested-name-specifier[opt] class-name\nTypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc, SourceLocation &EndLocation) {\n if (Tok.is(tok::less)) {\n if (!Actions.DiagnoseUnknownTemplateName(*Id, IdLoc, getCurScope(), &SS, Template, TNK)) {\n Diag(IdLoc, diag::err_unknown_template_name) << Id;"}} | ||
}, | }, | ||
["err_unknown_type_or_class_name_suggest"]={ | ["err_unknown_type_or_class_name_suggest"]={ | ||
Line 1,059: | Line 1,059: | ||
[h]=m, | [h]=m, | ||
[i]={"9cb8e9fc89d3",1340408225,"Perform typo correction for base class specifiers."}, | [i]={"9cb8e9fc89d3",1340408225,"Perform typo correction for base class specifiers."}, | ||
[j]={{w, | [j]={{w,470,"/// If the identifier refers to a type name within this scope,\n/// return the declaration of that type.\n///\n/// This routine performs ordinary name lookup of the identifier II\n/// within the given scope, with optional C++ scope specifier SS, to\n/// determine whether the name refers to a type. If so, returns an\n/// opaque pointer (actually a QualType) corresponding to that\n/// type. Otherwise, returns NULL.\nParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS, bool isClassName, bool HasTrailingDot, ParsedType ObjectTypePtr, bool IsCtorOrDtorName, bool WantNontrivialTypeSourceInfo, bool IsClassTemplateDeductionContext, ImplicitTypenameContext AllowImplicitTypename, IdentifierInfo **CorrectedII) {\n case LookupResult::NotFoundInCurrentInstantiation:\n if (CorrectedII) {\n if (Correction && (NNS || NewII != &II) &&\n if (Ty) {\n diagnoseTypo(Correction, PDiag(diag::err_unknown_type_or_class_name_suggest) << Result.getLookupName() << isClassName);"},{ob,1733,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n if (corrected) {\n // Did we find an Objective-C class?\n if (auto objcClass = corrected.getCorrectionDeclAs<ObjCInterfaceDecl>()) {\n diagnoseTypo(corrected, PDiag(diag::err_unknown_type_or_class_name_suggest) << identifiers[i] << true);"}} | ||
}, | }, | ||
["err_unknown_typename"]={ | ["err_unknown_typename"]={ | ||
Line 1,071: | Line 1,071: | ||
[h]=m, | [h]=m, | ||
[i]={"6cc055af1df1",1239568951,"Implement the first set of changes for PR3963 and rdar://6759604,"}, | [i]={"6cc055af1df1",1239568951,"Implement the first set of changes for PR3963 and rdar://6759604,"}, | ||
[j]={{w, | [j]={{w,809,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n if (!SS || (!SS->isSet() && !SS->isInvalid()))\n Diag(IILoc, IsTemplateName ? diag::err_no_template : diag::err_unknown_typename) << II;"},{z,12113,"Decl *Sema::ActOnUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation IdentLoc, IdentifierInfo &II, CXXScopeSpec *SS) {\n if (EnumTy.isNull()) {\n Diag(IdentLoc, SS && isDependentScopeSpecifier(*SS) ? diag::err_using_enum_is_dependent : diag::err_unknown_typename) << II.getName() << SourceRange(SS ? SS->getBeginLoc() : IdentLoc, IdentLoc);"},{ob,1746,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n Diag(identifierLocs[i], (lookupKind == LookupAnyName ? diag::err_objc_type_arg_missing : lookupKind == LookupObjCProtocolName ? diag::err_undeclared_protocol : diag::err_unknown_typename)) << identifiers[i];"},{E,11059,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::NotFound: {\n DiagID = Ctx ? diag::err_typename_nested_not_found : diag::err_unknown_typename;"}} | ||
}, | }, | ||
["err_unknown_typename_suggest"]={ | ["err_unknown_typename_suggest"]={ | ||
Line 1,083: | Line 1,083: | ||
[h]=m, | [h]=m, | ||
[i]={"2d435306e524",1262192684,"Typo correction for type names when they appear in declarations, e.g., given"}, | [i]={"2d435306e524",1262192684,"Typo correction for type names when they appear in declarations, e.g., given"}, | ||
[j]={{w, | [j]={{w,748,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(II, IILoc), LookupOrdinaryName, S, SS, CCC, CTK_ErrorRecovery)) {\n if (Corrected.isKeyword()) {\n diagnoseTypo(Corrected, PDiag(IsTemplateName ? diag::err_no_template_suggest : diag::err_unknown_typename_suggest) << II);"},{w,756,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(II, IILoc), LookupOrdinaryName, S, SS, CCC, CTK_ErrorRecovery)) {\n if (Corrected.isKeyword()) {\n } else {\n // We found a similarly-named type or interface; suggest that.\n if (!SS || !SS->isSet()) {\n diagnoseTypo(Corrected, PDiag(IsTemplateName ? diag::err_no_template_suggest : diag::err_unknown_typename_suggest) << II, CanRecover);"},{w,1022,"Corrected:\n case LookupResult::NotFound:\n // Perform typo correction to determine if there is another name that is\n // close to this name.\n if (!SecondTry && CCC) {\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, &SS, *CCC, CTK_ErrorRecovery)) {\n if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && UnderlyingFirstDecl && isa<TemplateDecl>(UnderlyingFirstDecl)) {\n } else if (UnderlyingFirstDecl && (isa<TypeDecl>(UnderlyingFirstDecl) || isa<ObjCInterfaceDecl>(UnderlyingFirstDecl) || isa<ObjCCompatibleAliasDecl>(UnderlyingFirstDecl))) {\n UnqualifiedDiag = diag::err_unknown_typename_suggest;"},{ob,1722,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n if (corrected) {\n // Did we find a type?\n if (auto typeDecl = corrected.getCorrectionDeclAs<TypeDecl>()) {\n diagnoseTypo(corrected, PDiag(diag::err_unknown_typename_suggest) << identifiers[i]);"}} | ||
}, | }, | ||
["err_unofficial_altivec_support_not_enabled"]={ | ["err_unofficial_altivec_support_not_enabled"]={ | ||
Line 1,225: | Line 1,225: | ||
[h]=x, | [h]=x, | ||
[i]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit"}, | [i]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit"}, | ||
[j]={{ub, | [j]={{ub,281,"/// \\brief Parse a constraint-logical-and-expression.\n///\n/// \\verbatim\n/// C++2a[temp.constr.decl]p1\n/// constraint-logical-and-expression:\n/// primary-expression\n/// constraint-logical-and-expression \'&&\' primary-expression\n///\n/// \\endverbatim\nExprResult Parser::ParseConstraintLogicalAndExpression(bool IsTrailingRequiresClause) {\n auto ParsePrimary = [&]() {\n auto RecoverFromNonPrimary = [&](ExprResult E, bool Note) {\n if (!E.isInvalid())\n Diag(E.get()->getExprLoc(), Note ? diag::note_unparenthesized_non_primary_expr_in_requires_clause : diag::err_unparenthesized_non_primary_expr_in_requires_clause) << FixItHint::CreateInsertion(E.get()->getBeginLoc(), \"(\") << FixItHint::CreateInsertion(PP.getLocForEndOfToken(E.get()->getEndLoc()), \")\") << E.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_unqualified_pointer_member_function"]={ | ["err_unqualified_pointer_member_function"]={ | ||
Line 1,237: | Line 1,237: | ||
[h]=m, | [h]=m, | ||
[i]={"9a8dd0db89f7",1263225416,"Make Clang complain about taking the address of an unqualified member function. Fixes PR5985."}, | [i]={"9a8dd0db89f7",1263225416,"Make Clang complain about taking the address of an unqualified member function. Fixes PR5985."}, | ||
[j]={{y, | [j]={{y,14970,"/// 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 // The id-expression was parenthesized.\n if (OrigOp.get() != DRE) {\n } else if (!DRE->getQualifier()) {\n if (MD->getParent()->getName().empty())\n Diag(OpLoc, diag::err_unqualified_pointer_member_function) << op->getSourceRange();"},{y,14978,"/// 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 // The id-expression was parenthesized.\n if (OrigOp.get() != DRE) {\n } else if (!DRE->getQualifier()) {\n if (MD->getParent()->getName().empty())\n else {\n Diag(OpLoc, diag::err_unqualified_pointer_member_function) << op->getSourceRange() << FixItHint::CreateInsertion(op->getSourceRange().getBegin(), Qual);"}} | ||
}, | }, | ||
["err_unspecified_size_with_static"]={ | ["err_unspecified_size_with_static"]={ | ||
Line 1,249: | Line 1,249: | ||
[h]=x, | [h]=x, | ||
[i]={"f9834d5fa094",1407482478,"Parser: Array decls with static but without array size are illformed"}, | [i]={"f9834d5fa094",1407482478,"Parser: Array decls with static but without array size are illformed"}, | ||
[j]={{F, | [j]={{F,7627,"/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\nvoid Parser::ParseBracketDeclarator(Declarator &D) {\n // Handle the case where we have \'[*]\' as the array size. However, a leading\n // star could be the start of an expression, for example \'X[*p + 4]\'. Verify\n // the token after the star is a \']\'. Since stars in arrays are\n // infrequent, use of lookahead is not costly here.\n if (Tok.is(tok::star) && GetLookAheadToken(1).is(tok::r_square)) {\n } else if (Tok.isNot(tok::r_square)) {\n } else {\n if (StaticLoc.isValid()) {\n Diag(StaticLoc, diag::err_unspecified_size_with_static);"}} | ||
}, | }, | ||
["err_unspecified_vla_size_with_static"]={ | ["err_unspecified_vla_size_with_static"]={ | ||
Line 1,261: | Line 1,261: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{F, | [j]={{F,7605,"/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\nvoid Parser::ParseBracketDeclarator(Declarator &D) {\n // Handle the case where we have \'[*]\' as the array size. However, a leading\n // star could be the start of an expression, for example \'X[*p + 4]\'. Verify\n // the token after the star is a \']\'. Since stars in arrays are\n // infrequent, use of lookahead is not costly here.\n if (Tok.is(tok::star) && GetLookAheadToken(1).is(tok::r_square)) {\n if (StaticLoc.isValid()) {\n Diag(StaticLoc, diag::err_unspecified_vla_size_with_static);"}} | ||
}, | }, | ||
["err_unsupported_abi_for_opt"]={ | ["err_unsupported_abi_for_opt"]={ | ||
Line 1,273: | Line 1,273: | ||
[h]=q, | [h]=q, | ||
[i]={"eb63256095dd",1534929985,"[clang][mips] Set __mips_fpr correctly for -mfpxx"}, | [i]={"eb63256095dd",1534929985,"[clang][mips] Set __mips_fpr correctly for -mfpxx"}, | ||
[j]={{"clang/lib/Basic/Targets/Mips.cpp", | [j]={{"clang/lib/Basic/Targets/Mips.cpp",251,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // -fpxx is valid only for the o32 ABI\n if (FPMode == FPXX && (ABI == \"n32\" || ABI == \"n64\")) {\n Diags.Report(diag::err_unsupported_abi_for_opt) << \"-mfpxx\""}} | ||
}, | }, | ||
["err_unsupported_ast_node"]={ | ["err_unsupported_ast_node"]={ | ||
Line 1,285: | Line 1,285: | ||
[h]=q, | [h]=q, | ||
[i]={"e4c83e4e2e09",1265755713,"Complain about types and declarations that we don\'t know how to import."}, | [i]={"e4c83e4e2e09",1265755713,"Complain about types and declarations that we don\'t know how to import."}, | ||
[j]={{jc, | [j]={{jc,1069,"ExpectedType ASTNodeImporter::VisitType(const Type *T) {\n Importer.FromDiag(SourceLocation(), diag::err_unsupported_ast_node) << T->getTypeClassName();"},{jc,1718,"//----------------------------------------------------------------------------\n// Import Declarations\n//----------------------------------------------------------------------------\nError ASTNodeImporter::ImportDeclParts(NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC, DeclarationName &Name, NamedDecl *&ToD, SourceLocation &Loc) {\n if (isa<RecordDecl>(D) && (FunDecl = dyn_cast<FunctionDecl>(OrigDC)) && FunDecl->hasBody()) {\n for (const ParmVarDecl *P : FunDecl->parameters()) {\n if (RT && RT->getDecl() == D) {\n Importer.FromDiag(D->getLocation(), diag::err_unsupported_ast_node) << D->getDeclKindName();"},{jc,2263,"ExpectedDecl ASTNodeImporter::VisitDecl(Decl *D) {\n Importer.FromDiag(D->getLocation(), diag::err_unsupported_ast_node) << D->getDeclKindName();"},{jc,2269,"ExpectedDecl ASTNodeImporter::VisitImportDecl(ImportDecl *D) {\n Importer.FromDiag(D->getLocation(), diag::err_unsupported_ast_node) << D->getDeclKindName();"},{jc,6447,"ExpectedStmt ASTNodeImporter::VisitStmt(Stmt *S) {\n Importer.FromDiag(S->getBeginLoc(), diag::err_unsupported_ast_node) << S->getStmtClassName();"},{jc,6961,"//----------------------------------------------------------------------------\n// Import Expressions\n//----------------------------------------------------------------------------\nExpectedStmt ASTNodeImporter::VisitExpr(Expr *E) {\n Importer.FromDiag(E->getBeginLoc(), diag::err_unsupported_ast_node) << E->getStmtClassName();"}} | ||
}, | }, | ||
["err_unsupported_bom"]={ | ["err_unsupported_bom"]={ | ||
Line 1,297: | Line 1,297: | ||
[h]=q, | [h]=q, | ||
[i]={"8fbe98b3b6e4",1271787243,"enhance sourcemgr to detect various UTF BOM\'s and emit a fatal error"}, | [i]={"8fbe98b3b6e4",1271787243,"enhance sourcemgr to detect various UTF BOM\'s and emit a fatal error"}, | ||
[j]={{"clang/lib/Basic/SourceManager.cpp", | [j]={{"clang/lib/Basic/SourceManager.cpp",181,"std::optional<llvm::MemoryBufferRef> ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, SourceLocation Loc) const {\n if (InvalidBOM) {\n Diag.Report(Loc, diag::err_unsupported_bom) << InvalidBOM << ContentsEntry->getName();"}} | ||
}, | }, | ||
["err_unsupported_cxx_abi"]={ | ["err_unsupported_cxx_abi"]={ | ||
Line 1,309: | Line 1,309: | ||
[h]=q, | [h]=q, | ||
[i]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths."}, | [i]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths."}, | ||
[j]={{"clang/lib/Frontend/CompilerInvocation.cpp", | [j]={{"clang/lib/Frontend/CompilerInvocation.cpp",4026,"#include \"clang/Driver/Options.inc\"\n if (!CXXABI.empty()) {\n if (!TargetCXXABI::isABI(CXXABI)) {\n } else {\n if (!TargetCXXABI::isSupportedCXXABI(T, Kind))\n Diags.Report(diag::err_unsupported_cxx_abi) << CXXABI << T.str();"}} | ||
}, | }, | ||
["err_unsupported_module_partition"]={ | ["err_unsupported_module_partition"]={ | ||
Line 1,321: | Line 1,321: | ||
[h]=xc, | [h]=xc, | ||
[i]={"d652bdd05f1c",1555229219,"[c++20] Parsing support for module-declarations, import-declarations,"}, | [i]={"d652bdd05f1c",1555229219,"[c++20] Parsing support for module-declarations, import-declarations,"}, | ||
[j]={{wb, | [j]={{wb,2454,"/// 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 if (Tok.is(tok::colon)) {\n if (!getLangOpts().CPlusPlusModules)\n Diag(ColonLoc, diag::err_unsupported_module_partition) << SourceRange(ColonLoc, Partition.back().second);"},{wb,2519,"/// 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 if (Tok.is(tok::header_name)) {\n } else if (Tok.is(tok::annot_header_unit)) {\n } else if (Tok.is(tok::colon)) {\n if (!getLangOpts().CPlusPlusModules)\n Diag(ColonLoc, diag::err_unsupported_module_partition) << SourceRange(ColonLoc, Path.back().second);"}} | ||
}, | }, | ||
["err_unsupported_placeholder_constraint"]={ | ["err_unsupported_placeholder_constraint"]={ | ||
Line 1,333: | Line 1,333: | ||
[h]=m, | [h]=m, | ||
[i]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk"}, | [i]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk"}, | ||
[j]={{E, | [j]={{E,1274,"bool Sema::AttachTypeConstraint(AutoTypeLoc TL, NonTypeTemplateParmDecl *NewConstrainedParm, NonTypeTemplateParmDecl *OrigConstrainedParm, SourceLocation EllipsisLoc) {\n if (NewConstrainedParm->getType() != TL.getType() || TL.getAutoKeyword() != AutoTypeKeyword::Auto) {\n Diag(NewConstrainedParm->getTypeSourceInfo()->getTypeLoc().getBeginLoc(), diag::err_unsupported_placeholder_constraint) << NewConstrainedParm->getTypeSourceInfo()->getTypeLoc().getSourceRange();"}} | ||
}, | }, | ||
["err_unsupported_string_concat"]={ | ["err_unsupported_string_concat"]={ | ||
Line 1,345: | Line 1,345: | ||
[h]=A, | [h]=A, | ||
[i]={"fb65e592e05a",1311745230,"Add support for C++0x unicode string and character literals, from Craig Topper!"}, | [i]={"fb65e592e05a",1311745230,"Add support for C++0x unicode string and character literals, from Craig Topper!"}, | ||
[j]={{cb, | [j]={{cb,1964,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n /// (C99 5.1.1.2p1). The common case is only one string fragment.\n for (const Token &Tok : StringToks) {\n // Remember if we see any wide or utf-8/16/32 strings.\n // Also check for illegal concatenations.\n if (isUnevaluated() && Tok.getKind() != tok::string_literal) {\n } else if (Tok.isNot(Kind) && Tok.isNot(tok::string_literal)) {\n if (isOrdinary()) {\n } else {\n if (Diags)\n Diags->Report(Tok.getLocation(), diag::err_unsupported_string_concat);"}} | ||
}, | }, | ||
["err_unsupported_unknown_any_call"]={ | ["err_unsupported_unknown_any_call"]={ | ||
Line 1,357: | Line 1,357: | ||
[h]=m, | [h]=m, | ||
[i]={"2979fe01da2c",1302568968,"After some discussion with Doug, we decided that it made a lot more sense"}, | [i]={"2979fe01da2c",1302568968,"After some discussion with Doug, we decided that it made a lot more sense"}, | ||
[j]={{y, | [j]={{y,21094,"/// A visitor for rebuilding a call to an __unknown_any expression\n/// to have an appropriate type.\nstruct RebuildUnknownAnyFunction : StmtVisitor<RebuildUnknownAnyFunction, ExprResult> {\n ExprResult VisitExpr(Expr *E) {\n S.Diag(E->getExprLoc(), diag::err_unsupported_unknown_any_call) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_unsupported_unknown_any_decl"]={ | ["err_unsupported_unknown_any_decl"]={ | ||
Line 1,369: | Line 1,369: | ||
[h]=m, | [h]=m, | ||
[i]={"2d2e870745c2",1302505370,"More __unknown_anytype work."}, | [i]={"2d2e870745c2",1302505370,"More __unknown_anytype work."}, | ||
[j]={{y, | [j]={{y,21421,"ExprResult RebuildUnknownAnyExpr::resolveDecl(Expr *E, ValueDecl *VD) {\n // - functions\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(VD)) {\n } else if (isa<VarDecl>(VD)) {\n } else {\n S.Diag(E->getExprLoc(), diag::err_unsupported_unknown_any_decl) << VD << E->getSourceRange();"}} | ||
}, | }, | ||
["err_unsupported_unknown_any_expr"]={ | ["err_unsupported_unknown_any_expr"]={ | ||
Line 1,381: | Line 1,381: | ||
[h]=m, | [h]=m, | ||
[i]={"2d2e870745c2",1302505370,"More __unknown_anytype work."}, | [i]={"2d2e870745c2",1302505370,"More __unknown_anytype work."}, | ||
[j]={{y, | [j]={{y,21126,"/// A visitor for rebuilding an expression of type __unknown_anytype\n/// into one which resolves the type directly on the referring\n/// expression. Strict preservation of the original source\n/// structure is not a goal.\nstruct RebuildUnknownAnyExpr : StmtVisitor<RebuildUnknownAnyExpr, ExprResult> {\n ExprResult VisitExpr(Expr *E) {\n S.Diag(E->getExprLoc(), diag::err_unsupported_unknown_any_expr) << E->getSourceRange();"},{y,21537,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n if (DeclRefExpr *ref = dyn_cast<DeclRefExpr>(E)) {\n } else if (MemberExpr *mem = dyn_cast<MemberExpr>(E)) {\n } else if (ObjCMessageExpr *msg = dyn_cast<ObjCMessageExpr>(E)) {\n } else {\n S.Diag(E->getExprLoc(), diag::err_unsupported_unknown_any_expr) << E->getSourceRange();"}} | ||
}, | }, | ||
["err_unterm_macro_invoc"]={ | ["err_unterm_macro_invoc"]={ | ||
Line 1,393: | Line 1,393: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{"clang/lib/Lex/PPMacroExpansion.cpp", | [j]={{"clang/lib/Lex/PPMacroExpansion.cpp",815,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n while (Tok.isNot(tok::r_paren)) {\n while (true) {\n if (Tok.isOneOf(tok::eof, tok::eod)) { // \"#if f(<eof>\" & \"#if f(\\n\"\n if (!ContainsCodeCompletionTok) {\n Diag(MacroName, diag::err_unterm_macro_invoc);"},{"clang/lib/Lex/PPMacroExpansion.cpp",1322,"/// Process single-argument builtin feature-like macros that return\n/// integer values.\nstatic void EvaluateFeatureLikeBuiltinMacro(llvm::raw_svector_ostream &OS, Token &Tok, IdentifierInfo *II, Preprocessor &PP, bool ExpandArgs, llvm::function_ref<int(Token &Tok, bool &HasLexedNextTok)> Op) {\n already_lexed:\n case tok::eod:\n PP.Diag(Tok.getLocation(), diag::err_unterm_macro_invoc);"}} | ||
}, | }, | ||
["err_unterminated___pragma"]={ | ["err_unterminated___pragma"]={ | ||
Line 1,405: | Line 1,405: | ||
[h]=A, | [h]=A, | ||
[i]={"49039d4afb3f",1283044194,"Complain if a __pragma isn\'t terminated."}, | [i]={"49039d4afb3f",1283044194,"Complain if a __pragma isn\'t terminated."}, | ||
[j]={{lb, | [j]={{lb,388,"/// 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.is(tok::eof)) {\n Diag(PragmaLoc, diag::err_unterminated___pragma);"}} | ||
}, | }, | ||
["err_unterminated_block_comment"]={ | ["err_unterminated_block_comment"]={ | ||
Line 1,417: | Line 1,417: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{Z, | [j]={{Z,2735,"/// We have just read from input the / and * characters that started a comment.\n/// Read until we find the * and / characters that terminate the comment.\n/// Note that we don\'t bother decoding trigraphs or escaped newlines in block\n/// comments, because they cannot cause the comment to end. The only thing\n/// that can happen is the comment could end with an escaped newline between\n/// the terminating * and /.\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::SkipBlockComment(Token &Result, const char *CurPtr, bool &TokAtPhysicalStartOfLine) {\n if (C == 0 && CurPtr == BufferEnd + 1) {\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::err_unterminated_block_comment);"},{Z,2881,"#endif\n FoundSlash:\n } else if (C == 0 && CurPtr == BufferEnd + 1) {\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::err_unterminated_block_comment);"}} | ||
}, | }, | ||
["err_unterminated_raw_string"]={ | ["err_unterminated_raw_string"]={ | ||
Line 1,429: | Line 1,429: | ||
[h]=A, | [h]=A, | ||
[i]={"54edccafc5e3",1313035575,"Add support for C++0x raw string literals."}, | [i]={"54edccafc5e3",1313035575,"Add support for C++0x raw string literals."}, | ||
[j]={{Z, | [j]={{Z,2198,"/// LexRawStringLiteral - Lex the remainder of a raw string literal, after\n/// having lexed R\", LR\", u8R\", uR\", or UR\".\nbool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n while (true) {\n if (C == \')\') {\n } else if (C == 0 && CurPtr - 1 == BufferEnd) { // End of file.\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::err_unterminated_raw_string) << StringRef(Prefix, PrefixLen);"}} | ||
}, | }, | ||
["err_upcast_to_inaccessible_base"]={ | ["err_upcast_to_inaccessible_base"]={ | ||
Line 1,441: | Line 1,441: | ||
[h]=m, | [h]=m, | ||
[i]={"5b0829a321d5",1265794272,"Improve access control diagnostics. Perform access control on member-pointer"}, | [i]={"5b0829a321d5",1265794272,"Improve access control diagnostics. Perform access control on member-pointer"}, | ||
[j]={{Ab, | [j]={{Ab,1833,"/// 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 (!CStyle) {\n switch (Self.CheckBaseClassAccess(OpRange.getBegin(), DestClass, SrcClass, Paths.front(), diag::err_upcast_to_inaccessible_base)) {"},{z,3166,"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); }"},{Jb,3146,"/// 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 InaccessibleID = diag::err_upcast_to_inaccessible_base;"}} | ||
}, | }, | ||
["err_use_continuation_class"]={ | ["err_use_continuation_class"]={ | ||
Line 1,453: | Line 1,453: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{Cc, | [j]={{Cc,464,"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 // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // A readonly property declared in the primary class can be refined\n // by adding a readwrite property within an extension.\n // Anything else is an error.\n if (!(PIDecl->isReadOnly() && isReadWrite)) {\n unsigned diag = (Attributes & ObjCPropertyAttribute::kind_readwrite) && (PIDecl->getPropertyAttributesAsWritten() & ObjCPropertyAttribute::kind_readwrite) ? diag::err_use_continuation_class_redeclaration_readwrite : diag::err_use_continuation_class;"}} | ||
}, | }, | ||
["err_use_continuation_class_redeclaration_readwrite"]={ | ["err_use_continuation_class_redeclaration_readwrite"]={ | ||
Line 1,465: | Line 1,465: | ||
[h]=m, | [h]=m, | ||
[i]={"5ef9ad9907a7",1287686982,"Tweak diagnostics for redeclaration of a @property in a class extension where the redelcaration and ..."}, | [i]={"5ef9ad9907a7",1287686982,"Tweak diagnostics for redeclaration of a @property in a class extension where the redelcaration and ..."}, | ||
[j]={{Cc, | [j]={{Cc,463,"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 // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // A readonly property declared in the primary class can be refined\n // by adding a readwrite property within an extension.\n // Anything else is an error.\n if (!(PIDecl->isReadOnly() && isReadWrite)) {\n unsigned diag = (Attributes & ObjCPropertyAttribute::kind_readwrite) && (PIDecl->getPropertyAttributesAsWritten() & ObjCPropertyAttribute::kind_readwrite) ? diag::err_use_continuation_class_redeclaration_readwrite : diag::err_use_continuation_class;"}} | ||
}, | }, | ||
["err_use_of_default_argument_to_function_declared_later"]={ | ["err_use_of_default_argument_to_function_declared_later"]={ | ||
Line 1,477: | Line 1,477: | ||
[h]=m, | [h]=m, | ||
[i]={"84613c4eba08",1244825500,"It\'s an error to use a function declared in a class definition as a default argument before the func..."}, | [i]={"84613c4eba08",1244825500,"It\'s an error to use a function declared in a class definition as a default argument before the func..."}, | ||
[j]={{y, | [j]={{y,6035,"bool Sema::CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *RewrittenInit, bool SkipImmediateInvocations) {\n if (Param->hasUnparsedDefaultArg()) {\n Diag(CallLoc, diag::err_use_of_default_argument_to_function_declared_later) << FD << cast<CXXRecordDecl>(FD->getDeclContext());"}} | ||
}, | }, | ||
["err_use_of_empty_using_if_exists"]={ | ["err_use_of_empty_using_if_exists"]={ | ||
Line 1,489: | Line 1,489: | ||
[h]=m, | [h]=m, | ||
[i]={bc,1615397021,fc}, | [i]={bc,1615397021,fc}, | ||
[j]={{y, | [j]={{y,366,"/// 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 if (const auto *EmptyD = dyn_cast<UnresolvedUsingIfExistsDecl>(D)) {\n Diag(Loc, diag::err_use_of_empty_using_if_exists);"}} | ||
}, | }, | ||
["err_use_of_tag_name_without_tag"]={ | ["err_use_of_tag_name_without_tag"]={ | ||
Line 1,501: | Line 1,501: | ||
[h]=q, | [h]=q, | ||
[i]={"ffaa0e6919b0",1239572970,"Diagnose invalid uses of tagged types with a missing tag. For example, in:"}, | [i]={"ffaa0e6919b0",1239572970,"Diagnose invalid uses of tagged types with a missing tag. For example, in:"}, | ||
[j]={{F, | [j]={{F,2823,"/// 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 // Otherwise, if we don\'t consume this token, we are going to emit an\n // error anyway. Try to recover from various common problems. Check\n // to see if this was a reference to a tag name without a tag specified.\n // This is a common problem in C (saying \'foo\' instead of \'struct foo\').\n //\n // C++ doesn\'t need this, and isTagName doesn\'t take SS.\n if (SS == nullptr) {\n if (TagName) {\n Diag(Loc, diag::err_use_of_tag_name_without_tag) << TokenName << TagName << getLangOpts().CPlusPlus << FixItHint::CreateInsertion(Tok.getLocation(), FixitTagName);"},{w,883,"static bool isTagTypeWithMissingTag(Sema &SemaRef, LookupResult &Result, Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc) {\n if (TagDecl *Tag = R.getAsSingle<TagDecl>()) {\n SemaRef.Diag(NameLoc, diag::err_use_of_tag_name_without_tag) << Name << TagName << SemaRef.getLangOpts().CPlusPlus << FixItHint::CreateInsertion(NameLoc, FixItTagName);"}} | ||
}, | }, | ||
["err_use_of_unaddressable_function"]={ | ["err_use_of_unaddressable_function"]={ | ||
Line 1,513: | Line 1,513: | ||
[h]=m, | [h]=m, | ||
[i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | [i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | ||
[j]={{y, | [j]={{y,21597,"/// 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 if (DRE) {\n if (Context.BuiltinInfo.isInStdNamespace(BuiltinID)) {\n Diag(E->getBeginLoc(), getLangOpts().CPlusPlus20 ? diag::err_use_of_unaddressable_function : diag::warn_cxx20_compat_use_of_unaddressable_function);"}} | ||
}, | }, | ||
["err_use_with_wrong_tag"]={ | ["err_use_with_wrong_tag"]={ | ||
Line 1,525: | Line 1,525: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,17241,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n if (!Previous.empty()) {\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // If this is a use of a previous tag, or if the tag is already declared\n // in the same scope (so that the definition/declaration completes or\n // rementions the tag), reuse the decl.\n if (TUK == TUK_Reference || TUK == TUK_Friend || isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // Make sure that this wasn\'t declared as an enum and now used as a\n // struct or something similar.\n if (!isAcceptableTagRedeclaration(PrevTagDecl, Kind, TUK == TUK_Definition, KWLoc, Name)) {\n if (SafeToContinue)\n Diag(KWLoc, diag::err_use_with_wrong_tag) << Name << FixItHint::CreateReplacement(SourceRange(KWLoc), PrevTagDecl->getKindName());"},{w,17246,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n if (!Previous.empty()) {\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // If this is a use of a previous tag, or if the tag is already declared\n // in the same scope (so that the definition/declaration completes or\n // rementions the tag), reuse the decl.\n if (TUK == TUK_Reference || TUK == TUK_Friend || isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // Make sure that this wasn\'t declared as an enum and now used as a\n // struct or something similar.\n if (!isAcceptableTagRedeclaration(PrevTagDecl, Kind, TUK == TUK_Definition, KWLoc, Name)) {\n if (SafeToContinue)\n else\n Diag(KWLoc, diag::err_use_with_wrong_tag) << Name;"},{E,2006,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n if (PrevClassTemplate) {\n if (!isAcceptableTagRedeclaration(PrevRecordDecl, Kind, TUK == TUK_Definition, KWLoc, Name)) {\n Diag(KWLoc, diag::err_use_with_wrong_tag) << Name << FixItHint::CreateReplacement(KWLoc, PrevRecordDecl->getKindName());"},{E,4302,"TypeResult Sema::ActOnTagTemplateIdType(TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) {\n // Check the tag kind\n if (const RecordType *RT = Result->getAs<RecordType>()) {\n if (!isAcceptableTagRedeclaration(D, TagKind, TUK == TUK_Definition, TagLoc, Id)) {\n Diag(TagLoc, diag::err_use_with_wrong_tag) << Result << FixItHint::CreateReplacement(SourceRange(TagLoc), D->getKindName());"},{E,8714,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n if (!isAcceptableTagRedeclaration(ClassTemplate->getTemplatedDecl(), Kind, TUK == TUK_Definition, KWLoc, ClassTemplate->getIdentifier())) {\n Diag(KWLoc, diag::err_use_with_wrong_tag) << ClassTemplate << FixItHint::CreateReplacement(KWLoc, ClassTemplate->getTemplatedDecl()->getKindName());"},{E,9971,"// Explicit instantiation of a class template specialization\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy TemplateD, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, const ParsedAttributesView &Attr) {\n if (!isAcceptableTagRedeclaration(ClassTemplate->getTemplatedDecl(), Kind, /*isDefinition*/ false, KWLoc, ClassTemplate->getIdentifier())) {\n Diag(KWLoc, diag::err_use_with_wrong_tag) << ClassTemplate << FixItHint::CreateReplacement(KWLoc, ClassTemplate->getTemplatedDecl()->getKindName());"},{"clang/lib/Sema/SemaTemplateInstantiate.cpp",1683,"QualType TemplateInstantiator::RebuildElaboratedType(SourceLocation KeywordLoc, ElaboratedTypeKeyword Keyword, NestedNameSpecifierLoc QualifierLoc, QualType T) {\n if (const TagType *TT = T->getAs<TagType>()) {\n // TODO: should we even warn on struct/class mismatches for this? Seems\n // like it\'s likely to produce a lot of spurious errors.\n if (Id && Keyword != ETK_None && Keyword != ETK_Typename) {\n if (!SemaRef.isAcceptableTagRedeclaration(TD, Kind, /*isDefinition*/ false, TagLocation, Id)) {\n SemaRef.Diag(TagLocation, diag::err_use_with_wrong_tag) << Id << FixItHint::CreateReplacement(SourceRange(TagLocation), TD->getKindName());"}} | ||
}, | }, | ||
["err_using_attribute_ns_conflict"]={ | ["err_using_attribute_ns_conflict"]={ | ||
Line 1,537: | Line 1,537: | ||
[h]=x, | [h]=x, | ||
[i]={"b7d7a046d8e0",1466770512,"Using for attributes voted into C++17."}, | [i]={"b7d7a046d8e0",1466770512,"Using for attributes voted into C++17."}, | ||
[j]={{L, | [j]={{L,4594,"/// Parse a C++11 or C2x attribute-specifier.\n///\n/// [C++11] attribute-specifier:\n/// \'[\' \'[\' attribute-list \']\' \']\'\n/// alignment-specifier\n///\n/// [C++11] attribute-list:\n/// attribute[opt]\n/// attribute-list \',\' attribute[opt]\n/// attribute \'...\'\n/// attribute-list \',\' attribute \'...\'\n///\n/// [C++11] attribute:\n/// attribute-token attribute-argument-clause[opt]\n///\n/// [C++11] attribute-token:\n/// identifier\n/// attribute-scoped-token\n///\n/// [C++11] attribute-scoped-token:\n/// attribute-namespace \'::\' identifier\n///\n/// [C++11] attribute-namespace:\n/// identifier\nvoid Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, CachedTokens &OpenMPTokens, SourceLocation *EndLoc) {\n while (!Tok.isOneOf(tok::r_square, tok::semi, tok::eof)) {\n if (CommonScopeName) {\n if (ScopeName) {\n Diag(ScopeLoc, diag::err_using_attribute_ns_conflict) << SourceRange(CommonScopeLoc);"}} | ||
}, | }, | ||
["err_using_decl_can_not_refer_to_class_member"]={ | ["err_using_decl_can_not_refer_to_class_member"]={ | ||
Line 1,549: | Line 1,549: | ||
[h]=m, | [h]=m, | ||
[i]={"5a9c5acf0f49",1251430518,"More work on using declarations."}, | [i]={"5a9c5acf0f49",1251430518,"More work on using declarations."}, | ||
[j]={{z, | [j]={{z,13057,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n if (!CurContext->isRecord()) {\n Diag(NameLoc, Cxx20Enumerator ? diag::warn_cxx17_compat_using_decl_class_member_enumerator : diag::err_using_decl_can_not_refer_to_class_member) << SS.getRange();"}} | ||
}, | }, | ||
["err_using_decl_can_not_refer_to_namespace"]={ | ["err_using_decl_can_not_refer_to_namespace"]={ | ||
Line 1,561: | Line 1,561: | ||
[h]=m, | [h]=m, | ||
[i]={"5a9c5acf0f49",1251430518,"More work on using declarations."}, | [i]={"5a9c5acf0f49",1251430518,"More work on using declarations."}, | ||
[j]={{z, | [j]={{z,12795,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n // C++14 [namespace.udecl]p6:\n // A using-declaration shall not name a namespace.\n if (R.getAsSingle<NamespaceDecl>()) {\n Diag(IdentLoc, diag::err_using_decl_can_not_refer_to_namespace) << SS.getRange();"}} | ||
}, | }, | ||
["err_using_decl_conflict"]={ | ["err_using_decl_conflict"]={ | ||
Line 1,573: | Line 1,573: | ||
[h]=m, | [h]=m, | ||
[i]={"84d8767c1582",1260438112,"Implement redeclaration checking and hiding semantics for using declarations. There"}, | [i]={"84d8767c1582",1260438112,"Implement redeclaration checking and hiding semantics for using declarations. There"}, | ||
[j]={{z, | [j]={{z,12276,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // Always emit a diagnostic for a mismatch between an unresolved\n // using_if_exists and a resolved using declaration in either direction.\n if (isa<UnresolvedUsingIfExistsDecl>(Target) != (isa_and_nonnull<UnresolvedUsingIfExistsDecl>(NonTag))) {\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"},{z,12292,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n if (FunctionDecl *FD = Target->getAsFunction()) {\n case Ovl_NonFunction:\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"},{z,12304,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n if (FunctionDecl *FD = Target->getAsFunction()) {\n // We found a decl with the exact signature.\n case Ovl_Match:\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"},{z,12320,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n if (isa<TagDecl>(Target)) {\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"},{z,12330,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"}} | ||
}, | }, | ||
["err_using_decl_conflict_reverse"]={ | ["err_using_decl_conflict_reverse"]={ | ||
Line 1,585: | Line 1,585: | ||
[h]=m, | [h]=m, | ||
[i]={"e29c5cd2398c",1260474663,"Improve the diagnostic when a new declaration conflicts with a using shadow"}, | [i]={"e29c5cd2398c",1260474663,"Improve the diagnostic when a new declaration conflicts with a using shadow"}, | ||
[j]={{w, | [j]={{w,3554,"/// Check whether a redeclaration of an entity introduced by a\n/// using-declaration is valid, given that we know it\'s not an overload\n/// (nor a hidden tag declaration).\ntemplate <typename ExpectedDecl> static bool checkUsingShadowRedecl(Sema &S, UsingShadowDecl *OldS, ExpectedDecl *New) {\n if (!Old) {\n S.Diag(New->getLocation(), diag::err_using_decl_conflict_reverse);"},{w,17214,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n if (!Previous.empty()) {\n // If this is a redeclaration of a using shadow declaration, it must\n // declare a tag in the same context. In MSVC mode, we allow a\n // redefinition if either context is within the other.\n if (auto *Shadow = dyn_cast<UsingShadowDecl>(DirectPrevDecl)) {\n if (SS.isEmpty() && TUK != TUK_Reference && TUK != TUK_Friend && isDeclInScope(Shadow, SearchDC, S, isMemberSpecialization) && !(OldTag && isAcceptableTagRedeclContext(*this, OldTag->getDeclContext(), SearchDC))) {\n Diag(KWLoc, diag::err_using_decl_conflict_reverse);"},{E,1978,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n if (auto *Shadow = dyn_cast_or_null<UsingShadowDecl>(PrevDecl ? Previous.getRepresentativeDecl() : nullptr)) {\n if (SS.isEmpty() && !(PrevClassTemplate && PrevClassTemplate->getDeclContext()->getRedeclContext()->Equals(SemanticContext->getRedeclContext()))) {\n Diag(KWLoc, diag::err_using_decl_conflict_reverse);"}} | ||
}, | }, | ||
["err_using_decl_constructor"]={ | ["err_using_decl_constructor"]={ | ||
Line 1,597: | Line 1,597: | ||
[h]=m, | [h]=m, | ||
[i]={"220f4277bd2a",1257352206,"Switch parsing of using declarations over to ParseUnqualifiedId."}, | [i]={"220f4277bd2a",1257352206,"Switch parsing of using declarations over to ParseUnqualifiedId."}, | ||
[j]={{z, | [j]={{z,12040,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n case UnqualifiedIdKind::IK_ConstructorTemplateId:\n Diag(Name.getBeginLoc(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_using_decl_constructor : diag::err_using_decl_constructor) << SS.getRange();"}} | ||
}, | }, | ||
["err_using_decl_constructor_not_in_direct_base"]={ | ["err_using_decl_constructor_not_in_direct_base"]={ | ||
Line 1,609: | Line 1,609: | ||
[h]=m, | [h]=m, | ||
[i]={"0890502f44a1",1296933799,"Basic implementation of inherited constructors. Only generates declarations, and probably only works..."}, | [i]={"0890502f44a1",1296933799,"Basic implementation of inherited constructors. Only generates declarations, and probably only works..."}, | ||
[j]={{z, | [j]={{z,12905,"/// Additional checks for a using declaration referring to a constructor name.\nbool Sema::CheckInheritingConstructorUsingDecl(UsingDecl *UD) {\n if (!Base && !AnyDependentBases) {\n Diag(UD->getUsingLoc(), diag::err_using_decl_constructor_not_in_direct_base) << UD->getNameInfo().getSourceRange() << QualType(SourceType, 0) << TargetClass;"}} | ||
}, | }, | ||
["err_using_decl_destructor"]={ | ["err_using_decl_destructor"]={ | ||
Line 1,621: | Line 1,621: | ||
[h]=m, | [h]=m, | ||
[i]={"220f4277bd2a",1257352206,"Switch parsing of using declarations over to ParseUnqualifiedId."}, | [i]={"220f4277bd2a",1257352206,"Switch parsing of using declarations over to ParseUnqualifiedId."}, | ||
[j]={{z, | [j]={{z,12048,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n case UnqualifiedIdKind::IK_DestructorName:\n Diag(Name.getBeginLoc(), diag::err_using_decl_destructor) << SS.getRange();"}} | ||
}, | }, | ||
["err_using_decl_friend"]={ | ["err_using_decl_friend"]={ | ||
Line 1,633: | Line 1,633: | ||
[h]=m, | [h]=m, | ||
[i]={"c70fca60dab4",1365023987,"Complain about attempts to befriend declarations via a using"}, | [i]={"c70fca60dab4",1365023987,"Complain about attempts to befriend declarations via a using"}, | ||
[j]={{w, | [j]={{w,3638,"/// 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 (!Old) {\n if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(OldD)) {\n if (New->getFriendObjectKind()) {\n Diag(New->getLocation(), diag::err_using_decl_friend);"}} | ||
}, | }, | ||
["err_using_decl_nested_name_specifier_is_current_class"]={ | ["err_using_decl_nested_name_specifier_is_current_class"]={ | ||
Line 1,645: | Line 1,645: | ||
[h]=m, | [h]=m, | ||
[i]={"3969e30d3831",1260258378,"Correctly implement the C++03 and 0x restrictions on class-member using"}, | [i]={"3969e30d3831",1260258378,"Correctly implement the C++03 and 0x restrictions on class-member using"}, | ||
[j]={{z, | [j]={{z,12201,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // Diagnose finding a decl which is not from a base class of the\n // current class. We do this now because there are cases where this\n // function will silently decide not to build a shadow decl, which\n // will pre-empt further diagnostics.\n //\n // We don\'t need to do this in C++11 because we do the check once on\n // the qualifier.\n //\n // FIXME: diagnose the following if we care enough:\n // struct A { int foo; };\n // struct B : A { using A::foo; };\n // template <class T> struct C : A {};\n // template <class T> struct D : C<T> { using B::foo; } // <---\n // This is invalid (during instantiation) in C++03 because B::foo\n // resolves to the using decl in B, which is not a base class of D<T>.\n // We can\'t diagnose it immediately because C<T> is an unknown\n // specialization. The UsingShadowDecl in D<T> then points directly\n // to A::foo, which will look well-formed when we instantiate.\n // The right solution is to not collapse the shadow-decl chain.\n if (!getLangOpts().CPlusPlus11 && CurContext->isRecord())\n if (auto *Using = dyn_cast<UsingDecl>(BUD)) {\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(OrigRec)) {\n if (OrigDC == CurContext) {\n Diag(Using->getLocation(), diag::err_using_decl_nested_name_specifier_is_current_class) << Using->getQualifierLoc().getSourceRange();"},{z,13171,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n if (getLangOpts().CPlusPlus11) {\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(cast<CXXRecordDecl>(NamedContext))) {\n if (CurContext == NamedContext) {\n Diag(SS.getBeginLoc(), diag::err_using_decl_nested_name_specifier_is_current_class) << SS.getRange();"}} | ||
}, | }, | ||
["err_using_decl_nested_name_specifier_is_not_base_class"]={ | ["err_using_decl_nested_name_specifier_is_not_base_class"]={ | ||
Line 1,657: | Line 1,657: | ||
[h]=m, | [h]=m, | ||
[i]={"3969e30d3831",1260258378,"Correctly implement the C++03 and 0x restrictions on class-member using"}, | [i]={"3969e30d3831",1260258378,"Correctly implement the C++03 and 0x restrictions on class-member using"}, | ||
[j]={{z, | [j]={{z,12209,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // Diagnose finding a decl which is not from a base class of the\n // current class. We do this now because there are cases where this\n // function will silently decide not to build a shadow decl, which\n // will pre-empt further diagnostics.\n //\n // We don\'t need to do this in C++11 because we do the check once on\n // the qualifier.\n //\n // FIXME: diagnose the following if we care enough:\n // struct A { int foo; };\n // struct B : A { using A::foo; };\n // template <class T> struct C : A {};\n // template <class T> struct D : C<T> { using B::foo; } // <---\n // This is invalid (during instantiation) in C++03 because B::foo\n // resolves to the using decl in B, which is not a base class of D<T>.\n // We can\'t diagnose it immediately because C<T> is an unknown\n // specialization. The UsingShadowDecl in D<T> then points directly\n // to A::foo, which will look well-formed when we instantiate.\n // The right solution is to not collapse the shadow-decl chain.\n if (!getLangOpts().CPlusPlus11 && CurContext->isRecord())\n if (auto *Using = dyn_cast<UsingDecl>(BUD)) {\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(OrigRec)) {\n Diag(Using->getQualifierLoc().getBeginLoc(), diag::err_using_decl_nested_name_specifier_is_not_base_class) << Using->getQualifier() << cast<CXXRecordDecl>(CurContext) << Using->getQualifierLoc().getSourceRange();"},{z,13178,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n if (getLangOpts().CPlusPlus11) {\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(cast<CXXRecordDecl>(NamedContext))) {\n if (!cast<CXXRecordDecl>(NamedContext)->isInvalidDecl()) {\n Diag(SS.getBeginLoc(), diag::err_using_decl_nested_name_specifier_is_not_base_class) << SS.getScopeRep() << cast<CXXRecordDecl>(CurContext) << SS.getRange();"},{z,13224,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n Diag(SS.getRange().getBegin(), diag::err_using_decl_nested_name_specifier_is_not_base_class) << SS.getScopeRep() << cast<CXXRecordDecl>(CurContext) << SS.getRange();"}} | ||
}, | }, | ||
["err_using_decl_nested_name_specifier_is_not_class"]={ | ["err_using_decl_nested_name_specifier_is_not_class"]={ | ||
Line 1,669: | Line 1,669: | ||
[h]=m, | [h]=m, | ||
[i]={"3969e30d3831",1260258378,"Correctly implement the C++03 and 0x restrictions on class-member using"}, | [i]={"3969e30d3831",1260258378,"Correctly implement the C++03 and 0x restrictions on class-member using"}, | ||
[j]={{z, | [j]={{z,13141,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // The current scope is a record.\n if (!NamedContext->isRecord()) {\n Diag(SS.getBeginLoc(), Cxx20Enumerator ? diag::warn_cxx17_compat_using_decl_non_member_enumerator : diag::err_using_decl_nested_name_specifier_is_not_class) << SS.getScopeRep() << SS.getRange();"}} | ||
}, | }, | ||
["err_using_decl_redeclaration"]={ | ["err_using_decl_redeclaration"]={ | ||
Line 1,681: | Line 1,681: | ||
[h]=m, | [h]=m, | ||
[i]={"84d8767c1582",1260438112,"Implement redeclaration checking and hiding semantics for using declarations. There"}, | [i]={"84d8767c1582",1260438112,"Implement redeclaration checking and hiding semantics for using declarations. There"}, | ||
[j]={{z, | [j]={{z,12988,"/// Checks that the given using declaration is not an invalid\n/// redeclaration. Note that this is checking only for the using decl\n/// itself, not for any ill-formedness among the UsingShadowDecls.\nbool Sema::CheckUsingDeclRedeclaration(SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Prev) {\n for (LookupResult::iterator I = Prev.begin(), E = Prev.end(); I != E; ++I) {\n Diag(NameLoc, diag::err_using_decl_redeclaration) << SS.getRange();"}} | ||
}, | }, | ||
["err_using_decl_redeclaration_expansion"]={ | ["err_using_decl_redeclaration_expansion"]={ | ||
Line 1,693: | Line 1,693: | ||
[h]=m, | [h]=m, | ||
[i]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations."}, | [i]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations."}, | ||
[j]={{Gc, | [j]={{Gc,3412,"template <typename T> Decl *TemplateDeclInstantiator::instantiateUnresolvedUsingDecl(T *D, bool InstantiatingPackElement) {\n // If this is a pack expansion, expand it now.\n if (D->isPackExpansion() && !InstantiatingPackElement) {\n // Within a function, we don\'t have any normal way to check for conflicts\n // between shadow declarations from different using declarations in the\n // same pack expansion, but this is always ill-formed because all expansions\n // must produce (conflicting) enumerators.\n //\n // Sadly we can\'t just reject this in the template definition because it\n // could be valid if the pack is empty or has exactly one expansion.\n if (D->getDeclContext()->isFunctionOrMethod() && *NumExpansions > 1) {\n SemaRef.Diag(D->getEllipsisLoc(), diag::err_using_decl_redeclaration_expansion);"}} | ||
}, | }, | ||
["err_using_decl_template_id"]={ | ["err_using_decl_template_id"]={ | ||
Line 1,705: | Line 1,705: | ||
[h]=m, | [h]=m, | ||
[i]={"220f4277bd2a",1257352206,"Switch parsing of using declarations over to ParseUnqualifiedId."}, | [i]={"220f4277bd2a",1257352206,"Switch parsing of using declarations over to ParseUnqualifiedId."}, | ||
[j]={{z, | [j]={{z,12052,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n case UnqualifiedIdKind::IK_TemplateId:\n Diag(Name.getBeginLoc(), diag::err_using_decl_template_id) << SourceRange(Name.TemplateId->LAngleLoc, Name.TemplateId->RAngleLoc);"}} | ||
}, | }, | ||
["err_using_dependent_value_is_type"]={ | ["err_using_dependent_value_is_type"]={ | ||
Line 1,717: | Line 1,717: | ||
[h]=m, | [h]=m, | ||
[i]={"e61f2ba7e44a",1258511779,"Incremental progress on using declarations. Split UnresolvedUsingDecl into"}, | [i]={"e61f2ba7e44a",1258511779,"Incremental progress on using declarations. Split UnresolvedUsingDecl into"}, | ||
[j]={{z, | [j]={{z,12786,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n if (HasTypenameKeyword) {\n } else {\n // If we asked for a non-typename and we got a type, error out,\n // but only if this is an instantiation of an unresolved using\n // decl. Otherwise just silently find the type name.\n if (IsInstantiation && R.getAsSingle<TypeDecl>()) {\n Diag(IdentLoc, diag::err_using_dependent_value_is_type);"}} | ||
}, | }, | ||
["err_using_directive_member_suggest"]={ | ["err_using_directive_member_suggest"]={ | ||
Line 1,729: | Line 1,729: | ||
[h]=m, | [h]=m, | ||
[i]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace"}, | [i]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace"}, | ||
[j]={{z, | [j]={{z,11903,"static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), Sc, &SS, CCC, Sema::CTK_ErrorRecovery)) {\n if (DeclContext *DC = S.computeDeclContext(SS, false)) {\n S.diagnoseTypo(Corrected, S.PDiag(diag::err_using_directive_member_suggest) << Ident << DC << DroppedSpecifier << SS.getRange(), S.PDiag(diag::note_namespace_defined_here));"},{"clang/unittests/Sema/ExternalSemaSourceTest.cpp",60,"/// Counts the number of typo-correcting diagnostics correcting from one name to\n/// another while still passing all diagnostics along a chain of consumers.\nclass DiagnosticWatcher : public clang::DiagnosticConsumer {\n void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override {\n if (Info.getID() - 1 == diag::err_using_directive_member_suggest) {"}} | ||
}, | }, | ||
["err_using_directive_suggest"]={ | ["err_using_directive_suggest"]={ | ||
Line 1,741: | Line 1,741: | ||
[h]=m, | [h]=m, | ||
[i]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace"}, | [i]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace"}, | ||
[j]={{z, | [j]={{z,11908,"static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), Sc, &SS, CCC, Sema::CTK_ErrorRecovery)) {\n if (DeclContext *DC = S.computeDeclContext(SS, false)) {\n } else {\n S.diagnoseTypo(Corrected, S.PDiag(diag::err_using_directive_suggest) << Ident, S.PDiag(diag::note_namespace_defined_here));"}} | ||
}, | }, | ||
["err_using_enum_decl_redeclaration"]={ | ["err_using_enum_decl_redeclaration"]={ | ||
Line 1,753: | Line 1,753: | ||
[h]=m, | [h]=m, | ||
[i]={bc,1615397021,fc}, | [i]={bc,1615397021,fc}, | ||
[j]={{z, | [j]={{z,12840,"NamedDecl *Sema::BuildUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation NameLoc, TypeSourceInfo *EnumType, EnumDecl *ED) {\n if (CurContext->getRedeclContext()->isRecord()) {\n for (NamedDecl *D : Previous)\n if (UsingEnumDecl *UED = dyn_cast<UsingEnumDecl>(D))\n if (UED->getEnumDecl() == ED) {\n Diag(UsingLoc, diag::err_using_enum_decl_redeclaration) << SourceRange(EnumLoc, NameLoc);"}} | ||
}, | }, | ||
["err_using_enum_expect_identifier"]={ | ["err_using_enum_expect_identifier"]={ | ||
Line 1,765: | Line 1,765: | ||
[h]=x, | [h]=x, | ||
[i]={"3d2080683f1d",1663177354,"[clang][DR2621] using enum NAME lookup fix"}, | [i]={"3d2080683f1d",1663177354,"[clang][DR2621] using enum NAME lookup fix"}, | ||
[j]={{L, | [j]={{L,733,"/// 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 (TryConsumeToken(tok::kw_enum, UELoc) && !InInitStatement) {\n if (!Tok.is(tok::identifier)) {\n Diag(Tok.getLocation(), diag::err_using_enum_expect_identifier) << Tok.is(tok::kw_enum);"}} | ||
}, | }, | ||
["err_using_enum_is_dependent"]={ | ["err_using_enum_is_dependent"]={ | ||
Line 1,777: | Line 1,777: | ||
[h]=m, | [h]=m, | ||
[i]={bc,1615397021,fc}, | [i]={bc,1615397021,fc}, | ||
[j]={{z, | [j]={{z,12112,"Decl *Sema::ActOnUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation IdentLoc, IdentifierInfo &II, CXXScopeSpec *SS) {\n if (EnumTy.isNull()) {\n Diag(IdentLoc, SS && isDependentScopeSpecifier(*SS) ? diag::err_using_enum_is_dependent : diag::err_unknown_typename) << II.getName() << SourceRange(SS ? SS->getBeginLoc() : IdentLoc, IdentLoc);"}} | ||
}, | }, | ||
["err_using_enum_not_enum"]={ | ["err_using_enum_not_enum"]={ | ||
Line 1,789: | Line 1,789: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{z, | [j]={{z,12121,"Decl *Sema::ActOnUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation IdentLoc, IdentifierInfo &II, CXXScopeSpec *SS) {\n if (!Enum) {\n Diag(IdentLoc, diag::err_using_enum_not_enum) << EnumTy;"}} | ||
}, | }, | ||
["err_using_if_exists_on_ctor"]={ | ["err_using_if_exists_on_ctor"]={ | ||
Line 1,801: | Line 1,801: | ||
[h]=m, | [h]=m, | ||
[i]={bc,1615397021,fc}, | [i]={bc,1615397021,fc}, | ||
[j]={{z, | [j]={{z,12625,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n // \'using_if_exists\' doesn\'t make sense on an inherited constructor.\n if (IsUsingIfExists && UsingName.getName().getNameKind() == DeclarationName::CXXConstructorName) {\n Diag(UsingLoc, diag::err_using_if_exists_on_ctor);"}} | ||
}, | }, | ||
["err_using_namespace_in_class"]={ | ["err_using_namespace_in_class"]={ | ||
Line 1,813: | Line 1,813: | ||
[h]=x, | [h]=x, | ||
[i]={"fec52635f0d5",1245459114,"Parsing and AST support for using declarations, from John Thompson!"}, | [i]={"fec52635f0d5",1245459114,"Parsing and AST support for using declarations, from John Thompson!"}, | ||
[j]={{L, | [j]={{L,2802,"/// 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::kw_using)) {\n if (Tok.is(tok::kw_namespace)) {\n Diag(UsingLoc, diag::err_using_namespace_in_class);"}} | ||
}, | }, | ||
["err_using_pack_expansion_empty"]={ | ["err_using_pack_expansion_empty"]={ | ||
Line 1,836: | Line 1,836: | ||
[h]=m, | [h]=m, | ||
[i]={"fec52635f0d5",1245459114,"Parsing and AST support for using declarations, from John Thompson!"}, | [i]={"fec52635f0d5",1245459114,"Parsing and AST support for using declarations, from John Thompson!"}, | ||
[j]={{z, | [j]={{z,12022,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n if (SS.isEmpty()) {\n Diag(Name.getBeginLoc(), diag::err_using_requires_qualname);"}} | ||
}, | }, | ||
["err_using_typename_non_type"]={ | ["err_using_typename_non_type"]={ | ||
Line 1,848: | Line 1,848: | ||
[h]=m, | [h]=m, | ||
[i]={"fec52635f0d5",1245459114,"Parsing and AST support for using declarations, from John Thompson!"}, | [i]={"fec52635f0d5",1245459114,"Parsing and AST support for using declarations, from John Thompson!"}, | ||
[j]={{z, | [j]={{z,12775,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n if (HasTypenameKeyword) {\n // If we asked for a typename and got a non-type decl, error out.\n if (!R.getAsSingle<TypeDecl>() && !R.getAsSingle<UnresolvedUsingIfExistsDecl>()) {\n Diag(IdentLoc, diag::err_using_typename_non_type);"}} | ||
}, | }, | ||
["err_uuidof_with_multiple_guids"]={ | ["err_uuidof_with_multiple_guids"]={ | ||
Line 1,860: | Line 1,860: | ||
[h]=m, | [h]=m, | ||
[i]={"59c0ec23966a",1378537186,"AST: __uuidof should leak through templated types"}, | [i]={"59c0ec23966a",1378537186,"AST: __uuidof should leak through templated types"}, | ||
[j]={{V, | [j]={{V,760,"/// Build a Microsoft __uuidof expression with a type operand.\nExprResult Sema::BuildCXXUuidof(QualType Type, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc) {\n if (!Operand->getType()->isDependentType()) {\n if (UuidAttrs.size() > 1)\n return ExprError(Diag(TypeidLoc, diag::err_uuidof_with_multiple_guids));"},{V,782,"/// Build a Microsoft __uuidof expression with an expression operand.\nExprResult Sema::BuildCXXUuidof(QualType Type, SourceLocation TypeidLoc, Expr *E, SourceLocation RParenLoc) {\n if (!E->getType()->isDependentType()) {\n if (E->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) {\n } else {\n if (UuidAttrs.size() > 1)\n return ExprError(Diag(TypeidLoc, diag::err_uuidof_with_multiple_guids));"}} | ||
}, | }, | ||
["err_uuidof_without_guid"]={ | ["err_uuidof_without_guid"]={ | ||
Line 1,872: | Line 1,872: | ||
[h]=m, | [h]=m, | ||
[i]={"9dddd40a1caf",1292817063,"Emit an error if operator __uuidof() is called on a type with no associated GUID."}, | [i]={"9dddd40a1caf",1292817063,"Emit an error if operator __uuidof() is called on a type with no associated GUID."}, | ||
[j]={{V, | [j]={{V,758,"/// Build a Microsoft __uuidof expression with a type operand.\nExprResult Sema::BuildCXXUuidof(QualType Type, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc) {\n if (!Operand->getType()->isDependentType()) {\n if (UuidAttrs.empty())\n return ExprError(Diag(TypeidLoc, diag::err_uuidof_without_guid));"},{V,780,"/// Build a Microsoft __uuidof expression with an expression operand.\nExprResult Sema::BuildCXXUuidof(QualType Type, SourceLocation TypeidLoc, Expr *E, SourceLocation RParenLoc) {\n if (!E->getType()->isDependentType()) {\n if (E->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) {\n } else {\n if (UuidAttrs.empty())\n return ExprError(Diag(TypeidLoc, diag::err_uuidof_without_guid));"}} | ||
}, | }, | ||
["err_va_arg_in_device"]={ | ["err_va_arg_in_device"]={ | ||
Line 1,884: | Line 1,884: | ||
[h]=m, | [h]=m, | ||
[i]={"6644e366b01e",1453249620,"[CUDA] Bail, rather than crash, on va_arg in device code."}, | [i]={"6644e366b01e",1453249620,"[CUDA] Bail, rather than crash, on va_arg in device code."}, | ||
[j]={{y, | [j]={{y,17165,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // CUDA device code does not support varargs.\n if (getLangOpts().CUDA && getLangOpts().CUDAIsDevice) {\n if (const FunctionDecl *F = dyn_cast<FunctionDecl>(CurContext)) {\n if (T == CFT_Global || T == CFT_Device || T == CFT_HostDevice)\n return ExprError(Diag(E->getBeginLoc(), diag::err_va_arg_in_device));"},{y,17215,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // NVPTX does not support va_arg expression.\n if (getLangOpts().OpenMP && getLangOpts().OpenMPIsTargetDevice && Context.getTargetInfo().getTriple().isNVPTX())\n targetDiag(E->getBeginLoc(), diag::err_va_arg_in_device);"}} | ||
}, | }, | ||
["err_va_start_captured_stmt"]={ | ["err_va_start_captured_stmt"]={ | ||
Line 1,896: | Line 1,896: | ||
[h]=m, | [h]=m, | ||
[i]={"f1deb837eee3",1493927465,"Fix bugs checking va_start in lambdas and erroneous contexts"}, | [i]={"f1deb837eee3",1493927465,"Fix bugs checking va_start in lambdas and erroneous contexts"}, | ||
[j]={{bb, | [j]={{bb,8082,"static bool checkVAStartIsInVariadicFunction(Sema &S, Expr *Fn, ParmVarDecl **LastParam = nullptr) {\n if (auto *Block = dyn_cast<BlockDecl>(Caller)) {\n } else if (auto *FD = dyn_cast<FunctionDecl>(Caller)) {\n } else if (auto *MD = dyn_cast<ObjCMethodDecl>(Caller)) {\n } else if (isa<CapturedDecl>(Caller)) {\n S.Diag(Fn->getBeginLoc(), diag::err_va_start_captured_stmt);"}} | ||
}, | }, | ||
["err_va_start_fixed_function"]={ | ["err_va_start_fixed_function"]={ | ||
Line 1,908: | Line 1,908: | ||
[h]=m, | [h]=m, | ||
[i]={"f1deb837eee3",1493927465,"Fix bugs checking va_start in lambdas and erroneous contexts"}, | [i]={"f1deb837eee3",1493927465,"Fix bugs checking va_start in lambdas and erroneous contexts"}, | ||
[j]={{bb, | [j]={{bb,8091,"static bool checkVAStartIsInVariadicFunction(Sema &S, Expr *Fn, ParmVarDecl **LastParam = nullptr) {\n if (!IsVariadic) {\n S.Diag(Fn->getBeginLoc(), diag::err_va_start_fixed_function);"}} | ||
}, | }, | ||
["err_va_start_outside_function"]={ | ["err_va_start_outside_function"]={ | ||
Line 1,920: | Line 1,920: | ||
[h]=m, | [h]=m, | ||
[i]={"f1deb837eee3",1493927465,"Fix bugs checking va_start in lambdas and erroneous contexts"}, | [i]={"f1deb837eee3",1493927465,"Fix bugs checking va_start in lambdas and erroneous contexts"}, | ||
[j]={{bb, | [j]={{bb,8086,"static bool checkVAStartIsInVariadicFunction(Sema &S, Expr *Fn, ParmVarDecl **LastParam = nullptr) {\n if (auto *Block = dyn_cast<BlockDecl>(Caller)) {\n } else if (auto *FD = dyn_cast<FunctionDecl>(Caller)) {\n } else if (auto *MD = dyn_cast<ObjCMethodDecl>(Caller)) {\n } else if (isa<CapturedDecl>(Caller)) {\n } else {\n S.Diag(Fn->getBeginLoc(), diag::err_va_start_outside_function);"}} | ||
}, | }, | ||
["err_va_start_used_in_wrong_abi_function"]={ | ["err_va_start_used_in_wrong_abi_function"]={ | ||
Line 1,932: | Line 1,932: | ||
[h]=m, | [h]=m, | ||
[i]={"c7d5c94f78c7",1442523333,"Support __builtin_ms_va_list."}, | [i]={"c7d5c94f78c7",1442523333,"Support __builtin_ms_va_list."}, | ||
[j]={{bb, | [j]={{bb,8052,"/// 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 (IsX64 || IsAArch64) {\n if (IsMSVAStart) {\n } else {\n // On x86-64/AArch64 Unix, don\'t allow this in Win64 ABI functions.\n // On x64 Windows, don\'t allow this in System V ABI functions.\n // (Yes, that means there\'s no corresponding way to support variadic\n // System V ABI functions on Windows.)\n if ((IsWindows && CC == CC_X86_64SysV) || (!IsWindows && CC == CC_Win64))\n return S.Diag(Fn->getBeginLoc(), diag::err_va_start_used_in_wrong_abi_function) << !IsWindows;"}} | ||
}, | }, | ||
["err_value_init_for_array_type"]={ | ["err_value_init_for_array_type"]={ | ||
Line 1,944: | Line 1,944: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{V, | [j]={{V,1565,"ExprResult Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization) {\n if (Ty->isArrayType()) {\n if (!ListInitialization)\n return ExprError(Diag(TyBeginLoc, diag::err_value_init_for_array_type) << FullRange);"}} | ||
}, | }, | ||
["err_vaopt_paste_at_end"]={ | ["err_vaopt_paste_at_end"]={ | ||
Line 1,956: | Line 1,956: | ||
[h]=A, | [h]=A, | ||
[i]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)"}, | [i]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)"}, | ||
[j]={{W, | [j]={{W,2934,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n } else {\n while (Tok.isNot(tok::eod)) {\n if (!Tok.isOneOf(tok::hash, tok::hashat, tok::hashhash)) {\n if (VAOCtx.isVAOptToken(Tok)) {\n } else if (VAOCtx.isInVAOpt()) {\n if (Tok.is(tok::r_paren)) {\n if (VAOCtx.sawClosingParen()) {\n if (Tokens[Tokens.size() - 2].is(tok::hashhash)) {\n Diag(Tok, diag::err_vaopt_paste_at_end);"}} | ||
}, | }, | ||
["err_vaopt_paste_at_start"]={ | ["err_vaopt_paste_at_start"]={ | ||
Line 1,968: | Line 1,968: | ||
[h]=A, | [h]=A, | ||
[i]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)"}, | [i]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)"}, | ||
[j]={{W, | [j]={{W,2923,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n } else {\n while (Tok.isNot(tok::eod)) {\n if (!Tok.isOneOf(tok::hash, tok::hashat, tok::hashhash)) {\n if (VAOCtx.isVAOptToken(Tok)) {\n if (Tok.is(tok::hashhash)) {\n Diag(Tok, diag::err_vaopt_paste_at_start);"}} | ||
}, | }, | ||
["err_var_partial_spec_redeclared"]={ | ["err_var_partial_spec_redeclared"]={ | ||
Line 1,980: | Line 1,980: | ||
[h]=m, | [h]=m, | ||
[i]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som..."}, | [i]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som..."}, | ||
[j]={{Gc, | [j]={{Gc,4367,"/// Instantiate the declaration of a variable template partial\n/// specialization.\n///\n/// \\param VarTemplate the (instantiated) variable template that is partially\n/// specialized by the instantiation of \\p PartialSpec.\n///\n/// \\param PartialSpec the (uninstantiated) variable template partial\n/// specialization that we are instantiating.\n///\n/// \\returns The instantiated partial specialization, if successful; otherwise,\n/// NULL to indicate an error.\nVarTemplatePartialSpecializationDecl *TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(VarTemplateDecl *VarTemplate, VarTemplatePartialSpecializationDecl *PartialSpec) {\n if (PrevDecl) {\n SemaRef.Diag(PartialSpec->getLocation(), diag::err_var_partial_spec_redeclared) << WrittenTy->getType();"}} | ||
}, | }, | ||
["err_var_spec_no_template"]={ | ["err_var_spec_no_template"]={ | ||
Line 1,992: | Line 1,992: | ||
[h]=m, | [h]=m, | ||
[i]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som..."}, | [i]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som..."}, | ||
[j]={{E, | [j]={{E,4544,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n if (!VarTemplate) {\n return Diag(D.getIdentifierLoc(), diag::err_var_spec_no_template) << IsPartialSpecialization;"}} | ||
}, | }, | ||
["err_var_spec_no_template_but_method"]={ | ["err_var_spec_no_template_but_method"]={ | ||
Line 2,004: | Line 2,004: | ||
[h]=m, | [h]=m, | ||
[i]={"967c13d3fbfa",1399554980,"Fix PR19169 [Crash on invalid attempting to specialize a template method as a template variable]."}, | [i]={"967c13d3fbfa",1399554980,"Fix PR19169 [Crash on invalid attempting to specialize a template method as a template variable]."}, | ||
[j]={{E, | [j]={{E,4542,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n if (!VarTemplate) {\n if (FnTemplate)\n return Diag(D.getIdentifierLoc(), diag::err_var_spec_no_template_but_method) << FnTemplate->getDeclName();"}} | ||
}, | }, | ||
["err_variable_instantiates_to_function"]={ | ["err_variable_instantiates_to_function"]={ | ||
Line 2,016: | Line 2,016: | ||
[h]=m, | [h]=m, | ||
[i]={"6162334ce0f1",1284277044,"Diagnose the instantiation of variables (including static data"}, | [i]={"6162334ce0f1",1284277044,"Diagnose the instantiation of variables (including static data"}, | ||
[j]={{Gc, | [j]={{Gc,1139,"Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D, bool InstantiatingVarTemplate, ArrayRef<BindingDecl *> *Bindings) {\n if (DI->getType()->isFunctionType()) {\n SemaRef.Diag(D->getLocation(), diag::err_variable_instantiates_to_function) << D->isStaticDataMember() << DI->getType();"},{Gc,3963,"Decl *TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl(VarTemplateDecl *VarTemplate, VarDecl *D, const TemplateArgumentListInfo &TemplateArgsInfo, ArrayRef<TemplateArgument> Converted, VarTemplateSpecializationDecl *PrevDecl) {\n if (DI->getType()->isFunctionType()) {\n SemaRef.Diag(D->getLocation(), diag::err_variable_instantiates_to_function) << D->isStaticDataMember() << DI->getType();"},{Gc,4383,"/// Instantiate the declaration of a variable template partial\n/// specialization.\n///\n/// \\param VarTemplate the (instantiated) variable template that is partially\n/// specialized by the instantiation of \\p PartialSpec.\n///\n/// \\param PartialSpec the (uninstantiated) variable template partial\n/// specialization that we are instantiating.\n///\n/// \\returns The instantiated partial specialization, if successful; otherwise,\n/// NULL to indicate an error.\nVarTemplatePartialSpecializationDecl *TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(VarTemplateDecl *VarTemplate, VarTemplatePartialSpecializationDecl *PartialSpec) {\n if (DI->getType()->isFunctionType()) {\n SemaRef.Diag(PartialSpec->getLocation(), diag::err_variable_instantiates_to_function) << PartialSpec->isStaticDataMember() << DI->getType();"}} | ||
}, | }, | ||
["err_variable_object_no_init"]={ | ["err_variable_object_no_init"]={ | ||
Line 2,028: | Line 2,028: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,7679,"ExprResult Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr) {\n if (literalType->isArrayType()) {\n if (literalType->isVariableArrayType()) {\n if ((LangOpts.CPlusPlus || NumInits.value_or(0)) && !tryToFixVariablyModifiedVarType(TInfo, literalType, LParenLoc, diag::err_variable_object_no_init))"},{T,1996,"void InitListChecker::CheckArrayType(const InitializedEntity &Entity, InitListExpr *IList, QualType &DeclType, llvm::APSInt elementIndex, bool SubobjectIsDesignatorContext, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n if (const VariableArrayType *VAT = dyn_cast<VariableArrayType>(arrayType)) {\n if (!VerifyOnly) {\n // C2x 6.7.9p4: An entity of variable length array type shall not be\n // initialized except by an empty initializer.\n //\n // The C extension warnings are issued from ParseBraceInitializer() and\n // do not need to be issued here. However, we continue to issue an error\n // in the case there are initializers or we are compiling C++. We allow\n // use of VLAs in C++, but it\'s not clear we want to allow {} to zero\n // init a VLA in C++ in all cases (such as with non-trivial constructors).\n // FIXME: should we allow this construct in C++ when it makes sense to do\n // so?\n if (HasErr)\n SemaRef.Diag(VAT->getSizeExpr()->getBeginLoc(), diag::err_variable_object_no_init) << VAT->getSizeExpr()->getSourceRange();"},{T,5480,"static void TryOrBuildParenListInitialization(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args, InitializationSequence &Sequence, bool VerifyOnly, ExprResult *Result = nullptr) {\n if (const ArrayType *AT = S.getASTContext().getAsArrayType(Entity.getType())) {\n // C++ [dcl.init]p16.5\n // if the destination type is an array, the object is initialized as\n // follows. Let x1, . . . , xk be the elements of the expression-list. If\n // the destination type is an array of unknown bound, it is defined as\n // having k elements.\n if (const ConstantArrayType *CAT = S.getASTContext().getAsConstantArrayType(Entity.getType())) {\n } else if (const VariableArrayType *VAT = S.getASTContext().getAsVariableArrayType(Entity.getType())) {\n S.Diag(SE->getBeginLoc(), diag::err_variable_object_no_init) << SE->getSourceRange();"},{T,9619,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n case FK_VariableLengthArrayHasInitializer:\n S.Diag(Kind.getLocation(), diag::err_variable_object_no_init) << Args[0]->getSourceRange();"}} | ||
}, | }, | ||
["err_variably_modified_new_type"]={ | ["err_variably_modified_new_type"]={ | ||
Line 2,040: | Line 2,040: | ||
[h]=m, | [h]=m, | ||
[i]={"3999e15d93d4",1286380831,"Reject the allocation of variably-modified types in C++ \'new\'"}, | [i]={"3999e15d93d4",1286380831,"Reject the allocation of variably-modified types in C++ \'new\'"}, | ||
[j]={{V, | [j]={{V,2471,"/// 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 return Diag(Loc, diag::err_variably_modified_new_type) << AllocType;"}} | ||
}, | }, | ||
["err_variably_modified_nontype_template_param"]={ | ["err_variably_modified_nontype_template_param"]={ | ||
Line 2,052: | Line 2,052: | ||
[h]=m, | [h]=m, | ||
[i]={"959d5a0cbd78",1274545050,"Implement support for variable length arrays in C++. VLAs are limited"}, | [i]={"959d5a0cbd78",1274545050,"Implement support for variable length arrays in C++. VLAs are limited"}, | ||
[j]={{E, | [j]={{E,1431,"QualType Sema::CheckNonTypeTemplateParameterType(QualType T, SourceLocation Loc) {\n // We don\'t allow variably-modified types as the type of non-type template\n // parameters.\n if (T->isVariablyModifiedType()) {\n Diag(Loc, diag::err_variably_modified_nontype_template_param) << T;"}} | ||
}, | }, | ||
["err_variably_modified_template_arg"]={ | ["err_variably_modified_template_arg"]={ | ||
Line 2,064: | Line 2,064: | ||
[h]=m, | [h]=m, | ||
[i]={"959d5a0cbd78",1274545050,"Implement support for variable length arrays in C++. VLAs are limited"}, | [i]={"959d5a0cbd78",1274545050,"Implement support for variable length arrays in C++. VLAs are limited"}, | ||
[j]={{E, | [j]={{E,6509,"/// Check a template argument against its corresponding\n/// template type parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.type]. It\n/// returns true if an error occurred, and false otherwise.\nbool Sema::CheckTemplateArgument(TypeSourceInfo *ArgInfo) {\n if (CanonArg->isVariablyModifiedType()) {\n return Diag(SR.getBegin(), diag::err_variably_modified_template_arg) << Arg;"}} | ||
}, | }, | ||
["err_variably_modified_typeid"]={ | ["err_variably_modified_typeid"]={ | ||
Line 2,076: | Line 2,076: | ||
[h]=m, | [h]=m, | ||
[i]={"6f3150a7d262",1416604152,"Sema: Don\'t permit variably modified types in typeid"}, | [i]={"6f3150a7d262",1416604152,"Sema: Don\'t permit variably modified types in typeid"}, | ||
[j]={{V, | [j]={{V,564,"/// Build a C++ typeid expression with a type operand.\nExprResult Sema::BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc) {\n if (T->isVariablyModifiedType())\n return ExprError(Diag(TypeidLoc, diag::err_variably_modified_typeid) << T);"},{V,634,"/// Build a C++ typeid expression with an expression operand.\nExprResult Sema::BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, Expr *E, SourceLocation RParenLoc) {\n if (E->getType()->isVariablyModifiedType())\n return ExprError(Diag(TypeidLoc, diag::err_variably_modified_typeid) << E->getType());"}} | ||
}, | }, | ||
["err_variadic_device_fn"]={ | ["err_variadic_device_fn"]={ | ||
Line 2,088: | Line 2,088: | ||
[h]=m, | [h]=m, | ||
[i]={"e48cd6c5304d",1453584497,"[CUDA] Disallow variadic functions other than printf in device code."}, | [i]={"e48cd6c5304d",1453584497,"[CUDA] Disallow variadic functions other than printf in device code."}, | ||
[j]={{w, | [j]={{w,10680,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (getLangOpts().CUDA) {\n // Variadic functions, other than a *declaration* of printf, are not allowed\n // in device-side CUDA code, unless someone passed\n // -fcuda-allow-variadic-functions.\n if (!getLangOpts().CUDAAllowVariadicFunctions && NewFD->isVariadic() && (NewFD->hasAttr<CUDADeviceAttr>() || NewFD->hasAttr<CUDAGlobalAttr>()) && !(II && II->isStr(\"printf\") && NewFD->isExternC() && !D.isFunctionDefinition())) {\n Diag(NewFD->getLocation(), diag::err_variadic_device_fn);"}} | ||
}, | }, | ||
["err_vec_builtin_incompatible_vector"]={ | ["err_vec_builtin_incompatible_vector"]={ | ||
Line 2,100: | Line 2,100: | ||
[h]=m, | [h]=m, | ||
[i]={"edc7849b1bdd",1495637157,"Generalize two diagnostic messages to take function name as parameter."}, | [i]={"edc7849b1bdd",1495637157,"Generalize two diagnostic messages to take function name as parameter."}, | ||
[j]={{bb, | [j]={{bb,8422,"// Customized Sema Checking for VSX builtins that have the following signature:\n// vector [...] builtinName(vector [...], vector [...], const int);\n// Which takes the same type of vectors (any legal vector type) for the first\n// two arguments and takes compile time constant for the third argument.\n// Example builtins are :\n// vector double vec_xxpermdi(vector double, vector double, int);\n// vector short vec_xxsldwi(vector short, vector short, int);\nbool Sema::SemaBuiltinVSX(CallExpr *TheCall) {\n // Check the first two arguments are the same type.\n if (!Context.hasSameUnqualifiedType(Arg1Ty, Arg2Ty)) {\n return Diag(BuiltinLoc, diag::err_vec_builtin_incompatible_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(0)->getBeginLoc(), TheCall->getArg(1)->getEndLoc());"},{bb,8473,"/// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.\n// This is declared to take (...), so we have to check everything.\nExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {\n if (!TheCall->getArg(0)->isTypeDependent() && !TheCall->getArg(1)->isTypeDependent()) {\n // Check to see if we have a call with 2 vector arguments, the unary shuffle\n // with mask. If so, verify that RHS is an integer vector type with the\n // same number of elts as lhs.\n if (TheCall->getNumArgs() == 2) {\n if (!RHSType->hasIntegerRepresentation() || RHSType->castAs<VectorType>()->getNumElements() != numElements)\n return ExprError(Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_incompatible_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(1)->getBeginLoc(), TheCall->getArg(1)->getEndLoc()));"},{bb,8479,"/// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.\n// This is declared to take (...), so we have to check everything.\nExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {\n if (!TheCall->getArg(0)->isTypeDependent() && !TheCall->getArg(1)->isTypeDependent()) {\n // Check to see if we have a call with 2 vector arguments, the unary shuffle\n // with mask. If so, verify that RHS is an integer vector type with the\n // same number of elts as lhs.\n if (TheCall->getNumArgs() == 2) {\n } else if (!Context.hasSameUnqualifiedType(LHSType, RHSType)) {\n return ExprError(Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_incompatible_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(0)->getBeginLoc(), TheCall->getArg(1)->getEndLoc()));"}} | ||
}, | }, | ||
["err_vec_builtin_non_vector"]={ | ["err_vec_builtin_non_vector"]={ | ||
Line 2,112: | Line 2,112: | ||
[h]=m, | [h]=m, | ||
[i]={"edc7849b1bdd",1495637157,"Generalize two diagnostic messages to take function name as parameter."}, | [i]={"edc7849b1bdd",1495637157,"Generalize two diagnostic messages to take function name as parameter."}, | ||
[j]={{bb, | [j]={{bb,8414,"// Customized Sema Checking for VSX builtins that have the following signature:\n// vector [...] builtinName(vector [...], vector [...], const int);\n// Which takes the same type of vectors (any legal vector type) for the first\n// two arguments and takes compile time constant for the third argument.\n// Example builtins are :\n// vector double vec_xxpermdi(vector double, vector double, int);\n// vector short vec_xxsldwi(vector short, vector short, int);\nbool Sema::SemaBuiltinVSX(CallExpr *TheCall) {\n if ((!Arg1Ty->isVectorType() && !Arg1Ty->isDependentType()) || (!Arg2Ty->isVectorType() && !Arg2Ty->isDependentType())) {\n return Diag(BuiltinLoc, diag::err_vec_builtin_non_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(0)->getBeginLoc(), TheCall->getArg(1)->getEndLoc());"},{bb,8458,"/// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.\n// This is declared to take (...), so we have to check everything.\nExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {\n if (!TheCall->getArg(0)->isTypeDependent() && !TheCall->getArg(1)->isTypeDependent()) {\n if (!LHSType->isVectorType() || !RHSType->isVectorType())\n return ExprError(Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_non_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(0)->getBeginLoc(), TheCall->getArg(1)->getEndLoc()));"}} | ||
}, | }, | ||
["err_vecstep_non_scalar_vector_type"]={ | ["err_vecstep_non_scalar_vector_type"]={ | ||
Line 2,124: | Line 2,124: | ||
[h]=m, | [h]=m, | ||
[i]={"e190dee7a548",1299871489,"Add support for the OpenCL vec_step operator, by generalising and"}, | [i]={"e190dee7a548",1299871489,"Add support for the OpenCL vec_step operator, by generalising and"}, | ||
[j]={{y, | [j]={{y,4302,"static bool CheckVecStepTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange) {\n // [OpenCL 1.1 6.11.12] \"The vec_step built-in function takes a built-in\n // scalar or vector data type argument...\"\n // Every built-in scalar type (OpenCL 1.1 6.1.1) is either an arithmetic\n // type (C99 6.2.5p18) or void.\n if (!(T->isArithmeticType() || T->isVoidType() || T->isVectorType())) {\n S.Diag(Loc, diag::err_vecstep_non_scalar_vector_type) << T << ArgRange;"}} | ||
}, | }, | ||
["err_vector_incorrect_num_initializers"]={ | ["err_vector_incorrect_num_initializers"]={ | ||
Line 2,136: | Line 2,136: | ||
[h]=m, | [h]=m, | ||
[i]={"a96114ed087b",1249840544,"AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);"}, | [i]={"a96114ed087b",1249840544,"AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);"}, | ||
[j]={{T, | [j]={{T,1908,"void InitListChecker::CheckVectorType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // OpenCL and HLSL require all elements to be initialized.\n if (numEltsInit != maxElements) {\n if (!VerifyOnly)\n SemaRef.Diag(IList->getBeginLoc(), diag::err_vector_incorrect_num_initializers) << (numEltsInit < maxElements) << maxElements << numEltsInit;"}} | ||
}, | }, | ||
["err_verify_ambiguous_marker"]={ | ["err_verify_ambiguous_marker"]={ | ||
Line 2,148: | Line 2,148: | ||
[h]=q, | [h]=q, | ||
[i]={"4e8144a0d140",1555130019,"[verify] Add support for location markers in directives."}, | [i]={"4e8144a0d140",1555130019,"[verify] Add support for location markers in directives."}, | ||
[j]={{nb, | [j]={{nb,386,"// Tracker for markers in the input files. A marker is a comment of the form\n//\n// n = 123; // #123\n//\n// ... that can be referred to by a later expected-* directive:\n//\n// // expected-error@#123 {{undeclared identifier \'n\'}}\n//\n// Marker declarations must be at the start of a comment or preceded by\n// whitespace to distinguish them from uses of markers in directives.\nclass VerifyDiagnosticConsumer::MarkerTracker {\n // Ensure we have no remaining deferred directives, and no\n // multiply-defined-and-used markers.\n void finalize() {\n for (auto &MarkerInfo : Markers) {\n if (M.RedefLoc.isValid() && M.UseLoc.isValid()) {\n Diags.Report(M.UseLoc, diag::err_verify_ambiguous_marker) << Name;"}} | ||
}, | }, | ||
["err_verify_inconsistent_diags"]={ | ["err_verify_inconsistent_diags"]={ | ||
Line 2,160: | Line 2,160: | ||
[h]=q, | [h]=q, | ||
[i]={"348185548eb2",1258168999,"Add VerifyDiagnosticsClient, to replace old -verify."}, | [i]={"348185548eb2",1258168999,"Add VerifyDiagnosticsClient, to replace old -verify."}, | ||
[j]={{nb, | [j]={{nb,880,"/// Takes a list of diagnostics that have been generated but not matched\n/// by an expected-* directive and produces a diagnostic to the user from this.\nstatic unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceMgr, const_diag_iterator diag_begin, const_diag_iterator diag_end, const char *Kind) {\n Diags.Report(diag::err_verify_inconsistent_diags).setForceEmit() << Kind << /*Unexpected=*/true << OS.str();"},{nb,911,"/// Takes a list of diagnostics that were expected to have been generated\n/// but were not and produces a diagnostic to the user from this.\nstatic unsigned PrintExpected(DiagnosticsEngine &Diags, SourceManager &SourceMgr, std::vector<Directive *> &DL, const char *Kind) {\n Diags.Report(diag::err_verify_inconsistent_diags).setForceEmit() << Kind << /*Unexpected=*/false << OS.str();"}} | ||
}, | }, | ||
["err_verify_invalid_content"]={ | ["err_verify_invalid_content"]={ | ||
Line 2,172: | Line 2,172: | ||
[h]=q, | [h]=q, | ||
[i]={"e82411b47f76",1272484950,"add regex support for -verify mode. You can now do things like"}, | [i]={"e82411b47f76",1272484950,"add regex support for -verify mode. You can now do things like"}, | ||
[j]={{nb, | [j]={{nb,308,"// Attach the specified directive to the line of code indicated by\n// \\p ExpectedLoc.\nvoid attachDirective(DiagnosticsEngine &Diags, const UnattachedDirective &UD, SourceLocation ExpectedLoc, bool MatchAnyFileAndLine = false, bool MatchAnyLine = false) {\n if (!D->isValid(Error)) {\n Diags.Report(UD.ContentBegin, diag::err_verify_invalid_content) << (UD.RegexKind ? \"regex\" : \"string\") << Error;"}} | ||
}, | }, | ||
["err_verify_invalid_no_diags"]={ | ["err_verify_invalid_no_diags"]={ | ||
Line 2,184: | Line 2,184: | ||
[h]=q, | [h]=q, | ||
[i]={"0fea04509a64",1350650972,"Change VerifyDiagnosticConsumer so that it *must* contain at least one \"expected-*\" directive. As a..."}, | [i]={"0fea04509a64",1350650972,"Change VerifyDiagnosticConsumer so that it *must* contain at least one \"expected-*\" directive. As a..."}, | ||
[j]={{nb, | [j]={{nb,483,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n for (ParseHelper PH(S); !PH.Done();) {\n if (NoDiag) {\n if (Status == VerifyDiagnosticConsumer::HasOtherExpectedDirectives)\n Diags.Report(Pos, diag::err_verify_invalid_no_diags) << /*IsExpectedNoDiagnostics=*/true;"},{nb,490,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n for (ParseHelper PH(S); !PH.Done();) {\n if (Status == VerifyDiagnosticConsumer::HasExpectedNoDiagnostics) {\n Diags.Report(Pos, diag::err_verify_invalid_no_diags) << /*IsExpectedNoDiagnostics=*/false;"}} | ||
}, | }, | ||
["err_verify_invalid_range"]={ | ["err_verify_invalid_range"]={ | ||
Line 2,196: | Line 2,196: | ||
[h]=q, | [h]=q, | ||
[i]={"b8b2ca6ffbfb",1341889046,"Allow -verify directives to specify a min and max count, not just \"+\"."}, | [i]={"b8b2ca6ffbfb",1341889046,"Allow -verify directives to specify a min and max count, not just \"+\"."}, | ||
[j]={{nb, | [j]={{nb,594,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n for (ParseHelper PH(S); !PH.Done();) {\n // Next optional token: positive integer or a \'+\'.\n if (PH.Next(D.Min)) {\n // A positive integer can be followed by a \'+\' meaning min\n // or more, or by a \'-\' meaning a range from min to max.\n if (PH.Next(\"+\")) {\n } else if (PH.Next(\"-\")) {\n if (!PH.Next(D.Max) || D.Max < D.Min) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_invalid_range) << KindStr;"}} | ||
}, | }, | ||
["err_verify_missing_end"]={ | ["err_verify_missing_end"]={ | ||
Line 2,208: | Line 2,208: | ||
[h]=q, | [h]=q, | ||
[i]={"348185548eb2",1258168999,"Add VerifyDiagnosticsClient, to replace old -verify."}, | [i]={"348185548eb2",1258168999,"Add VerifyDiagnosticsClient, to replace old -verify."}, | ||
[j]={{nb, | [j]={{nb,621,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n for (ParseHelper PH(S); !PH.Done();) {\n // Search for token: }}\n if (!PH.SearchClosingBrace(\"{{\", \"}}\")) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_end) << KindStr;"}} | ||
}, | }, | ||
["err_verify_missing_file"]={ | ["err_verify_missing_file"]={ | ||
Line 2,220: | Line 2,220: | ||
[h]=q, | [h]=q, | ||
[i]={"fcc699aee8db",1366186006,"Extended VerifyDiagnosticConsumer to also verify source file for diagnostic."}, | [i]={"fcc699aee8db",1366186006,"Extended VerifyDiagnosticConsumer to also verify source file for diagnostic."}, | ||
[j]={{nb, | [j]={{nb,550,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n for (ParseHelper PH(S); !PH.Done();) {\n if (!PH.Next(\"@\")) {\n } else {\n if (FoundPlus || PH.Next(\"-\")) {\n } else if (PH.Next(Line)) {\n } else if (PH.NextMarker()) {\n } else if (PP && PH.Search(\":\")) {\n if (Filename == \"*\") {\n } else {\n if (!File) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_file) << Filename << KindStr;"}} | ||
}, | }, | ||
["err_verify_missing_line"]={ | ["err_verify_missing_line"]={ | ||
Line 2,232: | Line 2,232: | ||
[h]=q, | [h]=q, | ||
[i]={"e1572eb3e27c",1341889023,"Allow line numbers on -verify directives."}, | [i]={"e1572eb3e27c",1341889023,"Allow line numbers on -verify directives."}, | ||
[j]={{nb, | [j]={{nb,537,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n for (ParseHelper PH(S); !PH.Done();) {\n if (!PH.Next(\"@\")) {\n } else {\n if (FoundPlus || PH.Next(\"-\")) {\n } else if (PH.Next(Line)) {\n } else if (PH.NextMarker()) {\n } else if (PP && PH.Search(\":\")) {\n if (Filename == \"*\") {\n if (!PH.Next(\"*\")) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_line) << \"\'*\'\";"},{nb,573,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n for (ParseHelper PH(S); !PH.Done();) {\n if (!PH.Next(\"@\")) {\n } else {\n if (ExpectedLoc.isInvalid() && !MatchAnyLine && Marker.empty()) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_line) << KindStr;"}} | ||
}, | }, | ||
["err_verify_missing_regex"]={ | ["err_verify_missing_regex"]={ | ||
Line 2,244: | Line 2,244: | ||
[h]=q, | [h]=q, | ||
[i]={"cda4b6dd007c",1386805250,"Change semantics of regex expectations in the diagnostic verifier"}, | [i]={"cda4b6dd007c",1386805250,"Change semantics of regex expectations in the diagnostic verifier"}, | ||
[j]={{nb, | [j]={{nb,645,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n for (ParseHelper PH(S); !PH.Done();) {\n // Check that regex directives contain at least one regex.\n if (D.RegexKind && D.Text.find(\"{{\") == StringRef::npos) {\n Diags.Report(D.ContentBegin, diag::err_verify_missing_regex) << D.Text;"}} | ||
}, | }, | ||
["err_verify_missing_start"]={ | ["err_verify_missing_start"]={ | ||
Line 2,256: | Line 2,256: | ||
[h]=q, | [h]=q, | ||
[i]={"348185548eb2",1258168999,"Add VerifyDiagnosticsClient, to replace old -verify."}, | [i]={"348185548eb2",1258168999,"Add VerifyDiagnosticsClient, to replace old -verify."}, | ||
[j]={{nb, | [j]={{nb,613,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n for (ParseHelper PH(S); !PH.Done();) {\n // Next token: {{\n if (!PH.Next(\"{{\")) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_start) << KindStr;"}} | ||
}, | }, | ||
["err_verify_no_directives"]={ | ["err_verify_no_directives"]={ | ||
Line 2,268: | Line 2,268: | ||
[h]=q, | [h]=q, | ||
[i]={"0fea04509a64",1350650972,"Change VerifyDiagnosticConsumer so that it *must* contain at least one \"expected-*\" directive. As a..."}, | [i]={"0fea04509a64",1350650972,"Change VerifyDiagnosticConsumer so that it *must* contain at least one \"expected-*\" directive. As a..."}, | ||
[j]={{nb, | [j]={{nb,1099,"#endif // !NDEBUG\n if (SrcManager) {\n // Produce an error if no expected-* directives could be found in the\n // source file(s) processed.\n if (Status == HasNoDirectives) {\n Diags.Report(diag::err_verify_no_directives).setForceEmit();"}} | ||
}, | }, | ||
["err_verify_no_such_marker"]={ | ["err_verify_no_such_marker"]={ | ||
Line 2,280: | Line 2,280: | ||
[h]=q, | [h]=q, | ||
[i]={"4e8144a0d140",1555130019,"[verify] Add support for location markers in directives."}, | [i]={"4e8144a0d140",1555130019,"[verify] Add support for location markers in directives."}, | ||
[j]={{nb, | [j]={{nb,394,"// Tracker for markers in the input files. A marker is a comment of the form\n//\n// n = 123; // #123\n//\n// ... that can be referred to by a later expected-* directive:\n//\n// // expected-error@#123 {{undeclared identifier \'n\'}}\n//\n// Marker declarations must be at the start of a comment or preceded by\n// whitespace to distinguish them from uses of markers in directives.\nclass VerifyDiagnosticConsumer::MarkerTracker {\n // Ensure we have no remaining deferred directives, and no\n // multiply-defined-and-used markers.\n void finalize() {\n for (auto &DeferredPair : DeferredDirectives) {\n Diags.Report(DeferredPair.second.front().DirectivePos, diag::err_verify_no_such_marker) << DeferredPair.first();"}} | ||
}, | }, | ||
["err_verify_nonconst_addrspace"]={ | ["err_verify_nonconst_addrspace"]={ | ||
Line 2,292: | Line 2,292: | ||
[h]=q, | [h]=q, | ||
[i]={"b714f73defc8",1611802254,"Frontend: Add -f{,no-}implicit-modules-uses-lock and -Rmodule-lock"}, | [i]={"b714f73defc8",1611802254,"Frontend: Add -f{,no-}implicit-modules-uses-lock and -Rmodule-lock"}, | ||
[j]={{"clang/lib/CodeGen/Targets/AVR.cpp", | [j]={{"clang/lib/CodeGen/Targets/AVR.cpp",128,"class AVRTargetCodeGenInfo : public TargetCodeGenInfo {\n LangAS getGlobalVarAddressSpace(CodeGenModule &CGM, const VarDecl *D) const override {\n // Check if global/static variable is defined in address space\n // 1~6 (__flash, __flash1, __flash2, __flash3, __flash4, __flash5)\n // but not constant.\n if (D) {\n if (isTargetAddressSpace(AS) && 1 <= toTargetAddressSpace(AS) && toTargetAddressSpace(AS) <= 6 && !D->getType().isConstQualified())\n CGM.getDiags().Report(D->getLocation(), diag::err_verify_nonconst_addrspace) << \"__flash*\";"}} | ||
}, | }, | ||
["err_vftable_ambiguous_component"]={ | ["err_vftable_ambiguous_component"]={ | ||
Line 2,304: | Line 2,304: | ||
[h]="VTable ABI Issue", | [h]="VTable ABI Issue", | ||
[i]={"70e6a00170a4",1430516145,"[MS ABI] Detect and diagnose vftables which cannot be created"}, | [i]={"70e6a00170a4",1430516145,"[MS ABI] Detect and diagnose vftables which cannot be created"}, | ||
[j]={{"clang/lib/AST/VTableBuilder.cpp", | [j]={{"clang/lib/AST/VTableBuilder.cpp",3553,"// We want to select the path which introduces the most covariant overrides. If\n// two paths introduce overrides which the other path doesn\'t contain, issue a\n// diagnostic.\nstatic const FullPathTy *selectBestPath(ASTContext &Context, const CXXRecordDecl *RD, const VPtrInfo &Info, std::list<FullPathTy> &FullPaths) {\n for (const FullPathTy &SpecificPath : FullPaths) {\n if (MissingOverrides.empty()) {\n } else {\n Diags.Report(RD->getLocation(), diag::err_vftable_ambiguous_component) << RD;"}} | ||
}, | }, | ||
["err_virt_specifier_outside_class"]={ | ["err_virt_specifier_outside_class"]={ | ||
Line 2,316: | Line 2,316: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{F, | [j]={{F,2174,"/// 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 // We\'re at the point where the parsing of function declarator is finished.\n //\n // A common error is that users accidently add a virtual specifier\n // (e.g. override) in an out-line method definition.\n // We attempt to recover by stripping all these specifiers coming after\n // the declarator.\n while (auto Specifier = isCXX11VirtSpecifier()) {\n Diag(Tok, diag::err_virt_specifier_outside_class) << VirtSpecifiers::getSpecifierName(Specifier) << FixItHint::CreateRemoval(Tok.getLocation());"}} | ||
}, | }, | ||
["err_virtual_in_union"]={ | ["err_virtual_in_union"]={ | ||
Line 2,328: | Line 2,328: | ||
[h]=m, | [h]=m, | ||
[i]={"43899d44c2f4",1435432735,"[Sema] Unions cannot have virtual functions."}, | [i]={"43899d44c2f4",1435432735,"[Sema] Unions cannot have virtual functions."}, | ||
[j]={{w, | [j]={{w,9756,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (getLangOpts().CPlusPlus) {\n // If this is a method defined in an __interface, and is not a constructor\n // or an overloaded operator, then set the pure flag (isVirtual will already\n // return true).\n if (const CXXRecordDecl *Parent = dyn_cast<CXXRecordDecl>(NewFD->getDeclContext())) {\n // C++ [class.union]p2\n // A union can have member functions, but not virtual functions.\n if (isVirtual && Parent->isUnion()) {\n Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_in_union);"}} | ||
}, | }, | ||
["err_virtual_member_function_template"]={ | ["err_virtual_member_function_template"]={ | ||
Line 2,340: | Line 2,340: | ||
[h]=m, | [h]=m, | ||
[i]={"e973899f4687",1295707436,"A member function template cannot be virtual."}, | [i]={"e973899f4687",1295707436,"A member function template cannot be virtual."}, | ||
[j]={{w, | [j]={{w,9889,"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 (!isVirtualOkay) {\n } else if (!CurContext->isRecord()) {\n } else if (NewFD->getDescribedFunctionTemplate()) {\n Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_member_function_template) << FixItHint::CreateRemoval(D.getDeclSpec().getVirtualSpecLoc());"}} | ||
}, | }, | ||
["err_virtual_non_function"]={ | ["err_virtual_non_function"]={ | ||
Line 2,352: | Line 2,352: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{w, | [j]={{w,6645,"/// Diagnose function specifiers on a declaration of an identifier that\n/// does not identify a function.\nvoid Sema::DiagnoseFunctionSpecifiers(const DeclSpec &DS) {\n // FIXME: We should probably indicate the identifier in question to avoid\n // confusion for constructs like \"virtual int a(), b;\"\n if (DS.isVirtualSpecified())\n Diag(DS.getVirtualSpecLoc(), diag::err_virtual_non_function);"},{w,9879,"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 (!isVirtualOkay) {\n Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_non_function);"}} | ||
}, | }, | ||
["err_virtual_out_of_class"]={ | ["err_virtual_out_of_class"]={ | ||
Line 2,364: | Line 2,364: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,9883,"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 (!isVirtualOkay) {\n } else if (!CurContext->isRecord()) {\n Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_out_of_class) << FixItHint::CreateRemoval(D.getDeclSpec().getVirtualSpecLoc());"}} | ||
}, | }, | ||
["err_vla_decl_has_extern_linkage"]={ | ["err_vla_decl_has_extern_linkage"]={ | ||
Line 2,376: | Line 2,376: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,8710,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n if ((!FixedTInfo || FixedT.isNull()) && T->isVariableArrayType()) {\n if (NewVD->isFileVarDecl())\n else if (NewVD->isStaticLocal())\n else\n Diag(NewVD->getLocation(), diag::err_vla_decl_has_extern_linkage) << SizeRange;"}} | ||
}, | }, | ||
["err_vla_decl_has_static_storage"]={ | ["err_vla_decl_has_static_storage"]={ | ||
Line 2,388: | Line 2,388: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,8707,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n if ((!FixedTInfo || FixedT.isNull()) && T->isVariableArrayType()) {\n if (NewVD->isFileVarDecl())\n else if (NewVD->isStaticLocal())\n Diag(NewVD->getLocation(), diag::err_vla_decl_has_static_storage) << SizeRange;"}} | ||
}, | }, | ||
["err_vla_decl_in_file_scope"]={ | ["err_vla_decl_in_file_scope"]={ | ||
Line 2,400: | Line 2,400: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,6728,"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 Diag(NewTD->getLocation(), diag::err_vla_decl_in_file_scope);"},{w,8704,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n if ((!FixedTInfo || FixedT.isNull()) && T->isVariableArrayType()) {\n if (NewVD->isFileVarDecl())\n Diag(NewVD->getLocation(), diag::err_vla_decl_in_file_scope) << SizeRange;"}} | ||
}, | }, | ||
["err_vla_in_sfinae"]={ | ["err_vla_in_sfinae"]={ | ||
Line 2,412: | Line 2,412: | ||
[h]=m, | [h]=m, | ||
[i]={"a09387df9ffb",1274644621,"It turns out that people love using VLAs in templates, too. Weaken our"}, | [i]={"a09387df9ffb",1274644621,"It turns out that people love using VLAs in templates, too. Weaken our"}, | ||
[j]={{R, | [j]={{R,2586,"/// 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().OpenCL) {\n } else if (getLangOpts().C99) {\n } else if (isSFINAEContext()) {\n VLADiag = diag::err_vla_in_sfinae;"}} | ||
}, | }, | ||
["err_vla_unsupported"]={ | ["err_vla_unsupported"]={ | ||
Line 2,424: | Line 2,424: | ||
[h]=m, | [h]=m, | ||
[i]={"87d44269885f",1511038846,"[OpenMP] Show error if VLAs are not supported"}, | [i]={"87d44269885f",1511038846,"[OpenMP] Show error if VLAs are not supported"}, | ||
[j]={{V, | [j]={{V,4990,"static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, SourceLocation KeyLoc, QualType T) {\n case UTT_IsBoundedArray:\n Self.Diag(KeyLoc, diag::err_vla_unsupported) << 1 << tok::kw___is_bounded_array;"},{V,4998,"static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, SourceLocation KeyLoc, QualType T) {\n case UTT_IsUnboundedArray:\n Self.Diag(KeyLoc, diag::err_vla_unsupported) << 1 << tok::kw___is_unbounded_array;"},{R,2673,"/// 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->isVariableArrayType() && !Context.getTargetInfo().isVLASupported()) {\n targetDiag(Loc, IsCUDADevice ? diag::err_cuda_vla : diag::err_vla_unsupported) << (IsCUDADevice ? CurrentCUDATarget() : 0);"}} | ||
}, | }, | ||
["err_vm_decl_has_extern_linkage"]={ | ["err_vm_decl_has_extern_linkage"]={ | ||
Line 2,436: | Line 2,436: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,8720,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n if (!FixedTInfo) {\n if (NewVD->isFileVarDecl())\n else\n Diag(NewVD->getLocation(), diag::err_vm_decl_has_extern_linkage);"}} | ||
}, | }, | ||
["err_vm_decl_in_file_scope"]={ | ["err_vm_decl_in_file_scope"]={ | ||
Line 2,448: | Line 2,448: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,6733,"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 else\n Diag(NewTD->getLocation(), diag::err_vm_decl_in_file_scope);"},{w,8718,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n if (!FixedTInfo) {\n if (NewVD->isFileVarDecl())\n Diag(NewVD->getLocation(), diag::err_vm_decl_in_file_scope);"}} | ||
}, | }, | ||
["err_vm_func_decl"]={ | ["err_vm_func_decl"]={ | ||
Line 2,460: | Line 2,460: | ||
[h]=m, | [h]=m, | ||
[i]={"4f8b8ed2ac98",1242482280,"Missing change for r71941 (PR2044)."}, | [i]={"4f8b8ed2ac98",1242482280,"Missing change for r71941 (PR2044)."}, | ||
[j]={{w, | [j]={{w,10198,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // Functions returning a variably modified type violate C99 6.7.5.2p2\n // because all functions have linkage.\n if (!NewFD->isInvalidDecl() && NewFD->getReturnType()->isVariablyModifiedType()) {\n Diag(NewFD->getLocation(), diag::err_vm_func_decl);"}} | ||
}, | }, | ||
["err_void_only_param"]={ | ["err_void_only_param"]={ | ||
Line 2,472: | Line 2,472: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{R, | [j]={{R,5503,"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 // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n } else {\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // If this is something like \'float(int, void)\', reject it. \'void\'\n // is an incomplete type (C99 6.2.5p19) and function decls cannot\n // have parameters of incomplete type.\n if (FTI.NumParams != 1 || FTI.isVariadic) {\n S.Diag(FTI.Params[i].IdentLoc, diag::err_void_only_param);"}} | ||
}, | }, | ||
["err_void_param_qualified"]={ | ["err_void_param_qualified"]={ | ||
Line 2,484: | Line 2,484: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{R, | [j]={{R,5514,"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 // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n } else {\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // If this is something like \'float(int, void)\', reject it. \'void\'\n // is an incomplete type (C99 6.2.5p19) and function decls cannot\n // have parameters of incomplete type.\n if (FTI.NumParams != 1 || FTI.isVariadic) {\n } else if (FTI.Params[i].Ident) {\n } else {\n // Reject, but continue to parse \'float(const void)\'.\n if (ParamTy.hasQualifiers())\n S.Diag(DeclType.Loc, diag::err_void_param_qualified);"}} | ||
}, | }, | ||
["err_volatile_comparison_operator"]={ | ["err_volatile_comparison_operator"]={ | ||
Line 2,496: | Line 2,496: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{z, | [j]={{z,8742,"bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, DefaultedComparisonKind DCK) {\n if (IsMethod) {\n if (MD->isVolatile()) {\n Diag(MD->getLocation(), diag::err_volatile_comparison_operator);"}} | ||
}, | }, | ||
["err_vsx_builtin_nonconstant_argument"]={ | ["err_vsx_builtin_nonconstant_argument"]={ | ||
Line 2,508: | Line 2,508: | ||
[h]=m, | [h]=m, | ||
[i]={"bbc48e91643b",1495638812,"[PowerPC] Implement vec_xxpermdi builtin."}, | [i]={"bbc48e91643b",1495638812,"[PowerPC] Implement vec_xxpermdi builtin."}, | ||
[j]={{bb, | [j]={{bb,8402,"// Customized Sema Checking for VSX builtins that have the following signature:\n// vector [...] builtinName(vector [...], vector [...], const int);\n// Which takes the same type of vectors (any legal vector type) for the first\n// two arguments and takes compile time constant for the third argument.\n// Example builtins are :\n// vector double vec_xxpermdi(vector double, vector double, int);\n// vector short vec_xxsldwi(vector short, vector short, int);\nbool Sema::SemaBuiltinVSX(CallExpr *TheCall) {\n // Check the third argument is a compile time constant\n if (!TheCall->getArg(2)->isIntegerConstantExpr(Context))\n return Diag(TheCall->getBeginLoc(), diag::err_vsx_builtin_nonconstant_argument) << 3 /* argument index */ << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(2)->getBeginLoc(), TheCall->getArg(2)->getEndLoc());"}} | ||
}, | }, | ||
["err_wasm_builtin_arg_must_be_integer_type"]={ | ["err_wasm_builtin_arg_must_be_integer_type"]={ | ||
Line 2,520: | Line 2,520: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{bb, | [j]={{bb,19017,"/// Checks the argument at the given index is an integer.\nstatic bool CheckWasmBuiltinArgIsInteger(Sema &S, CallExpr *E, unsigned ArgIndex) {\n if (!ArgExpr->getType()->isIntegerType()) {\n return S.Diag(ArgExpr->getBeginLoc(), diag::err_wasm_builtin_arg_must_be_integer_type) << ArgIndex + 1 << ArgExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_wasm_builtin_arg_must_be_table_type"]={ | ["err_wasm_builtin_arg_must_be_table_type"]={ | ||
Line 2,532: | Line 2,532: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{bb, | [j]={{bb,19004,"/// Checks the argument at the given index is a WebAssembly table and if it\n/// is, sets ElTy to the element type.\nstatic bool CheckWasmBuiltinArgIsTable(Sema &S, CallExpr *E, unsigned ArgIndex, QualType &ElTy) {\n if (!ATy || !ATy->getElementType().isWebAssemblyReferenceType()) {\n return S.Diag(ArgExpr->getBeginLoc(), diag::err_wasm_builtin_arg_must_be_table_type) << ArgIndex + 1 << ArgExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_wasm_builtin_arg_must_match_table_element_type"]={ | ["err_wasm_builtin_arg_must_match_table_element_type"]={ | ||
Line 2,544: | Line 2,544: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{bb, | [j]={{bb,19091,"/// Check that the first argument is a WebAssembly table, the second is the\n/// value to use for new elements (of a type matching the table type), the\n/// third value is an integer.\nbool Sema::BuiltinWasmTableGrow(CallExpr *TheCall) {\n if (!Context.hasSameType(ElTy, NewElemArg->getType())) {\n return Diag(NewElemArg->getBeginLoc(), diag::err_wasm_builtin_arg_must_match_table_element_type) << 2 << 1 << NewElemArg->getSourceRange();"},{bb,19118,"/// Check that the first argument is a WebAssembly table, the second is an\n/// integer, the third is the value to use to fill the table (of a type\n/// matching the table type), and the fourth is an integer.\nbool Sema::BuiltinWasmTableFill(CallExpr *TheCall) {\n if (!Context.hasSameType(ElTy, NewElemArg->getType())) {\n return Diag(NewElemArg->getBeginLoc(), diag::err_wasm_builtin_arg_must_match_table_element_type) << 3 << 1 << NewElemArg->getSourceRange();"},{bb,19146,"/// Check that the first argument is a WebAssembly table, the second is also a\n/// WebAssembly table (of the same element type), and the third to fifth\n/// arguments are integers.\nbool Sema::BuiltinWasmTableCopy(CallExpr *TheCall) {\n if (!Context.hasSameType(XElTy, YElTy)) {\n return Diag(TableYArg->getBeginLoc(), diag::err_wasm_builtin_arg_must_match_table_element_type) << 2 << 1 << TableYArg->getSourceRange();"}} | ||
}, | }, | ||
["err_wasm_ca_reference"]={ | ["err_wasm_ca_reference"]={ | ||
Line 2,556: | Line 2,556: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{y, | [j]={{y,15078,"/// 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 // Cannot take the address of WebAssembly references or tables.\n if (Context.getTargetInfo().getTriple().isWasm()) {\n if (OpTy.isWebAssemblyReferenceType()) {\n Diag(OpLoc, diag::err_wasm_ca_reference) << 1 << OrigOp.get()->getSourceRange();"},{y,19393,"/// 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 if (BuildAndDiagnose && S.Context.getTargetInfo().getTriple().isWasm() && CaptureType.getNonReferenceType().isWebAssemblyReferenceType()) {\n S.Diag(Loc, diag::err_wasm_ca_reference) << 0;"}} | ||
}, | }, | ||
["err_wasm_cast_table"]={ | ["err_wasm_cast_table"]={ | ||
Line 2,568: | Line 2,568: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{Ab, | [j]={{Ab,2780,"void CastOperation::CheckCXXCStyleCast(bool FunctionalStyle, bool ListInitialization) {\n if (SrcType->isWebAssemblyTableType()) {\n Self.Diag(OpRange.getBegin(), diag::err_wasm_cast_table) << 1 << SrcExpr.get()->getSourceRange();"},{Ab,2962,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n if (SrcType->isWebAssemblyTableType()) {\n Self.Diag(OpRange.getBegin(), diag::err_wasm_cast_table) << 1 << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_wasm_funcref_not_wasm"]={ | ["err_wasm_funcref_not_wasm"]={ | ||
Line 2,580: | Line 2,580: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{F, | [j]={{F,863,"void Parser::ParseWebAssemblyFuncrefTypeAttribute(ParsedAttributes &attrs) {\n if (!getTargetInfo().getTriple().isWasm()) {\n Diag(StartLoc, diag::err_wasm_funcref_not_wasm);"}} | ||
}, | }, | ||
["err_wasm_reference_pr"]={ | ["err_wasm_reference_pr"]={ | ||
Line 2,592: | Line 2,592: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{R, | [j]={{R,2210,"/// Build a pointer type.\n///\n/// \\param T The type to which we\'ll be building a pointer.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// pointer type or, if there is no such entity, the location of the\n/// type that will have pointer type.\n///\n/// \\param Entity The name of the entity that involves the pointer\n/// type, if known.\n///\n/// \\returns A suitable pointer type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildPointerType(QualType T, SourceLocation Loc, DeclarationName Entity) {\n // In WebAssembly, pointers to reference types and pointers to tables are\n // illegal.\n if (getASTContext().getTargetInfo().getTriple().isWasm()) {\n if (T.isWebAssemblyReferenceType()) {\n Diag(Loc, diag::err_wasm_reference_pr) << 0;"},{R,2299,"/// Build a reference type.\n///\n/// \\param T The type to which we\'ll be building a reference.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// reference type or, if there is no such entity, the location of the\n/// type that will have reference type.\n///\n/// \\param Entity The name of the entity that involves the reference\n/// type, if known.\n///\n/// \\returns A suitable reference type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildReferenceType(QualType T, bool SpelledAsLValue, SourceLocation Loc, DeclarationName Entity) {\n // In WebAssembly, references to reference types and tables are illegal.\n if (getASTContext().getTargetInfo().getTriple().isWasm() && T.isWebAssemblyReferenceType()) {\n Diag(Loc, diag::err_wasm_reference_pr) << 1;"}} | ||
}, | }, | ||
["err_wasm_reftype_exception_spec"]={ | ["err_wasm_reftype_exception_spec"]={ | ||
Line 2,604: | Line 2,604: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{Bb, | [j]={{Bb,178,"/// CheckSpecifiedExceptionType - Check if the given type is valid in an\n/// exception specification. Incomplete types, or pointers to incomplete types\n/// other than void are not allowed.\n///\n/// \\param[in,out] T The exception type. This will be decayed to a pointer type\n/// when the input is an array or a function type.\nbool Sema::CheckSpecifiedExceptionType(QualType &T, SourceRange Range) {\n // WebAssembly reference types can\'t be used in exception specifications.\n if (PointeeT.isWebAssemblyReferenceType()) {\n Diag(Range.getBegin(), diag::err_wasm_reftype_exception_spec);"}} | ||
}, | }, | ||
["err_wasm_reftype_multidimensional_array"]={ | ["err_wasm_reftype_multidimensional_array"]={ | ||
Line 2,616: | Line 2,616: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{R, | [j]={{R,2520,"/// 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 // Multi-dimensional arrays of WebAssembly references are not allowed.\n if (Context.getTargetInfo().getTriple().isWasm() && T->isArrayType()) {\n if (ATy && ATy->getElementType().isWebAssemblyReferenceType()) {\n Diag(Loc, diag::err_wasm_reftype_multidimensional_array);"}} | ||
}, | }, | ||
["err_wasm_reftype_tc"]={ | ["err_wasm_reftype_tc"]={ | ||
Line 2,628: | Line 2,628: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{z, | [j]={{z,16650,"/// 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 && BaseType.isWebAssemblyReferenceType()) {\n Diag(Loc, diag::err_wasm_reftype_tc) << 1;"},{V,988,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // Cannot throw WebAssembly reference type.\n if (Ty.isWebAssemblyReferenceType()) {\n Diag(ThrowLoc, diag::err_wasm_reftype_tc) << 0 << E->getSourceRange();"}} | ||
}, | }, | ||
["err_wasm_table_art"]={ | ["err_wasm_table_art"]={ | ||
Line 2,640: | Line 2,640: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{bb, | [j]={{bb,12965,"void Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, SourceLocation ReturnLoc, bool isObjCMethod, const AttrVec *Attrs, const FunctionDecl *FD) {\n if (RetValExp && RetValExp->getType()->isWebAssemblyTableType()) {\n Diag(ReturnLoc, diag::err_wasm_table_art) << 1;"},{w,13148,"/// 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 // WebAssembly tables can\'t be used to initialise a variable.\n if (Init && !Init->getType().isNull() && Init->getType()->isWebAssemblyTableType()) {\n Diag(Init->getExprLoc(), diag::err_wasm_table_art) << 0;"},{y,5052,"ExprResult Sema::ActOnArraySubscriptExpr(Scope *S, Expr *base, SourceLocation lbLoc, MultiExprArg ArgExprs, SourceLocation rbLoc) {\n if (base->getType()->isWebAssemblyTableType()) {\n Diag(base->getExprLoc(), diag::err_wasm_table_art) << SourceRange(base->getBeginLoc(), rbLoc) << 3;"},{y,14482,"// C99 6.5.16.1\nQualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType, BinaryOperatorKind Opc) {\n // WebAssembly tables can\'t be used on RHS of an assignment expression.\n if (RHSType->isWebAssemblyTableType()) {\n Diag(Loc, diag::err_wasm_table_art) << 0;"},{V,994,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // Cannot throw WebAssembly table.\n if (isPointer && Ty.isWebAssemblyReferenceType()) {\n Diag(ThrowLoc, diag::err_wasm_table_art) << 2 << E->getSourceRange();"},{Ob,3991,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n if (RetValExp) {\n if (ATy && ATy->getElementType().isWebAssemblyReferenceType()) {\n Diag(ReturnLoc, diag::err_wasm_table_art) << 1;"}} | ||
}, | }, | ||
["err_wasm_table_as_function_parameter"]={ | ["err_wasm_table_as_function_parameter"]={ | ||
Line 2,652: | Line 2,652: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{bb, | [j]={{bb,16708,"/// 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() && Param->getOriginalType()->isWebAssemblyTableType()) {\n Diag(Param->getLocation(), diag::err_wasm_table_as_function_parameter);"},{w,10755,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n for (const ParmVarDecl *Param : NewFD->parameters()) {\n // WebAssembly tables can\'t be used as function parameters.\n if (Context.getTargetInfo().getTriple().isWasm()) {\n if (PT->getUnqualifiedDesugaredType()->isWebAssemblyTableType()) {\n Diag(Param->getTypeSpecStartLoc(), diag::err_wasm_table_as_function_parameter);"},{y,7533,"/// 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 // WebAssembly tables can\'t be used as arguments.\n if (Context.getTargetInfo().getTriple().isWasm()) {\n for (const Expr *Arg : Args) {\n if (Arg && Arg->getType()->isWebAssemblyTableType()) {\n return ExprError(Diag(Arg->getExprLoc(), diag::err_wasm_table_as_function_parameter));"},{R,3034,"QualType Sema::BuildFunctionType(QualType T, MutableArrayRef<QualType> ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI) {\n for (unsigned Idx = 0, Cnt = ParamTypes.size(); Idx < Cnt; ++Idx) {\n if (ParamType->isVoidType()) {\n } else if (ParamType->isHalfType() && !getLangOpts().NativeHalfArgsAndReturns && !Context.getTargetInfo().allowHalfArgsAndReturns()) {\n } else if (ParamType->isWebAssemblyTableType()) {\n Diag(Loc, diag::err_wasm_table_as_function_parameter);"}} | ||
}, | }, | ||
["err_wasm_table_conditional_expression"]={ | ["err_wasm_table_conditional_expression"]={ | ||
Line 2,664: | Line 2,664: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{y, | [j]={{y,9124,"/// Note that LHS is not null here, even if this is the gnu \"x ?: y\" extension.\n/// In that case, LHS = cond.\n/// C99 6.5.15\nQualType Sema::CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n if (LHSTy->isWebAssemblyTableType() || RHSTy->isWebAssemblyTableType()) {\n Diag(QuestionLoc, diag::err_wasm_table_conditional_expression) << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{V,6604,"/// 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 // WebAssembly tables are not allowed as conditional LHS or RHS.\n if (LTy->isWebAssemblyTableType() || RTy->isWebAssemblyTableType()) {\n Diag(QuestionLoc, diag::err_wasm_table_conditional_expression) << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_wasm_table_in_function"]={ | ["err_wasm_table_in_function"]={ | ||
Line 2,676: | Line 2,676: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{w, | [j]={{w,8659,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // WebAssembly tables must be static with a zero length and can\'t be\n // declared within functions.\n if (T->isWebAssemblyTableType()) {\n if (getCurScope()->getParent()) { // Parent is null at top-level\n Diag(NewVD->getLocation(), diag::err_wasm_table_in_function);"}} | ||
}, | }, | ||
["err_wasm_table_invalid_uett_operand"]={ | ["err_wasm_table_invalid_uett_operand"]={ | ||
Line 2,688: | Line 2,688: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{y, | [j]={{y,4411,"/// Check the constraints on expression operands to unary type expression\n/// and type traits.\n///\n/// Completes any types necessary and validates the constraints on the operand\n/// expression. The logic mostly mirrors the type-based overload, but may modify\n/// the expression as it completes the type for that expression through template\n/// instantiation, etc.\nbool Sema::CheckUnaryExprOrTypeTraitOperand(Expr *E, UnaryExprOrTypeTrait ExprKind) {\n // WebAssembly tables are always illegal operands to unary expressions and\n // type traits.\n if (Context.getTargetInfo().getTriple().isWasm() && E->getType()->isWebAssemblyTableType()) {\n Diag(E->getExprLoc(), diag::err_wasm_table_invalid_uett_operand) << getTraitSpelling(ExprKind);"},{y,4782,"/// Check the constraints on operands to unary expression and type\n/// traits.\n///\n/// This will complete any types necessary, and validate the various constraints\n/// on those operands.\n///\n/// The UsualUnaryConversions() function is *not* called by this routine.\n/// C99 6.3.2.1p[2-4] all state:\n/// Except when it is the operand of the sizeof operator ...\n///\n/// C++ [expr.sizeof]p4\n/// The lvalue-to-rvalue, array-to-pointer, and function-to-pointer\n/// standard conversions are not applied to the operand of sizeof.\n///\n/// This policy is followed for all of the unary trait expressions.\nbool Sema::CheckUnaryExprOrTypeTraitOperand(QualType ExprType, SourceLocation OpLoc, SourceRange ExprRange, UnaryExprOrTypeTrait ExprKind, StringRef KWName) {\n // WebAssembly tables are always illegal operands to unary expressions and\n // type traits.\n if (Context.getTargetInfo().getTriple().isWasm() && ExprType->isWebAssemblyTableType()) {\n Diag(OpLoc, diag::err_wasm_table_invalid_uett_operand) << getTraitSpelling(ExprKind);"}} | ||
}, | }, | ||
["err_wasm_table_must_be_static"]={ | ["err_wasm_table_must_be_static"]={ | ||
Line 2,700: | Line 2,700: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{w, | [j]={{w,8664,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // WebAssembly tables must be static with a zero length and can\'t be\n // declared within functions.\n if (T->isWebAssemblyTableType()) {\n if (NewVD->getStorageClass() != SC_Static) {\n Diag(NewVD->getLocation(), diag::err_wasm_table_must_be_static);"}} | ||
}, | }, | ||
["err_wasm_table_pr"]={ | ["err_wasm_table_pr"]={ | ||
Line 2,712: | Line 2,712: | ||
[h]=q, | [h]=q, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{y, | [j]={{y,15141,"/// 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 // Cannot take the address of WebAssembly references or tables.\n if (Context.getTargetInfo().getTriple().isWasm()) {\n if (OpTy->isWebAssemblyTableType()) {\n Diag(OpLoc, diag::err_wasm_table_pr) << 1 << OrigOp.get()->getSourceRange();"},{R,2216,"/// Build a pointer type.\n///\n/// \\param T The type to which we\'ll be building a pointer.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// pointer type or, if there is no such entity, the location of the\n/// type that will have pointer type.\n///\n/// \\param Entity The name of the entity that involves the pointer\n/// type, if known.\n///\n/// \\returns A suitable pointer type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildPointerType(QualType T, SourceLocation Loc, DeclarationName Entity) {\n // In WebAssembly, pointers to reference types and pointers to tables are\n // illegal.\n if (getASTContext().getTargetInfo().getTriple().isWasm()) {\n // We need to desugar the type here in case T is a ParenType.\n if (T->getUnqualifiedDesugaredType()->isWebAssemblyTableType()) {\n Diag(Loc, diag::err_wasm_table_pr) << 0;"},{R,2303,"/// Build a reference type.\n///\n/// \\param T The type to which we\'ll be building a reference.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// reference type or, if there is no such entity, the location of the\n/// type that will have reference type.\n///\n/// \\param Entity The name of the entity that involves the reference\n/// type, if known.\n///\n/// \\returns A suitable reference type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildReferenceType(QualType T, bool SpelledAsLValue, SourceLocation Loc, DeclarationName Entity) {\n if (T->isWebAssemblyTableType()) {\n Diag(Loc, diag::err_wasm_table_pr) << 1;"}} | ||
}, | }, | ||
["err_weak_property"]={ | ["err_weak_property"]={ | ||
Line 2,724: | Line 2,724: | ||
[h]=m, | [h]=m, | ||
[i]={"f881267db9a9",1480718311,"Mass-rename the handful of error_* diagnostics to err_*."}, | [i]={"f881267db9a9",1480718311,"Mass-rename the handful of error_* diagnostics to err_*."}, | ||
[j]={{Cc, | [j]={{Cc,771,"static void checkARCPropertyImpl(Sema &S, SourceLocation propertyImplLoc, ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {\n case Qualifiers::OCL_Weak:\n S.Diag(ivar->getLocation(), diag::err_weak_property) << property->getDeclName() << ivar->getDeclName();"},{Cc,1401,"/// 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 // Check that type of property and its ivar are type compatible.\n if (!Context.hasSameType(PropertyIvarType, IvarType)) {\n // __weak is explicit. So it works on Canonical type.\n if ((PropType.isObjCGCWeak() && !IvarType.isObjCGCWeak() && getLangOpts().getGC() != LangOptions::NonGC)) {\n Diag(PropertyDiagLoc, diag::err_weak_property) << property->getDeclName() << Ivar->getDeclName();"}} | ||
}, | }, | ||
["err_while_loop_outside_of_a_function"]={ | ["err_while_loop_outside_of_a_function"]={ | ||
Line 2,736: | Line 2,736: | ||
[h]=x, | [h]=x, | ||
[i]={"edaae251cca0",1657642332,"[clang] better error message for while loops outside of control flow"}, | [i]={"edaae251cca0",1657642332,"[clang] better error message for while loops outside of control flow"}, | ||
[j]={{F, | [j]={{F,6618,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n if (Tok.is(tok::l_paren)) {\n } else if (D.mayOmitIdentifier()) {\n } else {\n if (D.getContext() == DeclaratorContext::Member) {\n } else {\n if (Tok.getKind() == tok::TokenKind::kw_while) {\n Diag(Tok, diag::err_while_loop_outside_of_a_function);"}} | ||
}, | }, | ||
["err_wrong_sampler_addressspace"]={ | ["err_wrong_sampler_addressspace"]={ | ||
Line 2,748: | Line 2,748: | ||
[h]=m, | [h]=m, | ||
[i]={"610541989a52",1360234547,"Add OpenCL samplers as Clang builtin types and check sampler related restrictions."}, | [i]={"610541989a52",1360234547,"Add OpenCL samplers as Clang builtin types and check sampler related restrictions."}, | ||
[j]={{w, | [j]={{w,7384,"/// Returns true if there hasn\'t been any invalid type diagnosed.\nstatic bool diagnoseOpenCLTypes(Sema &Se, VarDecl *NewVD) {\n if (R->isSamplerT()) {\n // OpenCL v1.2 s6.9.b p4:\n // The sampler type cannot be used with the __local and __global address\n // space qualifiers.\n if (R.getAddressSpace() == LangAS::opencl_local || R.getAddressSpace() == LangAS::opencl_global) {\n Se.Diag(NewVD->getLocation(), diag::err_wrong_sampler_addressspace);"}} | ||
}, | }, | ||
["err_x86_builtin_invalid_rounding"]={ | ["err_x86_builtin_invalid_rounding"]={ | ||
Line 2,760: | Line 2,760: | ||
[h]=m, | [h]=m, | ||
[i]={"a7e253e8fb06",1474606111,"[AVX-512] Add initial support for checking rounding mode arguments of builtins."}, | [i]={"a7e253e8fb06",1474606111,"[AVX-512] Add initial support for checking rounding mode arguments of builtins."}, | ||
[j]={{bb, | [j]={{bb,5790,"// Check if the rounding mode is legal.\nbool Sema::CheckX86BuiltinRoundingOrSAE(unsigned BuiltinID, CallExpr *TheCall) {\n return Diag(TheCall->getBeginLoc(), diag::err_x86_builtin_invalid_rounding) << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_x86_builtin_invalid_scale"]={ | ["err_x86_builtin_invalid_scale"]={ | ||
Line 2,772: | Line 2,772: | ||
[h]=m, | [h]=m, | ||
[i]={"df5beb2d6f83",1489425410,"[X86] Add checking of the scale argument to scatter/gather builtins"}, | [i]={"df5beb2d6f83",1489425410,"[X86] Add checking of the scale argument to scatter/gather builtins"}, | ||
[j]={{bb, | [j]={{bb,5893,"// Check if the gather/scatter scale is legal.\nbool Sema::CheckX86BuiltinGatherScatterScale(unsigned BuiltinID, CallExpr *TheCall) {\n return Diag(TheCall->getBeginLoc(), diag::err_x86_builtin_invalid_scale) << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_x86_builtin_tile_arg_duplicate"]={ | ["err_x86_builtin_tile_arg_duplicate"]={ | ||
Line 2,784: | Line 2,784: | ||
[h]=m, | [h]=m, | ||
[i]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata"}, | [i]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata"}, | ||
[j]={{bb, | [j]={{bb,5926,"bool Sema::CheckX86BuiltinTileDuplicate(CallExpr *TheCall, ArrayRef<int> ArgNums) {\n for (int ArgNum : ArgNums) {\n if (ArgValues.test(ArgExtValue))\n return Diag(TheCall->getBeginLoc(), diag::err_x86_builtin_tile_arg_duplicate) << TheCall->getArg(ArgNum)->getSourceRange();"}} | ||
}, | }, | ||
["err_zero_version"]={ | ["err_zero_version"]={ | ||
Line 2,796: | Line 2,796: | ||
[h]=x, | [h]=x, | ||
[i]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | [i]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify"}, | ||
[j]={{F, | [j]={{F,1037,"/// Parse a version number.\n///\n/// version:\n/// simple-integer\n/// simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer\n/// simple-integer \'.\' simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer \'_\' simple-integer\nVersionTuple Parser::ParseVersionTuple(SourceRange &Range) {\n if (AfterMajor == ActualLength) {\n // We only had a single version component.\n if (Major == 0) {\n Diag(Tok, diag::err_zero_version);"},{F,1066,"/// Parse a version number.\n///\n/// version:\n/// simple-integer\n/// simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer\n/// simple-integer \'.\' simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer \'_\' simple-integer\nVersionTuple Parser::ParseVersionTuple(SourceRange &Range) {\n if (AfterMinor == ActualLength) {\n // We had major.minor.\n if (Major == 0 && Minor == 0) {\n Diag(Tok, diag::err_zero_version);"}} | ||
}, | }, | ||
["error_cconv_unsupported"]={ | ["error_cconv_unsupported"]={ | ||
Line 2,808: | Line 2,808: | ||
[h]=m, | [h]=m, | ||
[i]={"f4038e75d202",1563572314,"Disallow most calling convention attributes on PS4"}, | [i]={"f4038e75d202",1563572314,"Disallow most calling convention attributes on PS4"}, | ||
[j]={{Wb, | [j]={{Wb,5448,"bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, const FunctionDecl *FD) {\n case TargetInfo::CCCR_Error:\n Diag(Attrs.getLoc(), diag::error_cconv_unsupported) << Attrs << (int)CallingConventionIgnoredReason::ForThisTarget;"}} | ||
}, | }, | ||
["error_duplicate_asm_operand_name"]={ | ["error_duplicate_asm_operand_name"]={ | ||
Line 2,820: | Line 2,820: | ||
[h]="Inline Assembly Issue", | [h]="Inline Assembly Issue", | ||
[i]={"954ec09aed4f",1559178346,"clang support gnu asm goto."}, | [i]={"954ec09aed4f",1559178346,"clang support gnu asm goto."}, | ||
[j]={{"clang/lib/Sema/SemaStmtAsm.cpp", | [j]={{"clang/lib/Sema/SemaStmtAsm.cpp",736,"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 if (Found != NamedOperandList.end()) {\n Diag((Found + 1)->second->getBeginLoc(), diag::error_duplicate_asm_operand_name) << (Found + 1)->first;"}} | ||
}, | }, | ||
["error_inoutput_conflict_with_clobber"]={ | ["error_inoutput_conflict_with_clobber"]={ | ||
Line 2,832: | Line 2,832: | ||
[h]=q, | [h]=q, | ||
[i]={"c42fd03bf854",1482755022,"[inline-asm]No error for conflict between inputs\\outputs and clobber list"}, | [i]={"c42fd03bf854",1482755022,"[inline-asm]No error for conflict between inputs\\outputs and clobber list"}, | ||
[j]={{"clang/lib/Sema/SemaStmtAsm.cpp", | [j]={{"clang/lib/Sema/SemaStmtAsm.cpp",717,"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 if (ConstraintLoc.isValid())\n targetDiag(ConstraintLoc, diag::error_inoutput_conflict_with_clobber);"}} | ||
}, | }, | ||
["error_subscript_overload"]={ | ["error_subscript_overload"]={ | ||
Line 2,844: | Line 2,844: | ||
[h]=m, | [h]=m, | ||
[i]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions."}, | [i]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions."}, | ||
[j]={{z, | [j]={{z,16193,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // C++ [over.oper]p8:\n // An operator function cannot have default arguments (8.3.6),\n // except where explicitly stated below.\n //\n // Only the function-call operator (C++ [over.call]p1) and the subscript\n // operator (CWG2507) allow default arguments.\n if (Op != OO_Call) {\n if (FirstDefaultedParam) {\n if (Op == OO_Subscript) {\n Diag(FnDecl->getLocation(), LangOpts.CPlusPlus23 ? diag::ext_subscript_overload : diag::error_subscript_overload) << FnDecl->getDeclName() << 1 << FirstDefaultedParam->getDefaultArgRange();"},{z,16244,"#include \"clang/Basic/OperatorKinds.def\"\n if (Op == OO_Subscript && NumParams != 2) {\n Diag(FnDecl->getLocation(), LangOpts.CPlusPlus23 ? diag::ext_subscript_overload : diag::error_subscript_overload) << FnDecl->getDeclName() << (NumParams == 1 ? 0 : 2);"}} | ||
}, | }, | ||
["escaped_newline_block_comment_end"]={ | ["escaped_newline_block_comment_end"]={ | ||
Line 2,858: | Line 2,858: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{Z, | [j]={{Z,2695,"/// 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 // Warn about having an escaped newline between the */ characters.\n if (!L->isLexingRawMode())\n L->Diag(CurPtr + 1, diag::escaped_newline_block_comment_end);"}} | ||
}, | }, | ||
["ext_abstract_pack_declarator_parens"]={ | ["ext_abstract_pack_declarator_parens"]={ | ||
Line 2,872: | Line 2,872: | ||
[h]=x, | [h]=x, | ||
[i]={"b19337fbe474",1361391567,"PR15311: Finish implementation of the suggested resolution of core issue 1488,"}, | [i]={"b19337fbe474",1361391567,"PR15311: Finish implementation of the suggested resolution of core issue 1488,"}, | ||
[j]={{F, | [j]={{F,6590,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n if (Tok.is(tok::l_paren)) {\n } else if (D.mayOmitIdentifier()) {\n // The grammar for abstract-pack-declarator does not allow grouping parens.\n // FIXME: Revisit this once core issue 1488 is resolved.\n if (D.hasEllipsis() && D.hasGroupingParens())\n Diag(PP.getLocForEndOfToken(D.getEllipsisLoc()), diag::ext_abstract_pack_declarator_parens);"}} | ||
}, | }, | ||
["ext_adl_only_template_id"]={ | ["ext_adl_only_template_id"]={ | ||
Line 2,886: | Line 2,886: | ||
[h]=m, | [h]=m, | ||
[i]={"b23c5e8c3df8",1557372687,"[c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose"}, | [i]={"b23c5e8c3df8",1557372687,"[c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose"}, | ||
[j]={{y, | [j]={{y,7080,"ExprResult Sema::ActOnCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig) {\n // Diagnose uses of the C++20 \"ADL-only template-id call\" feature in earlier\n // language modes.\n if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(Fn)) {\n if (ULE->hasExplicitTemplateArgs() && ULE->decls_begin() == ULE->decls_end()) {\n Diag(Fn->getExprLoc(), getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_adl_only_template_id : diag::ext_adl_only_template_id) << ULE->getName();"}} | ||
}, | }, | ||
["ext_aggregate_init_not_constant"]={ | ["ext_aggregate_init_not_constant"]={ | ||
Line 2,901: | Line 2,901: | ||
[h]=m, | [h]=m, | ||
[i]={"1aac546d3108",1374490706,"Implement the part of C89 6.5.7 p3 requiring a constant initializer list"}, | [i]={"1aac546d3108",1374490706,"Implement the part of C89 6.5.7 p3 requiring a constant initializer list"}, | ||
[j]={{w, | [j]={{w,13435,"/// 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->isLocalVarDecl()) {\n // Don\'t check the initializer if the declaration is malformed.\n if (VDecl->isInvalidDecl()) {\n } else if (VDecl->getType().getAddressSpace() == LangAS::opencl_constant) {\n } else if (getLangOpts().CPlusPlus) {\n } else if (VDecl->getStorageClass() == SC_Static) {\n } else if (!getLangOpts().C99 && VDecl->getType()->isAggregateType() && isa<InitListExpr>(Init)) {\n if (!Init->isConstantInitializer(Context, false, &Culprit)) {\n Diag(Culprit->getExprLoc(), diag::ext_aggregate_init_not_constant) << Culprit->getSourceRange();"}} | ||
}, | }, | ||
["ext_alias_declaration"]={ | ["ext_alias_declaration"]={ | ||
Line 2,915: | Line 2,915: | ||
[h]=x, | [h]=x, | ||
[i]={"dda56e4b4a9c",1302877477,"Support for C++11 (non-template) alias declarations."}, | [i]={"dda56e4b4a9c",1302877477,"Support for C++11 (non-template) alias declarations."}, | ||
[j]={{L, | [j]={{L,879,"Decl *Parser::ParseAliasDeclarationAfterDeclarator(const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, UsingDeclarator &D, SourceLocation &DeclEnd, AccessSpecifier AS, ParsedAttributes &Attrs, Decl **OwnedType) {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_alias_declaration : diag::ext_alias_declaration);"}} | ||
}, | }, | ||
["ext_alias_in_init_statement"]={ | ["ext_alias_in_init_statement"]={ | ||
Line 2,929: | Line 2,929: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{vb, | [j]={{vb,2003,"Parser::DeclGroupPtrTy Parser::ParseAliasDeclarationInInitStatement(DeclaratorContext Context, ParsedAttributes &Attrs) {\n Diag(DeclStart, !getLangOpts().CPlusPlus23 ? diag::ext_alias_in_init_statement : diag::warn_cxx20_alias_in_init_statement) << SourceRange(DeclStart, DeclEnd);"}} | ||
}, | }, | ||
["ext_alignof_expr"]={ | ["ext_alignof_expr"]={ | ||
Line 2,943: | Line 2,943: | ||
[h]=x, | [h]=x, | ||
[i]={"7dd5fe5ce60c",1359454698,"Produce a diagnostic if alignas is applied to an expression. Neither C11 nor"}, | [i]={"7dd5fe5ce60c",1359454698,"Produce a diagnostic if alignas is applied to an expression. Neither C11 nor"}, | ||
[j]={{ub, | [j]={{ub,2529,"/// Parse a sizeof or alignof expression.\n///\n/// \\verbatim\n/// unary-expression: [C99 6.5.3]\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++11] \'alignof\' \'(\' type-id \')\'\n/// \\endverbatim\nExprResult Parser::ParseUnaryExprOrTypeTraitExpression() {\n if (OpTok.isOneOf(tok::kw_alignof, tok::kw__Alignof))\n Diag(OpTok, diag::ext_alignof_expr) << OpTok.getIdentifierInfo();"}} | ||
}, | }, | ||
["ext_anonymous_record_with_anonymous_type"]={ | ["ext_anonymous_record_with_anonymous_type"]={ | ||
Line 2,958: | Line 2,958: | ||
[h]=m, | [h]=m, | ||
[i]={"254d2666e435",1359334445,"Add a -pedantic warning: an anonymous union within an anonymous union is not"}, | [i]={"254d2666e435",1359334445,"Add a -pedantic warning: an anonymous union within an anonymous union is not"}, | ||
[j]={{w, | [j]={{w,5635,"/// 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 } else {\n Diag(MemRecord->getLocation(), diag::ext_anonymous_record_with_anonymous_type) << Record->isUnion();"}} | ||
}, | }, | ||
["ext_anonymous_record_with_type"]={ | ["ext_anonymous_record_with_type"]={ | ||
Line 2,973: | Line 2,973: | ||
[h]=m, | [h]=m, | ||
[i]={"4ad4b5863947",1283945545,"Allow type definitions inside anonymous struct/union in Microsoft mode."}, | [i]={"4ad4b5863947",1283945545,"Allow type definitions inside anonymous struct/union in Microsoft mode."}, | ||
[j]={{w, | [j]={{w,5622,"/// 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 Diag(MemRecord->getLocation(), diag::ext_anonymous_record_with_type) << Record->isUnion();"},{w,5656,"/// 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 // Visual C++ allows type definition in anonymous struct or union.\n if (getLangOpts().MicrosoftExt && DK == diag::err_anonymous_record_with_type)\n Diag(Mem->getLocation(), diag::ext_anonymous_record_with_type) << Record->isUnion();"}} | ||
}, | }, | ||
["ext_anonymous_struct_union_qualified"]={ | ["ext_anonymous_struct_union_qualified"]={ | ||
Line 2,988: | Line 2,988: | ||
[h]=m, | [h]=m, | ||
[i]={"0f8bc97abd6d",1304982333,"Ignore const/volatile/restrict qualifiers on anonymous structs and"}, | [i]={"0f8bc97abd6d",1304982333,"Ignore const/volatile/restrict qualifiers on anonymous structs and"}, | ||
[j]={{w, | [j]={{w,5556,"/// 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 // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n if (DS.getTypeQualifiers() & DeclSpec::TQ_const)\n Diag(DS.getConstSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"const\" << FixItHint::CreateRemoval(DS.getConstSpecLoc());"},{w,5561,"/// 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 // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n if (DS.getTypeQualifiers() & DeclSpec::TQ_volatile)\n Diag(DS.getVolatileSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"volatile\" << FixItHint::CreateRemoval(DS.getVolatileSpecLoc());"},{w,5566,"/// 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 // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n if (DS.getTypeQualifiers() & DeclSpec::TQ_restrict)\n Diag(DS.getRestrictSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"restrict\" << FixItHint::CreateRemoval(DS.getRestrictSpecLoc());"},{w,5571,"/// 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 // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n if (DS.getTypeQualifiers() & DeclSpec::TQ_atomic)\n Diag(DS.getAtomicSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"_Atomic\" << FixItHint::CreateRemoval(DS.getAtomicSpecLoc());"},{w,5576,"/// 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 // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n if (DS.getTypeQualifiers() & DeclSpec::TQ_unaligned)\n Diag(DS.getUnalignedSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"__unaligned\" << FixItHint::CreateRemoval(DS.getUnalignedSpecLoc());"}} | ||
}, | }, | ||
["ext_anonymous_union"]={ | ["ext_anonymous_union"]={ | ||
Line 3,003: | Line 3,003: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,5508,"/// 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 // Diagnose whether this anonymous struct/union is an extension.\n if (Record->isUnion() && !getLangOpts().CPlusPlus && !getLangOpts().C11)\n Diag(Record->getLocation(), diag::ext_anonymous_union);"}} | ||
}, | }, | ||
["ext_array_init_copy"]={ | ["ext_array_init_copy"]={ | ||
Line 3,018: | Line 3,018: | ||
[h]=m, | [h]=m, | ||
[i]={"e2f943b5cb44",1298399391,"Implement the GNU C extension which permits the initialization of an"}, | [i]={"e2f943b5cb44",1298399391,"Implement the GNU C extension which permits the initialization of an"}, | ||
[j]={{T, | [j]={{T,9223,"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_GNUArrayInit:\n S.Diag(Kind.getLocation(), diag::ext_array_init_copy) << Step->Type << CurInit.get()->getType() << CurInit.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_array_init_parens"]={ | ["ext_array_init_parens"]={ | ||
Line 3,032: | Line 3,032: | ||
[h]=m, | [h]=m, | ||
[i]={"ebeed415870b",1329345489,"Support GCC\'s bug^Wextension allowing class array members to be initalized by a"}, | [i]={"ebeed415870b",1329345489,"Support GCC\'s bug^Wextension allowing class array members to be initalized by a"}, | ||
[j]={{T, | [j]={{T,9249,"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_ParenthesizedArrayInit:\n S.Diag(Kind.getLocation(), diag::ext_array_init_parens) << CurInit.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_array_size_conversion"]={ | ["ext_array_size_conversion"]={ | ||
Line 3,047: | Line 3,047: | ||
[h]=m, | [h]=m, | ||
[i]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class"}, | [i]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class"}, | ||
[j]={{V, | [j]={{V,2187,"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 diagnoseConversion(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy) override { return S.Diag(Loc, S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_array_size_conversion : diag::ext_array_size_conversion) << T << ConvTy->isEnumeralType() << ConvTy; }"}} | ||
}, | }, | ||
["ext_auto_new_list_init"]={ | ["ext_auto_new_list_init"]={ | ||
Line 3,062: | Line 3,062: | ||
[h]=m, | [h]=m, | ||
[i]={"00c9dfdfd094",1513016994,"P0620 follow-up: deducing `auto` from braced-init-list in new expr"}, | [i]={"00c9dfdfd094",1513016994,"P0620 follow-up: deducing `auto` from braced-init-list in new expr"}, | ||
[j]={{V, | [j]={{V,2060,"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 (Braced && !getLangOpts().CPlusPlus17)\n Diag(Initializer->getBeginLoc(), diag::ext_auto_new_list_init) << AllocType << TypeRange;"}} | ||
}, | }, | ||
["ext_auto_storage_class"]={ | ["ext_auto_storage_class"]={ | ||
Line 3,076: | Line 3,076: | ||
[h]=x, | [h]=x, | ||
[i]={"58c743370994",1315166054,"PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ..."}, | [i]={"58c743370994",1315166054,"PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ..."}, | ||
[j]={{F, | [j]={{F,3969,"/// 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_auto:\n if (getLangOpts().CPlusPlus11) {\n if (isKnownToBeTypeSpecifier(GetLookAheadToken(1))) {\n if (!isInvalid)\n Diag(Tok, diag::ext_auto_storage_class) << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());"}} | ||
}, | }, | ||
["ext_auto_type"]={ | ["ext_auto_type"]={ | ||
Line 3,091: | Line 3,091: | ||
[h]=x, | [h]=x, | ||
[i]={"e301ba2b4891",1447207335,"Add support for GCC\'s \'__auto_type\' extension, per the GCC manual:"}, | [i]={"e301ba2b4891",1447207335,"Add support for GCC\'s \'__auto_type\' extension, per the GCC manual:"}, | ||
[j]={{F, | [j]={{F,3980,"/// 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___auto_type:\n Diag(Tok, diag::ext_auto_type);"}} | ||
}, | }, | ||
["ext_auto_type_specifier"]={ | ["ext_auto_type_specifier"]={ | ||
Line 3,105: | Line 3,105: | ||
[h]=m, | [h]=m, | ||
[i]={"58c743370994",1315166054,"PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ..."}, | [i]={"58c743370994",1315166054,"PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ..."}, | ||
[j]={{pc, | [j]={{pc,1369,"/// Finish - This does final analysis of the declspec, rejecting things like\n/// \"_Imaginary\" (lacking an FP type). After calling this method, DeclSpec is\n/// guaranteed to be self-consistent, even if an error occurred.\nvoid DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {\n // Diagnose if we\'ve recovered from an ill-formed \'auto\' storage class\n // specifier in a pre-C++11 dialect of C++.\n if (!S.getLangOpts().CPlusPlus11 && TypeSpecType == TST_auto)\n S.Diag(TSTLoc, diag::ext_auto_type_specifier);"}} | ||
}, | }, | ||
["ext_bad_cxx_cast_qualifiers_away_incoherent"]={ | ["ext_bad_cxx_cast_qualifiers_away_incoherent"]={ | ||
Line 3,119: | Line 3,119: | ||
[h]=m, | [h]=m, | ||
[i]={"f276e2dc4618",1531263875,"Fix determination of whether a reinterpret_cast casts away constness."}, | [i]={"f276e2dc4618",1531263875,"Fix determination of whether a reinterpret_cast casts away constness."}, | ||
[j]={{Ab, | [j]={{Ab,771,"static TryCastResult getCastAwayConstnessCastKind(CastAwayConstnessKind CACK, unsigned &DiagID) {\n case CastAwayConstnessKind::CACK_Incoherent:\n DiagID = diag::ext_bad_cxx_cast_qualifiers_away_incoherent;"}} | ||
}, | }, | ||
["ext_binary_literal"]={ | ["ext_binary_literal"]={ | ||
Line 3,134: | Line 3,134: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{cb, | [j]={{cb,1349,"/// ParseNumberStartingWithZero - This method is called when the first character\n/// of the number is found to be a zero. This means it is either an octal\n/// number (like \'04\') or a hex number (\'0x123a\') a binary number (\'0b1010\') or\n/// a floating point number (01239.123e4). Eat the prefix, determining the\n/// radix etc.\nvoid NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {\n // Handle simple binary numbers 0b01010\n if ((c1 == \'b\' || c1 == \'B\') && (s[1] == \'0\' || s[1] == \'1\')) {\n Diags.Report(TokLoc, LangOpts.CPlusPlus14 ? diag::warn_cxx11_compat_binary_literal : LangOpts.CPlusPlus ? diag::ext_binary_literal_cxx14 : diag::ext_binary_literal);"}} | ||
}, | }, | ||
["ext_binary_literal_cxx14"]={ | ["ext_binary_literal_cxx14"]={ | ||
Line 3,149: | Line 3,149: | ||
[h]=A, | [h]=A, | ||
[i]={"dd69ef38dba7",1408463755,"C++1y is now C++14!"}, | [i]={"dd69ef38dba7",1408463755,"C++1y is now C++14!"}, | ||
[j]={{cb, | [j]={{cb,1348,"/// ParseNumberStartingWithZero - This method is called when the first character\n/// of the number is found to be a zero. This means it is either an octal\n/// number (like \'04\') or a hex number (\'0x123a\') a binary number (\'0b1010\') or\n/// a floating point number (01239.123e4). Eat the prefix, determining the\n/// radix etc.\nvoid NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {\n // Handle simple binary numbers 0b01010\n if ((c1 == \'b\' || c1 == \'B\') && (s[1] == \'0\' || s[1] == \'1\')) {\n Diags.Report(TokLoc, LangOpts.CPlusPlus14 ? diag::warn_cxx11_compat_binary_literal : LangOpts.CPlusPlus ? diag::ext_binary_literal_cxx14 : diag::ext_binary_literal);"}} | ||
}, | }, | ||
["ext_bit_int"]={ | ["ext_bit_int"]={ | ||
Line 3,164: | Line 3,164: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{F, | [j]={{F,7962,"void Parser::DiagnoseBitIntUse(const Token &Tok) {\n if (Tok.is(tok::kw__ExtInt)) {\n } else {\n // In C2x mode, diagnose that the use is not compatible with pre-C2x modes.\n // Otherwise, diagnose that the use is a Clang extension.\n if (getLangOpts().C2x)\n else\n Diag(Loc, diag::ext_bit_int) << getLangOpts().CPlusPlus;"}} | ||
}, | }, | ||
["ext_bitfield_member_init"]={ | ["ext_bitfield_member_init"]={ | ||
Line 3,178: | Line 3,178: | ||
[h]=x, | [h]=x, | ||
[i]={"6b8e3c02ca44",1503880094,"[c++2a] P0683R1: Permit default member initializers for bit-fields."}, | [i]={"6b8e3c02ca44",1503880094,"[c++2a] P0683R1: Permit default member initializers for bit-fields."}, | ||
[j]={{L, | [j]={{L,3037,"/// 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 } else if (DeclaratorInfo.isDeclarationOfFunction()) {\n } else if (DeclaratorInfo.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_static && DeclaratorInfo.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_typedef && !DS.isFriendSpecified()) {\n // It\'s a default member initializer.\n if (BitfieldSize.get())\n Diag(Tok, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_bitfield_member_init : diag::ext_bitfield_member_init);"}} | ||
}, | }, | ||
["ext_c11_anonymous_struct"]={ | ["ext_c11_anonymous_struct"]={ | ||
Line 3,193: | Line 3,193: | ||
[h]=m, | [h]=m, | ||
[i]={"b64a1fa65ca1",1328284024,"Don\'t warn about anonymous struct/union in C11."}, | [i]={"b64a1fa65ca1",1328284024,"Don\'t warn about anonymous struct/union in C11."}, | ||
[j]={{w, | [j]={{w,5512,"/// 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 // Diagnose whether this anonymous struct/union is an extension.\n if (Record->isUnion() && !getLangOpts().CPlusPlus && !getLangOpts().C11)\n else if (!Record->isUnion() && getLangOpts().CPlusPlus)\n else if (!Record->isUnion() && !getLangOpts().C11)\n Diag(Record->getLocation(), diag::ext_c11_anonymous_struct);"}} | ||
}, | }, | ||
["ext_c11_feature"]={ | ["ext_c11_feature"]={ | ||
Line 3,208: | Line 3,208: | ||
[h]=x, | [h]=x, | ||
[i]={"774bd6ef1c93",1566848647,"Diagnose use of _Thread_local as an extension when not in C11 mode."}, | [i]={"774bd6ef1c93",1566848647,"Diagnose use of _Thread_local as an extension when not in C11 mode."}, | ||
[j]={{F, | [j]={{F,4015,"/// 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__Thread_local:\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{F,4072,"/// 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__Noreturn:\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{F,4079,"/// 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 // alignment-specifier\n case tok::kw__Alignas:\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{F,4409,"#include \"clang/Basic/TransformTypeTraits.def\"\n case tok::kw__Atomic:\n // C11 6.7.2.4/4:\n // If the _Atomic keyword is immediately followed by a left parenthesis,\n // it is interpreted as a type specifier (with a type name), not as a\n // type qualifier.\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{F,5967,"/// 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__Atomic:\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{L,972,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n if (Tok.is(tok::kw__Static_assert) && !getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{ub,1437,"#include \"clang/Basic/TransformTypeTraits.def\"\n case tok::kw__Alignof: // unary-expression: \'_Alignof\' \'(\' type-name \')\'\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{ub,3315,"/// ParseGenericSelectionExpression - Parse a C11 generic-selection\n/// [C11 6.5.1.1].\n///\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( assignment-expression , generic-assoc-list )\n/// generic-assoc-list:\n/// generic-association\n/// generic-assoc-list , generic-association\n/// generic-association:\n/// type-name : assignment-expression\n/// default : assignment-expression\n/// \\endverbatim\n///\n/// As an extension, Clang also accepts:\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( type-name, generic-assoc-list )\n/// \\endverbatim\nExprResult Parser::ParseGenericSelectionExpression() {\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"}} | ||
}, | }, | ||
["ext_c2x_bitint_suffix"]={ | ["ext_c2x_bitint_suffix"]={ | ||
Line 3,222: | Line 3,222: | ||
[h]=q, | [h]=q, | ||
[i]={"8cba72177dcd",1647264157,"Implement literal suffixes for _BitInt"}, | [i]={"8cba72177dcd",1647264157,"Implement literal suffixes for _BitInt"}, | ||
[j]={{rc, | [j]={{rc,341,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n case tok::numeric_constant: {\n // \'wb/uwb\' literals are a C2x feature. We explicitly do not support the\n // suffix in C++ as an extension because a library-based UDL that resolves\n // to a library type may be more appropriate there.\n if (Literal.isBitInt)\n PP.Diag(PeekTok, PP.getLangOpts().C2x ? diag::warn_c2x_compat_bitint_suffix : diag::ext_c2x_bitint_suffix);"},{y,4069,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n if (Literal.isFixedPointLiteral()) {\n } else if (Literal.isFloatingLiteral()) {\n } else if (!Literal.isIntegerLiteral()) {\n } else {\n // \'wb/uwb\' literals are a C2x feature. We support _BitInt as a type in C++,\n // but we do not currently support the suffix in C++ mode because it\'s not\n // entirely clear whether WG21 will prefer this suffix to return a library\n // type such as std::bit_int instead of returning a _BitInt.\n if (Literal.isBitInt && !getLangOpts().CPlusPlus)\n PP.Diag(Tok.getLocation(), getLangOpts().C2x ? diag::warn_c2x_compat_bitint_suffix : diag::ext_c2x_bitint_suffix);"}} | ||
}, | }, | ||
["ext_c2x_pp_directive"]={ | ["ext_c2x_pp_directive"]={ | ||
Line 3,236: | Line 3,236: | ||
[h]=A, | [h]=A, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{W, | [j]={{W,772,"/// SkipExcludedConditionalBlock - We just read a \\#if or related directive and\n/// decided that the subsequent tokens are in the \\#if\'d out portion of the\n/// file. Lex the rest of the file, until we see an \\#endif. If\n/// FoundNonSkipPortion is true, then we have already emitted code for part of\n/// this \\#if directive, so \\#else/\\#elif blocks should never be entered.\n/// If ElseOk is true, then \\#else directives are ok, if not, then we have\n/// already seen one so a \\#else directive is a duplicate. When this returns,\n/// the caller can lex the first valid token.\nvoid Preprocessor::SkipExcludedConditionalBlock(SourceLocation HashTokenLoc, SourceLocation IfTokenLoc, bool FoundNonSkipPortion, bool FoundElse, SourceLocation ElseLoc) {\n while (true) {\n if (Directive.startswith(\"if\")) {\n } else if (Directive[0] == \'e\') {\n if (Sub == \"ndif\") { // \"endif\"\n } else if (Sub == \"lse\") { // \"else\".\n } else if (Sub == \"lif\") { // \"elif\".\n } else if (Sub == \"lifdef\" || // \"elifdef\"\n if (LangOpts.CPlusPlus)\n else\n DiagID = LangOpts.C2x ? diag::warn_c2x_compat_pp_directive : diag::ext_c2x_pp_directive;"},{W,3458,"/// Implements the \\#elif, \\#elifdef, and \\#elifndef directives.\nvoid Preprocessor::HandleElifFamilyDirective(Token &ElifToken, const Token &HashToken, tok::PPKeywordKind Kind) {\n case PED_Elifndef:\n if (LangOpts.CPlusPlus)\n else\n DiagID = LangOpts.C2x ? diag::warn_c2x_compat_pp_directive : diag::ext_c2x_pp_directive;"}} | ||
}, | }, | ||
["ext_c99_array_usage"]={ | ["ext_c99_array_usage"]={ | ||
Line 3,251: | Line 3,251: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{R, | [j]={{R,2681,"/// 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;"}} | ||
}, | }, | ||
["ext_c99_compound_literal"]={ | ["ext_c99_compound_literal"]={ | ||
Line 3,266: | Line 3,266: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{ub, | [j]={{ub,3243,"/// ParseCompoundLiteralExpression - We have parsed the parenthesized type-name\n/// and we are at the left brace.\n///\n/// \\verbatim\n/// postfix-expression: [C99 6.5.2]\n/// \'(\' type-name \')\' \'{\' initializer-list \'}\'\n/// \'(\' type-name \')\' \'{\' initializer-list \',\' \'}\'\n/// \\endverbatim\nExprResult Parser::ParseCompoundLiteralExpression(ParsedType Ty, SourceLocation LParenLoc, SourceLocation RParenLoc) {\n if (!getLangOpts().C99) // Compound literals don\'t exist in C90.\n Diag(LParenLoc, diag::ext_c99_compound_literal);"}} | ||
}, | }, | ||
["ext_c99_feature"]={ | ["ext_c99_feature"]={ | ||
Line 3,281: | Line 3,281: | ||
[h]=x, | [h]=x, | ||
[i]={"9fac4a5d3522",1566933324,"Diagnose both _Complex and _Imaginary as C99 extensions."}, | [i]={"9fac4a5d3522",1566933324,"Diagnose both _Complex and _Imaginary as C99 extensions."}, | ||
[j]={{F, | [j]={{F,4140,"/// 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__Complex:\n if (!getLangOpts().C99)\n Diag(Tok, diag::ext_c99_feature) << Tok.getName();"},{F,4146,"/// 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__Imaginary:\n if (!getLangOpts().C99)\n Diag(Tok, diag::ext_c99_feature) << Tok.getName();"},{F,4249,"/// 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) && !getLangOpts().C99)\n Diag(Tok, diag::ext_c99_feature) << Tok.getName();"}} | ||
}, | }, | ||
["ext_c99_flexible_array_member"]={ | ["ext_c99_flexible_array_member"]={ | ||
Line 3,296: | Line 3,296: | ||
[h]=m, | [h]=m, | ||
[i]={"07518f249f91",1331900137,"Warn on flexible array members when in C89 mode, with -pedantic."}, | [i]={"07518f249f91",1331900137,"Warn on flexible array members when in C89 mode, with -pedantic."}, | ||
[j]={{w, | [j]={{w,18823,"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 if (Record) {\n if (!getLangOpts().C99)\n Diag(FD->getLocation(), diag::ext_c99_flexible_array_member) << FD->getDeclName() << Record->getTagKind();"}} | ||
}, | }, | ||
["ext_c99_longlong"]={ | ["ext_c99_longlong"]={ | ||
Line 3,311: | Line 3,311: | ||
[h]=q, | [h]=q, | ||
[i]={"1cd230570394",1348510761,"Change the wording of the extension warning from"}, | [i]={"1cd230570394",1348510761,"Change the wording of the extension warning from"}, | ||
[j]={{rc, | [j]={{rc,324,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n case tok::numeric_constant: {\n // \'long long\' is a C99 or C++11 feature.\n if (!PP.getLangOpts().C99 && Literal.isLongLong) {\n if (PP.getLangOpts().CPlusPlus)\n else\n PP.Diag(PeekTok, diag::ext_c99_longlong);"},{y,4237,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n if (Literal.isFixedPointLiteral()) {\n } else if (Literal.isFloatingLiteral()) {\n } else if (!Literal.isIntegerLiteral()) {\n } else {\n if (Literal.GetIntegerValue(ResultVal)) {\n } else {\n // Check long long if needed.\n if (Ty.isNull() && !Literal.isSizeT) {\n // Does it fit in a unsigned long long?\n if (ResultVal.isIntN(LongLongSize)) {\n // \'long long\' is a C99 or C++11 feature, whether the literal\n // explicitly specified \'long long\' or we needed the extra width.\n if (getLangOpts().CPlusPlus)\n else if (!getLangOpts().C99)\n Diag(Tok.getLocation(), diag::ext_c99_longlong);"},{R,1413,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n case DeclSpec::TST_int: {\n if (DS.getTypeSpecSign() != TypeSpecifierSign::Unsigned) {\n case TypeSpecifierWidth::LongLong:\n // \'long long\' is a C99 or C++11 feature.\n if (!S.getLangOpts().C99) {\n if (S.getLangOpts().CPlusPlus)\n else\n S.Diag(DS.getTypeSpecWidthLoc(), diag::ext_c99_longlong);"},{R,1438,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n case DeclSpec::TST_int: {\n if (DS.getTypeSpecSign() != TypeSpecifierSign::Unsigned) {\n } else {\n case TypeSpecifierWidth::LongLong:\n // \'long long\' is a C99 or C++11 feature.\n if (!S.getLangOpts().C99) {\n if (S.getLangOpts().CPlusPlus)\n else\n S.Diag(DS.getTypeSpecWidthLoc(), diag::ext_c99_longlong);"}} | ||
}, | }, | ||
["ext_c99_variable_decl_in_for_loop"]={ | ["ext_c99_variable_decl_in_for_loop"]={ | ||
Line 3,326: | Line 3,326: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{xb, | [j]={{xb,2054,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // Parse the first part of the for specifier.\n if (Tok.is(tok::semi)) { // for (;\n } else if (getLangOpts().CPlusPlus && Tok.is(tok::identifier) && isForRangeIdentifier()) {\n } else if (isForInitDeclaration()) { // for (int X = 4;\n // Parse declaration, which eats the \';\'.\n if (!C99orCXXorObjC) { // Use of C99-style for loops in C90 mode?\n Diag(Tok, diag::ext_c99_variable_decl_in_for_loop);"}} | ||
}, | }, | ||
["ext_c99_whitespace_required_after_macro_name"]={ | ["ext_c99_whitespace_required_after_macro_name"]={ | ||
Line 3,340: | Line 3,340: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,2857,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // If this is a function-like macro definition, parse the argument list,\n // marking each of the identifiers as being used as macro arguments. Also,\n // check other constraints on the first token of the macro body.\n if (Tok.is(tok::eod)) {\n } else if (Tok.hasLeadingSpace()) {\n } else if (Tok.is(tok::l_paren)) {\n } else if (LangOpts.C99 || LangOpts.CPlusPlus11) {\n Diag(Tok, diag::ext_c99_whitespace_required_after_macro_name);"}} | ||
}, | }, | ||
["ext_c_empty_initializer"]={ | ["ext_c_empty_initializer"]={ | ||
Line 3,355: | Line 3,355: | ||
[h]=x, | [h]=x, | ||
[i]={"5d8aaad4452f",1680549555,"[C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)"}, | [i]={"5d8aaad4452f",1680549555,"[C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)"}, | ||
[j]={{vc, | [j]={{vc,457,"/// ParseBraceInitializer - Called when parsing an initializer that has a\n/// leading open brace.\n///\n/// initializer: [C99 6.7.8]\n/// \'{\' initializer-list \'}\'\n/// \'{\' initializer-list \',\' \'}\'\n/// [C2x] \'{\' \'}\'\n///\n/// initializer-list:\n/// designation[opt] initializer ...[opt]\n/// initializer-list \',\' designation[opt] initializer ...[opt]\n///\nExprResult Parser::ParseBraceInitializer() {\n if (Tok.is(tok::r_brace)) {\n // Empty initializers are a C++ feature and a GNU extension to C before C2x.\n if (!getLangOpts().CPlusPlus) {\n Diag(LBraceLoc, getLangOpts().C2x ? diag::warn_c2x_compat_empty_initializer : diag::ext_c_empty_initializer);"}} | ||
}, | }, | ||
["ext_c_label_end_of_compound_statement"]={ | ["ext_c_label_end_of_compound_statement"]={ | ||
Line 3,369: | Line 3,369: | ||
[h]=x, | [h]=x, | ||
[i]={"782ac2182c2b",1657907157,"[HLSL] Support cbuffer/tbuffer for hlsl."}, | [i]={"782ac2182c2b",1657907157,"[HLSL] Support cbuffer/tbuffer for hlsl."}, | ||
[j]={{xb, | [j]={{xb,1081,"void Parser::DiagnoseLabelAtEndOfCompoundStatement() {\n if (getLangOpts().CPlusPlus) {\n } else {\n Diag(Tok, getLangOpts().C2x ? diag::warn_c2x_compat_label_end_of_compound_statement : diag::ext_c_label_end_of_compound_statement);"}} | ||
}, | }, | ||
["ext_c_nullptr"]={ | ["ext_c_nullptr"]={ | ||
Line 3,384: | Line 3,384: | ||
[h]=x, | [h]=x, | ||
[i]={"3a31970ee2af",1665756274,"[C2x] Implement support for nullptr and nullptr_t"}, | [i]={"3a31970ee2af",1665756274,"[C2x] Implement support for nullptr and nullptr_t"}, | ||
[j]={{ub, | [j]={{ub,1015,"/// Parse a cast-expression, or, if \\pisUnaryExpression is true, parse\n/// a unary-expression.\n///\n/// \\p isAddressOfOperand exists because an id-expression that is the operand\n/// of address-of gets special treatment due to member pointers. NotCastExpr\n/// is set to true if the token is not the start of a cast-expression, and no\n/// diagnostic is emitted in this case and no tokens are consumed.\n///\n/// \\verbatim\n/// cast-expression: [C99 6.5.4]\n/// unary-expression\n/// \'(\' type-name \')\' cast-expression\n///\n/// unary-expression: [C99 6.5.3]\n/// postfix-expression\n/// \'++\' unary-expression\n/// \'--\' unary-expression\n/// [Coro] \'co_await\' cast-expression\n/// unary-operator cast-expression\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++11] \'alignof\' \'(\' type-id \')\'\n/// [GNU] \'&&\' identifier\n/// [C++11] \'noexcept\' \'(\' expression \')\' [C++11 5.3.7]\n/// [C++] new-expression\n/// [C++] delete-expression\n///\n/// unary-operator: one of\n/// \'&\' \'*\' \'+\' \'-\' \'~\' \'!\'\n/// [GNU] \'__extension__\' \'__real\' \'__imag\'\n///\n/// primary-expression: [C99 6.5.1]\n/// [C99] identifier\n/// [C++] id-expression\n/// constant\n/// string-literal\n/// [C++] boolean-literal [C++ 2.13.5]\n/// [C++11] \'nullptr\' [C++11 2.14.7]\n/// [C++11] user-defined-literal\n/// \'(\' expression \')\'\n/// [C11] generic-selection\n/// [C++2a] requires-expression\n/// \'__func__\' [C99 6.4.2.2]\n/// [GNU] \'__FUNCTION__\'\n/// [MS] \'__FUNCDNAME__\'\n/// [MS] \'L__FUNCTION__\'\n/// [MS] \'__FUNCSIG__\'\n/// [MS] \'L__FUNCSIG__\'\n/// [GNU] \'__PRETTY_FUNCTION__\'\n/// [GNU] \'(\' compound-statement \')\'\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__null\'\n/// [OBJC] \'[\' objc-message-expr \']\'\n/// [OBJC] \'\\@selector\' \'(\' objc-selector-arg \')\'\n/// [OBJC] \'\\@protocol\' \'(\' identifier \')\'\n/// [OBJC] \'\\@encode\' \'(\' type-name \')\'\n/// [OBJC] objc-string-literal\n/// [C++] simple-type-specifier \'(\' expression-list[opt] \')\' [C++ 5.2.3]\n/// [C++11] simple-type-specifier braced-init-list [C++11 5.2.3]\n/// [C++] typename-specifier \'(\' expression-list[opt] \')\' [C++ 5.2.3]\n/// [C++11] typename-specifier braced-init-list [C++11 5.2.3]\n/// [C++] \'const_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'dynamic_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'reinterpret_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'static_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'typeid\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'typeid\' \'(\' type-id \')\' [C++ 5.2p1]\n/// [C++] \'this\' [C++ 9.3.2]\n/// [G++] unary-type-trait \'(\' type-id \')\'\n/// [G++] binary-type-trait \'(\' type-id \',\' type-id \')\' [TODO]\n/// [EMBT] array-type-trait \'(\' type-id \',\' integer \')\'\n/// [clang] \'^\' block-literal\n///\n/// constant: [C99 6.4.4]\n/// integer-constant\n/// floating-constant\n/// enumeration-constant -> identifier\n/// character-constant\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// new-expression: [C++ 5.3.4]\n/// \'::\'[opt] \'new\' new-placement[opt] new-type-id\n/// new-initializer[opt]\n/// \'::\'[opt] \'new\' new-placement[opt] \'(\' type-id \')\'\n/// new-initializer[opt]\n///\n/// delete-expression: [C++ 5.3.5]\n/// \'::\'[opt] \'delete\' cast-expression\n/// \'::\'[opt] \'delete\' \'[\' \']\' cast-expression\n///\n/// [GNU/Embarcadero] unary-type-trait:\n/// \'__is_arithmetic\'\n/// \'__is_floating_point\'\n/// \'__is_integral\'\n/// \'__is_lvalue_expr\'\n/// \'__is_rvalue_expr\'\n/// \'__is_complete_type\'\n/// \'__is_void\'\n/// \'__is_array\'\n/// \'__is_function\'\n/// \'__is_reference\'\n/// \'__is_lvalue_reference\'\n/// \'__is_rvalue_reference\'\n/// \'__is_fundamental\'\n/// \'__is_object\'\n/// \'__is_scalar\'\n/// \'__is_compound\'\n/// \'__is_pointer\'\n/// \'__is_member_object_pointer\'\n/// \'__is_member_function_pointer\'\n/// \'__is_member_pointer\'\n/// \'__is_const\'\n/// \'__is_volatile\'\n/// \'__is_trivial\'\n/// \'__is_standard_layout\'\n/// \'__is_signed\'\n/// \'__is_unsigned\'\n///\n/// [GNU] unary-type-trait:\n/// \'__has_nothrow_assign\'\n/// \'__has_nothrow_copy\'\n/// \'__has_nothrow_constructor\'\n/// \'__has_trivial_assign\' [TODO]\n/// \'__has_trivial_copy\' [TODO]\n/// \'__has_trivial_constructor\'\n/// \'__has_trivial_destructor\'\n/// \'__has_virtual_destructor\'\n/// \'__is_abstract\' [TODO]\n/// \'__is_class\'\n/// \'__is_empty\' [TODO]\n/// \'__is_enum\'\n/// \'__is_final\'\n/// \'__is_pod\'\n/// \'__is_polymorphic\'\n/// \'__is_sealed\' [MS]\n/// \'__is_trivial\'\n/// \'__is_union\'\n/// \'__has_unique_object_representations\'\n///\n/// [Clang] unary-type-trait:\n/// \'__is_aggregate\'\n/// \'__trivially_copyable\'\n///\n/// binary-type-trait:\n/// [GNU] \'__is_base_of\'\n/// [MS] \'__is_convertible_to\'\n/// \'__is_convertible\'\n/// \'__is_same\'\n///\n/// [Embarcadero] array-type-trait:\n/// \'__array_rank\'\n/// \'__array_extent\'\n///\n/// [Embarcadero] expression-trait:\n/// \'__is_lvalue_expr\'\n/// \'__is_rvalue_expr\'\n/// \\endverbatim\n///\nExprResult Parser::ParseCastExpression(CastParseKind ParseKind, bool isAddressOfOperand, bool &NotCastExpr, TypeCastState isTypeCast, bool isVectorLiteral, bool *NotPrimaryExpression) {\n case tok::kw_nullptr:\n if (getLangOpts().CPlusPlus)\n else\n Diag(Tok, getLangOpts().C2x ? diag::warn_c2x_compat_keyword : diag::ext_c_nullptr) << Tok.getName();"}} | ||
}, | }, | ||
["ext_c_static_assert_no_message"]={ | ["ext_c_static_assert_no_message"]={ | ||
Line 3,398: | Line 3,398: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{L, | [j]={{L,1011,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n if (Tok.is(tok::r_paren)) {\n if (getLangOpts().CPlusPlus17)\n else if (getLangOpts().CPlusPlus)\n else if (getLangOpts().C2x)\n else\n DiagVal = diag::ext_c_static_assert_no_message;"}} | ||
}, | }, | ||
["ext_cannot_use_trivial_abi"]={ | ["ext_cannot_use_trivial_abi"]={ | ||
Line 3,412: | Line 3,412: | ||
[h]=m, | [h]=m, | ||
[i]={"02914dc1278c",1517862202,"Add support for attribute \'trivial_abi\'."}, | [i]={"02914dc1278c",1517862202,"Add support for attribute \'trivial_abi\'."}, | ||
[j]={{z, | [j]={{z,10302,"void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl &RD) {\n auto PrintDiagAndRemoveAttr = [&](unsigned N) {\n // No diagnostics if this is a template instantiation.\n if (!isTemplateInstantiation(RD.getTemplateSpecializationKind())) {\n Diag(RD.getAttr<TrivialABIAttr>()->getLocation(), diag::ext_cannot_use_trivial_abi) << &RD;"}} | ||
}, | }, | ||
["ext_capture_binding"]={ | ["ext_capture_binding"]={ | ||
Line 3,426: | Line 3,426: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{y, | [j]={{y,19211,"// 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 if (isa<BindingDecl>(Var)) {\n if (!IsLambda || !S.getLangOpts().CPlusPlus) {\n } else if (Diagnose && S.getLangOpts().CPlusPlus) {\n S.Diag(Loc, S.LangOpts.CPlusPlus20 ? diag::warn_cxx17_compat_capture_binding : diag::ext_capture_binding) << Var;"}} | ||
}, | }, | ||
["ext_cast_fn_obj"]={ | ["ext_cast_fn_obj"]={ | ||
Line 3,441: | Line 3,441: | ||
[h]=m, | [h]=m, | ||
[i]={"9f831dbbcdfa",1248536498,"Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conve..."}, | [i]={"9f831dbbcdfa",1248536498,"Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conve..."}, | ||
[j]={{Ab, | [j]={{Ab,2559,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (SrcType->isFunctionPointerType()) {\n Self.Diag(OpRange.getBegin(), Self.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_cast_fn_obj : diag::ext_cast_fn_obj) << OpRange;"},{Ab,2568,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n if (DestType->isFunctionPointerType()) {\n Self.Diag(OpRange.getBegin(), Self.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_cast_fn_obj : diag::ext_cast_fn_obj) << OpRange;"}} | ||
}, | }, | ||
["ext_cce_narrowing"]={ | ["ext_cce_narrowing"]={ | ||
Line 3,455: | Line 3,455: | ||
[h]=m, | [h]=m, | ||
[i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a"}, | [i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a"}, | ||
[j]={{Jb, | [j]={{Jb,5929,"/// BuildConvertedConstantExpression - Check that the expression From is a\n/// converted constant expression of type T, perform the conversion but\n/// does not evaluate the expression\nstatic ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From, QualType T, Sema::CCEKind CCE, NamedDecl *Dest, APValue &PreNarrowingValue) {\n case NK_Constant_Narrowing:\n S.Diag(From->getBeginLoc(), diag::ext_cce_narrowing) << CCE << /*Constant*/ 1 << PreNarrowingValue.getAsString(S.Context, PreNarrowingType) << T;"},{Jb,5937,"/// BuildConvertedConstantExpression - Check that the expression From is a\n/// converted constant expression of type T, perform the conversion but\n/// does not evaluate the expression\nstatic ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From, QualType T, Sema::CCEKind CCE, NamedDecl *Dest, APValue &PreNarrowingValue) {\n case NK_Type_Narrowing:\n S.Diag(From->getBeginLoc(), diag::ext_cce_narrowing) << CCE << /*Constant*/ 0 << From->getType() << T;"}} | ||
}, | }, | ||
["ext_charize_microsoft"]={ | ["ext_charize_microsoft"]={ | ||
Line 3,470: | Line 3,470: | ||
[h]=A, | [h]=A, | ||
[i]={"a08713ce8610",1318888073,"Move about 20 random diagnostics under -W flags. Patch by Ahmed Charles!"}, | [i]={"a08713ce8610",1318888073,"Move about 20 random diagnostics under -W flags. Patch by Ahmed Charles!"}, | ||
[j]={{Z, | [j]={{Z,4073,"LexStart:\n case \'%\':\n if (Char == \'=\') {\n } else if (LangOpts.Digraphs && Char == \'>\') {\n } else if (LangOpts.Digraphs && Char == \':\') {\n if (Char == \'%\' && getCharAndSize(CurPtr + SizeTmp, SizeTmp2) == \':\') {\n } else if (Char == \'@\' && LangOpts.MicrosoftExt) { // %:@ -> #@ -> Charize\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::ext_charize_microsoft);"},{Z,4262,"LexStart:\n case \'#\':\n if (Char == \'#\') {\n } else if (Char == \'@\' && LangOpts.MicrosoftExt) { // #@ -> Charize\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::ext_charize_microsoft);"}} | ||
}, | }, | ||
["ext_clang_c_enum_fixed_underlying_type"]={ | ["ext_clang_c_enum_fixed_underlying_type"]={ | ||
Line 3,485: | Line 3,485: | ||
[h]=x, | [h]=x, | ||
[i]={"6f11db137034",1538166298,"Support enums with a fixed underlying type in all language modes."}, | [i]={"6f11db137034",1538166298,"Support enums with a fixed underlying type in all language modes."}, | ||
[j]={{F, | [j]={{F,4949,"/// 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 } else if (CanHaveEnumBase || !ColonIsSacred) {\n if (!getLangOpts().ObjC) {\n if (getLangOpts().CPlusPlus11)\n else if (getLangOpts().CPlusPlus)\n else if (getLangOpts().MicrosoftExt)\n else\n Diag(ColonLoc, diag::ext_clang_c_enum_fixed_underlying_type) << BaseRange;"}} | ||
}, | }, | ||
["ext_clang_diagnose_if"]={ | ["ext_clang_diagnose_if"]={ | ||
Line 3,500: | Line 3,500: | ||
[h]=q, | [h]=q, | ||
[i]={"177399e2277c",1483935134,"Add the diagnose_if attribute to clang."}, | [i]={"177399e2277c",1483935134,"Add the diagnose_if attribute to clang."}, | ||
[j]={{Wb, | [j]={{Wb,1098,"static void handleDiagnoseIfAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n S.Diag(AL.getLoc(), diag::ext_clang_diagnose_if);"}} | ||
}, | }, | ||
["ext_clang_enable_if"]={ | ["ext_clang_enable_if"]={ | ||
Line 3,515: | Line 3,515: | ||
[h]=q, | [h]=q, | ||
[i]={"046ba5b66fae",1455778171,"Sema: provide an extension warning for enable_if"}, | [i]={"046ba5b66fae",1455778171,"Sema: provide an extension warning for enable_if"}, | ||
[j]={{Wb, | [j]={{Wb,957,"static void handleEnableIfAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n S.Diag(AL.getLoc(), diag::ext_clang_enable_if);"}} | ||
}, | }, | ||
["ext_comment_paste_microsoft"]={ | ["ext_comment_paste_microsoft"]={ | ||
Line 3,530: | Line 3,530: | ||
[h]=A, | [h]=A, | ||
[i]={"446cf25c2131",1451430377,"Emit a -Wmicrosoft warning when pasting /##/ into a comment token in MS mode."}, | [i]={"446cf25c2131",1451430377,"Emit a -Wmicrosoft warning when pasting /##/ into a comment token in MS mode."}, | ||
[j]={{"clang/lib/Lex/TokenLexer.cpp", | [j]={{"clang/lib/Lex/TokenLexer.cpp",947,"/// HandleMicrosoftCommentPaste - In microsoft compatibility mode, /##/ pastes\n/// together to form a comment that comments out everything in the current\n/// macro, other active macros, and anything left on the current physical\n/// source line of the expanded buffer. Handle this by returning the\n/// first token on the next line.\nvoid TokenLexer::HandleMicrosoftCommentPaste(Token &Tok, SourceLocation OpLoc) {\n PP.Diag(OpLoc, diag::ext_comment_paste_microsoft);"}} | ||
}, | }, | ||
["ext_complex_component_init"]={ | ["ext_complex_component_init"]={ | ||
Line 3,545: | Line 3,545: | ||
[h]=m, | [h]=m, | ||
[i]={"6b9c41ea68f8",1316474264,"Add list initialization for complex numbers in C. Essentially, this allows \"_Complex float x = {1.0..."}, | [i]={"6b9c41ea68f8",1316474264,"Add list initialization for complex numbers in C. Essentially, this allows \"_Complex float x = {1.0..."}, | ||
[j]={{T, | [j]={{T,1606,"void InitListChecker::CheckComplexType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // This is an extension in C. (The builtin _Complex type does not exist\n // in the C++ standard.)\n if (!SemaRef.getLangOpts().CPlusPlus && !VerifyOnly)\n SemaRef.Diag(IList->getBeginLoc(), diag::ext_complex_component_init) << IList->getSourceRange();"}} | ||
}, | }, | ||
["ext_consteval_if"]={ | ["ext_consteval_if"]={ | ||
Line 3,559: | Line 3,559: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{xb, | [j]={{xb,1480,"/// ParseIfStatement\n/// if-statement: [C99 6.8.4.1]\n/// \'if\' \'(\' expression \')\' statement\n/// \'if\' \'(\' expression \')\' statement \'else\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement \'else\' statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement \'else\' statement\n///\nStmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) {\n if (Tok.is(tok::kw_constexpr)) {\n } else {\n if (Tok.is(tok::kw_consteval)) {\n Diag(Tok, getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_consteval_if : diag::ext_consteval_if);"}} | ||
}, | }, | ||
["ext_constexpr_body_invalid_stmt"]={ | ["ext_constexpr_body_invalid_stmt"]={ | ||
Line 3,573: | Line 3,573: | ||
[h]=m, | [h]=m, | ||
[i]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | [i]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | ||
[j]={{z, | [j]={{z,2301,"/// 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 (Kind == Sema::CheckConstexprKind::CheckValid) {\n } else if (Cxx2bLoc.isValid()) {\n } else if (Cxx2aLoc.isValid()) {\n } else if (Cxx1yLoc.isValid()) {\n SemaRef.Diag(Cxx1yLoc, SemaRef.getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_constexpr_body_invalid_stmt : diag::ext_constexpr_body_invalid_stmt) << isa<CXXConstructorDecl>(Dcl);"}} | ||
}, | }, | ||
["ext_constexpr_body_invalid_stmt_cxx20"]={ | ["ext_constexpr_body_invalid_stmt_cxx20"]={ | ||
Line 3,587: | Line 3,587: | ||
[h]=m, | [h]=m, | ||
[i]={Kb,1576908663,Ib}, | [i]={Kb,1576908663,Ib}, | ||
[j]={{z, | [j]={{z,2295,"/// 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 (Kind == Sema::CheckConstexprKind::CheckValid) {\n } else if (Cxx2bLoc.isValid()) {\n } else if (Cxx2aLoc.isValid()) {\n SemaRef.Diag(Cxx2aLoc, SemaRef.getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_constexpr_body_invalid_stmt : diag::ext_constexpr_body_invalid_stmt_cxx20) << isa<CXXConstructorDecl>(Dcl);"}} | ||
}, | }, | ||
["ext_constexpr_body_invalid_stmt_cxx23"]={ | ["ext_constexpr_body_invalid_stmt_cxx23"]={ | ||
Line 3,601: | Line 3,601: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{z, | [j]={{z,2289,"/// 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 (Kind == Sema::CheckConstexprKind::CheckValid) {\n } else if (Cxx2bLoc.isValid()) {\n SemaRef.Diag(Cxx2bLoc, SemaRef.getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_constexpr_body_invalid_stmt : diag::ext_constexpr_body_invalid_stmt_cxx23) << isa<CXXConstructorDecl>(Dcl);"}} | ||
}, | }, | ||
["ext_constexpr_body_multiple_return"]={ | ["ext_constexpr_body_multiple_return"]={ | ||
Line 3,615: | Line 3,615: | ||
[h]=m, | [h]=m, | ||
[i]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | [i]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | ||
[j]={{z, | [j]={{z,2400,"/// 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 } else if (ReturnStmts.size() > 1) {\n case Sema::CheckConstexprKind::Diagnose:\n SemaRef.Diag(ReturnStmts.back(), SemaRef.getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_constexpr_body_multiple_return : diag::ext_constexpr_body_multiple_return);"}} | ||
}, | }, | ||
["ext_constexpr_ctor_missing_init"]={ | ["ext_constexpr_ctor_missing_init"]={ | ||
Line 3,629: | Line 3,629: | ||
[h]=m, | [h]=m, | ||
[i]={Ub,1567434909,Vb}, | [i]={Ub,1567434909,Vb}, | ||
[j]={{z, | [j]={{z,2045,"/// Check that the given field is initialized within a constexpr constructor.\n///\n/// \\param Dcl The constexpr constructor being checked.\n/// \\param Field The field being checked. This may be a member of an anonymous\n/// struct or union nested within the class being checked.\n/// \\param Inits All declarations, including anonymous struct/union members and\n/// indirect members, for which any initialization was provided.\n/// \\param Diagnosed Whether we\'ve emitted the error message yet. Used to attach\n/// multiple notes for different members to the same error.\n/// \\param Kind Whether we\'re diagnosing a constructor as written or determining\n/// whether the formal requirements are satisfied.\n/// \\return \\c false if we\'re checking for validity and the constructor does\n/// not satisfy the requirements on a constexpr constructor.\nstatic bool CheckConstexprCtorInitializer(Sema &SemaRef, const FunctionDecl *Dcl, FieldDecl *Field, llvm::SmallSet<Decl *, 16> &Inits, bool &Diagnosed, Sema::CheckConstexprKind Kind) {\n if (!Inits.count(Field)) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n if (!Diagnosed) {\n SemaRef.Diag(Dcl->getLocation(), SemaRef.getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_constexpr_ctor_missing_init : diag::ext_constexpr_ctor_missing_init);"}} | ||
}, | }, | ||
["ext_constexpr_function_never_constant_expr"]={ | ["ext_constexpr_function_never_constant_expr"]={ | ||
Line 3,643: | Line 3,643: | ||
[h]=m, | [h]=m, | ||
[i]={"f86b5dc7009e",1355032543,"PR14550: If a system header contains a bogus constexpr function definition,"}, | [i]={"f86b5dc7009e",1355032543,"PR14550: If a system header contains a bogus constexpr function definition,"}, | ||
[j]={{z, | [j]={{z,2431,"/// 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 (Kind == Sema::CheckConstexprKind::Diagnose && !Expr::isPotentialConstantExpr(Dcl, Diags)) {\n SemaRef.Diag(Dcl->getLocation(), diag::ext_constexpr_function_never_constant_expr) << isa<CXXConstructorDecl>(Dcl) << Dcl->isConsteval();"}} | ||
}, | }, | ||
["ext_constexpr_function_try_block_cxx20"]={ | ["ext_constexpr_function_try_block_cxx20"]={ | ||
Line 3,657: | Line 3,657: | ||
[h]=m, | [h]=m, | ||
[i]={Kb,1576908663,Ib}, | [i]={Kb,1576908663,Ib}, | ||
[j]={{z, | [j]={{z,2258,"/// 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 (isa<CXXTryStmt>(Body)) {\n case Sema::CheckConstexprKind::Diagnose:\n SemaRef.Diag(Body->getBeginLoc(), !SemaRef.getLangOpts().CPlusPlus20 ? diag::ext_constexpr_function_try_block_cxx20 : diag::warn_cxx17_compat_constexpr_function_try_block) << isa<CXXConstructorDecl>(Dcl);"}} | ||
}, | }, | ||
["ext_constexpr_if"]={ | ["ext_constexpr_if"]={ | ||
Line 3,671: | Line 3,671: | ||
[h]=x, | [h]=x, | ||
[i]={"b130fe7d316e",1466709409,"Implement p0292r2 (constexpr if), a likely C++1z feature."}, | [i]={"b130fe7d316e",1466709409,"Implement p0292r2 (constexpr if), a likely C++1z feature."}, | ||
[j]={{xb, | [j]={{xb,1470,"/// ParseIfStatement\n/// if-statement: [C99 6.8.4.1]\n/// \'if\' \'(\' expression \')\' statement\n/// \'if\' \'(\' expression \')\' statement \'else\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement \'else\' statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement \'else\' statement\n///\nStmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) {\n if (Tok.is(tok::kw_constexpr)) {\n Diag(Tok, getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_constexpr_if : diag::ext_constexpr_if);"}} | ||
}, | }, | ||
["ext_constexpr_local_var"]={ | ["ext_constexpr_local_var"]={ | ||
Line 3,685: | Line 3,685: | ||
[h]=m, | [h]=m, | ||
[i]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | [i]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | ||
[j]={{z, | [j]={{z,1972,"/// 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 (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(VD->getLocation(), SemaRef.getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_constexpr_local_var : diag::ext_constexpr_local_var) << isa<CXXConstructorDecl>(Dcl);"}} | ||
}, | }, | ||
["ext_constexpr_local_var_no_init"]={ | ["ext_constexpr_local_var_no_init"]={ | ||
Line 3,699: | Line 3,699: | ||
[h]=m, | [h]=m, | ||
[i]={Ub,1567434909,Vb}, | [i]={Ub,1567434909,Vb}, | ||
[j]={{z, | [j]={{z,1960,"/// 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 if (!VD->getType()->isDependentType() && !VD->hasInit() && !VD->isCXXForRangeDecl()) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(VD->getLocation(), SemaRef.getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_constexpr_local_var_no_init : diag::ext_constexpr_local_var_no_init) << isa<CXXConstructorDecl>(Dcl);"}} | ||
}, | }, | ||
["ext_constexpr_on_lambda_cxx17"]={ | ["ext_constexpr_on_lambda_cxx17"]={ | ||
Line 3,713: | Line 3,713: | ||
[h]=x, | [h]=x, | ||
[i]={"b115e5dda202",1502667449,"Rename cxx1z -> cxx17 across all diagnostic IDs."}, | [i]={"b115e5dda202",1502667449,"Rename cxx1z -> cxx17 across all diagnostic IDs."}, | ||
[j]={{vb, | [j]={{vb,1227,"static void addConstexprToLambdaDeclSpecifier(Parser &P, SourceLocation ConstexprLoc, DeclSpec &DS) {\n if (ConstexprLoc.isValid()) {\n P.Diag(ConstexprLoc, !P.getLangOpts().CPlusPlus17 ? diag::ext_constexpr_on_lambda_cxx17 : diag::warn_cxx14_compat_constexpr_on_lambda);"}} | ||
}, | }, | ||
["ext_constexpr_static_var"]={ | ["ext_constexpr_static_var"]={ | ||
Line 3,727: | Line 3,727: | ||
[h]=m, | [h]=m, | ||
[i]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | [i]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls."}, | ||
[j]={{z, | [j]={{z,1935,"/// 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 if (VD->isStaticLocal()) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(VD->getLocation(), SemaRef.getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_constexpr_var : diag::ext_constexpr_static_var) << isa<CXXConstructorDecl>(Dcl) << (VD->getTLSKind() == VarDecl::TLS_Dynamic);"}} | ||
}, | }, | ||
["ext_constexpr_type_definition"]={ | ["ext_constexpr_type_definition"]={ | ||
Line 3,741: | Line 3,741: | ||
[h]=m, | [h]=m, | ||
[i]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | [i]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and"}, | ||
[j]={{z, | [j]={{z,1907,"/// 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::CXXRecord:\n // C++1y allows types to be defined, not just declared.\n if (cast<TagDecl>(DclIt)->isThisDeclarationADefinition()) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(DS->getBeginLoc(), SemaRef.getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_constexpr_type_definition : diag::ext_constexpr_type_definition) << isa<CXXConstructorDecl>(Dcl);"}} | ||
}, | }, | ||
["ext_constexpr_union_ctor_no_init"]={ | ["ext_constexpr_union_ctor_no_init"]={ | ||
Line 3,755: | Line 3,755: | ||
[h]=m, | [h]=m, | ||
[i]={Ub,1567434909,Vb}, | [i]={Ub,1567434909,Vb}, | ||
[j]={{z, | [j]={{z,2322,"/// 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 // DR1359:\n // - every non-variant non-static data member and base class sub-object\n // shall be initialized;\n // DR1460:\n // - if the class is a union having variant members, exactly one of them\n // shall be initialized;\n if (RD->isUnion()) {\n if (Constructor->getNumCtorInitializers() == 0 && RD->hasVariantMembers()) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(Dcl->getLocation(), SemaRef.getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_constexpr_union_ctor_no_init : diag::ext_constexpr_union_ctor_no_init);"}} | ||
}, | }, | ||
["ext_constinit_missing"]={ | ["ext_constinit_missing"]={ | ||
Line 3,769: | Line 3,769: | ||
[h]=m, | [h]=m, | ||
[i]={Ub,1567434909,Vb}, | [i]={Ub,1567434909,Vb}, | ||
[j]={{w, | [j]={{w,3165,"static void diagnoseMissingConstinit(Sema &S, const VarDecl *InitDecl, const ConstInitAttr *CIAttr, bool AttrBeforeInit) {\n if (AttrBeforeInit) {\n S.Diag(InitDecl->getLocation(), diag::ext_constinit_missing) << InitDecl << FixItHint::CreateInsertion(InsertLoc, SuitableSpelling);"}} | ||
}, | }, | ||
["ext_ctrl_z_eof_microsoft"]={ | ["ext_ctrl_z_eof_microsoft"]={ | ||
Line 3,784: | Line 3,784: | ||
[h]=A, | [h]=A, | ||
[i]={"de2310bddf64",1451431047,"Emit a -Wmicrosoft warning when treating ^Z as EOF in MS mode."}, | [i]={"de2310bddf64",1451431047,"Emit a -Wmicrosoft warning when treating ^Z as EOF in MS mode."}, | ||
[j]={{Z, | [j]={{Z,3654,"LexStart:\n case 26: // DOS & CP/M EOF: \"^Z\".\n // If we\'re in Microsoft extensions mode, treat this as end of file.\n if (LangOpts.MicrosoftExt) {\n if (!isLexingRawMode())\n Diag(CurPtr - 1, diag::ext_ctrl_z_eof_microsoft);"}} | ||
}, | }, | ||
["ext_cxx11_attr_placement"]={ | ["ext_cxx11_attr_placement"]={ | ||
Line 3,798: | Line 3,798: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{F, | [j]={{F,1782,"void Parser::DiagnoseCXX11AttributeExtension(ParsedAttributes &Attrs) {\n for (const ParsedAttr &PA : Attrs) {\n if (PA.isCXX11Attribute() || PA.isC2xAttribute() || PA.isRegularKeywordAttribute())\n Diag(PA.getLoc(), diag::ext_cxx11_attr_placement) << PA << PA.isRegularKeywordAttribute() << PA.getRange();"}} | ||
}, | }, | ||
["ext_cxx11_enum_fixed_underlying_type"]={ | ["ext_cxx11_enum_fixed_underlying_type"]={ | ||
Line 3,813: | Line 3,813: | ||
[h]=x, | [h]=x, | ||
[i]={"0d0355abfca9",1351820068,"Change diagnostics for enums with fixed underlying type so in C++98 mode, we cite C++11."}, | [i]={"0d0355abfca9",1351820068,"Change diagnostics for enums with fixed underlying type so in C++98 mode, we cite C++11."}, | ||
[j]={{F, | [j]={{F,4943,"/// 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 } else if (CanHaveEnumBase || !ColonIsSacred) {\n if (!getLangOpts().ObjC) {\n if (getLangOpts().CPlusPlus11)\n else if (getLangOpts().CPlusPlus)\n Diag(ColonLoc, diag::ext_cxx11_enum_fixed_underlying_type) << BaseRange;"}} | ||
}, | }, | ||
["ext_cxx11_longlong"]={ | ["ext_cxx11_longlong"]={ | ||
Line 3,828: | Line 3,828: | ||
[h]=q, | [h]=q, | ||
[i]={"1cd230570394",1348510761,"Change the wording of the extension warning from"}, | [i]={"1cd230570394",1348510761,"Change the wording of the extension warning from"}, | ||
[j]={{rc, | [j]={{rc,322,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n case tok::numeric_constant: {\n // \'long long\' is a C99 or C++11 feature.\n if (!PP.getLangOpts().C99 && Literal.isLongLong) {\n if (PP.getLangOpts().CPlusPlus)\n PP.Diag(PeekTok, PP.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_longlong : diag::ext_cxx11_longlong);"},{y,4228,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n if (Literal.isFixedPointLiteral()) {\n } else if (Literal.isFloatingLiteral()) {\n } else if (!Literal.isIntegerLiteral()) {\n } else {\n if (Literal.GetIntegerValue(ResultVal)) {\n } else {\n // Check long long if needed.\n if (Ty.isNull() && !Literal.isSizeT) {\n // Does it fit in a unsigned long long?\n if (ResultVal.isIntN(LongLongSize)) {\n // \'long long\' is a C99 or C++11 feature, whether the literal\n // explicitly specified \'long long\' or we needed the extra width.\n if (getLangOpts().CPlusPlus)\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_longlong : diag::ext_cxx11_longlong);"},{R,1411,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n case DeclSpec::TST_int: {\n if (DS.getTypeSpecSign() != TypeSpecifierSign::Unsigned) {\n case TypeSpecifierWidth::LongLong:\n // \'long long\' is a C99 or C++11 feature.\n if (!S.getLangOpts().C99) {\n if (S.getLangOpts().CPlusPlus)\n S.Diag(DS.getTypeSpecWidthLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_longlong : diag::ext_cxx11_longlong);"},{R,1436,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n case DeclSpec::TST_int: {\n if (DS.getTypeSpecSign() != TypeSpecifierSign::Unsigned) {\n } else {\n case TypeSpecifierWidth::LongLong:\n // \'long long\' is a C99 or C++11 feature.\n if (!S.getLangOpts().C99) {\n if (S.getLangOpts().CPlusPlus)\n S.Diag(DS.getTypeSpecWidthLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_longlong : diag::ext_cxx11_longlong);"}} | ||
}, | }, | ||
["ext_cxx14_attr"]={ | ["ext_cxx14_attr"]={ | ||
Line 3,843: | Line 3,843: | ||
[h]=m, | [h]=m, | ||
[i]={"4f902c7eccd4",1457397175,"P0188R1: add support for standard [[fallthrough]] attribute. This is almost"}, | [i]={"4f902c7eccd4",1457397175,"P0188R1: add support for standard [[fallthrough]] attribute. This is almost"}, | ||
[j]={{Wb, | [j]={{Wb,8200,"static void handleDeprecatedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!S.getLangOpts().CPlusPlus14 && AL.isCXX11Attribute() && !AL.isGNUScope())\n S.Diag(AL.getLoc(), diag::ext_cxx14_attr) << AL;"}} | ||
}, | }, | ||
["ext_cxx17_attr"]={ | ["ext_cxx17_attr"]={ | ||
Line 3,858: | Line 3,858: | ||
[h]=m, | [h]=m, | ||
[i]={"b115e5dda202",1502667449,"Rename cxx1z -> cxx17 across all diagnostic IDs."}, | [i]={"b115e5dda202",1502667449,"Rename cxx1z -> cxx17 across all diagnostic IDs."}, | ||
[j]={{Wb, | [j]={{Wb,2336,"static void handleUnusedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // If this is spelled as the standard C++17 attribute, but not in C++17, warn\n // about using it as an extension.\n if (!S.getLangOpts().CPlusPlus17 && IsCXX17Attr)\n S.Diag(AL.getLoc(), diag::ext_cxx17_attr) << AL;"},{Wb,3176,"static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.isStandardAttributeSyntax() && !AL.getScopeName()) {\n if (AL.getNumArgs() == 1) {\n } else if (LO.CPlusPlus && !LO.CPlusPlus17)\n S.Diag(AL.getLoc(), diag::ext_cxx17_attr) << AL;"},{"clang/lib/Sema/SemaStmtAttr.cpp",49,"static Attr *handleFallThroughAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n // If this is spelled as the standard C++17 attribute, but not in C++17, warn\n // about using it as an extension.\n if (!S.getLangOpts().CPlusPlus17 && A.isCXX11Attribute() && !A.getScopeName())\n S.Diag(A.getLoc(), diag::ext_cxx17_attr) << A;"}} | ||
}, | }, | ||
["ext_cxx20_attr"]={ | ["ext_cxx20_attr"]={ | ||
Line 3,873: | Line 3,873: | ||
[h]=m, | [h]=m, | ||
[i]={Kb,1576908663,Ib}, | [i]={Kb,1576908663,Ib}, | ||
[j]={{Wb, | [j]={{Wb,3167,"static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.isStandardAttributeSyntax() && !AL.getScopeName()) {\n if (AL.getNumArgs() == 1) {\n if (LO.CPlusPlus && !LO.CPlusPlus20)\n S.Diag(AL.getLoc(), diag::ext_cxx20_attr) << AL;"},{"clang/lib/Sema/SemaStmtAttr.cpp",312,"static Attr *handleLikely(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n if (!S.getLangOpts().CPlusPlus20 && A.isCXX11Attribute() && !A.getScopeName())\n S.Diag(A.getLoc(), diag::ext_cxx20_attr) << A << Range;"},{"clang/lib/Sema/SemaStmtAttr.cpp",321,"static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n if (!S.getLangOpts().CPlusPlus20 && A.isCXX11Attribute() && !A.getScopeName())\n S.Diag(A.getLoc(), diag::ext_cxx20_attr) << A << Range;"}} | ||
}, | }, | ||
["ext_cxx23_pp_directive"]={ | ["ext_cxx23_pp_directive"]={ | ||
Line 3,887: | Line 3,887: | ||
[h]=A, | [h]=A, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{W, | [j]={{W,769,"/// SkipExcludedConditionalBlock - We just read a \\#if or related directive and\n/// decided that the subsequent tokens are in the \\#if\'d out portion of the\n/// file. Lex the rest of the file, until we see an \\#endif. If\n/// FoundNonSkipPortion is true, then we have already emitted code for part of\n/// this \\#if directive, so \\#else/\\#elif blocks should never be entered.\n/// If ElseOk is true, then \\#else directives are ok, if not, then we have\n/// already seen one so a \\#else directive is a duplicate. When this returns,\n/// the caller can lex the first valid token.\nvoid Preprocessor::SkipExcludedConditionalBlock(SourceLocation HashTokenLoc, SourceLocation IfTokenLoc, bool FoundNonSkipPortion, bool FoundElse, SourceLocation ElseLoc) {\n while (true) {\n if (Directive.startswith(\"if\")) {\n } else if (Directive[0] == \'e\') {\n if (Sub == \"ndif\") { // \"endif\"\n } else if (Sub == \"lse\") { // \"else\".\n } else if (Sub == \"lif\") { // \"elif\".\n } else if (Sub == \"lifdef\" || // \"elifdef\"\n if (LangOpts.CPlusPlus)\n DiagID = LangOpts.CPlusPlus23 ? diag::warn_cxx23_compat_pp_directive : diag::ext_cxx23_pp_directive;"},{W,3455,"/// Implements the \\#elif, \\#elifdef, and \\#elifndef directives.\nvoid Preprocessor::HandleElifFamilyDirective(Token &ElifToken, const Token &HashToken, tok::PPKeywordKind Kind) {\n case PED_Elifndef:\n if (LangOpts.CPlusPlus)\n DiagID = LangOpts.CPlusPlus23 ? diag::warn_cxx23_compat_pp_directive : diag::ext_cxx23_pp_directive;"}} | ||
}, | }, | ||
["ext_cxx23_size_t_suffix"]={ | ["ext_cxx23_size_t_suffix"]={ | ||
Line 3,901: | Line 3,901: | ||
[h]=q, | [h]=q, | ||
[i]={"33ee5c466346",1680613513,"[clang] Add Parse and Sema support for RegularKeyword attributes"}, | [i]={"33ee5c466346",1680613513,"[clang] Add Parse and Sema support for RegularKeyword attributes"}, | ||
[j]={{rc, | [j]={{rc,332,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n case tok::numeric_constant: {\n // \'z/uz\' literals are a C++23 feature.\n if (Literal.isSizeT)\n PP.Diag(PeekTok, PP.getLangOpts().CPlusPlus ? PP.getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_size_t_suffix : diag::ext_cxx23_size_t_suffix : diag::err_cxx23_size_t_suffix);"},{y,4059,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n if (Literal.isFixedPointLiteral()) {\n } else if (Literal.isFloatingLiteral()) {\n } else if (!Literal.isIntegerLiteral()) {\n } else {\n // \'z/uz\' literals are a C++23 feature.\n if (Literal.isSizeT)\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus ? getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_size_t_suffix : diag::ext_cxx23_size_t_suffix : diag::err_cxx23_size_t_suffix);"}} | ||
}, | }, | ||
["ext_cxx_designated_init"]={ | ["ext_cxx_designated_init"]={ | ||
Line 3,916: | Line 3,916: | ||
[h]=m, | [h]=m, | ||
[i]={tc,1567205575,sc}, | [i]={tc,1567205575,sc}, | ||
[j]={{y, | [j]={{y,7833,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n if (FirstDesignator.isValid()) {\n // Only diagnose designated initiaization as a C++20 extension if we didn\'t\n // already diagnose use of (non-C++20) C99 designator syntax.\n if (getLangOpts().CPlusPlus && !DiagnosedArrayDesignator && !DiagnosedNestedDesignator && !DiagnosedMixedDesignator) {\n Diag(FirstDesignator, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_designated_init : diag::ext_cxx_designated_init);"}} | ||
}, | }, | ||
["ext_cxx_label_end_of_compound_statement"]={ | ["ext_cxx_label_end_of_compound_statement"]={ | ||
Line 3,930: | Line 3,930: | ||
[h]=x, | [h]=x, | ||
[i]={"782ac2182c2b",1657907157,"[HLSL] Support cbuffer/tbuffer for hlsl."}, | [i]={"782ac2182c2b",1657907157,"[HLSL] Support cbuffer/tbuffer for hlsl."}, | ||
[j]={{xb, | [j]={{xb,1077,"void Parser::DiagnoseLabelAtEndOfCompoundStatement() {\n if (getLangOpts().CPlusPlus) {\n Diag(Tok, getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_label_end_of_compound_statement : diag::ext_cxx_label_end_of_compound_statement);"}} | ||
}, | }, | ||
["ext_cxx_static_assert_no_message"]={ | ["ext_cxx_static_assert_no_message"]={ | ||
Line 3,944: | Line 3,944: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{L, | [j]={{L,1007,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n if (Tok.is(tok::r_paren)) {\n if (getLangOpts().CPlusPlus17)\n else if (getLangOpts().CPlusPlus)\n DiagVal = diag::ext_cxx_static_assert_no_message;"}} | ||
}, | }, | ||
["ext_decl_attrs_on_lambda"]={ | ["ext_decl_attrs_on_lambda"]={ | ||
Line 3,958: | Line 3,958: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{vb, | [j]={{vb,1368,"/// ParseLambdaExpressionAfterIntroducer - Parse the rest of a lambda\n/// expression.\nExprResult Parser::ParseLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro) {\n // Implement WG21 P2173, which allows attributes immediately before the\n // lambda declarator and applies them to the corresponding function operator\n // or operator template declaration. We accept this as a conforming extension\n // in all language modes that support lambdas.\n if (isCXX11AttributeSpecifier()) {\n Diag(Tok, getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_decl_attrs_on_lambda : diag::ext_decl_attrs_on_lambda) << Tok.getIdentifierInfo() << Tok.isRegularKeywordAttribute();"}} | ||
}, | }, | ||
["ext_decltype_auto_type_specifier"]={ | ["ext_decltype_auto_type_specifier"]={ | ||
Line 3,972: | Line 3,972: | ||
[h]=x, | [h]=x, | ||
[i]={"74aeef50a0cc",1366992935,"Implement C++1y decltype(auto)."}, | [i]={"74aeef50a0cc",1366992935,"Implement C++1y decltype(auto)."}, | ||
[j]={{L, | [j]={{L,1105,"/// ParseDecltypeSpecifier - Parse a C++11 decltype specifier.\n///\n/// \'decltype\' ( expression )\n/// \'decltype\' ( \'auto\' ) [C++1y]\n///\nSourceLocation Parser::ParseDecltypeSpecifier(DeclSpec &DS) {\n if (Tok.is(tok::annot_decltype)) {\n } else {\n // Check for C++1y \'decltype(auto)\'.\n if (Tok.is(tok::kw_auto) && NextToken().is(tok::r_paren)) {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_decltype_auto_type_specifier : diag::ext_decltype_auto_type_specifier);"}} | ||
}, | }, | ||
["ext_decomp_decl"]={ | ["ext_decomp_decl"]={ | ||
Line 3,986: | Line 3,986: | ||
[h]=m, | [h]=m, | ||
[i]={"bdb84f374cde",1469230619,"P0217R3: Parsing support and framework for AST representation of C++1z"}, | [i]={"bdb84f374cde",1469230619,"P0217R3: Parsing support and framework for AST representation of C++1z"}, | ||
[j]={{z, | [j]={{z,752,"NamedDecl *Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n Diag(Decomp.getLSquareLoc(), !getLangOpts().CPlusPlus17 ? diag::ext_decomp_decl : D.getContext() == DeclaratorContext::Condition ? diag::ext_decomp_decl_cond : diag::warn_cxx14_compat_decomp_decl) << Decomp.getSourceRange();"}} | ||
}, | }, | ||
["ext_decomp_decl_cond"]={ | ["ext_decomp_decl_cond"]={ | ||
Line 4,000: | Line 4,000: | ||
[h]=m, | [h]=m, | ||
[i]={"c81f4538ecd9",1512630195,"Allow conditions to be decomposed with structured bindings"}, | [i]={"c81f4538ecd9",1512630195,"Allow conditions to be decomposed with structured bindings"}, | ||
[j]={{z, | [j]={{z,754,"NamedDecl *Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n Diag(Decomp.getLSquareLoc(), !getLangOpts().CPlusPlus17 ? diag::ext_decomp_decl : D.getContext() == DeclaratorContext::Condition ? diag::ext_decomp_decl_cond : diag::warn_cxx14_compat_decomp_decl) << Decomp.getSourceRange();"}} | ||
}, | }, | ||
["ext_decomp_decl_empty"]={ | ["ext_decomp_decl_empty"]={ | ||
Line 4,014: | Line 4,014: | ||
[h]=x, | [h]=x, | ||
[i]={"bdb84f374cde",1469230619,"P0217R3: Parsing support and framework for AST representation of C++1z"}, | [i]={"bdb84f374cde",1469230619,"P0217R3: Parsing support and framework for AST representation of C++1z"}, | ||
[j]={{F, | [j]={{F,6783,"void Parser::ParseDecompositionDeclarator(Declarator &D) {\n if (Tok.isNot(tok::r_square))\n else {\n // C++17 does not allow the identifier-list in a structured binding\n // to be empty.\n if (Bindings.empty())\n Diag(Tok.getLocation(), diag::ext_decomp_decl_empty);"}} | ||
}, | }, | ||
["ext_decomp_decl_spec"]={ | ["ext_decomp_decl_spec"]={ | ||
Line 4,028: | Line 4,028: | ||
[h]=m, | [h]=m, | ||
[i]={"13bf9892dc2a",1558554775,"Part of P1091R3: permit structured bindings to be declared \'static\' and"}, | [i]={"13bf9892dc2a",1558554775,"Part of P1091R3: permit structured bindings to be declared \'static\' and"}, | ||
[j]={{z, | [j]={{z,813,"NamedDecl *Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n {\n if (!BadSpecifiers.empty()) {\n } else if (!CPlusPlus20Specifiers.empty()) {\n auto &&Warn = Diag(CPlusPlus20SpecifierLocs.front(), getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_decomp_decl_spec : diag::ext_decomp_decl_spec);"}} | ||
}, | }, | ||
["ext_default_init_const"]={ | ["ext_default_init_const"]={ | ||
Line 4,042: | Line 4,042: | ||
[h]=m, | [h]=m, | ||
[i]={"337d5aa58fc2",1429259558,"Move fixit for const init from note to diag, weaken to warning in MS mode."}, | [i]={"337d5aa58fc2",1429259558,"Move fixit for const init from note to diag, weaken to warning in MS mode."}, | ||
[j]={{T, | [j]={{T,8537,"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 } else {\n if (S.getLangOpts().MSVCCompat && D && D->hasAttr<SelectAnyAttr>())\n DiagID = diag::ext_default_init_const;"}} | ||
}, | }, | ||
["ext_defaulted_comparison"]={ | ["ext_defaulted_comparison"]={ | ||
Line 4,056: | Line 4,056: | ||
[h]=m, | [h]=m, | ||
[i]={Ub,1567434909,Vb}, | [i]={Ub,1567434909,Vb}, | ||
[j]={{z, | [j]={{z,17884,"void Sema::SetDeclDefaulted(Decl *Dcl, SourceLocation DefaultLoc) {\n // Issue compatibility warning. We already warned if the operator is\n // \'operator<=>\' when parsing the \'<=>\' token.\n if (DefKind.isComparison() && DefKind.asComparison() != DefaultedComparisonKind::ThreeWay) {\n Diag(DefaultLoc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_defaulted_comparison : diag::ext_defaulted_comparison);"}} | ||
}, | }, | ||
["ext_defaulted_comparison_constexpr_mismatch"]={ | ["ext_defaulted_comparison_constexpr_mismatch"]={ | ||
Line 4,071: | Line 4,071: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{z, | [j]={{z,8968,"bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, DefaultedComparisonKind DCK) {\n // C++2a [dcl.fct.def.default]p3 [P2002R0]:\n // An explicitly-defaulted function that is not defined as deleted may be\n // declared constexpr or consteval only if it is constexpr-compatible.\n // C++2a [class.compare.default]p3 [P2002R0]:\n // A defaulted comparison function is constexpr-compatible if it satisfies\n // the requirements for a constexpr function [...]\n // The only relevant requirements are that the parameter and return types are\n // literal types. The remaining conditions are checked by the analyzer.\n //\n // We support P2448R2 in language modes earlier than C++23 as an extension.\n // The concept of constexpr-compatible was removed.\n // C++23 [dcl.fct.def.default]p3 [P2448R2]\n // A function explicitly defaulted on its first declaration is implicitly\n // inline, and is implicitly constexpr if it is constexpr-suitable.\n // C++23 [dcl.constexpr]p3\n // A function is constexpr-suitable if\n // - it is not a coroutine, and\n // - if the function is a constructor or destructor, its class does not\n // have any virtual base classes.\n if (FD->isConstexpr()) {\n if (CheckConstexprReturnType(*this, FD, CheckConstexprKind::Diagnose) && CheckConstexprParameterTypes(*this, FD, CheckConstexprKind::Diagnose) && !Info.Constexpr) {\n Diag(FD->getBeginLoc(), getLangOpts().CPlusPlus23 ? diag::warn_cxx23_compat_defaulted_comparison_constexpr_mismatch : diag::ext_defaulted_comparison_constexpr_mismatch) << FD->isImplicit() << (int)DCK << FD->isConsteval();"}} | ||
}, | }, | ||
["ext_defaulted_deleted_function"]={ | ["ext_defaulted_deleted_function"]={ | ||
Line 4,085: | Line 4,085: | ||
[h]=x, | [h]=x, | ||
[i]={"54a6a68c706b",1447524968,"Merge some similar diagnostics using %select."}, | [i]={"54a6a68c706b",1447524968,"Merge some similar diagnostics using %select."}, | ||
[j]={{"clang/lib/Parse/ParseCXXInlineMethods.cpp", | [j]={{"clang/lib/Parse/ParseCXXInlineMethods.cpp",72,"/// ParseCXXInlineMethodDef - We parsed and verified that the specified\n/// Declarator is a well formed C++ inline method definition. Now lex its body\n/// and store its tokens for parsing after the C++ class is complete.\nNamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, const ParsedAttributesView &AccessAttrs, ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, const VirtSpecifiers &VS, SourceLocation PureSpecLoc) {\n if (TryConsumeToken(tok::equal)) {\n if (TryConsumeToken(tok::kw_delete, KWLoc)) {\n Diag(KWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_defaulted_deleted_function : diag::ext_defaulted_deleted_function) << 1 /* deleted */;"},{"clang/lib/Parse/ParseCXXInlineMethods.cpp",82,"/// ParseCXXInlineMethodDef - We parsed and verified that the specified\n/// Declarator is a well formed C++ inline method definition. Now lex its body\n/// and store its tokens for parsing after the C++ class is complete.\nNamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, const ParsedAttributesView &AccessAttrs, ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, const VirtSpecifiers &VS, SourceLocation PureSpecLoc) {\n if (TryConsumeToken(tok::equal)) {\n if (TryConsumeToken(tok::kw_delete, KWLoc)) {\n } else if (TryConsumeToken(tok::kw_default, KWLoc)) {\n Diag(KWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_defaulted_deleted_function : diag::ext_defaulted_deleted_function) << 0 /* defaulted */;"},{wb,1368,"/// ParseFunctionDefinition - We parsed and verified that the specified\n/// Declarator is well formed. If this is a K&R-style function, read the\n/// parameters declaration-list, then start the compound-statement.\n///\n/// function-definition: [C99 6.9.1]\n/// decl-specs declarator declaration-list[opt] compound-statement\n/// [C90] function-definition: [C99 6.7.1] - implicit int result\n/// [C90] decl-specs[opt] declarator declaration-list[opt] compound-statement\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator ctor-initializer[opt]\n/// function-body\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator function-try-block\n///\nDecl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, LateParsedAttrList *LateParsedAttrs) {\n if (TryConsumeToken(tok::equal)) {\n if (TryConsumeToken(tok::kw_delete, KWLoc)) {\n Diag(KWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_defaulted_deleted_function : diag::ext_defaulted_deleted_function) << 1 /* deleted */;"},{wb,1374,"/// ParseFunctionDefinition - We parsed and verified that the specified\n/// Declarator is well formed. If this is a K&R-style function, read the\n/// parameters declaration-list, then start the compound-statement.\n///\n/// function-definition: [C99 6.9.1]\n/// decl-specs declarator declaration-list[opt] compound-statement\n/// [C90] function-definition: [C99 6.7.1] - implicit int result\n/// [C90] decl-specs[opt] declarator declaration-list[opt] compound-statement\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator ctor-initializer[opt]\n/// function-body\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator function-try-block\n///\nDecl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, LateParsedAttrList *LateParsedAttrs) {\n if (TryConsumeToken(tok::equal)) {\n if (TryConsumeToken(tok::kw_delete, KWLoc)) {\n } else if (TryConsumeToken(tok::kw_default, KWLoc)) {\n Diag(KWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_defaulted_deleted_function : diag::ext_defaulted_deleted_function) << 0 /* defaulted */;"}} | ||
}, | }, | ||
["ext_delete_void_ptr_operand"]={ | ["ext_delete_void_ptr_operand"]={ | ||
Line 4,099: | Line 4,099: | ||
[h]=m, | [h]=m, | ||
[i]={"bb3348ed33ac",1274720516,"Downgrade deletion of a void* from an error (which is should be) to an"}, | [i]={"bb3348ed33ac",1274720516,"Downgrade deletion of a void* from an error (which is should be) to an"}, | ||
[j]={{V, | [j]={{V,3686,"/// 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->isVoidType() && !isSFINAEContext()) {\n Diag(StartLoc, diag::ext_delete_void_ptr_operand) << Type << Ex.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_delimited_escape_sequence"]={ | ["ext_delimited_escape_sequence"]={ | ||
Line 4,114: | Line 4,114: | ||
[h]=A, | [h]=A, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{Z, | [j]={{Z,3354,"std::optional<uint32_t> Lexer::tryReadNumericUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n if (Delimited && PP) {\n Diag(SlashLoc, PP->getLangOpts().CPlusPlus23 ? diag::warn_cxx23_delimited_escape_sequence : diag::ext_delimited_escape_sequence) << /*delimited*/ 0 << (PP->getLangOpts().CPlusPlus ? 1 : 0);"},{Z,3442,"std::optional<uint32_t> Lexer::tryReadNamedUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n if (Diagnose && Match)\n Diag(SlashLoc, PP->getLangOpts().CPlusPlus23 ? diag::warn_cxx23_delimited_escape_sequence : diag::ext_delimited_escape_sequence) << /*named*/ 1 << (PP->getLangOpts().CPlusPlus ? 1 : 0);"},{cb,357,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n if (Delimited && Diags) {\n if (!EndDelimiterFound)\n else if (!HadError) {\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, Features.CPlusPlus23 ? diag::warn_cxx23_delimited_escape_sequence : diag::ext_delimited_escape_sequence) << /*delimited*/ 0 << (Features.CPlusPlus ? 1 : 0);"},{cb,700,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n if ((IsDelimitedEscapeSequence || IsNamedEscapeSequence) && Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, Features.CPlusPlus23 ? diag::warn_cxx23_delimited_escape_sequence : diag::ext_delimited_escape_sequence) << (IsNamedEscapeSequence ? 1 : 0) << (Features.CPlusPlus ? 1 : 0);"}} | ||
}, | }, | ||
["ext_deprecated_string_literal_conversion"]={ | ["ext_deprecated_string_literal_conversion"]={ | ||
Line 4,128: | Line 4,128: | ||
[h]=m, | [h]=m, | ||
[i]={"1121de36c26b",1389992932,"Fix string-literal to char* conversion in overload resolution for C++11"}, | [i]={"1121de36c26b",1389992932,"Fix string-literal to char* conversion in overload resolution for C++11"}, | ||
[j]={{V, | [j]={{V,4752,"/// 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_Qualification: {\n if (SCS.DeprecatedStringLiteralToCharPtr && !getLangOpts().WritableStrings) {\n Diag(From->getBeginLoc(), getLangOpts().CPlusPlus11 ? diag::ext_deprecated_string_literal_conversion : diag::warn_deprecated_string_literal_conversion) << ToType.getNonReferenceType();"}} | ||
}, | }, | ||
["ext_designated_init"]={ | ["ext_designated_init"]={ | ||
Line 4,143: | Line 4,143: | ||
[h]=m, | [h]=m, | ||
[i]={"c124e59c90a3",1295194396,"Emit an extension diagnostic for C99 designated initializers that appear in C++ code"}, | [i]={"c124e59c90a3",1295194396,"Emit an extension diagnostic for C99 designated initializers that appear in C++ code"}, | ||
[j]={{y, | [j]={{y,7959,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n if (FirstDesignator.isValid()) {\n // Only diagnose designated initiaization as a C++20 extension if we didn\'t\n // already diagnose use of (non-C++20) C99 designator syntax.\n if (getLangOpts().CPlusPlus && !DiagnosedArrayDesignator && !DiagnosedNestedDesignator && !DiagnosedMixedDesignator) {\n } else if (!getLangOpts().CPlusPlus && !getLangOpts().C99) {\n Diag(FirstDesignator, diag::ext_designated_init);"}} | ||
}, | }, | ||
["ext_designated_init_array"]={ | ["ext_designated_init_array"]={ | ||
Line 4,157: | Line 4,157: | ||
[h]=m, | [h]=m, | ||
[i]={tc,1567205575,sc}, | [i]={tc,1567205575,sc}, | ||
[j]={{y, | [j]={{y,7808,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // Check that any designated initializers are syntactically valid in the\n // current language mode.\n for (unsigned I = 0, E = InitArgList.size(); I != E; ++I) {\n if (auto *DIE = dyn_cast<DesignatedInitExpr>(InitArgList[I])) {\n for (auto &Desig : DIE->designators()) {\n if (!Desig.isFieldDesignator() && !DiagnosedArrayDesignator) {\n Diag(Desig.getBeginLoc(), diag::ext_designated_init_array) << Desig.getSourceRange();"}} | ||
}, | }, | ||
["ext_designated_init_brace_elision"]={ | ["ext_designated_init_brace_elision"]={ | ||
Line 4,171: | Line 4,171: | ||
[h]=m, | [h]=m, | ||
[i]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types"}, | [i]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types"}, | ||
[j]={{T, | [j]={{T,1560,"void InitListChecker::CheckSubElementType(const InitializedEntity &Entity, InitListExpr *IList, QualType ElemType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool DirectlyDesignated) {\n // C++ [dcl.init.aggr]p12:\n //\n // [...] Otherwise, if the member is itself a non-empty\n // subaggregate, brace elision is assumed and the initializer is\n // considered for the initialization of the first member of\n // the subaggregate.\n // OpenCL vector initializer is handled elsewhere.\n if ((!SemaRef.getLangOpts().OpenCL && ElemType->isVectorType()) || ElemType->isAggregateType()) {\n // In C++20, brace elision is not permitted for a designated initializer.\n if (DirectlyDesignated && SemaRef.getLangOpts().CPlusPlus && !hadError) {\n if (!VerifyOnly) {\n SemaRef.Diag(expr->getBeginLoc(), diag::ext_designated_init_brace_elision) << expr->getSourceRange() << FixItHint::CreateInsertion(expr->getBeginLoc(), \"{\") << FixItHint::CreateInsertion(SemaRef.getLocForEndOfToken(expr->getEndLoc()), \"}\");"}} | ||
}, | }, | ||
["ext_designated_init_mixed"]={ | ["ext_designated_init_mixed"]={ | ||
Line 4,185: | Line 4,185: | ||
[h]=m, | [h]=m, | ||
[i]={tc,1567205575,sc}, | [i]={tc,1567205575,sc}, | ||
[j]={{y, | [j]={{y,7810,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // Check that any designated initializers are syntactically valid in the\n // current language mode.\n for (unsigned I = 0, E = InitArgList.size(); I != E; ++I) {\n if (auto *DIE = dyn_cast<DesignatedInitExpr>(InitArgList[I])) {\n if (!DiagnosedMixedDesignator && !isa<DesignatedInitExpr>(InitArgList[0])) {\n Diag(DIE->getBeginLoc(), diag::ext_designated_init_mixed) << DIE->getSourceRange();"},{y,7819,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // Check that any designated initializers are syntactically valid in the\n // current language mode.\n for (unsigned I = 0, E = InitArgList.size(); I != E; ++I) {\n if (auto *DIE = dyn_cast<DesignatedInitExpr>(InitArgList[I])) {\n } else if (getLangOpts().CPlusPlus && !DiagnosedMixedDesignator && isa<DesignatedInitExpr>(InitArgList[0])) {\n Diag(DIE->getBeginLoc(), diag::ext_designated_init_mixed) << DIE->getSourceRange();"}} | ||
}, | }, | ||
["ext_designated_init_nested"]={ | ["ext_designated_init_nested"]={ | ||
Line 4,199: | Line 4,199: | ||
[h]=m, | [h]=m, | ||
[i]={tc,1567205575,sc}, | [i]={tc,1567205575,sc}, | ||
[j]={{y, | [j]={{y,7800,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // Check that any designated initializers are syntactically valid in the\n // current language mode.\n for (unsigned I = 0, E = InitArgList.size(); I != E; ++I) {\n if (auto *DIE = dyn_cast<DesignatedInitExpr>(InitArgList[I])) {\n if (!DiagnosedNestedDesignator && DIE->size() > 1) {\n Diag(DIE->getBeginLoc(), diag::ext_designated_init_nested) << DIE->getDesignatorsSourceRange();"}} | ||
}, | }, | ||
["ext_designated_init_reordered"]={ | ["ext_designated_init_reordered"]={ | ||
Line 4,213: | Line 4,213: | ||
[h]=m, | [h]=m, | ||
[i]={tc,1567205575,sc}, | [i]={tc,1567205575,sc}, | ||
[j]={{T, | [j]={{T,2848,"/// 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 (D->isFieldDesignator()) {\n // C++20 [dcl.init.list]p3:\n // The ordered identifiers in the designators of the designated-\n // initializer-list shall form a subsequence of the ordered identifiers\n // in the direct non-static data members of T.\n //\n // Note that this is not a condition on forming the aggregate\n // initialization, only on actually performing initialization,\n // so it is not checked in VerifyOnly mode.\n //\n // FIXME: This is the only reordering diagnostic we produce, and it only\n // catches cases where we have a top-level field designator that jumps\n // backwards. This is the only such case that is reachable in an\n // otherwise-valid C++20 program, so is the only case that\'s required for\n // conformance, but for consistency, we should diagnose all the other\n // cases where a designator takes us backwards too.\n if (IsFirstDesignator && !VerifyOnly && SemaRef.getLangOpts().CPlusPlus && NextField && (*NextField == RD->field_end() || (*NextField)->getFieldIndex() > Field->getFieldIndex() + 1)) {\n if (PrevField && PrevField->getFieldIndex() > KnownField->getFieldIndex()) {\n SemaRef.Diag(DIE->getBeginLoc(), diag::ext_designated_init_reordered) << KnownField << PrevField << DIE->getSourceRange();"}} | ||
}, | }, | ||
["ext_destructor_typedef_name"]={ | ["ext_destructor_typedef_name"]={ | ||
Line 4,227: | Line 4,227: | ||
[h]=m, | [h]=m, | ||
[i]={yc,1576809732,Ac}, | [i]={yc,1576809732,Ac}, | ||
[j]={{z, | [j]={{z,10869,"/// CheckDestructorDeclarator - Called by ActOnDeclarator to check\n/// the well-formednes of the destructor 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 declarator to invalid. Even if this happens,\n/// will be updated to reflect a well-formed type for the destructor and\n/// returned.\nQualType Sema::CheckDestructorDeclarator(Declarator &D, QualType R, StorageClass &SC) {\n if (const TypedefType *TT = DeclaratorType->getAs<TypedefType>())\n Diag(D.getIdentifierLoc(), diag::ext_destructor_typedef_name) << DeclaratorType << isa<TypeAliasDecl>(TT->getDecl());"},{z,10874,"/// CheckDestructorDeclarator - Called by ActOnDeclarator to check\n/// the well-formednes of the destructor 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 declarator to invalid. Even if this happens,\n/// will be updated to reflect a well-formed type for the destructor and\n/// returned.\nQualType Sema::CheckDestructorDeclarator(Declarator &D, QualType R, StorageClass &SC) {\n if (const TypedefType *TT = DeclaratorType->getAs<TypedefType>())\n else if (const TemplateSpecializationType *TST = DeclaratorType->getAs<TemplateSpecializationType>())\n if (TST->isTypeAlias())\n Diag(D.getIdentifierLoc(), diag::ext_destructor_typedef_name) << DeclaratorType << 1;"}} | ||
}, | }, | ||
["ext_dollar_in_identifier"]={ | ["ext_dollar_in_identifier"]={ | ||
Line 4,242: | Line 4,242: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{Z, | [j]={{Z,1847,"bool Lexer::LexIdentifierContinue(Token &Result, const char *CurPtr) {\n // Match [_A-Za-z0-9]*, we have already matched an identifier start.\n while (true) {\n if (C == \'$\') {\n // Otherwise, emit a diagnostic and continue.\n if (!isLexingRawMode())\n Diag(CurPtr, diag::ext_dollar_in_identifier);"},{Z,3881,"LexStart:\n case \'$\': // $ in identifiers.\n if (LangOpts.DollarIdents) {\n if (!isLexingRawMode())\n Diag(CurPtr - 1, diag::ext_dollar_in_identifier);"}} | ||
}, | }, | ||
["ext_dtor_name_ambiguous"]={ | ["ext_dtor_name_ambiguous"]={ | ||
Line 4,257: | Line 4,257: | ||
[h]=m, | [h]=m, | ||
[i]={Kb,1576908663,Ib}, | [i]={Kb,1576908663,Ib}, | ||
[j]={{V, | [j]={{V,228,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n auto CheckLookupResult = [&](LookupResult &Found) -> ParsedType {\n // As an extension, attempt to \"fix\" an ambiguity by erasing all non-type\n // results, and all non-matching results if we have a search type. It\'s not\n // clear what the right behavior is if destructor lookup hits an ambiguity,\n // but other compilers do generally accept at least some kinds of\n // ambiguity.\n if (Found.isAmbiguous() && NumAcceptableResults == 1) {\n Diag(NameLoc, diag::ext_dtor_name_ambiguous);"}} | ||
}, | }, | ||
["ext_dtor_named_in_wrong_scope"]={ | ["ext_dtor_named_in_wrong_scope"]={ | ||
Line 4,272: | Line 4,272: | ||
[h]=m, | [h]=m, | ||
[i]={yc,1576809732,Ac}, | [i]={yc,1576809732,Ac}, | ||
[j]={{V, | [j]={{V,385,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n if (SS.isSet()) {\n // For compatibility with older broken C++ rules and existing code,\n //\n // nested-name-specifier :: ~ type-name\n //\n // also looks for type-name within the nested-name-specifier.\n if (ParsedType T = LookupInNestedNameSpec(SS)) {\n Diag(SS.getEndLoc(), diag::ext_dtor_named_in_wrong_scope) << SS.getRange() << FixItHint::CreateInsertion(SS.getEndLoc(), (\"::\" + II.getName()).str());"}} | ||
}, | }, | ||
["ext_duplicate_declspec"]={ | ["ext_duplicate_declspec"]={ | ||
Line 4,287: | Line 4,287: | ||
[h]=q, | [h]=q, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{F, | [j]={{F,4487,"#include \"clang/Basic/TransformTypeTraits.def\"\n // If the specifier wasn\'t legal, issue a diagnostic.\n if (isInvalid) {\n if (DiagID == diag::ext_duplicate_declspec || DiagID == diag::ext_warn_duplicate_declspec || DiagID == diag::err_duplicate_declspec)"},{R,1894,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // Apply const/volatile/restrict qualifiers to T.\n if (unsigned TypeQuals = DS.getTypeQualifiers()) {\n // C90 6.5.3 constraints: \"The same type qualifier shall not appear more\n // than once in the same specifier-list or qualifier-list, either directly\n // or via one or more typedefs.\"\n if (!S.getLangOpts().C99 && !S.getLangOpts().CPlusPlus && TypeQuals & Result.getCVRQualifiers()) {\n if (TypeQuals & DeclSpec::TQ_const && Result.isConstQualified()) {\n S.Diag(DS.getConstSpecLoc(), diag::ext_duplicate_declspec) << \"const\";"},{R,1899,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // Apply const/volatile/restrict qualifiers to T.\n if (unsigned TypeQuals = DS.getTypeQualifiers()) {\n // C90 6.5.3 constraints: \"The same type qualifier shall not appear more\n // than once in the same specifier-list or qualifier-list, either directly\n // or via one or more typedefs.\"\n if (!S.getLangOpts().C99 && !S.getLangOpts().CPlusPlus && TypeQuals & Result.getCVRQualifiers()) {\n if (TypeQuals & DeclSpec::TQ_volatile && Result.isVolatileQualified()) {\n S.Diag(DS.getVolatileSpecLoc(), diag::ext_duplicate_declspec) << \"volatile\";"}} | ||
}, | }, | ||
["ext_dynamic_exception_spec"]={ | ["ext_dynamic_exception_spec"]={ | ||
Line 4,301: | Line 4,301: | ||
[h]=x, | [h]=x, | ||
[i]={"82da19ddb327",1481165347,"[c++1z] P0003R5: Removing dynamic exception specifications."}, | [i]={"82da19ddb327",1481165347,"[c++1z] P0003R5: Removing dynamic exception specifications."}, | ||
[j]={{L, | [j]={{L,4010,"static void diagnoseDynamicExceptionSpecification(Parser &P, SourceRange Range, bool IsNoexcept) {\n if (P.getLangOpts().CPlusPlus11) {\n P.Diag(Range.getBegin(), P.getLangOpts().CPlusPlus17 && !IsNoexcept ? diag::ext_dynamic_exception_spec : diag::warn_exception_spec_deprecated) << Range;"}} | ||
}, | }, | ||
["ext_elaborated_enum_class"]={ | ["ext_elaborated_enum_class"]={ | ||
Line 4,315: | Line 4,315: | ||
[h]=x, | [h]=x, | ||
[i]={"d6425e2c1437",1589141691,"Properly implement \'enum class\' parsing."}, | [i]={"d6425e2c1437",1589141691,"Properly implement \'enum class\' parsing."}, | ||
[j]={{F, | [j]={{F,5059,"/// 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 if (BaseType.isUsable())\n else if (ScopedEnumKWLoc.isValid())\n Diag(ScopedEnumKWLoc, diag::ext_elaborated_enum_class) << FixItHint::CreateRemoval(ScopedEnumKWLoc) << IsScopedUsingClassTag;"}} | ||
}, | }, | ||
["ext_ellipsis_exception_spec"]={ | ["ext_ellipsis_exception_spec"]={ | ||
Line 4,330: | Line 4,330: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{L, | [j]={{L,4047,"/// ParseDynamicExceptionSpecification - Parse a C++\n/// dynamic-exception-specification (C++ [except.spec]).\n///\n/// dynamic-exception-specification:\n/// \'throw\' \'(\' type-id-list [opt] \')\'\n/// [MS] \'throw\' \'(\' \'...\' \')\'\n///\n/// type-id-list:\n/// type-id ... [opt]\n/// type-id-list \',\' type-id ... [opt]\n///\nExceptionSpecificationType Parser::ParseDynamicExceptionSpecification(SourceRange &SpecificationRange, SmallVectorImpl<ParsedType> &Exceptions, SmallVectorImpl<SourceRange> &Ranges) {\n // Parse throw(...), a Microsoft extension that means \"this function\n // can throw anything\".\n if (Tok.is(tok::ellipsis)) {\n if (!getLangOpts().MicrosoftExt)\n Diag(EllipsisLoc, diag::ext_ellipsis_exception_spec);"}} | ||
}, | }, | ||
["ext_embedded_directive"]={ | ["ext_embedded_directive"]={ | ||
Line 4,345: | Line 4,345: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,1185,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n // C99 6.10.3p11: Is this preprocessor directive in macro invocation? e.g.:\n // #define A(x) #x\n // A(abc\n // #warning blah\n // def)\n // If so, the user is relying on undefined behavior, emit a diagnostic. Do\n // not support this for #include-like directives, since that can result in\n // terrible diagnostics, and does not work in GCC.\n if (InMacroArgs) {\n Diag(Result, diag::ext_embedded_directive);"}} | ||
}, | }, | ||
["ext_empty_character"]={ | ["ext_empty_character"]={ | ||
Line 4,359: | Line 4,359: | ||
[h]=A, | [h]=A, | ||
[i]={"608c0b65d785",1340869916,"Add warning flag -Winvalid-pp-token for preprocessing-tokens which have"}, | [i]={"608c0b65d785",1340869916,"Add warning flag -Winvalid-pp-token for preprocessing-tokens which have"}, | ||
[j]={{Z, | [j]={{Z,2312,"/// LexCharConstant - Lex the remainder of a character constant, after having\n/// lexed either \' or L\' or u8\' or u\' or U\'.\nbool Lexer::LexCharConstant(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n if (C == \'\\\'\') {\n if (!isLexingRawMode() && !LangOpts.AsmPreprocessor)\n Diag(BufferPtr, diag::ext_empty_character);"}} | ||
}, | }, | ||
["ext_empty_fnmacro_arg"]={ | ["ext_empty_fnmacro_arg"]={ | ||
Line 4,374: | Line 4,374: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{"clang/lib/Lex/PPMacroExpansion.cpp", | [j]={{"clang/lib/Lex/PPMacroExpansion.cpp",905,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n while (Tok.isNot(tok::r_paren)) {\n // Empty arguments are standard in C99 and C++0x, and are supported as an\n // extension in other modes.\n if (ArgTokens.size() == ArgTokenStart && !getLangOpts().C99)\n Diag(Tok, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_empty_fnmacro_arg : diag::ext_empty_fnmacro_arg);"}} | ||
}, | }, | ||
["ext_empty_struct_union"]={ | ["ext_empty_struct_union"]={ | ||
Line 4,389: | Line 4,389: | ||
[h]=m, | [h]=m, | ||
[i]={"da2955ed744e",1280413774,"Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, si..."}, | [i]={"da2955ed744e",1280413774,"Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, si..."}, | ||
[j]={{w, | [j]={{w,19135,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // Okay, we successfully defined \'Record\'.\n if (Record) {\n if (CheckForZeroSize) {\n // Structs without named members are extension in C (C99 6.7.2.1p7),\n // but are accepted by GCC.\n if (NonBitFields == 0 && !getLangOpts().CPlusPlus) {\n Diag(RecLoc, IsEmpty ? diag::ext_empty_struct_union : diag::ext_no_named_members_in_struct_union) << Record->isUnion();"}} | ||
}, | }, | ||
["ext_empty_translation_unit"]={ | ["ext_empty_translation_unit"]={ | ||
Line 4,404: | Line 4,404: | ||
[h]=x, | [h]=x, | ||
[i]={"ccf43ca05cb1",1339003521,"Add pedantic warning -Wempty-translation-unit (C11 6.9p1)."}, | [i]={"ccf43ca05cb1",1339003521,"Add pedantic warning -Wempty-translation-unit (C11 6.9p1)."}, | ||
[j]={{wb, | [j]={{wb,604,"/// Parse the first top-level declaration in a translation unit.\n///\n/// translation-unit:\n/// [C] external-declaration\n/// [C] translation-unit external-declaration\n/// [C++] top-level-declaration-seq[opt]\n/// [C++20] global-module-fragment[opt] module-declaration\n/// top-level-declaration-seq[opt] private-module-fragment[opt]\n///\n/// Note that in C, it is an error if there is no first declaration.\nbool Parser::ParseFirstTopLevelDecl(DeclGroupPtrTy &Result, Sema::ModuleImportState &ImportState) {\n // C11 6.9p1 says translation units must have at least one top-level\n // declaration. C++ doesn\'t have this restriction. We also don\'t want to\n // complain if we have a precompiled header, although technically if the PCH\n // is empty we should still emit the (pedantic) diagnostic.\n // If the main file is a header, we\'re only pretending it\'s a TU; don\'t warn.\n if (NoTopLevelDecls && !Actions.getASTContext().getExternalSource() && !getLangOpts().CPlusPlus && !getLangOpts().IsHeaderFile)\n Diag(diag::ext_empty_translation_unit);"}} | ||
}, | }, | ||
["ext_enum_base_in_type_specifier"]={ | ["ext_enum_base_in_type_specifier"]={ | ||
Line 4,418: | Line 4,418: | ||
[h]=x, | [h]=x, | ||
[i]={"c90e19810743",1588991058,"Fix parsing of enum-base to follow C++11 rules."}, | [i]={"c90e19810743",1588991058,"Fix parsing of enum-base to follow C++11 rules."}, | ||
[j]={{F, | [j]={{F,5056,"/// 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 if (BaseType.isUsable())\n Diag(BaseRange.getBegin(), diag::ext_enum_base_in_type_specifier) << (AllowEnumSpecifier == AllowDefiningTypeSpec::Yes) << BaseRange;"}} | ||
}, | }, | ||
["ext_enum_friend"]={ | ["ext_enum_friend"]={ | ||
Line 4,432: | Line 4,432: | ||
[h]=m, | [h]=m, | ||
[i]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:"}, | [i]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:"}, | ||
[j]={{z, | [j]={{z,17229,"/// Perform semantic analysis of the given friend type declaration.\n///\n/// \\returns A friend declaration that.\nFriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo) {\n // C++03 [class.friend]p2:\n // An elaborated-type-specifier shall be used in a friend declaration\n // for a class.*\n //\n // * The class-key of the elaborated-type-specifier is required.\n if (!CodeSynthesisContexts.empty()) {\n } else {\n if (!T->isElaboratedTypeSpecifier()) {\n } else if (T->getAs<EnumType>()) {\n Diag(FriendLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_enum_friend : diag::ext_enum_friend) << T << TypeRange;"}} | ||
}, | }, | ||
["ext_enum_too_large"]={ | ["ext_enum_too_large"]={ | ||
Line 4,446: | Line 4,446: | ||
[h]=m, | [h]=m, | ||
[i]={"faf156ad158b",1394060098,"Tests for DR370-380."}, | [i]={"faf156ad158b",1394060098,"Tests for DR370-380."}, | ||
[j]={{w, | [j]={{w,19818,"void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange, Decl *EnumDeclX, ArrayRef<Decl *> Elements, Scope *S, const ParsedAttributesView &Attrs) {\n // If the enum already has a type because it is fixed or dictated by the\n // target, promote that type instead of analyzing the enumerators.\n if (Enum->isComplete()) {\n } else if (NumNegativeBits) {\n // If there is a negative value, figure out the smallest integer type (of\n // int/long/longlong) that fits.\n // If it\'s packed, check also if it fits a char or a short.\n if (Packed && NumNegativeBits <= CharWidth && NumPositiveBits < CharWidth) {\n } else if (Packed && NumNegativeBits <= ShortWidth && NumPositiveBits < ShortWidth) {\n } else if (NumNegativeBits <= IntWidth && NumPositiveBits < IntWidth) {\n } else {\n if (NumNegativeBits <= BestWidth && NumPositiveBits < BestWidth) {\n } else {\n if (NumNegativeBits > BestWidth || NumPositiveBits >= BestWidth)\n Diag(Enum->getLocation(), diag::ext_enum_too_large);"}} | ||
}, | }, | ||
["ext_enum_value_not_int"]={ | ["ext_enum_value_not_int"]={ | ||
Line 4,461: | Line 4,461: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,19321,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n if (Val) {\n if (Enum->isDependentType() || Val->isTypeDependent() || Val->containsErrors())\n else {\n // FIXME: We don\'t allow folding in C++11 mode for an enum with a fixed\n // underlying type, but do allow it in all other contexts.\n if (getLangOpts().CPlusPlus11 && Enum->isFixed()) {\n } else if (!Val->isValueDependent() && !(Val = VerifyIntegerConstantExpression(Val, &EnumVal, AllowFold).get())) {\n } else {\n if (Enum->isComplete()) {\n } else if (getLangOpts().CPlusPlus) {\n } else {\n // Complain if the value is not representable in an int.\n if (!isRepresentableIntegerValue(Context, EnumVal, Context.IntTy))\n Diag(IdLoc, diag::ext_enum_value_not_int) << toString(EnumVal, 10) << Val->getSourceRange() << (EnumVal.isUnsigned() || EnumVal.isNonNegative());"},{w,19408,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n if (!Val) {\n if (Enum->isDependentType())\n else if (!LastEnumConst) {\n } else {\n // Check for overflow on increment.\n if (EnumVal < LastEnumConst->getInitVal()) {\n } else if (!getLangOpts().CPlusPlus && !EltTy->isDependentType() && !isRepresentableIntegerValue(Context, EnumVal, EltTy)) {\n Diag(IdLoc, diag::ext_enum_value_not_int) << toString(EnumVal, 10) << 1;"}} | ||
}, | }, | ||
["ext_enumerator_increment_too_large"]={ | ["ext_enumerator_increment_too_large"]={ | ||
Line 4,475: | Line 4,475: | ||
[h]=m, | [h]=m, | ||
[i]={"faf156ad158b",1394060098,"Tests for DR370-380."}, | [i]={"faf156ad158b",1394060098,"Tests for DR370-380."}, | ||
[j]={{w, | [j]={{w,19383,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n if (!Val) {\n if (Enum->isDependentType())\n else if (!LastEnumConst) {\n } else {\n // Check for overflow on increment.\n if (EnumVal < LastEnumConst->getInitVal()) {\n if (T.isNull() || Enum->isFixed()) {\n if (Enum->isFixed())\n else\n Diag(IdLoc, diag::ext_enumerator_increment_too_large) << toString(EnumVal, 10);"}} | ||
}, | }, | ||
["ext_enumerator_list_comma_c"]={ | ["ext_enumerator_list_comma_c"]={ | ||
Line 4,490: | Line 4,490: | ||
[h]=x, | [h]=x, | ||
[i]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace"}, | [i]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace"}, | ||
[j]={{F, | [j]={{F,5259,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // If comma is followed by r_brace, emit appropriate warning.\n if (Tok.is(tok::r_brace) && CommaLoc.isValid()) {\n if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11)\n Diag(CommaLoc, getLangOpts().CPlusPlus ? diag::ext_enumerator_list_comma_cxx : diag::ext_enumerator_list_comma_c) << FixItHint::CreateRemoval(CommaLoc);"}} | ||
}, | }, | ||
["ext_enumerator_list_comma_cxx"]={ | ["ext_enumerator_list_comma_cxx"]={ | ||
Line 4,505: | Line 4,505: | ||
[h]=x, | [h]=x, | ||
[i]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace"}, | [i]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace"}, | ||
[j]={{F, | [j]={{F,5258,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // If comma is followed by r_brace, emit appropriate warning.\n if (Tok.is(tok::r_brace) && CommaLoc.isValid()) {\n if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11)\n Diag(CommaLoc, getLangOpts().CPlusPlus ? diag::ext_enumerator_list_comma_cxx : diag::ext_enumerator_list_comma_c) << FixItHint::CreateRemoval(CommaLoc);"}} | ||
}, | }, | ||
["ext_enumerator_too_large"]={ | ["ext_enumerator_too_large"]={ | ||
Line 4,520: | Line 4,520: | ||
[h]=m, | [h]=m, | ||
[i]={"a310806ae57f",1287414073,"Microsoft enum extensions. 2 things will change on -fms-extensions:"}, | [i]={"a310806ae57f",1287414073,"Microsoft enum extensions. 2 things will change on -fms-extensions:"}, | ||
[j]={{w, | [j]={{w,19295,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n if (Val) {\n if (Enum->isDependentType() || Val->isTypeDependent() || Val->containsErrors())\n else {\n // FIXME: We don\'t allow folding in C++11 mode for an enum with a fixed\n // underlying type, but do allow it in all other contexts.\n if (getLangOpts().CPlusPlus11 && Enum->isFixed()) {\n } else if (!Val->isValueDependent() && !(Val = VerifyIntegerConstantExpression(Val, &EnumVal, AllowFold).get())) {\n } else {\n if (Enum->isComplete()) {\n // In Obj-C and Microsoft mode, require the enumeration value to be\n // representable in the underlying type of the enumeration. In C++11,\n // we perform a non-narrowing conversion as part of converted constant\n // expression checking.\n if (!isRepresentableIntegerValue(Context, EnumVal, EltTy)) {\n if (Context.getTargetInfo().getTriple().isWindowsMSVCEnvironment()) {\n Diag(IdLoc, diag::ext_enumerator_too_large) << EltTy;"}} | ||
}, | }, | ||
["ext_equals_this_lambda_capture_cxx20"]={ | ["ext_equals_this_lambda_capture_cxx20"]={ | ||
Line 4,534: | Line 4,534: | ||
[h]="Lambda Issue", | [h]="Lambda Issue", | ||
[i]={Kb,1576908663,Ib}, | [i]={Kb,1576908663,Ib}, | ||
[j]={{"clang/lib/Sema/SemaLambda.cpp", | [j]={{"clang/lib/Sema/SemaLambda.cpp",1043,"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++20 [expr.prim.lambda]p8:\n // If a lambda-capture includes a capture-default that is =,\n // each simple-capture of that lambda-capture shall be of the form\n // \"&identifier\", \"this\", or \"* this\". [ Note: The form [&,this] is\n // redundant but accepted for compatibility with ISO C++14. --end note ]\n if (Intro.Default == LCD_ByCopy && C->Kind != LCK_StarThis)\n Diag(C->Loc, !getLangOpts().CPlusPlus20 ? diag::ext_equals_this_lambda_capture_cxx20 : diag::warn_cxx17_compat_equals_this_lambda_capture);"}} | ||
}, | }, | ||
["ext_equivalent_internal_linkage_decl_in_modules"]={ | ["ext_equivalent_internal_linkage_decl_in_modules"]={ | ||
Line 4,548: | Line 4,548: | ||
[h]=xc, | [h]=xc, | ||
[i]={"2dbe4043e8f5",1446665192,"[modules] Generalize the workaround for multiple ambiguous definitions of"}, | [i]={"2dbe4043e8f5",1446665192,"[modules] Generalize the workaround for multiple ambiguous definitions of"}, | ||
[j]={{Jb, | [j]={{Jb,10303,"void Sema::diagnoseEquivalentInternalLinkageDeclarations(SourceLocation Loc, const NamedDecl *D, ArrayRef<const NamedDecl *> Equiv) {\n Diag(Loc, diag::ext_equivalent_internal_linkage_decl_in_modules) << D;"}} | ||
}, | }, | ||
["ext_excess_initializers"]={ | ["ext_excess_initializers"]={ | ||
Line 4,562: | Line 4,562: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{T, | [j]={{T,1289,"/// Check whether the initializer \\p IList (that was written with explicit\n/// braces) can be used to initialize an object of type \\p T.\n///\n/// This also fills in \\p StructuredList with the fully-braced, desugared\n/// form of the initialization.\nvoid InitListChecker::CheckExplicitInitList(const InitializedEntity &Entity, InitListExpr *IList, QualType &T, InitListExpr *StructuredList, bool TopLevelObject) {\n // Don\'t complain for incomplete types, since we\'ll get an error elsewhere.\n if (Index < IList->getNumInits() && !T->isIncompleteType()) {\n if (VerifyOnly) {\n } else if (StructuredIndex == 1 && IsStringInit(StructuredList->getInit(0), T, SemaRef.Context) == SIF_None) {\n } else if (T->isSizelessBuiltinType()) {\n } else {\n unsigned DK = ExtraInitsIsError ? diag::err_excess_initializers : diag::ext_excess_initializers;"}} | ||
}, | }, | ||
["ext_excess_initializers_for_sizeless_type"]={ | ["ext_excess_initializers_for_sizeless_type"]={ | ||
Line 4,576: | Line 4,576: | ||
[h]=m, | [h]=m, | ||
[i]={Kb,1576908663,Ib}, | [i]={Kb,1576908663,Ib}, | ||
[j]={{T, | [j]={{T,1278,"/// Check whether the initializer \\p IList (that was written with explicit\n/// braces) can be used to initialize an object of type \\p T.\n///\n/// This also fills in \\p StructuredList with the fully-braced, desugared\n/// form of the initialization.\nvoid InitListChecker::CheckExplicitInitList(const InitializedEntity &Entity, InitListExpr *IList, QualType &T, InitListExpr *StructuredList, bool TopLevelObject) {\n // Don\'t complain for incomplete types, since we\'ll get an error elsewhere.\n if (Index < IList->getNumInits() && !T->isIncompleteType()) {\n if (VerifyOnly) {\n } else if (StructuredIndex == 1 && IsStringInit(StructuredList->getInit(0), T, SemaRef.Context) == SIF_None) {\n } else if (T->isSizelessBuiltinType()) {\n unsigned DK = ExtraInitsIsError ? diag::err_excess_initializers_for_sizeless_type : diag::ext_excess_initializers_for_sizeless_type;"}} | ||
}, | }, | ||
["ext_excess_initializers_in_char_array_initializer"]={ | ["ext_excess_initializers_in_char_array_initializer"]={ | ||
Line 4,590: | Line 4,590: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{T, | [j]={{T,1272,"/// Check whether the initializer \\p IList (that was written with explicit\n/// braces) can be used to initialize an object of type \\p T.\n///\n/// This also fills in \\p StructuredList with the fully-braced, desugared\n/// form of the initialization.\nvoid InitListChecker::CheckExplicitInitList(const InitializedEntity &Entity, InitListExpr *IList, QualType &T, InitListExpr *StructuredList, bool TopLevelObject) {\n // Don\'t complain for incomplete types, since we\'ll get an error elsewhere.\n if (Index < IList->getNumInits() && !T->isIncompleteType()) {\n if (VerifyOnly) {\n } else if (StructuredIndex == 1 && IsStringInit(StructuredList->getInit(0), T, SemaRef.Context) == SIF_None) {\n unsigned DK = ExtraInitsIsError ? diag::err_excess_initializers_in_char_array_initializer : diag::ext_excess_initializers_in_char_array_initializer;"}} | ||
}, | }, | ||
["ext_expected_semi_decl_list"]={ | ["ext_expected_semi_decl_list"]={ | ||
Line 4,602: | Line 4,602: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{F, | [j]={{F,4716,"/// ParseStructUnionBody\n/// struct-contents:\n/// struct-declaration-list\n/// [EXT] empty\n/// [GNU] \"struct-declaration-list\" without terminating \';\'\n/// struct-declaration-list:\n/// struct-declaration\n/// struct-declaration-list struct-declaration\n/// [OBC] \'@\' \'defs\' \'(\' class-name \')\'\n///\nvoid Parser::ParseStructUnionBody(SourceLocation RecordLoc, DeclSpec::TST TagType, RecordDecl *TagDecl) {\n // While we still have something to read, read the declarations in the struct.\n while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {\n if (Tok.is(tok::r_brace)) {\n ExpectAndConsume(tok::semi, diag::ext_expected_semi_decl_list);"}} | ||
}, | }, | ||
["ext_explicit_bool"]={ | ["ext_explicit_bool"]={ | ||
Line 4,616: | Line 4,616: | ||
[h]=x, | [h]=x, | ||
[i]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit"}, | [i]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit"}, | ||
[j]={{F, | [j]={{F,4048,"/// 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_explicit: {\n if (Tok.is(tok::l_paren)) {\n if (getLangOpts().CPlusPlus20 || isExplicitBool() == TPResult::True) {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_explicit_bool : diag::ext_explicit_bool);"}} | ||
}, | }, | ||
["ext_explicit_conversion_functions"]={ | ["ext_explicit_conversion_functions"]={ | ||
Line 4,630: | Line 4,630: | ||
[h]=m, | [h]=m, | ||
[i]={"0bf8a492fd75",1318970984,"-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1."}, | [i]={"0bf8a492fd75",1318970984,"-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1."}, | ||
[j]={{z, | [j]={{z,11141,"/// 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++0x explicit conversion operators.\n if (DS.hasExplicitSpecifier() && !getLangOpts().CPlusPlus20)\n Diag(DS.getExplicitSpecLoc(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_explicit_conversion_functions : diag::ext_explicit_conversion_functions) << SourceRange(DS.getExplicitSpecRange());"}} | ||
}, | }, | ||
["ext_explicit_instantiation_duplicate"]={ | ["ext_explicit_instantiation_duplicate"]={ | ||
Line 4,644: | Line 4,644: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{E, | [j]={{E,9297,"/// Diagnose cases where we have an explicit template specialization\n/// before/after an explicit template instantiation, producing diagnostics\n/// for those cases where they are required and determining whether the\n/// new specialization/instantiation will have any effect.\n///\n/// \\param NewLoc the location of the new explicit specialization or\n/// instantiation.\n///\n/// \\param NewTSK the kind of the new explicit specialization or instantiation.\n///\n/// \\param PrevDecl the previous declaration of the entity.\n///\n/// \\param PrevTSK the kind of the old explicit specialization or instantiatin.\n///\n/// \\param PrevPointOfInstantiation if valid, indicates where the previous\n/// declaration was instantiated (either implicitly or explicitly).\n///\n/// \\param HasNoEffect will be set to true to indicate that the new\n/// specialization or instantiation has no effect and should be ignored.\n///\n/// \\returns true if there was an error that should prevent the introduction of\n/// the new declaration into the AST, false otherwise.\nbool Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPointOfInstantiation, bool &HasNoEffect) {\n case TSK_ExplicitInstantiationDefinition:\n case TSK_ExplicitInstantiationDefinition:\n Diag(NewLoc, (getLangOpts().MSVCCompat) ? diag::ext_explicit_instantiation_duplicate : diag::err_explicit_instantiation_duplicate) << PrevDecl;"}} | ||
}, | }, | ||
["ext_explicit_instantiation_without_qualified_id"]={ | ["ext_explicit_instantiation_without_qualified_id"]={ | ||
Line 4,659: | Line 4,659: | ||
[h]=m, | [h]=m, | ||
[i]={"010815a20b7a",1276705607,"Downgrade the error when using a typedef in the nested-name-specifier"}, | [i]={"010815a20b7a",1276705607,"Downgrade the error when using a typedef in the nested-name-specifier"}, | ||
[j]={{E, | [j]={{E,10285,"// Explicit instantiation of a member class of a class template.\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr) {\n // C++0x [temp.explicit]p2:\n // If the explicit instantiation is for a class or member class, the\n // elaborated-type-specifier in the declaration shall include a\n // simple-template-id.\n //\n // C++98 has the same restriction, just worded differently.\n if (!ScopeSpecifierHasTemplateId(SS))\n Diag(TemplateLoc, diag::ext_explicit_instantiation_without_qualified_id) << Record << SS.getRange();"},{E,10532,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n if (!R->isFunctionType()) {\n // C++0x [temp.explicit]p2:\n // If the explicit instantiation is for a member function, a member class\n // or a static data member of a class template specialization, the name of\n // the class template specialization in the qualified-id for the member\n // name shall be a simple-template-id.\n //\n // C++98 has the same restriction, just worded differently.\n //\n // This does not apply to variable template specializations, where the\n // template-id is in the unqualified-id instead.\n if (!ScopeSpecifierHasTemplateId(D.getCXXScopeSpec()) && !PrevTemplate)\n Diag(D.getIdentifierLoc(), diag::ext_explicit_instantiation_without_qualified_id) << Prev << D.getCXXScopeSpec().getRange();"},{E,10754,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n if (D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId && !FunTmpl && D.getCXXScopeSpec().isSet() && !ScopeSpecifierHasTemplateId(D.getCXXScopeSpec()))\n Diag(D.getIdentifierLoc(), diag::ext_explicit_instantiation_without_qualified_id) << Specialization << D.getCXXScopeSpec().getRange();"}} | ||
}, | }, | ||
["ext_explicit_specialization_storage_class"]={ | ["ext_explicit_specialization_storage_class"]={ | ||
Line 4,671: | Line 4,671: | ||
[h]=m, | [h]=m, | ||
[i]={"c976f01d3f9e",1308282095,"Downgrade the error complaining about presence of a storage class"}, | [i]={"c976f01d3f9e",1308282095,"Downgrade the error complaining about presence of a storage class"}, | ||
[j]={{w, | [j]={{w,10434,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (!getLangOpts().CPlusPlus) {\n } else {\n // If it\'s a friend (and only if it\'s a friend), it\'s possible\n // that either the specialized function type or the specialized\n // template is dependent, and therefore matching will fail. In\n // this case, don\'t check the specialization yet.\n if (isFunctionTemplateSpecialization && isFriend && (NewFD->getType()->isDependentType() || DC->isDependentContext() || TemplateSpecializationType::anyInstantiationDependentTemplateArguments(TemplateArgs.arguments()))) {\n } else if (isFunctionTemplateSpecialization) {\n if (Info && SC != SC_None) {\n if (SC != Info->getTemplate()->getTemplatedDecl()->getStorageClass())\n else\n Diag(NewFD->getLocation(), diag::ext_explicit_specialization_storage_class) << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"}} | ||
}, | }, | ||
["ext_expr_not_ice"]={ | ["ext_expr_not_ice"]={ | ||
Line 4,686: | Line 4,686: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{y, | [j]={{y,17861,"Sema::SemaDiagnosticBuilder Sema::VerifyICEDiagnoser::diagnoseFold(Sema &S, SourceLocation Loc) { return S.Diag(Loc, diag::ext_expr_not_ice) << S.LangOpts.CPlusPlus; }"}} | ||
}, | }, | ||
["ext_extern_template"]={ | ["ext_extern_template"]={ | ||
Line 4,701: | Line 4,701: | ||
[h]=x, | [h]=x, | ||
[i]={"f411196d15a9",1319135758,"\'extern template\' is a C++11 feature. Add an Extension for C++98 (this matches"}, | [i]={"f411196d15a9",1319135758,"\'extern template\' is a C++11 feature. Add an Extension for C++98 (this matches"}, | ||
[j]={{wb, | [j]={{wb,1012,"/// ParseExternalDeclaration:\n///\n/// The `Attrs` that are passed in are C++11 attributes and appertain to the\n/// declaration.\n///\n/// external-declaration: [C99 6.9], declaration: [C++ dcl.dcl]\n/// function-definition\n/// declaration\n/// [GNU] asm-definition\n/// [GNU] __extension__ external-declaration\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\n/// [C++] linkage-specification\n/// [GNU] asm-definition:\n/// simple-asm-expr \';\'\n/// [C++11] empty-declaration\n/// [C++11] attribute-declaration\n///\n/// [C++11] empty-declaration:\n/// \';\'\n///\n/// [C++0x/GNU] \'extern\' \'template\' declaration\n///\n/// [C++20] module-import-declaration\n///\nParser::DeclGroupPtrTy Parser::ParseExternalDeclaration(ParsedAttributes &Attrs, ParsedAttributes &DeclSpecAttrs, ParsingDeclSpec *DS) {\n case tok::kw_extern:\n if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_template)) {\n Diag(ExternLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_extern_template : diag::ext_extern_template) << SourceRange(ExternLoc, TemplateLoc);"}} | ||
}, | }, | ||
["ext_extra_semi"]={ | ["ext_extra_semi"]={ | ||
Line 4,716: | Line 4,716: | ||
[h]=x, | [h]=x, | ||
[i]={"2f7dc46a5868",1337195099,"Move the warnings for extra semi-colons under -Wextra-semi. Also, added"}, | [i]={"2f7dc46a5868",1337195099,"Move the warnings for extra semi-colons under -Wextra-semi. Also, added"}, | ||
[j]={{wb, | [j]={{wb,207,"void Parser::ConsumeExtraSemi(ExtraSemiKind Kind, DeclSpec::TST TST) {\n if (Kind != AfterMemberFunctionDefinition || HadMultipleSemis)\n Diag(StartLoc, diag::ext_extra_semi) << Kind << DeclSpec::getSpecifierName(TST, Actions.getASTContext().getPrintingPolicy()) << FixItHint::CreateRemoval(SourceRange(StartLoc, EndLoc));"}} | ||
}, | }, | ||
["ext_extra_semi_cxx11"]={ | ["ext_extra_semi_cxx11"]={ | ||
Line 4,731: | Line 4,731: | ||
[h]=x, | [h]=x, | ||
[i]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace"}, | [i]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace"}, | ||
[j]={{wb, | [j]={{wb,201,"void Parser::ConsumeExtraSemi(ExtraSemiKind Kind, DeclSpec::TST TST) {\n // C++11 allows extra semicolons at namespace scope, but not in any of the\n // other contexts.\n if (Kind == OutsideFunction && getLangOpts().CPlusPlus) {\n if (getLangOpts().CPlusPlus11)\n else\n Diag(StartLoc, diag::ext_extra_semi_cxx11) << FixItHint::CreateRemoval(SourceRange(StartLoc, EndLoc));"}} | ||
}, | }, | ||
["ext_flexible_array_empty_aggregate_gnu"]={ | ["ext_flexible_array_empty_aggregate_gnu"]={ | ||
Line 4,746: | Line 4,746: | ||
[h]=m, | [h]=m, | ||
[i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays."}, | [i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays."}, | ||
[j]={{w, | [j]={{w,18808,"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 if (Record) {\n if (!Record->isUnion() && !IsLastField) {\n } else if (Record->isUnion())\n else if (NumNamedMembers < 1)\n DiagID = getLangOpts().MicrosoftExt ? diag::ext_flexible_array_empty_aggregate_ms : getLangOpts().CPlusPlus ? diag::ext_flexible_array_empty_aggregate_gnu : diag::err_flexible_array_empty_aggregate;"}} | ||
}, | }, | ||
["ext_flexible_array_empty_aggregate_ms"]={ | ["ext_flexible_array_empty_aggregate_ms"]={ | ||
Line 4,761: | Line 4,761: | ||
[h]=m, | [h]=m, | ||
[i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays."}, | [i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays."}, | ||
[j]={{w, | [j]={{w,18806,"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 if (Record) {\n if (!Record->isUnion() && !IsLastField) {\n } else if (Record->isUnion())\n else if (NumNamedMembers < 1)\n DiagID = getLangOpts().MicrosoftExt ? diag::ext_flexible_array_empty_aggregate_ms : getLangOpts().CPlusPlus ? diag::ext_flexible_array_empty_aggregate_gnu : diag::err_flexible_array_empty_aggregate;"}} | ||
}, | }, | ||
["ext_flexible_array_in_array"]={ | ["ext_flexible_array_in_array"]={ | ||
Line 4,776: | Line 4,776: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{R, | [j]={{R,2540,"/// 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 (const RecordType *EltTy = T->getAs<RecordType>()) {\n // If the element type is a struct or union that contains a variadic\n // array, accept it as a GNU extension: C99 6.7.2.1p2.\n if (EltTy->getDecl()->hasFlexibleArrayMember())\n Diag(Loc, diag::ext_flexible_array_in_array) << T;"}} | ||
}, | }, | ||
["ext_flexible_array_in_struct"]={ | ["ext_flexible_array_in_struct"]={ | ||
Line 4,791: | Line 4,791: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,18869,"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 (Record && FDTTy->getDecl()->hasFlexibleArrayMember()) {\n if (!Record->isUnion()) {\n // If this is a struct/class and this is not the last element, reject\n // it. Note that GCC supports variable sized arrays in the middle of\n // structures.\n if (!IsLastField)\n else {\n Diag(FD->getLocation(), diag::ext_flexible_array_in_struct) << FD->getDeclName();"}} | ||
}, | }, | ||
["ext_flexible_array_init"]={ | ["ext_flexible_array_init"]={ | ||
Line 4,806: | Line 4,806: | ||
[h]=m, | [h]=m, | ||
[i]={"07d8e3a50047",1237509176,"Allow flexible array initializers that are not surrounded by"}, | [i]={"07d8e3a50047",1237509176,"Allow flexible array initializers that are not surrounded by"}, | ||
[j]={{T, | [j]={{T,2103,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n if (isa<InitListExpr>(InitExpr) && cast<InitListExpr>(InitExpr)->getNumInits() == 0) {\n FlexArrayDiag = diag::ext_flexible_array_init;"},{T,2115,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n if (isa<InitListExpr>(InitExpr) && cast<InitListExpr>(InitExpr)->getNumInits() == 0) {\n } else if (!TopLevelObject) {\n } else if (Entity.getKind() != InitializedEntity::EK_Variable) {\n } else if (cast<VarDecl>(Entity.getDecl())->hasLocalStorage()) {\n } else {\n FlexArrayDiag = diag::ext_flexible_array_init;"},{T,2125,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n return FlexArrayDiag != diag::ext_flexible_array_init;"}} | ||
}, | }, | ||
["ext_flexible_array_union_gnu"]={ | ["ext_flexible_array_union_gnu"]={ | ||
Line 4,821: | Line 4,821: | ||
[h]=m, | [h]=m, | ||
[i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays."}, | [i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays."}, | ||
[j]={{w, | [j]={{w,18802,"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 if (Record) {\n if (!Record->isUnion() && !IsLastField) {\n } else if (Record->isUnion())\n DiagID = getLangOpts().MicrosoftExt ? diag::ext_flexible_array_union_ms : getLangOpts().CPlusPlus ? diag::ext_flexible_array_union_gnu : diag::err_flexible_array_union;"}} | ||
}, | }, | ||
["ext_flexible_array_union_ms"]={ | ["ext_flexible_array_union_ms"]={ | ||
Line 4,836: | Line 4,836: | ||
[h]=m, | [h]=m, | ||
[i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays."}, | [i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays."}, | ||
[j]={{w, | [j]={{w,18800,"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 if (Record) {\n if (!Record->isUnion() && !IsLastField) {\n } else if (Record->isUnion())\n DiagID = getLangOpts().MicrosoftExt ? diag::ext_flexible_array_union_ms : getLangOpts().CPlusPlus ? diag::ext_flexible_array_union_gnu : diag::err_flexible_array_union;"}} | ||
}, | }, | ||
["ext_fold_expression"]={ | ["ext_fold_expression"]={ | ||
Line 4,850: | Line 4,850: | ||
[h]=x, | [h]=x, | ||
[i]={"0f0af19b0581",1415423236,"[c++1z] N4295: fold-expressions."}, | [i]={"0f0af19b0581",1415423236,"[c++1z] N4295: fold-expressions."}, | ||
[j]={{ub, | [j]={{ub,3455,"/// Parse A C++1z fold-expression after the opening paren and optional\n/// left-hand-side expression.\n///\n/// \\verbatim\n/// fold-expression:\n/// ( cast-expression fold-operator ... )\n/// ( ... fold-operator cast-expression )\n/// ( cast-expression fold-operator ... fold-operator cast-expression )\nExprResult Parser::ParseFoldExpression(ExprResult LHS, BalancedDelimiterTracker &T) {\n Diag(EllipsisLoc, getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_fold_expression : diag::ext_fold_expression);"}} | ||
}, | }, | ||
["ext_for_range"]={ | ["ext_for_range"]={ | ||
Line 4,864: | Line 4,864: | ||
[h]=x, | [h]=x, | ||
[i]={"58c743370994",1315166054,"PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ..."}, | [i]={"58c743370994",1315166054,"PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ..."}, | ||
[j]={{xb, | [j]={{xb,2075,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // Parse the first part of the for specifier.\n if (Tok.is(tok::semi)) { // for (;\n } else if (getLangOpts().CPlusPlus && Tok.is(tok::identifier) && isForRangeIdentifier()) {\n } else if (isForInitDeclaration()) { // for (int X = 4;\n if (Tok.is(tok::kw_using)) {\n } else {\n if (ForRangeInfo.ParsedForRangeDecl()) {\n Diag(ForRangeInfo.ColonLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_for_range : diag::ext_for_range);"}} | ||
}, | }, | ||
["ext_for_range_begin_end_types_differ"]={ | ["ext_for_range_begin_end_types_differ"]={ | ||
Line 4,878: | Line 4,878: | ||
[h]=m, | [h]=m, | ||
[i]={"01694c340db8",1458470020,"P0184R0: Allow types of \'begin\' and \'end\' expressions in range-based for loops to differ."}, | [i]={"01694c340db8",1458470020,"P0184R0: Allow types of \'begin\' and \'end\' expressions in range-based for loops to differ."}, | ||
[j]={{Ob, | [j]={{Ob,2969,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n if (RangeVarType->isDependentType()) {\n } else if (!BeginDeclStmt.get()) {\n if (!Context.hasSameType(BeginType, EndType)) {\n Diag(RangeLoc, getLangOpts().CPlusPlus17 ? diag::warn_for_range_begin_end_types_differ : diag::ext_for_range_begin_end_types_differ) << BeginType << EndType;"}} | ||
}, | }, | ||
["ext_for_range_init_stmt"]={ | ["ext_for_range_init_stmt"]={ | ||
Line 4,892: | Line 4,892: | ||
[h]=x, | [h]=x, | ||
[i]={"8baa50013c86",1538160249,"[cxx2a] P0614R1: Support init-statements in range-based for loops."}, | [i]={"8baa50013c86",1538160249,"[cxx2a] P0614R1: Support init-statements in range-based for loops."}, | ||
[j]={{xb, | [j]={{xb,2172,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // Parse the second part of the for specifier.\n if (!ForEach && !ForRangeInfo.ParsedForRangeDecl() && !SecondPart.isInvalid()) {\n // Parse the second part of the for specifier.\n if (Tok.is(tok::semi)) { // for (...;;\n } else if (Tok.is(tok::r_paren)) {\n } else {\n if (getLangOpts().CPlusPlus) {\n if (ForRangeInfo.ParsedForRangeDecl()) {\n Diag(FirstPart.get() ? FirstPart.get()->getBeginLoc() : ForRangeInfo.ColonLoc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_for_range_init_stmt : diag::ext_for_range_init_stmt) << (FirstPart.get() ? FirstPart.get()->getSourceRange() : SourceRange());"}} | ||
}, | }, | ||
["ext_forward_ref_enum"]={ | ["ext_forward_ref_enum"]={ | ||
Line 4,907: | Line 4,907: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,17510,"CreateNewDecl:\n if (Kind == TTK_Enum) {\n // If this is an undefined enum, warn.\n if (TUK != TUK_Definition && !Invalid) {\n if (IsFixed && cast<EnumDecl>(New)->isFixed()) {\n } else if (PrevDecl && (Def = cast<EnumDecl>(PrevDecl)->getDefinition())) {\n } else {\n unsigned DiagID = diag::ext_forward_ref_enum;"}} | ||
}, | }, | ||
["ext_forward_ref_enum_def"]={ | ["ext_forward_ref_enum_def"]={ | ||
Line 4,922: | Line 4,922: | ||
[h]=m, | [h]=m, | ||
[i]={"c9ea2d5a672b",1277216795,"In C++, allow a declaration of an enum to follow a definition of that"}, | [i]={"c9ea2d5a672b",1277216795,"In C++, allow a declaration of an enum to follow a definition of that"}, | ||
[j]={{w, | [j]={{w,17506,"CreateNewDecl:\n if (Kind == TTK_Enum) {\n // If this is an undefined enum, warn.\n if (TUK != TUK_Definition && !Invalid) {\n if (IsFixed && cast<EnumDecl>(New)->isFixed()) {\n } else if (PrevDecl && (Def = cast<EnumDecl>(PrevDecl)->getDefinition())) {\n Diag(Loc, diag::ext_forward_ref_enum_def) << New;"}} | ||
}, | }, | ||
["ext_found_in_dependent_base"]={ | ["ext_found_in_dependent_base"]={ | ||
Line 4,936: | Line 4,936: | ||
[h]=m, | [h]=m, | ||
[i]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types"}, | [i]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types"}, | ||
[j]={{w, | [j]={{w,265,"static ParsedType recoverFromTypeInKnownDependentBase(Sema &S, const IdentifierInfo &II, SourceLocation NameLoc) {\n S.Diag(NameLoc, diag::ext_found_in_dependent_base) << &II;"},{y,2332,"/// Diagnose a lookup that found results in an enclosing class during error\n/// recovery. This usually indicates that the results were found in a dependent\n/// base class that could not be searched as part of a template definition.\n/// Always issues a diagnostic (though this may be only a warning in MS\n/// compatibility mode).\n///\n/// Return \\c true if the error is unrecoverable, or \\c false if the caller\n/// should attempt to recover using these lookup results.\nbool Sema::DiagnoseDependentMemberLookup(const LookupResult &R) {\n if (R.getRepresentativeDecl()->getDeclContext()->Equals(R.getNamingClass())) {\n } else if (getLangOpts().MSVCCompat) {\n DiagID = diag::ext_found_in_dependent_base;"}} | ||
}, | }, | ||
["ext_found_later_in_class"]={ | ["ext_found_later_in_class"]={ | ||
Line 4,950: | Line 4,950: | ||
[h]=m, | [h]=m, | ||
[i]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types"}, | [i]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types"}, | ||
[j]={{y, | [j]={{y,2329,"/// Diagnose a lookup that found results in an enclosing class during error\n/// recovery. This usually indicates that the results were found in a dependent\n/// base class that could not be searched as part of a template definition.\n/// Always issues a diagnostic (though this may be only a warning in MS\n/// compatibility mode).\n///\n/// Return \\c true if the error is unrecoverable, or \\c false if the caller\n/// should attempt to recover using these lookup results.\nbool Sema::DiagnoseDependentMemberLookup(const LookupResult &R) {\n if (R.getRepresentativeDecl()->getDeclContext()->Equals(R.getNamingClass())) {\n DiagID = getLangOpts().MSVCCompat ? diag::ext_found_later_in_class : diag::err_found_later_in_class;"}} | ||
}, | }, | ||
["ext_freestanding_complex"]={ | ["ext_freestanding_complex"]={ | ||
Line 4,965: | Line 4,965: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{R, | [j]={{R,1790,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // Handle complex types.\n if (DS.getTypeSpecComplex() == DeclSpec::TSC_complex) {\n if (S.getLangOpts().Freestanding)\n S.Diag(DS.getTypeSpecComplexLoc(), diag::ext_freestanding_complex);"}} | ||
}, | }, | ||
["ext_friend_tag_redecl_outside_namespace"]={ | ["ext_friend_tag_redecl_outside_namespace"]={ | ||
Line 4,979: | Line 4,979: | ||
[h]=m, | [h]=m, | ||
[i]={"0902a51bafc7",1405035892,"MSVC compat: Allow lookup of friend types in enclosing namespaces"}, | [i]={"0902a51bafc7",1405035892,"MSVC compat: Allow lookup of friend types in enclosing namespaces"}, | ||
[j]={{w, | [j]={{w,17046,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n if (Name && SS.isNotEmpty()) {\n } else if (Name) {\n // C++11 [namespace.memdef]p3:\n // If the name in a friend declaration is neither qualified nor\n // a template-id and the declaration is a function or an\n // elaborated-type-specifier, the lookup to determine whether\n // the entity has been previously declared shall not consider\n // any scopes outside the innermost enclosing namespace.\n //\n // MSVC doesn\'t implement the above rule for types, so a friend tag\n // declaration may be a redeclaration of a type declared in an enclosing\n // scope. They do implement this rule for friend functions.\n //\n // Does it matter that this should be by scope instead of by\n // semantic context?\n if (!Previous.empty() && TUK == TUK_Friend) {\n // Diagnose this MSVC extension in the easy case where lookup would have\n // unambiguously found something outside the enclosing namespace.\n if (Previous.isSingleResult() && FriendSawTagOutsideEnclosingNamespace) {\n Diag(NameLoc, diag::ext_friend_tag_redecl_outside_namespace) << createFriendTagNNSFixIt(*this, ND, S, NameLoc);"}} | ||
}, | }, | ||
["ext_generalized_initializer_lists"]={ | ["ext_generalized_initializer_lists"]={ | ||
Line 4,993: | Line 4,993: | ||
[h]=x, | [h]=x, | ||
[i]={"e9e27d95db1d",1299885044,"Implement a hack intended to allow Clang to parse libstdc++ 4.5\'s"}, | [i]={"e9e27d95db1d",1299885044,"Implement a hack intended to allow Clang to parse libstdc++ 4.5\'s"}, | ||
[j]={{xb, | [j]={{xb,2399,"/// ParseReturnStatement\n/// jump-statement:\n/// \'return\' expression[opt] \';\'\n/// \'return\' braced-init-list \';\'\n/// \'co_return\' expression[opt] \';\'\n/// \'co_return\' braced-init-list \';\'\nStmtResult Parser::ParseReturnStatement() {\n if (Tok.isNot(tok::semi)) {\n if (Tok.is(tok::l_brace) && getLangOpts().CPlusPlus) {\n if (R.isUsable())\n Diag(R.get()->getBeginLoc(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_generalized_initializer_lists : diag::ext_generalized_initializer_lists) << R.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_generic_with_type_arg"]={ | ["ext_generic_with_type_arg"]={ | ||
Line 5,008: | Line 5,008: | ||
[h]=x, | [h]=x, | ||
[i]={"ef9ec4bbcca2",1677810915,"[OpenMP] Add the `ompx_attribute` clause for target directives"}, | [i]={"ef9ec4bbcca2",1677810915,"[OpenMP] Add the `ompx_attribute` clause for target directives"}, | ||
[j]={{ub, | [j]={{ub,3334,"/// ParseGenericSelectionExpression - Parse a C11 generic-selection\n/// [C11 6.5.1.1].\n///\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( assignment-expression , generic-assoc-list )\n/// generic-assoc-list:\n/// generic-association\n/// generic-assoc-list , generic-association\n/// generic-association:\n/// type-name : assignment-expression\n/// default : assignment-expression\n/// \\endverbatim\n///\n/// As an extension, Clang also accepts:\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( type-name, generic-assoc-list )\n/// \\endverbatim\nExprResult Parser::ParseGenericSelectionExpression() {\n if (isTypeIdForGenericSelection()) {\n Diag(Loc, diag::ext_generic_with_type_arg);"}} | ||
}, | }, | ||
["ext_gnu_address_of_label"]={ | ["ext_gnu_address_of_label"]={ | ||
Line 5,023: | Line 5,023: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{ub, | [j]={{ub,1462,"#include \"clang/Basic/TransformTypeTraits.def\"\n case tok::ampamp: { // unary-expression: \'&&\' identifier\n Diag(AmpAmpLoc, diag::ext_gnu_address_of_label);"}} | ||
}, | }, | ||
["ext_gnu_anonymous_struct"]={ | ["ext_gnu_anonymous_struct"]={ | ||
Line 5,038: | Line 5,038: | ||
[h]=m, | [h]=m, | ||
[i]={"b64a1fa65ca1",1328284024,"Don\'t warn about anonymous struct/union in C11."}, | [i]={"b64a1fa65ca1",1328284024,"Don\'t warn about anonymous struct/union in C11."}, | ||
[j]={{w, | [j]={{w,5510,"/// 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 // Diagnose whether this anonymous struct/union is an extension.\n if (Record->isUnion() && !getLangOpts().CPlusPlus && !getLangOpts().C11)\n else if (!Record->isUnion() && getLangOpts().CPlusPlus)\n Diag(Record->getLocation(), diag::ext_gnu_anonymous_struct);"}} | ||
}, | }, | ||
["ext_gnu_array_range"]={ | ["ext_gnu_array_range"]={ | ||
Line 5,053: | Line 5,053: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{vc, | [j]={{vc,370,"/// ParseInitializerWithPotentialDesignator - Parse the \'initializer\' production\n/// checking to see if the token stream starts with a designator.\n///\n/// C99:\n///\n/// designation:\n/// designator-list \'=\'\n/// [GNU] array-designator\n/// [GNU] identifier \':\'\n///\n/// designator-list:\n/// designator\n/// designator-list designator\n///\n/// designator:\n/// array-designator\n/// \'.\' identifier\n///\n/// array-designator:\n/// \'[\' constant-expression \']\'\n/// [GNU] \'[\' constant-expression \'...\' constant-expression \']\'\n///\n/// C++20:\n///\n/// designated-initializer-list:\n/// designated-initializer-clause\n/// designated-initializer-list \',\' designated-initializer-clause\n///\n/// designated-initializer-clause:\n/// designator brace-or-equal-initializer\n///\n/// designator:\n/// \'.\' identifier\n///\n/// We allow the C99 syntax extensions in C++20, but do not allow the C++20\n/// extension (a braced-init-list after the designator with no \'=\') in C99.\n///\n/// NOTE: [OBC] allows \'[ objc-receiver objc-message-args ]\' as an\n/// initializer (because it is an expression). We need to consider this case\n/// when parsing array designators.\n///\n/// \\p CodeCompleteCB is called with Designation parsed so far.\nExprResult Parser::ParseInitializerWithPotentialDesignator(DesignatorCompletionInfo DesignatorCompletion) {\n // Parse each designator in the designator list until we find an initializer.\n while (Tok.is(tok::period) || Tok.is(tok::l_square)) {\n // If this is a normal array designator, remember it.\n if (Tok.isNot(tok::ellipsis)) {\n } else {\n Diag(Tok, diag::ext_gnu_array_range);"}} | ||
}, | }, | ||
["ext_gnu_case_range"]={ | ["ext_gnu_case_range"]={ | ||
Line 5,068: | Line 5,068: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{xb, | [j]={{xb,847,"/// ParseCaseStatement\n/// labeled-statement:\n/// \'case\' constant-expression \':\' statement\n/// [GNU] \'case\' constant-expression \'...\' constant-expression \':\' statement\n///\nStmtResult Parser::ParseCaseStatement(ParsedStmtContext StmtCtx, bool MissingCase, ExprResult Expr) {\n do {\n if (TryConsumeToken(tok::ellipsis, DotDotDotLoc)) {\n Diag(DotDotDotLoc, diag::ext_gnu_case_range);"}} | ||
}, | }, | ||
["ext_gnu_conditional_expr"]={ | ["ext_gnu_conditional_expr"]={ | ||
Line 5,083: | Line 5,083: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{ub, | [j]={{ub,490,"/// Parse a binary expression that starts with \\p LHS and has a\n/// precedence of at least \\p MinPrec.\nExprResult Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {\n while (true) {\n if (NextTokPrec == prec::Conditional) {\n if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {\n } else if (Tok.isNot(tok::colon)) {\n } else {\n Diag(Tok, diag::ext_gnu_conditional_expr);"}} | ||
}, | }, | ||
["ext_gnu_indirect_goto"]={ | ["ext_gnu_indirect_goto"]={ | ||
Line 5,098: | Line 5,098: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{xb, | [j]={{xb,2331,"/// ParseGotoStatement\n/// jump-statement:\n/// \'goto\' identifier \';\'\n/// [GNU] \'goto\' \'*\' expression \';\'\n///\n/// Note: this lets the caller parse the end \';\'.\n///\nStmtResult Parser::ParseGotoStatement() {\n if (Tok.is(tok::identifier)) {\n } else if (Tok.is(tok::star)) {\n Diag(Tok, diag::ext_gnu_indirect_goto);"}} | ||
}, | }, | ||
["ext_gnu_missing_equal_designator"]={ | ["ext_gnu_missing_equal_designator"]={ | ||
Line 5,112: | Line 5,112: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{vc, | [j]={{vc,116,"static void CheckArrayDesignatorSyntax(Parser &P, SourceLocation Loc, Designation &Desig) {\n // If we have exactly one array designator, this used the GNU\n // \'designation: array-designator\' extension, otherwise there should be no\n // designators at all!\n if (Desig.getNumDesignators() == 1 && (Desig.getDesignator(0).isArrayDesignator() || Desig.getDesignator(0).isArrayRangeDesignator()))\n P.Diag(Loc, diag::ext_gnu_missing_equal_designator);"},{vc,419,"/// ParseInitializerWithPotentialDesignator - Parse the \'initializer\' production\n/// checking to see if the token stream starts with a designator.\n///\n/// C99:\n///\n/// designation:\n/// designator-list \'=\'\n/// [GNU] array-designator\n/// [GNU] identifier \':\'\n///\n/// designator-list:\n/// designator\n/// designator-list designator\n///\n/// designator:\n/// array-designator\n/// \'.\' identifier\n///\n/// array-designator:\n/// \'[\' constant-expression \']\'\n/// [GNU] \'[\' constant-expression \'...\' constant-expression \']\'\n///\n/// C++20:\n///\n/// designated-initializer-list:\n/// designated-initializer-clause\n/// designated-initializer-list \',\' designated-initializer-clause\n///\n/// designated-initializer-clause:\n/// designator brace-or-equal-initializer\n///\n/// designator:\n/// \'.\' identifier\n///\n/// We allow the C99 syntax extensions in C++20, but do not allow the C++20\n/// extension (a braced-init-list after the designator with no \'=\') in C99.\n///\n/// NOTE: [OBC] allows \'[ objc-receiver objc-message-args ]\' as an\n/// initializer (because it is an expression). We need to consider this case\n/// when parsing array designators.\n///\n/// \\p CodeCompleteCB is called with Designation parsed so far.\nExprResult Parser::ParseInitializerWithPotentialDesignator(DesignatorCompletionInfo DesignatorCompletion) {\n // We read some number of designators and found something that isn\'t an = or\n // an initializer. If we have exactly one array designator, this\n // is the GNU \'designation: array-designator\' extension. Otherwise, it is a\n // parse error.\n if (Desig.getNumDesignators() == 1 && (Desig.getDesignator(0).isArrayDesignator() || Desig.getDesignator(0).isArrayRangeDesignator())) {\n Diag(Tok, diag::ext_gnu_missing_equal_designator) << FixItHint::CreateInsertion(Tok.getLocation(), \"= \");"}} | ||
}, | }, | ||
["ext_gnu_old_style_field_designator"]={ | ["ext_gnu_old_style_field_designator"]={ | ||
Line 5,126: | Line 5,126: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{vc, | [j]={{vc,181,"/// ParseInitializerWithPotentialDesignator - Parse the \'initializer\' production\n/// checking to see if the token stream starts with a designator.\n///\n/// C99:\n///\n/// designation:\n/// designator-list \'=\'\n/// [GNU] array-designator\n/// [GNU] identifier \':\'\n///\n/// designator-list:\n/// designator\n/// designator-list designator\n///\n/// designator:\n/// array-designator\n/// \'.\' identifier\n///\n/// array-designator:\n/// \'[\' constant-expression \']\'\n/// [GNU] \'[\' constant-expression \'...\' constant-expression \']\'\n///\n/// C++20:\n///\n/// designated-initializer-list:\n/// designated-initializer-clause\n/// designated-initializer-list \',\' designated-initializer-clause\n///\n/// designated-initializer-clause:\n/// designator brace-or-equal-initializer\n///\n/// designator:\n/// \'.\' identifier\n///\n/// We allow the C99 syntax extensions in C++20, but do not allow the C++20\n/// extension (a braced-init-list after the designator with no \'=\') in C99.\n///\n/// NOTE: [OBC] allows \'[ objc-receiver objc-message-args ]\' as an\n/// initializer (because it is an expression). We need to consider this case\n/// when parsing array designators.\n///\n/// \\p CodeCompleteCB is called with Designation parsed so far.\nExprResult Parser::ParseInitializerWithPotentialDesignator(DesignatorCompletionInfo DesignatorCompletion) {\n // If this is the old-style GNU extension:\n // designation ::= identifier \':\'\n // Handle it as a field designator. Otherwise, this must be the start of a\n // normal expression.\n if (Tok.is(tok::identifier)) {\n Diag(NameLoc, diag::ext_gnu_old_style_field_designator) << FixItHint::CreateReplacement(SourceRange(NameLoc, ColonLoc), NewSyntax);"}} | ||
}, | }, | ||
["ext_gnu_ptr_func_arith"]={ | ["ext_gnu_ptr_func_arith"]={ | ||
Line 5,141: | Line 5,141: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,11499,"/// Diagnose invalid arithmetic on two function pointers.\nstatic void diagnoseArithmeticOnTwoFunctionPointers(Sema &S, SourceLocation Loc, Expr *LHS, Expr *RHS) {\n S.Diag(Loc, S.getLangOpts().CPlusPlus ? diag::err_typecheck_pointer_arith_function_type : diag::ext_gnu_ptr_func_arith) << 1 /* two pointers */"},{y,11519,"/// Diagnose invalid arithmetic on a function pointer.\nstatic void diagnoseArithmeticOnFunctionPointer(Sema &S, SourceLocation Loc, Expr *Pointer) {\n S.Diag(Loc, S.getLangOpts().CPlusPlus ? diag::err_typecheck_pointer_arith_function_type : diag::ext_gnu_ptr_func_arith) << 0 /* one pointer */ << Pointer->getType()->getPointeeType() << 0 /* one pointer, so only one type */"}} | ||
}, | }, | ||
["ext_gnu_statement_expr"]={ | ["ext_gnu_statement_expr"]={ | ||
Line 5,156: | Line 5,156: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{ub, | [j]={{ub,2933,"/// 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 Diag(Tok, OpenLoc.isMacroID() ? diag::ext_gnu_statement_expr_macro : diag::ext_gnu_statement_expr);"}} | ||
}, | }, | ||
["ext_gnu_statement_expr_macro"]={ | ["ext_gnu_statement_expr_macro"]={ | ||
Line 5,171: | Line 5,171: | ||
[h]=x, | [h]=x, | ||
[i]={"7689c7fc9e08",1653629944,"Create specialization of -Wgnu-statement-expression for expressions found in macros."}, | [i]={"7689c7fc9e08",1653629944,"Create specialization of -Wgnu-statement-expression for expressions found in macros."}, | ||
[j]={{ub, | [j]={{ub,2932,"/// 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 Diag(Tok, OpenLoc.isMacroID() ? diag::ext_gnu_statement_expr_macro : diag::ext_gnu_statement_expr);"}} | ||
}, | }, | ||
["ext_gnu_subscript_void_type"]={ | ["ext_gnu_subscript_void_type"]={ | ||
Line 5,186: | Line 5,186: | ||
[h]=m, | [h]=m, | ||
[i]={"4cc3f296a907",1309192347,"Cleanup a fixme by using a specific diagnostic for subscripting"}, | [i]={"4cc3f296a907",1309192347,"Cleanup a fixme by using a specific diagnostic for subscripting"}, | ||
[j]={{y, | [j]={{y,5981,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n if (ResultType->isVoidType() && !getLangOpts().CPlusPlus) {\n Diag(LLoc, diag::ext_gnu_subscript_void_type) << BaseExpr->getSourceRange();"}} | ||
}, | }, | ||
["ext_gnu_void_ptr"]={ | ["ext_gnu_void_ptr"]={ | ||
Line 5,201: | Line 5,201: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,11440,"static void diagnoseArithmeticOnTwoVoidPointers(Sema &S, SourceLocation Loc, Expr *LHSExpr, Expr *RHSExpr) { S.Diag(Loc, S.getLangOpts().CPlusPlus ? diag::err_typecheck_pointer_arith_void_type : diag::ext_gnu_void_ptr) << 1 /* two pointers */ << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); }"},{y,11453,"static void diagnoseArithmeticOnVoidPointer(Sema &S, SourceLocation Loc, Expr *Pointer) { S.Diag(Loc, S.getLangOpts().CPlusPlus ? diag::err_typecheck_pointer_arith_void_type : diag::ext_gnu_void_ptr) << 0 /* one pointer */ << Pointer->getSourceRange(); }"}} | ||
}, | }, | ||
["ext_goto_into_protected_scope"]={ | ["ext_goto_into_protected_scope"]={ | ||
Line 5,215: | Line 5,215: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{"clang/lib/Sema/JumpDiagnostics.cpp", | [j]={{"clang/lib/Sema/JumpDiagnostics.cpp",667,"/// VerifyJumps - Verify each element of the Jumps array to see if they are\n/// valid, emitting diagnostics if not.\nvoid JumpScopeChecker::VerifyJumps() {\n while (!Jumps.empty()) {\n // With a goto,\n if (GotoStmt *GS = dyn_cast<GotoStmt>(Jump)) {\n // The label may not have a statement if it\'s coming from inline MS ASM.\n if (GS->getLabel()->getStmt()) {\n CheckJump(GS, GS->getLabel()->getStmt(), GS->getGotoLoc(), diag::err_goto_into_protected_scope, diag::ext_goto_into_protected_scope, diag::warn_cxx98_compat_goto_into_protected_scope);"},{"clang/lib/Sema/JumpDiagnostics.cpp",695,"/// VerifyJumps - Verify each element of the Jumps array to see if they are\n/// valid, emitting diagnostics if not.\nvoid JumpScopeChecker::VerifyJumps() {\n while (!Jumps.empty()) {\n // We only get indirect gotos here when they have a constant target.\n if (IndirectGotoStmt *IGS = dyn_cast<IndirectGotoStmt>(Jump)) {\n CheckJump(IGS, Target->getStmt(), IGS->getGotoLoc(), diag::err_goto_into_protected_scope, diag::ext_goto_into_protected_scope, diag::warn_cxx98_compat_goto_into_protected_scope);"}} | ||
}, | }, | ||
["ext_hex_constant_invalid"]={ | ["ext_hex_constant_invalid"]={ | ||
Line 5,230: | Line 5,230: | ||
[h]=A, | [h]=A, | ||
[i]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17."}, | [i]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17."}, | ||
[j]={{cb, | [j]={{cb,1330,"/// ParseNumberStartingWithZero - This method is called when the first character\n/// of the number is found to be a zero. This means it is either an octal\n/// number (like \'04\') or a hex number (\'0x123a\') a binary number (\'0b1010\') or\n/// a floating point number (01239.123e4). Eat the prefix, determining the\n/// radix etc.\nvoid NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {\n // Handle a hex number like 0x1234.\n if ((c1 == \'x\' || c1 == \'X\') && (isHexDigit(s[1]) || s[1] == \'.\')) {\n // A binary exponent can appear with or with a \'.\'. If dotted, the\n // binary exponent is required.\n if (*s == \'p\' || *s == \'P\') {\n if (!LangOpts.HexFloats)\n Diags.Report(TokLoc, LangOpts.CPlusPlus ? diag::ext_hex_literal_invalid : diag::ext_hex_constant_invalid);"}} | ||
}, | }, | ||
["ext_hex_literal_invalid"]={ | ["ext_hex_literal_invalid"]={ | ||
Line 5,245: | Line 5,245: | ||
[h]=A, | [h]=A, | ||
[i]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17."}, | [i]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17."}, | ||
[j]={{cb, | [j]={{cb,1329,"/// ParseNumberStartingWithZero - This method is called when the first character\n/// of the number is found to be a zero. This means it is either an octal\n/// number (like \'04\') or a hex number (\'0x123a\') a binary number (\'0b1010\') or\n/// a floating point number (01239.123e4). Eat the prefix, determining the\n/// radix etc.\nvoid NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {\n // Handle a hex number like 0x1234.\n if ((c1 == \'x\' || c1 == \'X\') && (isHexDigit(s[1]) || s[1] == \'.\')) {\n // A binary exponent can appear with or with a \'.\'. If dotted, the\n // binary exponent is required.\n if (*s == \'p\' || *s == \'P\') {\n if (!LangOpts.HexFloats)\n Diags.Report(TokLoc, LangOpts.CPlusPlus ? diag::ext_hex_literal_invalid : diag::ext_hex_constant_invalid);"}} | ||
}, | }, | ||
["ext_hlsl_access_specifiers"]={ | ["ext_hlsl_access_specifiers"]={ | ||
Line 5,259: | Line 5,259: | ||
[h]=q, | [h]=q, | ||
[i]={"0d6b574b8717",1651158800,"[HLSL] Adjust access specifier behavior"}, | [i]={"0d6b574b8717",1651158800,"[HLSL] Adjust access specifier behavior"}, | ||
[j]={{L, | [j]={{L,2271,"/// ParseBaseSpecifier - Parse a C++ base-specifier. A base-specifier is\n/// one entry in the base class list of a class specifier, for example:\n/// class foo : public bar, virtual private baz {\n/// \'public bar\' and \'virtual private baz\' are each base-specifiers.\n///\n/// base-specifier: [C++ class.derived]\n/// attribute-specifier-seq[opt] base-type-specifier\n/// attribute-specifier-seq[opt] \'virtual\' access-specifier[opt]\n/// base-type-specifier\n/// attribute-specifier-seq[opt] access-specifier \'virtual\'[opt]\n/// base-type-specifier\nBaseResult Parser::ParseBaseSpecifier(Decl *ClassDecl) {\n if (Access != AS_none) {\n if (getLangOpts().HLSL)\n Diag(Tok.getLocation(), diag::ext_hlsl_access_specifiers);"},{L,3378,"Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclarationWithPragmas(AccessSpecifier &AS, ParsedAttributes &AccessAttrs, DeclSpec::TST TagType, Decl *TagDecl) {\n case tok::kw_protected: {\n if (getLangOpts().HLSL)\n Diag(Tok.getLocation(), diag::ext_hlsl_access_specifiers);"}} | ||
}, | }, | ||
["ext_ident_list_in_param"]={ | ["ext_ident_list_in_param"]={ | ||
Line 5,274: | Line 5,274: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{F, | [j]={{F,7218,"/// ParseFunctionDeclaratorIdentifierList - While parsing a function declarator\n/// we found a K&R-style identifier list instead of a typed parameter list.\n///\n/// After returning, ParamInfo will hold the parsed parameters.\n///\n/// identifier-list: [C99 6.7.5]\n/// identifier\n/// identifier-list \',\' identifier\n///\nvoid Parser::ParseFunctionDeclaratorIdentifierList(Declarator &D, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo) {\n // If there was no identifier specified for the declarator, either we are in\n // an abstract-declarator, or we are in a parameter declarator which was found\n // to be abstract. In abstract-declarators, identifier lists are not valid:\n // diagnose this.\n if (!D.getIdentifier())\n Diag(Tok, diag::ext_ident_list_in_param);"}} | ||
}, | }, | ||
["ext_imaginary_constant"]={ | ["ext_imaginary_constant"]={ | ||
Line 5,289: | Line 5,289: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{y, | [j]={{y,4279,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // If this is an imaginary literal, create the ImaginaryLiteral wrapper.\n if (Literal.isImaginary) {\n Diag(Tok.getLocation(), diag::ext_imaginary_constant);"}} | ||
}, | }, | ||
["ext_implicit_exception_spec_mismatch"]={ | ["ext_implicit_exception_spec_mismatch"]={ | ||
Line 5,303: | Line 5,303: | ||
[h]=m, | [h]=m, | ||
[i]={"66f3ac9d2197",1350721611,"Rework implementation of DR1492: Apply the resolution to operator delete too,"}, | [i]={"66f3ac9d2197",1350721611,"Rework implementation of DR1492: Apply the resolution to operator delete too,"}, | ||
[j]={{Bb, | [j]={{Bb,340,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // Check the types as written: they must match before any exception\n // specification adjustment is applied.\n if (!CheckEquivalentExceptionSpecImpl(*this, PDiag(DiagID), PDiag(diag::note_previous_declaration), Old->getType()->getAs<FunctionProtoType>(), Old->getLocation(), New->getType()->getAs<FunctionProtoType>(), New->getLocation(), &MissingExceptionSpecification, &MissingEmptyExceptionSpecification,\n // C++11 [except.spec]p4 [DR1492]:\n // If a declaration of a function has an implicit\n // exception-specification, other declarations of the function shall\n // not specify an exception-specification.\n if (getLangOpts().CPlusPlus11 && getLangOpts().CXXExceptions && hasImplicitExceptionSpec(Old) != hasImplicitExceptionSpec(New)) {\n Diag(New->getLocation(), diag::ext_implicit_exception_spec_mismatch) << hasImplicitExceptionSpec(Old);"}} | ||
}, | }, | ||
["ext_implicit_function_decl_c99"]={ | ["ext_implicit_function_decl_c99"]={ | ||
Line 5,317: | Line 5,317: | ||
[h]=m, | [h]=m, | ||
[i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | [i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | ||
[j]={{w, | [j]={{w,16053,"/// ImplicitlyDefineFunction - An undeclared identifier was used in a function\n/// call, forming a call to an implicitly defined function (per C99 6.5.1p2).\nNamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II, Scope *S) {\n if (II.getName().startswith(\"__builtin_\"))\n // OpenCL v2.0 s6.9.u - Implicit function declaration is not supported.\n else if (getLangOpts().C99)\n diag_id = diag::ext_implicit_function_decl_c99;"}} | ||
}, | }, | ||
["ext_implicit_lib_function_decl"]={ | ["ext_implicit_lib_function_decl"]={ | ||
Line 5,331: | Line 5,331: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{w, | [j]={{w,2468,"/// LazilyCreateBuiltin - The specified Builtin-ID was first used at\n/// file scope. lazily create a decl for it. ForRedeclaration is true\n/// if we\'re creating this built-in in anticipation of redeclaring the\n/// built-in.\nNamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc) {\n if (!ForRedeclaration && (Context.BuiltinInfo.isPredefinedLibFunction(ID) || Context.BuiltinInfo.isHeaderDependentFunction(ID))) {\n Diag(Loc, LangOpts.C99 ? diag::ext_implicit_lib_function_decl_c99 : diag::ext_implicit_lib_function_decl) << Context.BuiltinInfo.getName(ID) << R;"}} | ||
}, | }, | ||
["ext_implicit_lib_function_decl_c99"]={ | ["ext_implicit_lib_function_decl_c99"]={ | ||
Line 5,345: | Line 5,345: | ||
[h]=m, | [h]=m, | ||
[i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | [i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | ||
[j]={{w, | [j]={{w,2467,"/// LazilyCreateBuiltin - The specified Builtin-ID was first used at\n/// file scope. lazily create a decl for it. ForRedeclaration is true\n/// if we\'re creating this built-in in anticipation of redeclaring the\n/// built-in.\nNamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc) {\n if (!ForRedeclaration && (Context.BuiltinInfo.isPredefinedLibFunction(ID) || Context.BuiltinInfo.isHeaderDependentFunction(ID))) {\n Diag(Loc, LangOpts.C99 ? diag::ext_implicit_lib_function_decl_c99 : diag::ext_implicit_lib_function_decl) << Context.BuiltinInfo.getName(ID) << R;"}} | ||
}, | }, | ||
["ext_implicit_typename"]={ | ["ext_implicit_typename"]={ | ||
Line 5,359: | Line 5,359: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{w, | [j]={{w,374,"/// If the identifier refers to a type name within this scope,\n/// return the declaration of that type.\n///\n/// This routine performs ordinary name lookup of the identifier II\n/// within the given scope, with optional C++ scope specifier SS, to\n/// determine whether the name refers to a type. If so, returns an\n/// opaque pointer (actually a QualType) corresponding to that\n/// type. Otherwise, returns NULL.\nParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS, bool isClassName, bool HasTrailingDot, ParsedType ObjectTypePtr, bool IsCtorOrDtorName, bool WantNontrivialTypeSourceInfo, bool IsClassTemplateDeductionContext, ImplicitTypenameContext AllowImplicitTypename, IdentifierInfo **CorrectedII) {\n if (ObjectTypePtr) {\n } else if (SS && SS->isNotEmpty()) {\n if (!LookupCtx) {\n if (isDependentScopeSpecifier(*SS)) {\n if (IsImplicitTypename) {\n if (getLangOpts().CPlusPlus20)\n else\n Diag(QualifiedLoc, diag::ext_implicit_typename) << SS->getScopeRep() << II.getName() << FixItHint::CreateInsertion(QualifiedLoc, \"typename \");"},{E,4149,"TypeResult Sema::ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, bool IsCtorOrDtorName, bool IsClassName, ImplicitTypenameContext AllowImplicitTypename) {\n if (!IsCtorOrDtorName && !IsClassName && SS.isSet()) {\n // C++ [temp.res]p3:\n // A qualified-id that refers to a type and in which the\n // nested-name-specifier depends on a template-parameter (14.6.2)\n // shall be prefixed by the keyword typename to indicate that the\n // qualified-id denotes a type, forming an\n // elaborated-type-specifier (7.1.5.3).\n if (!LookupCtx && isDependentScopeSpecifier(SS)) {\n // C++2a relaxes some of those restrictions in [temp.res]p5.\n if (AllowImplicitTypename == ImplicitTypenameContext::Yes) {\n if (getLangOpts().CPlusPlus20)\n else\n Diag(SS.getBeginLoc(), diag::ext_implicit_typename) << SS.getScopeRep() << TemplateII->getName() << FixItHint::CreateInsertion(SS.getBeginLoc(), \"typename \");"}} | ||
}, | }, | ||
["ext_in_class_initializer_float_type"]={ | ["ext_in_class_initializer_float_type"]={ | ||
Line 5,373: | Line 5,373: | ||
[h]=m, | [h]=m, | ||
[i]={"db76892e72e4",1284160882,"Support in-class initialization of static const floating-point data members."}, | [i]={"db76892e72e4",1284160882,"Support in-class initialization of static const floating-point data members."}, | ||
[j]={{w, | [j]={{w,13521,"/// 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->isLocalVarDecl()) {\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n } else if (VDecl->isConstexpr()) {\n } else if (!DclT.isConstQualified()) {\n } else if (DclT->isIntegralOrEnumerationType()) {\n } else if (DclT->isFloatingType()) { // also permits complex, which is ok\n // In C++98, this is a GNU extension. In C++11, it is not, but we support\n // it anyway and provide a fixit to add the \'constexpr\'.\n if (getLangOpts().CPlusPlus11) {\n } else {\n Diag(VDecl->getLocation(), diag::ext_in_class_initializer_float_type) << DclT << Init->getSourceRange();"}} | ||
}, | }, | ||
["ext_in_class_initializer_float_type_cxx11"]={ | ["ext_in_class_initializer_float_type_cxx11"]={ | ||
Line 5,387: | Line 5,387: | ||
[h]=m, | [h]=m, | ||
[i]={"cf656385ea2d",1359087736,"Sync \'in class initialization of static const double\' extension up with GCC,"}, | [i]={"cf656385ea2d",1359087736,"Sync \'in class initialization of static const double\' extension up with GCC,"}, | ||
[j]={{w, | [j]={{w,13515,"/// 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->isLocalVarDecl()) {\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n } else if (VDecl->isConstexpr()) {\n } else if (!DclT.isConstQualified()) {\n } else if (DclT->isIntegralOrEnumerationType()) {\n } else if (DclT->isFloatingType()) { // also permits complex, which is ok\n // In C++98, this is a GNU extension. In C++11, it is not, but we support\n // it anyway and provide a fixit to add the \'constexpr\'.\n if (getLangOpts().CPlusPlus11) {\n Diag(VDecl->getLocation(), diag::ext_in_class_initializer_float_type_cxx11) << DclT << Init->getSourceRange();"}} | ||
}, | }, | ||
["ext_in_class_initializer_non_constant"]={ | ["ext_in_class_initializer_non_constant"]={ | ||
Line 5,402: | Line 5,402: | ||
[h]=m, | [h]=m, | ||
[i]={"9925ec8bf446",1308030389,"fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member"}, | [i]={"9925ec8bf446",1308030389,"fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member"}, | ||
[j]={{w, | [j]={{w,13499,"/// 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->isLocalVarDecl()) {\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n } else if (VDecl->isConstexpr()) {\n } else if (!DclT.isConstQualified()) {\n } else if (DclT->isIntegralOrEnumerationType()) {\n if (getLangOpts().CPlusPlus11 && DclT.isVolatileQualified())\n else if (Init->isValueDependent())\n else if (Init->isIntegerConstantExpr(Context, &Loc))\n else if (Init->getType()->isScopedEnumeralType() && Init->isCXX11ConstantExpr(Context))\n else if (Init->isEvaluatable(Context)) {\n Diag(Loc, diag::ext_in_class_initializer_non_constant) << Init->getSourceRange();"}} | ||
}, | }, | ||
["ext_incomplete_in_exception_spec"]={ | ["ext_incomplete_in_exception_spec"]={ | ||
Line 5,416: | Line 5,416: | ||
[h]=m, | [h]=m, | ||
[i]={"b2b0da4ad08d",1465583081,"[-fms-extensions] Permit incomplete types in dynamic exception specifications"}, | [i]={"b2b0da4ad08d",1465583081,"[-fms-extensions] Permit incomplete types in dynamic exception specifications"}, | ||
[j]={{Bb, | [j]={{Bb,168,"/// CheckSpecifiedExceptionType - Check if the given type is valid in an\n/// exception specification. Incomplete types, or pointers to incomplete types\n/// other than void are not allowed.\n///\n/// \\param[in,out] T The exception type. This will be decayed to a pointer type\n/// when the input is an array or a function type.\nbool Sema::CheckSpecifiedExceptionType(QualType &T, SourceRange Range) {\n if (getLangOpts().MSVCCompat) {\n DiagID = diag::ext_incomplete_in_exception_spec;"}} | ||
}, | }, | ||
["ext_increment_bool"]={ | ["ext_increment_bool"]={ | ||
Line 5,430: | Line 5,430: | ||
[h]=m, | [h]=m, | ||
[i]={"4a0cd893257d",1448504197,"P0002R1: increment on expressions of type bool is no longer allowed in C++1z."}, | [i]={"4a0cd893257d",1448504197,"P0002R1: increment on expressions of type bool is no longer allowed in C++1z."}, | ||
[j]={{y, | [j]={{y,14703,"/// CheckIncrementDecrementOperand - unlike most \"Check\" methods, this routine\n/// doesn\'t need to call UsualUnaryConversions or UsualArithmeticConversions.\nstatic QualType CheckIncrementDecrementOperand(Sema &S, Expr *Op, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation OpLoc, bool IsInc, bool IsPrefix) {\n if (S.getLangOpts().CPlusPlus && ResType->isBooleanType()) {\n S.Diag(OpLoc, S.getLangOpts().CPlusPlus17 ? diag::ext_increment_bool : diag::warn_increment_bool) << Op->getSourceRange();"}} | ||
}, | }, | ||
["ext_init_capture"]={ | ["ext_init_capture"]={ | ||
Line 5,444: | Line 5,444: | ||
[h]="Lambda Issue", | [h]="Lambda Issue", | ||
[i]={"5b013f505068",1380346707,"Add compat/extension warnings for init captures."}, | [i]={"5b013f505068",1380346707,"Add compat/extension warnings for init captures."}, | ||
[j]={{"clang/lib/Sema/SemaLambda.cpp", | [j]={{"clang/lib/Sema/SemaLambda.cpp",1072,"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->Init.isUsable()) {\n Diag(C->Loc, getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_init_capture : diag::ext_init_capture);"}} | ||
}, | }, | ||
["ext_init_capture_pack"]={ | ["ext_init_capture_pack"]={ | ||
Line 5,458: | Line 5,458: | ||
[h]="Lambda Issue", | [h]="Lambda Issue", | ||
[i]={"b2997f579a8b",1558469450,"[c++20] P0780R2: Support pack-expansion of init-captures."}, | [i]={"b2997f579a8b",1558469450,"[c++20] P0780R2: Support pack-expansion of init-captures."}, | ||
[j]={{"clang/lib/Sema/SemaLambda.cpp", | [j]={{"clang/lib/Sema/SemaLambda.cpp",729,"QualType Sema::buildLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, std::optional<unsigned> NumExpansions, IdentifierInfo *Id, bool IsDirectInit, Expr *&Init) {\n if (EllipsisLoc.isValid()) {\n if (Init->containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_init_capture_pack : diag::ext_init_capture_pack);"}} | ||
}, | }, | ||
["ext_init_from_predefined"]={ | ["ext_init_from_predefined"]={ | ||
Line 5,472: | Line 5,472: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{T, | [j]={{T,8619,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n if (S.getLangOpts().MicrosoftExt && Args.size() == 1 && isa<PredefinedExpr>(Args[0]) && Entity.getType()->isArrayType()) {\n S.Diag(Init->getBeginLoc(), diag::ext_init_from_predefined) << Init;"}} | ||
}, | }, | ||
["ext_init_list_constant_narrowing"]={ | ["ext_init_list_constant_narrowing"]={ | ||
Line 5,486: | Line 5,486: | ||
[h]=m, | [h]=m, | ||
[i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a"}, | [i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a"}, | ||
[j]={{T, | [j]={{T,10426,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n case NK_Constant_Narrowing:\n S.Diag(PostInit->getBeginLoc(), NarrowingErrs(S.getLangOpts()) ? diag::ext_init_list_constant_narrowing : diag::warn_init_list_constant_narrowing) << PostInit->getSourceRange() << ConstantValue.getAsString(S.getASTContext(), ConstantType) << EntityType.getLocalUnqualifiedType();"}} | ||
}, | }, | ||
["ext_init_list_type_narrowing"]={ | ["ext_init_list_type_narrowing"]={ | ||
Line 5,500: | Line 5,500: | ||
[h]=m, | [h]=m, | ||
[i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a"}, | [i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a"}, | ||
[j]={{T, | [j]={{T,10415,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n case NK_Type_Narrowing:\n S.Diag(PostInit->getBeginLoc(), NarrowingErrs(S.getLangOpts()) ? diag::ext_init_list_type_narrowing : diag::warn_init_list_type_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() << EntityType.getLocalUnqualifiedType();"}} | ||
}, | }, | ||
["ext_init_list_variable_narrowing"]={ | ["ext_init_list_variable_narrowing"]={ | ||
Line 5,514: | Line 5,514: | ||
[h]=m, | [h]=m, | ||
[i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a"}, | [i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a"}, | ||
[j]={{T, | [j]={{T,10437,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n case NK_Variable_Narrowing:\n S.Diag(PostInit->getBeginLoc(), NarrowingErrs(S.getLangOpts()) ? diag::ext_init_list_variable_narrowing : diag::warn_init_list_variable_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() << EntityType.getLocalUnqualifiedType();"}} | ||
}, | }, | ||
["ext_init_statement"]={ | ["ext_init_statement"]={ | ||
Line 5,528: | Line 5,528: | ||
[h]=x, | [h]=x, | ||
[i]={"fccb5128b201",1476822436,"Add missing warning for use of C++1z init-statements in C++14 and before."}, | [i]={"fccb5128b201",1476822436,"Add missing warning for use of C++1z init-statements in C++14 and before."}, | ||
[j]={{vb, | [j]={{vb,2075,"/// ParseCXXCondition - if/switch/while condition expression.\n///\n/// condition:\n/// expression\n/// type-specifier-seq declarator \'=\' assignment-expression\n/// [C++11] type-specifier-seq declarator \'=\' initializer-clause\n/// [C++11] type-specifier-seq declarator braced-init-list\n/// [Clang] type-specifier-seq ref-qualifier[opt] \'[\' identifier-list \']\'\n/// brace-or-equal-initializer\n/// [GNU] type-specifier-seq declarator simple-asm-expr[opt] attributes[opt]\n/// \'=\' assignment-expression\n///\n/// In C++1z, a condition may in some contexts be preceded by an\n/// optional init-statement. This function will parse that too.\n///\n/// \\param InitStmt If non-null, an init-statement is permitted, and if present\n/// will be parsed and stored here.\n///\n/// \\param Loc The location of the start of the statement that requires this\n/// condition, e.g., the \"for\" in a for loop.\n///\n/// \\param MissingOK Whether an empty condition is acceptable here. Otherwise\n/// it is considered an error to be recovered from.\n///\n/// \\param FRI If non-null, a for range declaration is permitted, and if\n/// present will be parsed and stored here, and a null result will be returned.\n///\n/// \\param EnterForConditionScope If true, enter a continue/break scope at the\n/// appropriate moment for a \'for\' loop.\n///\n/// \\returns The parsed condition.\nSema::ConditionResult Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, Sema::ConditionKind CK, bool MissingOK, ForRangeInfo *FRI, bool EnterForConditionScope) {\n const auto WarnOnInit = [this, &CK] { Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_init_statement : diag::ext_init_statement) << (CK == Sema::ConditionKind::Switch); };"}} | ||
}, | }, | ||
["ext_initializer_overrides"]={ | ["ext_initializer_overrides"]={ | ||
Line 5,542: | Line 5,542: | ||
[h]=m, | [h]=m, | ||
[i]={tc,1567205575,sc}, | [i]={tc,1567205575,sc}, | ||
[j]={{T, | [j]={{T,415,"/// Semantic checking for initializer lists.\n///\n/// The InitListChecker class contains a set of routines that each\n/// handle the initialization of a certain kind of entity, e.g.,\n/// arrays, vectors, struct/union types, scalars, etc. The\n/// InitListChecker itself performs a recursive walk of the subobject\n/// structure of the type to be initialized, while stepping through\n/// the initializer list one element at a time. The IList and Index\n/// parameters to each of the Check* routines contain the active\n/// (syntactic) initializer list and the index into that initializer\n/// list that represents the current initializer. Each routine is\n/// responsible for moving that Index forward as it consumes elements.\n///\n/// Each Check* routine also has a StructuredList/StructuredIndex\n/// arguments, which contains the current \"structured\" (semantic)\n/// initializer list and the index into that initializer list where we\n/// are copying initializers as we map them over to the semantic\n/// list. Once we have completed our recursive walk of the subobject\n/// structure, we will have constructed a full semantic initializer\n/// list.\n///\n/// C99 designators cause changes in the initializer list traversal,\n/// because they make the initialization \"jump\" into a specific\n/// subobject and then continue the initialization from that\n/// point. CheckDesignatedInitializer() recursively steps into the\n/// designated subobject and manages backing out the recursion to\n/// initialize the subobjects after the one designated.\n///\n/// If an initializer list contains any designators, we build a placeholder\n/// structured list even in \'verify only\' mode, so that we can track which\n/// elements need \'empty\' initializtion.\nclass InitListChecker {\n /// Diagnose that OldInit (or part thereof) has been overridden by NewInit.\n void diagnoseInitOverride(Expr *OldInit, SourceRange NewInitRange, bool UnionOverride = false, bool FullyOverwritten = true) {\n unsigned DiagID = SemaRef.getLangOpts().CPlusPlus ? (UnionOverride ? diag::ext_initializer_union_overrides : diag::ext_initializer_overrides) : diag::warn_initializer_overrides;"}} | ||
}, | }, | ||
["ext_initializer_string_for_char_array_too_long"]={ | ["ext_initializer_string_for_char_array_too_long"]={ | ||
Line 5,556: | Line 5,556: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{T, | [j]={{T,258,"static void CheckStringInit(Expr *Str, QualType &DeclT, const ArrayType *AT, Sema &S) {\n // We have an array of character type with known size. However,\n // the size may be smaller or larger than the string we are initializing.\n // FIXME: Avoid truncation for 64-bit length strings.\n if (S.getLangOpts().CPlusPlus) {\n } else {\n // C99 6.7.8p14.\n if (StrLength - 1 > CAT->getSize().getZExtValue())\n S.Diag(Str->getBeginLoc(), diag::ext_initializer_string_for_char_array_too_long) << Str->getSourceRange();"}} | ||
}, | }, | ||
["ext_initializer_union_overrides"]={ | ["ext_initializer_union_overrides"]={ | ||
Line 5,570: | Line 5,570: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{T, | [j]={{T,414,"/// Semantic checking for initializer lists.\n///\n/// The InitListChecker class contains a set of routines that each\n/// handle the initialization of a certain kind of entity, e.g.,\n/// arrays, vectors, struct/union types, scalars, etc. The\n/// InitListChecker itself performs a recursive walk of the subobject\n/// structure of the type to be initialized, while stepping through\n/// the initializer list one element at a time. The IList and Index\n/// parameters to each of the Check* routines contain the active\n/// (syntactic) initializer list and the index into that initializer\n/// list that represents the current initializer. Each routine is\n/// responsible for moving that Index forward as it consumes elements.\n///\n/// Each Check* routine also has a StructuredList/StructuredIndex\n/// arguments, which contains the current \"structured\" (semantic)\n/// initializer list and the index into that initializer list where we\n/// are copying initializers as we map them over to the semantic\n/// list. Once we have completed our recursive walk of the subobject\n/// structure, we will have constructed a full semantic initializer\n/// list.\n///\n/// C99 designators cause changes in the initializer list traversal,\n/// because they make the initialization \"jump\" into a specific\n/// subobject and then continue the initialization from that\n/// point. CheckDesignatedInitializer() recursively steps into the\n/// designated subobject and manages backing out the recursion to\n/// initialize the subobjects after the one designated.\n///\n/// If an initializer list contains any designators, we build a placeholder\n/// structured list even in \'verify only\' mode, so that we can track which\n/// elements need \'empty\' initializtion.\nclass InitListChecker {\n /// Diagnose that OldInit (or part thereof) has been overridden by NewInit.\n void diagnoseInitOverride(Expr *OldInit, SourceRange NewInitRange, bool UnionOverride = false, bool FullyOverwritten = true) {\n unsigned DiagID = SemaRef.getLangOpts().CPlusPlus ? (UnionOverride ? diag::ext_initializer_union_overrides : diag::ext_initializer_overrides) : diag::warn_initializer_overrides;"}} | ||
}, | }, | ||
["ext_inline_namespace"]={ | ["ext_inline_namespace"]={ | ||
Line 5,584: | Line 5,584: | ||
[h]=x, | [h]=x, | ||
[i]={"5a5f2c76b6f7",1283215005,"Enable inline namespaces in C++03 as an extension."}, | [i]={"5a5f2c76b6f7",1283215005,"Enable inline namespaces in C++03 as an extension."}, | ||
[j]={{L, | [j]={{L,225,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // If we\'re still good, complain about inline namespaces in non-C++0x now.\n if (InlineLoc.isValid())\n Diag(InlineLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_inline_namespace : diag::ext_inline_namespace);"}} | ||
}, | }, | ||
["ext_inline_nested_namespace_definition"]={ | ["ext_inline_nested_namespace_definition"]={ | ||
Line 5,598: | Line 5,598: | ||
[h]=x, | [h]=x, | ||
[i]={"53f391dcb323",1542043188,"Implement P1094R2 (nested inline namespaces)"}, | [i]={"53f391dcb323",1542043188,"Implement P1094R2 (nested inline namespaces)"}, | ||
[j]={{L, | [j]={{L,183,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n if (ExtraNSs.empty()) {\n } else if (InlineLoc.isValid()) {\n } else if (getLangOpts().CPlusPlus20) {\n } else if (getLangOpts().CPlusPlus17) {\n if (FirstNestedInlineLoc.isValid())\n Diag(FirstNestedInlineLoc, diag::ext_inline_nested_namespace_definition);"},{L,218,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n if (ExtraNSs.empty()) {\n } else if (InlineLoc.isValid()) {\n } else if (getLangOpts().CPlusPlus20) {\n } else if (getLangOpts().CPlusPlus17) {\n } else {\n // Warn about nested inline namespaces.\n if (FirstNestedInlineLoc.isValid())\n Diag(FirstNestedInlineLoc, diag::ext_inline_nested_namespace_definition);"}} | ||
}, | }, | ||
["ext_inline_variable"]={ | ["ext_inline_variable"]={ | ||
Line 5,612: | Line 5,612: | ||
[h]=m, | [h]=m, | ||
[i]={"62f19e700d31",1466813756,"Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a"}, | [i]={"62f19e700d31",1466813756,"Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a"}, | ||
[j]={{w, | [j]={{w,7732,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n if (D.getDeclSpec().isInlineSpecified()) {\n if (!getLangOpts().CPlusPlus) {\n } else if (CurContext->isFunctionOrMethod()) {\n } else {\n Diag(D.getDeclSpec().getInlineSpecLoc(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_inline_variable : diag::ext_inline_variable);"}} | ||
}, | }, | ||
["ext_integer_complement_complex"]={ | ["ext_integer_complement_complex"]={ | ||
Line 5,627: | Line 5,627: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,16246,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n case UO_Not: // bitwise complement\n // C99 6.5.3.3p1. We allow complex int and float as a GCC extension.\n if (resultType->isComplexType() || resultType->isComplexIntegerType())\n Diag(OpLoc, diag::ext_integer_complement_complex) << resultType << Input.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_integer_complex"]={ | ["ext_integer_complex"]={ | ||
Line 5,642: | Line 5,642: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{pc, | [j]={{pc,1316,"/// Finish - This does final analysis of the declspec, rejecting things like\n/// \"_Imaginary\" (lacking an FP type). After calling this method, DeclSpec is\n/// guaranteed to be self-consistent, even if an error occurred.\nvoid DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {\n // TODO: if the implementation does not implement _Complex or _Imaginary,\n // disallow their use. Need information about the backend.\n if (TypeSpecComplex != TSC_unspecified) {\n if (TypeSpecType == TST_unspecified) {\n } else if (TypeSpecType == TST_int || TypeSpecType == TST_char || TypeSpecType == TST_bitint) {\n // Note that this intentionally doesn\'t include _Complex _Bool.\n if (!S.getLangOpts().CPlusPlus)\n S.Diag(TSTLoc, diag::ext_integer_complex);"}} | ||
}, | }, | ||
["ext_integer_increment_complex"]={ | ["ext_integer_increment_complex"]={ | ||
Line 5,657: | Line 5,657: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,14740,"/// CheckIncrementDecrementOperand - unlike most \"Check\" methods, this routine\n/// doesn\'t need to call UsualUnaryConversions or UsualArithmeticConversions.\nstatic QualType CheckIncrementDecrementOperand(Sema &S, Expr *Op, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation OpLoc, bool IsInc, bool IsPrefix) {\n if (S.getLangOpts().CPlusPlus && ResType->isBooleanType()) {\n } else if (S.getLangOpts().CPlusPlus && ResType->isEnumeralType()) {\n } else if (ResType->isRealType()) {\n } else if (ResType->isPointerType()) {\n } else if (ResType->isObjCObjectPointerType()) {\n } else if (ResType->isAnyComplexType()) {\n S.Diag(OpLoc, diag::ext_integer_increment_complex) << ResType << Op->getSourceRange();"}} | ||
}, | }, | ||
["ext_integer_literal_too_large_for_signed"]={ | ["ext_integer_literal_too_large_for_signed"]={ | ||
Line 5,671: | Line 5,671: | ||
[h]=q, | [h]=q, | ||
[i]={"31f42318d833",1406213483,"Improving the \"integer constant too large\" diagnostics based on post-commit feedback from Richard Sm..."}, | [i]={"31f42318d833",1406213483,"Improving the \"integer constant too large\" diagnostics based on post-commit feedback from Richard Sm..."}, | ||
[j]={{rc, | [j]={{rc,363,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n case tok::numeric_constant: {\n // Parse the integer literal into Result.\n if (Literal.GetIntegerValue(Result.Val)) {\n } else {\n // Detect overflow based on whether the value is signed. If signed\n // and if the value is too large, emit a warning \"integer constant is so\n // large that it is unsigned\" e.g. on 12345678901234567890 where intmax_t\n // is 64-bits.\n if (!Literal.isUnsigned && Result.Val.isNegative()) {\n // Octal, hexadecimal, and binary literals are implicitly unsigned if\n // the value does not fit into a signed integer type.\n if (ValueLive && Literal.getRadix() == 10)\n PP.Diag(PeekTok, diag::ext_integer_literal_too_large_for_signed);"},{y,4257,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n if (Literal.isFixedPointLiteral()) {\n } else if (Literal.isFloatingLiteral()) {\n } else if (!Literal.isIntegerLiteral()) {\n } else {\n if (Literal.GetIntegerValue(ResultVal)) {\n } else {\n // If we still couldn\'t decide a type, we either have \'size_t\' literal\n // that is out of range, or a decimal literal that does not fit in a\n // signed long long and has no U suffix.\n if (Ty.isNull()) {\n if (Literal.isSizeT)\n else\n Diag(Tok.getLocation(), diag::ext_integer_literal_too_large_for_signed);"}} | ||
}, | }, | ||
["ext_internal_in_extern_inline"]={ | ["ext_internal_in_extern_inline"]={ | ||
Line 5,685: | Line 5,685: | ||
[h]=m, | [h]=m, | ||
[i]={"edff0200115c",1340041798,"Allow internal decls in inline functions if the function is in the main file."}, | [i]={"edff0200115c",1340041798,"Allow internal decls in inline functions if the function is in the main file."}, | ||
[j]={{y, | [j]={{y,192,"/// Check whether we\'re in an extern inline function and referring to a\n/// variable or function with internal linkage (C11 6.7.4p3).\n///\n/// This is only a warning because we used to silently accept this code, but\n/// in many cases it will not behave correctly. This is not enabled in C++ mode\n/// because the restriction language is a bit weaker (C++11 [basic.def.odr]p6)\n/// and so while there may still be user mistakes, most of the time we can\'t\n/// prove that there are errors.\nstatic void diagnoseUseOfInternalDeclInInlineFunction(Sema &S, const NamedDecl *D, SourceLocation Loc) {\n S.Diag(Loc, DowngradeWarning ? diag::ext_internal_in_extern_inline_quiet : diag::ext_internal_in_extern_inline) << /*IsVar=*/!UsedFn << D;"}} | ||
}, | }, | ||
["ext_internal_in_extern_inline_quiet"]={ | ["ext_internal_in_extern_inline_quiet"]={ | ||
Line 5,700: | Line 5,700: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{y, | [j]={{y,191,"/// Check whether we\'re in an extern inline function and referring to a\n/// variable or function with internal linkage (C11 6.7.4p3).\n///\n/// This is only a warning because we used to silently accept this code, but\n/// in many cases it will not behave correctly. This is not enabled in C++ mode\n/// because the restriction language is a bit weaker (C++11 [basic.def.odr]p6)\n/// and so while there may still be user mistakes, most of the time we can\'t\n/// prove that there are errors.\nstatic void diagnoseUseOfInternalDeclInInlineFunction(Sema &S, const NamedDecl *D, SourceLocation Loc) {\n S.Diag(Loc, DowngradeWarning ? diag::ext_internal_in_extern_inline_quiet : diag::ext_internal_in_extern_inline) << /*IsVar=*/!UsedFn << D;"}} | ||
}, | }, | ||
["ext_keyword_as_ident"]={ | ["ext_keyword_as_ident"]={ | ||
Line 5,714: | Line 5,714: | ||
[h]=x, | [h]=x, | ||
[i]={"47642d2b7ea1",1386051181,"Emit an extension warning when changing system header tokens"}, | [i]={"47642d2b7ea1",1386051181,"Emit an extension warning when changing system header tokens"}, | ||
[j]={{ub, | [j]={{ub,1770,"#include \"clang/Basic/TransformTypeTraits.def\"\n // HACK: libstdc++ uses some of the transform-type-traits as alias\n // templates, so we need to work around this.\n if (!NextToken().is(tok::l_paren)) {\n Diag(Tok, diag::ext_keyword_as_ident) << Tok.getIdentifierInfo()->getName() << 0;"},{vb,3134,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (!NextToken().is(tok::l_paren)) {\n Diag(Tok, diag::ext_keyword_as_ident) << Tok.getIdentifierInfo()->getName() << 0;"},{wb,1915,"bool Parser::TryKeywordIdentFallback(bool DisableKeyword) {\n Diag(Tok, diag::ext_keyword_as_ident) << PP.getSpelling(Tok) << DisableKeyword;"},{xb,274,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (NextToken().is(tok::less)) {\n Diag(Tok, diag::ext_keyword_as_ident) << Tok.getIdentifierInfo()->getName() << 0;"}} | ||
}, | }, | ||
["ext_lambda_missing_parens"]={ | ["ext_lambda_missing_parens"]={ | ||
Line 5,728: | Line 5,728: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{vb, | [j]={{vb,1511,"/// ParseLambdaExpressionAfterIntroducer - Parse the rest of a lambda\n/// expression.\nExprResult Parser::ParseLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro) {\n if (HasSpecifiers && !HasParentheses && !getLangOpts().CPlusPlus23) {\n Diag(Tok, diag::ext_lambda_missing_parens) << FixItHint::CreateInsertion(Tok.getLocation(), \"() \");"}} | ||
}, | }, | ||
["ext_lambda_template_parameter_list"]={ | ["ext_lambda_template_parameter_list"]={ | ||
Line 5,742: | Line 5,742: | ||
[h]=x, | [h]=x, | ||
[i]={"8205a814a691",1556966986,"[c++20] Implement P0428R2 - Familiar template syntax for generic lambdas"}, | [i]={"8205a814a691",1556966986,"[c++20] Implement P0428R2 - Familiar template syntax for generic lambdas"}, | ||
[j]={{vb, | [j]={{vb,1331,"/// ParseLambdaExpressionAfterIntroducer - Parse the rest of a lambda\n/// expression.\nExprResult Parser::ParseLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro) {\n if (Tok.is(tok::less)) {\n Diag(Tok, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_lambda_template_parameter_list : diag::ext_lambda_template_parameter_list);"}} | ||
}, | }, | ||
["ext_line_comment"]={ | ["ext_line_comment"]={ | ||
Line 5,757: | Line 5,757: | ||
[h]=A, | [h]=A, | ||
[i]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/"}, | [i]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/"}, | ||
[j]={{Z, | [j]={{Z,2444,"/// 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 // If Line comments aren\'t explicitly enabled for this language, emit an\n // extension warning.\n if (!LineComment) {\n if (!isLexingRawMode()) // There\'s no PP in raw mode, so can\'t emit diags.\n Diag(BufferPtr, diag::ext_line_comment);"}} | ||
}, | }, | ||
["ext_main_returns_nonint"]={ | ["ext_main_returns_nonint"]={ | ||
Line 5,771: | Line 5,771: | ||
[h]=m, | [h]=m, | ||
[i]={"5ed3caf2e364",1329249052,"Warn about non-int main() results in GNU C mode instead of erroring."}, | [i]={"5ed3caf2e364",1329249052,"Warn about non-int main() results in GNU C mode instead of erroring."}, | ||
[j]={{w, | [j]={{w,12128,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n if (getLangOpts().GNUMode && !getLangOpts().CPlusPlus) {\n // GCC in C mode accepts qualified \'int\'.\n if (Context.hasSameUnqualifiedType(FT->getReturnType(), Context.IntTy))\n else {\n Diag(FD->getTypeSpecStartLoc(), diag::ext_main_returns_nonint);"}} | ||
}, | }, | ||
["ext_main_used"]={ | ["ext_main_used"]={ | ||
Line 5,786: | Line 5,786: | ||
[h]=m, | [h]=m, | ||
[i]={"b63b6ee9a00e",1390354999,"Enforce restrictions that \'main\' is not allowed to be deleted, or to be used by"}, | [i]={"b63b6ee9a00e",1390354999,"Enforce restrictions that \'main\' is not allowed to be deleted, or to be used by"}, | ||
[j]={{y, | [j]={{y,249,"/// 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 if (getLangOpts().CPlusPlus && isa<FunctionDecl>(D)) {\n // C++ [basic.start.main]p3:\n // The function \'main\' shall not be used within a program.\n if (cast<FunctionDecl>(D)->isMain())\n Diag(Loc, diag::ext_main_used);"}} | ||
}, | }, | ||
["ext_many_braces_around_init"]={ | ["ext_many_braces_around_init"]={ | ||
Line 5,800: | Line 5,800: | ||
[h]=m, | [h]=m, | ||
[i]={Kb,1576908663,Ib}, | [i]={Kb,1576908663,Ib}, | ||
[j]={{T, | [j]={{T,1655,"void InitListChecker::CheckScalarType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n if (InitListExpr *SubIList = dyn_cast<InitListExpr>(expr)) {\n // FIXME: This is invalid, and accepting it causes overload resolution\n // to pick the wrong overload in some corner cases.\n if (!VerifyOnly)\n SemaRef.Diag(SubIList->getBeginLoc(), diag::ext_many_braces_around_init) << DeclType->isSizelessBuiltinType() << SubIList->getSourceRange();"}} | ||
}, | }, | ||
["ext_mathematical_notation"]={ | ["ext_mathematical_notation"]={ | ||
Line 5,814: | Line 5,814: | ||
[h]=A, | [h]=A, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{Z, | [j]={{Z,1556,"static void diagnoseExtensionInIdentifier(DiagnosticsEngine &Diags, uint32_t C, CharSourceRange Range) {\n Diags.Report(Range.getBegin(), diag::ext_mathematical_notation) << codepointAsHexString(C) << Range;"}} | ||
}, | }, | ||
["ext_member_redeclared"]={ | ["ext_member_redeclared"]={ | ||
Line 5,828: | Line 5,828: | ||
[h]=m, | [h]=m, | ||
[i]={"55890bfaa6c2",1370922683,"Implement DR85: Redeclaration of member is forbidden"}, | [i]={"55890bfaa6c2",1370922683,"Implement DR85: Redeclaration of member is forbidden"}, | ||
[j]={{w, | [j]={{w,17285,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n if (!Previous.empty()) {\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // If this is a use of a previous tag, or if the tag is already declared\n // in the same scope (so that the definition/declaration completes or\n // rementions the tag), reuse the decl.\n if (TUK == TUK_Reference || TUK == TUK_Friend || isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // C++11 [class.mem]p1:\n // A member shall not be declared twice in the member-specification,\n // except that a nested class or member class template can be declared\n // and then later defined.\n if (TUK == TUK_Declaration && PrevDecl->isCXXClassMember() && S->isDeclScope(PrevDecl)) {\n Diag(NameLoc, diag::ext_member_redeclared);"}} | ||
}, | }, | ||
["ext_mismatched_exception_spec"]={ | ["ext_mismatched_exception_spec"]={ | ||
Line 5,842: | Line 5,842: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{Bb, | [j]={{Bb,314,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n if (getLangOpts().MSVCCompat) {\n DiagID = diag::ext_mismatched_exception_spec;"},{Bb,506,"/// CheckEquivalentExceptionSpec - Check if the two types have equivalent\n/// exception specifications. Exception specifications are equivalent if\n/// they allow exactly the same set of exception types. It does not matter how\n/// that is achieved. See C++ [except.spec]p2.\nbool Sema::CheckEquivalentExceptionSpec(const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc) {\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_mismatched_exception_spec;"}} | ||
}, | }, | ||
["ext_mismatched_exception_spec_explicit_instantiation"]={ | ["ext_mismatched_exception_spec_explicit_instantiation"]={ | ||
Line 5,856: | Line 5,856: | ||
[h]=m, | [h]=m, | ||
[i]={"73983918c45b",1415268650,"Fix for exception specification mismatch in explicit instantiation."}, | [i]={"73983918c45b",1415268650,"Fix for exception specification mismatch in explicit instantiation."}, | ||
[j]={{E, | [j]={{E,10669,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // C++11 [except.spec]p4\n // In an explicit instantiation an exception-specification may be specified,\n // but is not required.\n // If an exception-specification is specified in an explicit instantiation\n // directive, it shall be compatible with the exception-specifications of\n // other declarations of that function.\n if (auto *FPT = R->getAs<FunctionProtoType>())\n if (FPT->hasExceptionSpec()) {\n if (getLangOpts().MicrosoftExt)\n DiagID = diag::ext_mismatched_exception_spec_explicit_instantiation;"}} | ||
}, | }, | ||
["ext_missing_exception_specification"]={ | ["ext_missing_exception_specification"]={ | ||
Line 5,870: | Line 5,870: | ||
[h]=m, | [h]=m, | ||
[i]={"a91de375f278",1443574130,"Promote a warning on ill-formed code (redeclaration missing an exception"}, | [i]={"a91de375f278",1443574130,"Promote a warning on ill-formed code (redeclaration missing an exception"}, | ||
[j]={{Bb, | [j]={{Bb,401,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n DiagID = diag::ext_missing_exception_specification;"},{Bb,407,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n } else if (New->isReplaceableGlobalAllocationFunction() && ESI.Type != EST_DependentNoexcept) {\n DiagID = diag::ext_missing_exception_specification;"},{Bb,416,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n } else if (New->isReplaceableGlobalAllocationFunction() && ESI.Type != EST_DependentNoexcept) {\n } else if (ESI.Type == EST_NoThrow) {\n DiagID = diag::ext_missing_exception_specification;"}} | ||
}, | }, | ||
["ext_missing_type_specifier"]={ | ["ext_missing_type_specifier"]={ | ||
Line 5,884: | Line 5,884: | ||
[h]=m, | [h]=m, | ||
[i]={"aef810900a7a",1244031721,"Minor cleanup for implicit int warnings."}, | [i]={"aef810900a7a",1244031721,"Minor cleanup for implicit int warnings."}, | ||
[j]={{R, | [j]={{R,1384,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n case DeclSpec::TST_unspecified:\n // Unspecified typespec defaults to int in C90. However, the C90 grammar\n // [C90 6.5] only allows a decl-spec if there was *some* type-specifier,\n // type-qualifier, or storage-class-specifier. If not, emit an extwarn.\n // Note that the one exception to this is function definitions, which are\n // allowed to be completely missing a declspec. This is handled in the\n // parser already though by it pretending to have seen an \'int\' in this\n // case.\n if (S.getLangOpts().isImplicitIntRequired()) {\n } else if (!DS.hasTypeSpecifier()) {\n // C99 and C++ require a type specifier. For example, C99 6.7.2p2 says:\n // \"At least one type specifier shall be given in the declaration\n // specifiers in each declaration, and in the specifier-qualifier list in\n // each struct declaration and type name.\"\n if (!S.getLangOpts().isImplicitIntAllowed() && !DS.isTypeSpecPipe()) {\n } else if (S.getLangOpts().getOpenCLCompatibleVersion() >= 200 && DS.isTypeSpecPipe()) {\n } else {\n S.Diag(DeclLoc, diag::ext_missing_type_specifier) << DS.getSourceRange() << FixItHint::CreateInsertion(DS.getBeginLoc(), \"int\");"}} | ||
}, | }, | ||
["ext_missing_varargs_arg"]={ | ["ext_missing_varargs_arg"]={ | ||
Line 5,899: | Line 5,899: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{"clang/lib/Lex/PPMacroExpansion.cpp", | [j]={{"clang/lib/Lex/PPMacroExpansion.cpp",1001,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n if (NumActuals < MinArgsExpected) {\n // There are several cases where too few arguments is ok, handle them now.\n if (NumActuals == 0 && MinArgsExpected == 1) {\n } else if ((FoundElidedComma || MI->isVariadic()) && (NumActuals + 1 == MinArgsExpected || // A(x, ...) -> A(X)\n // Varargs where the named vararg parameter is missing: OK as extension.\n // #define A(x, ...)\n // A(\"blah\")\n //\n // If the macro contains the comma pasting extension, the diagnostic\n // is suppressed; we know we\'ll get another diagnostic later.\n if (!MI->hasCommaPasting()) {\n Diag(Tok, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_missing_varargs_arg : diag::ext_missing_varargs_arg);"}} | ||
}, | }, | ||
["ext_missing_whitespace_after_macro_name"]={ | ["ext_missing_whitespace_after_macro_name"]={ | ||
Line 5,911: | Line 5,911: | ||
[h]=A, | [h]=A, | ||
[i]={"2425bcb49ae4",1240021405,"enforce requirements imposed by C90 6.8 TC1, fixing PR3919."}, | [i]={"2425bcb49ae4",1240021405,"enforce requirements imposed by C90 6.8 TC1, fixing PR3919."}, | ||
[j]={{W, | [j]={{W,2875,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // If this is a function-like macro definition, parse the argument list,\n // marking each of the identifiers as being used as macro arguments. Also,\n // check other constraints on the first token of the macro body.\n if (Tok.is(tok::eod)) {\n } else if (Tok.hasLeadingSpace()) {\n } else if (Tok.is(tok::l_paren)) {\n } else if (LangOpts.C99 || LangOpts.CPlusPlus11) {\n } else {\n if (isInvalid)\n Diag(Tok, diag::ext_missing_whitespace_after_macro_name);"}} | ||
}, | }, | ||
["ext_mixed_decls_code"]={ | ["ext_mixed_decls_code"]={ | ||
Line 5,926: | Line 5,926: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{Ob, | [j]={{Ob,420,"StmtResult Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R, ArrayRef<Stmt *> Elts, bool isStmtExpr) {\n const unsigned MixedDeclsCodeID = getLangOpts().C99 ? diag::warn_mixed_decls_code : diag::ext_mixed_decls_code;"}} | ||
}, | }, | ||
["ext_module_import_in_extern_c"]={ | ["ext_module_import_in_extern_c"]={ | ||
Line 5,940: | Line 5,940: | ||
[h]=xc, | [h]=xc, | ||
[i]={"e69bdd10ead6",1444696780,"[modules] Allow the error on importing a C++ module within an extern \"C\""}, | [i]={"e69bdd10ead6",1444696780,"[modules] Allow the error on importing a C++ module within an extern \"C\""}, | ||
[j]={{"clang/lib/Sema/SemaModule.cpp", | [j]={{"clang/lib/Sema/SemaModule.cpp",54,"static void checkModuleImportContext(Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude = false) {\n if (!isa<TranslationUnitDecl>(DC)) {\n } else if (!M->IsExternC && ExternCLoc.isValid()) {\n S.Diag(ImportLoc, diag::ext_module_import_in_extern_c) << M->getFullModuleName();"}} | ||
}, | }, | ||
["ext_module_import_not_at_top_level_noop"]={ | ["ext_module_import_not_at_top_level_noop"]={ | ||
Line 5,954: | Line 5,954: | ||
[h]=xc, | [h]=xc, | ||
[i]={"752ada870d7b",1447803121,"[modules] When a #include is mapped to a module import and appears somewhere"}, | [i]={"752ada870d7b",1447803121,"[modules] When a #include is mapped to a module import and appears somewhere"}, | ||
[j]={{"clang/lib/Sema/SemaModule.cpp", | [j]={{"clang/lib/Sema/SemaModule.cpp",47,"static void checkModuleImportContext(Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude = false) {\n if (!isa<TranslationUnitDecl>(DC)) {\n S.Diag(ImportLoc, (FromInclude && S.isModuleVisible(M)) ? diag::ext_module_import_not_at_top_level_noop : diag::err_module_import_not_at_top_level_fatal) << M->getFullModuleName() << DC;"}} | ||
}, | }, | ||
["ext_ms_abstract_keyword"]={ | ["ext_ms_abstract_keyword"]={ | ||
Line 5,968: | Line 5,968: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{L, | [j]={{L,2467,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n } else if (Specifier == VirtSpecifiers::VS_Abstract) {\n Diag(Tok.getLocation(), diag::ext_ms_abstract_keyword);"},{L,3534,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n if (TagType == DeclSpec::TST_interface)\n else if (Specifier == VirtSpecifiers::VS_Final)\n else if (Specifier == VirtSpecifiers::VS_Sealed)\n else if (Specifier == VirtSpecifiers::VS_Abstract)\n Diag(AbstractLoc, diag::ext_ms_abstract_keyword);"}} | ||
}, | }, | ||
["ext_ms_ambiguous_direct_base"]={ | ["ext_ms_ambiguous_direct_base"]={ | ||
Line 5,982: | Line 5,982: | ||
[h]=m, | [h]=m, | ||
[i]={"2e87a21c7cac",1509144521,"[MS] Allow access to ambiguous, inaccessible direct bases"}, | [i]={"2e87a21c7cac",1509144521,"[MS] Allow access to ambiguous, inaccessible direct bases"}, | ||
[j]={{z, | [j]={{z,3108,"/// CheckDerivedToBaseConversion - Check whether the Derived-to-Base\n/// conversion (where Derived and Base are class types) is\n/// well-formed, meaning that the conversion is unambiguous (and\n/// that all of the base classes are accessible). Returns true\n/// and emits a diagnostic if the code is ill-formed, returns false\n/// otherwise. Loc is the location where this routine should point to\n/// if there is an error, and Range is the source range to highlight\n/// if there is an error.\n///\n/// If either InaccessibleBaseID or AmbiguousBaseConvID are 0, then the\n/// diagnostic for the respective type of error will be suppressed, but the\n/// check for ill-formed code will still be performed.\nbool Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base, unsigned InaccessibleBaseID, unsigned AmbiguousBaseConvID, SourceLocation Loc, SourceRange Range, DeclarationName Name, CXXCastPath *BasePath, bool IgnoreAccess) {\n // For MSVC compatibility, check if Derived directly inherits from Base. Clang\n // warns about this hierarchy under -Winaccessible-base, but MSVC allows the\n // user to access such bases.\n if (!Path && getLangOpts().MSVCCompat) {\n for (const CXXBasePath &PossiblePath : Paths) {\n if (PossiblePath.size() == 1) {\n if (AmbiguousBaseConvID)\n Diag(Loc, diag::ext_ms_ambiguous_direct_base) << Base << Derived << Range;"}} | ||
}, | }, | ||
["ext_ms_anonymous_record"]={ | ["ext_ms_anonymous_record"]={ | ||
Line 5,996: | Line 5,996: | ||
[h]=m, | [h]=m, | ||
[i]={"8f0ed914902f",1407742194,"Sema: Handle declspecs without declarators in records properly in C mode"}, | [i]={"8f0ed914902f",1407742194,"Sema: Handle declspecs without declarators in records properly in C mode"}, | ||
[j]={{w, | [j]={{w,5215,"/// 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 // C11 6.7.2.1p2:\n // A struct-declaration that does not declare an anonymous structure or\n // anonymous union shall contain a struct-declarator-list.\n //\n // This rule also existed in C89 and C99; the grammar for struct-declaration\n // did not permit a struct-declaration without a struct-declarator-list.\n if (!getLangOpts().CPlusPlus && CurContext->isRecord() && DS.getStorageClassSpec() == DeclSpec::SCS_unspecified) {\n // Check for Microsoft C extension: anonymous struct/union member.\n // Handle 2 kinds of anonymous struct/union:\n // struct STRUCT;\n // union UNION;\n // and\n // STRUCT_TYPE; <- where STRUCT_TYPE is a typedef struct.\n // UNION_TYPE; <- where UNION_TYPE is a typedef union.\n if ((Tag && Tag->getDeclName()) || DS.getTypeSpecType() == DeclSpec::TST_typename) {\n if (Record && getLangOpts().MicrosoftExt) {\n Diag(DS.getBeginLoc(), diag::ext_ms_anonymous_record) << Record->isUnion() << DS.getSourceRange();"}} | ||
}, | }, | ||
["ext_ms_c_enum_fixed_underlying_type"]={ | ["ext_ms_c_enum_fixed_underlying_type"]={ | ||
Line 6,011: | Line 6,011: | ||
[h]=x, | [h]=x, | ||
[i]={"6f11db137034",1538166298,"Support enums with a fixed underlying type in all language modes."}, | [i]={"6f11db137034",1538166298,"Support enums with a fixed underlying type in all language modes."}, | ||
[j]={{F, | [j]={{F,4946,"/// 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 } else if (CanHaveEnumBase || !ColonIsSacred) {\n if (!getLangOpts().ObjC) {\n if (getLangOpts().CPlusPlus11)\n else if (getLangOpts().CPlusPlus)\n else if (getLangOpts().MicrosoftExt)\n Diag(ColonLoc, diag::ext_ms_c_enum_fixed_underlying_type) << BaseRange;"}} | ||
}, | }, | ||
["ext_ms_cast_fn_obj"]={ | ["ext_ms_cast_fn_obj"]={ | ||
Line 6,025: | Line 6,025: | ||
[h]=m, | [h]=m, | ||
[i]={"85bd1206796d",1433283312,"[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr"}, | [i]={"85bd1206796d",1433283312,"[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr"}, | ||
[j]={{Ab, | [j]={{Ab,1469,"/// 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 // Microsoft permits static_cast from \'pointer-to-void\' to\n // \'pointer-to-function\'.\n if (!CStyle && Self.getLangOpts().MSVCCompat && DestPointee->isFunctionType()) {\n Self.Diag(OpRange.getBegin(), diag::ext_ms_cast_fn_obj) << OpRange;"}} | ||
}, | }, | ||
["ext_ms_delayed_template_argument"]={ | ["ext_ms_delayed_template_argument"]={ | ||
Line 6,039: | Line 6,039: | ||
[h]=m, | [h]=m, | ||
[i]={"df6e4a06e42b",1402094196,"Delay lookup of simple default template arguments under -fms-compatibility"}, | [i]={"df6e4a06e42b",1402094196,"Delay lookup of simple default template arguments under -fms-compatibility"}, | ||
[j]={{w, | [j]={{w,635,"ParsedType Sema::ActOnMSVCUnknownTypeName(const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg) {\n if (IsTemplateTypeArg && getCurScope()->isTemplateParamScope()) {\n Diag(NameLoc, diag::ext_ms_delayed_template_argument) << &II;"}} | ||
}, | }, | ||
["ext_ms_deref_template_argument"]={ | ["ext_ms_deref_template_argument"]={ | ||
Line 6,053: | Line 6,053: | ||
[h]=m, | [h]=m, | ||
[i]={"da45a0fa6f72",1377236539,"arc commit didn\'t add this because it wasn\'t in the patch..."}, | [i]={"da45a0fa6f72",1377236539,"arc commit didn\'t add this because it wasn\'t in the patch..."}, | ||
[j]={{E, | [j]={{E,6732,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n if (S.getLangOpts().MicrosoftExt) {\n if (FirstOpLoc.isValid()) {\n if (ExtWarnMSTemplateArg)\n S.Diag(ArgIn->getBeginLoc(), diag::ext_ms_deref_template_argument) << ArgIn->getSourceRange();"}} | ||
}, | }, | ||
["ext_ms_explicit_constructor_call"]={ | ["ext_ms_explicit_constructor_call"]={ | ||
Line 6,067: | Line 6,067: | ||
[h]=m, | [h]=m, | ||
[i]={"64225794119e",1295327079,"Add support for explicit constructor calls in Microsoft mode."}, | [i]={"64225794119e",1295327079,"Add support for explicit constructor calls in Microsoft mode."}, | ||
[j]={{"clang/lib/Sema/SemaExprMember.cpp", | [j]={{"clang/lib/Sema/SemaExprMember.cpp",1721,"/// The main callback when the parser finds something like\n/// expression . [nested-name-specifier] identifier\n/// expression -> [nested-name-specifier] identifier\n/// where \'identifier\' encompasses a fairly broad spectrum of\n/// possibilities, including destructor and operator references.\n///\n/// \\param OpKind either tok::arrow or tok::period\n/// \\param ObjCImpDecl the current Objective-C \\@implementation\n/// decl; this is an ugly hack around the fact that Objective-C\n/// \\@implementations aren\'t properly put in the context chain\nExprResult Sema::ActOnMemberAccessExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, Decl *ObjCImpDecl) {\n // Warn about the explicit constructor calls Microsoft extension.\n if (getLangOpts().MicrosoftExt && Id.getKind() == UnqualifiedIdKind::IK_ConstructorName)\n Diag(Id.getSourceRange().getBegin(), diag::ext_ms_explicit_constructor_call);"}} | ||
}, | }, | ||
["ext_ms_forward_ref_enum"]={ | ["ext_ms_forward_ref_enum"]={ | ||
Line 6,081: | Line 6,081: | ||
[h]=m, | [h]=m, | ||
[i]={"488b4a7d943b",1284268015,"Add basic support for Microsoft enum forward declaration. "}, | [i]={"488b4a7d943b",1284268015,"Add basic support for Microsoft enum forward declaration. "}, | ||
[j]={{w, | [j]={{w,17512,"CreateNewDecl:\n if (Kind == TTK_Enum) {\n // If this is an undefined enum, warn.\n if (TUK != TUK_Definition && !Invalid) {\n if (IsFixed && cast<EnumDecl>(New)->isFixed()) {\n } else if (PrevDecl && (Def = cast<EnumDecl>(PrevDecl)->getDefinition())) {\n } else {\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_ms_forward_ref_enum;"}} | ||
}, | }, | ||
["ext_ms_impcast_fn_obj"]={ | ["ext_ms_impcast_fn_obj"]={ | ||
Line 6,095: | Line 6,095: | ||
[h]=m, | [h]=m, | ||
[i]={"6bf02820bced",1446280934,"[MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff -fms-compatibilit..."}, | [i]={"6bf02820bced",1446280934,"[MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff -fms-compatibilit..."}, | ||
[j]={{Jb, | [j]={{Jb,3163,"/// 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 (Diagnose && !IsCStyleOrFunctionalCast && FromPointeeType->isFunctionType() && ToPointeeType->isVoidType()) {\n Diag(From->getExprLoc(), diag::ext_ms_impcast_fn_obj) << From->getSourceRange();"}} | ||
}, | }, | ||
["ext_ms_reserved_user_defined_literal"]={ | ["ext_ms_reserved_user_defined_literal"]={ | ||
Line 6,109: | Line 6,109: | ||
[h]=A, | [h]=A, | ||
[i]={"7ebc4c191058",1333840163,"ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_re..."}, | [i]={"7ebc4c191058",1333840163,"ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_re..."}, | ||
[j]={{Z, | [j]={{Z,2052,"/// LexUDSuffix - Lex the ud-suffix production for user-defined literal suffixes\n/// in C++11, or warn on a ud-suffix in C++98.\nconst char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr, bool IsStringLiteral) {\n // C++11 [lex.ext]p10, [usrlit.suffix]p1: A program containing a ud-suffix\n // that does not start with an underscore is ill-formed. As a conforming\n // extension, we treat all such suffixes as if they had whitespace before\n // them. We assume a suffix beginning with a UCN or UTF-8 character is more\n // likely to be a ud-suffix than a macro, however, and accept that.\n if (!Consumed) {\n if (!IsUDSuffix) {\n if (!isLexingRawMode())\n Diag(CurPtr, LangOpts.MSVCCompat ? diag::ext_ms_reserved_user_defined_literal : diag::ext_reserved_user_defined_literal) << FixItHint::CreateInsertion(getSourceLocation(CurPtr), \" \");"}} | ||
}, | }, | ||
["ext_ms_sealed_keyword"]={ | ["ext_ms_sealed_keyword"]={ | ||
Line 6,123: | Line 6,123: | ||
[h]=x, | [h]=x, | ||
[i]={"a543308ce556",1382056411,"[-fms-extensions] Permit \'override\' in C++98 and \'sealed\' as a synonym for \'final\'"}, | [i]={"a543308ce556",1382056411,"[-fms-extensions] Permit \'override\' in C++98 and \'sealed\' as a synonym for \'final\'"}, | ||
[j]={{L, | [j]={{L,2465,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n Diag(Tok.getLocation(), diag::ext_ms_sealed_keyword);"},{L,3532,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n if (TagType == DeclSpec::TST_interface)\n else if (Specifier == VirtSpecifiers::VS_Final)\n else if (Specifier == VirtSpecifiers::VS_Sealed)\n Diag(FinalLoc, diag::ext_ms_sealed_keyword);"}} | ||
}, | }, | ||
["ext_ms_static_assert"]={ | ["ext_ms_static_assert"]={ | ||
Line 6,137: | Line 6,137: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{L, | [j]={{L,978,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n if (Tok.is(tok::kw_static_assert)) {\n if (!getLangOpts().CPlusPlus) {\n if (getLangOpts().C2x)\n else\n Diag(Tok, diag::ext_ms_static_assert) << FixItHint::CreateReplacement(Tok.getLocation(), \"_Static_assert\");"}} | ||
}, | }, | ||
["ext_ms_template_spec_redecl_out_of_scope"]={ | ["ext_ms_template_spec_redecl_out_of_scope"]={ | ||
Line 6,151: | Line 6,151: | ||
[h]=m, | [h]=m, | ||
[i]={"0068cb249965",1426836106,"[MSVC] Explicit specializations can be declared in any namespace (fix for http://llvm.org/PR13738)"}, | [i]={"0068cb249965",1426836106,"[MSVC] Explicit specializations can be declared in any namespace (fix for http://llvm.org/PR13738)"}, | ||
[j]={{E, | [j]={{E,8451,"/// Check whether a specialization is well-formed in the current\n/// context.\n///\n/// This routine determines whether a template specialization can be declared\n/// in the current context (C++ [temp.expl.spec]p2).\n///\n/// \\param S the semantic analysis object for which this check is being\n/// performed.\n///\n/// \\param Specialized the entity being specialized or instantiated, which\n/// may be a kind of template (class template, function template, etc.) or\n/// a member of a class template (member function, static data member,\n/// member class).\n///\n/// \\param PrevDecl the previous declaration of this entity, if any.\n///\n/// \\param Loc the location of the explicit specialization or instantiation of\n/// this entity.\n///\n/// \\param IsPartialSpecialization whether this is a partial specialization of\n/// a class template.\n///\n/// \\returns true if there was an error that we cannot recover from, false\n/// otherwise.\nstatic bool CheckTemplateSpecializationScope(Sema &S, NamedDecl *Specialized, NamedDecl *PrevDecl, SourceLocation Loc, bool IsPartialSpecialization) {\n // Make sure that this redeclaration (or definition) occurs in the same\n // scope or an enclosing namespace.\n if (!(DC->isFileContext() ? DC->Encloses(SpecializedContext) : DC->Equals(SpecializedContext))) {\n if (isa<TranslationUnitDecl>(SpecializedContext))\n else {\n if (S.getLangOpts().MicrosoftExt && !DC->isRecord())\n Diag = diag::ext_ms_template_spec_redecl_out_of_scope;"}} | ||
}, | }, | ||
["ext_ms_template_type_arg_missing_typename"]={ | ["ext_ms_template_type_arg_missing_typename"]={ | ||
Line 6,165: | Line 6,165: | ||
[h]=m, | [h]=m, | ||
[i]={"377c1592f8d3",1402442988,"Recover from missing typenames on template args for MSVC compatibility"}, | [i]={"377c1592f8d3",1402442988,"Recover from missing typenames on template args for MSVC compatibility"}, | ||
[j]={{E, | [j]={{E,5254,"bool Sema::CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, TemplateArgumentLoc &AL, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted) {\n case TemplateArgument::Expression: {\n if (auto *II = NameInfo.getName().getAsIdentifierInfo()) {\n if (Result.getAsSingle<TypeDecl>() || Result.getResultKind() == LookupResult::NotFoundInCurrentInstantiation) {\n Diag(Loc, getLangOpts().MSVCCompat ? diag::ext_ms_template_type_arg_missing_typename : diag::err_template_arg_must_be_type_suggest) << FixItHint::CreateInsertion(Loc, \"typename \");"}} | ||
}, | }, | ||
["ext_ms_using_declaration_inaccessible"]={ | ["ext_ms_using_declaration_inaccessible"]={ | ||
Line 6,179: | Line 6,179: | ||
[h]=m, | [h]=m, | ||
[i]={"e434590bd90d",1325195853,"Change the diagnostics which said \'accepted as an extension\' to instead say"}, | [i]={"e434590bd90d",1325195853,"Change the diagnostics which said \'accepted as an extension\' to instead say"}, | ||
[j]={{kc, | [j]={{kc,1328,"/// MSVC has a bug where if during an using declaration name lookup,\n/// the declaration found is unaccessible (private) and that declaration\n/// was bring into scope via another using declaration whose target\n/// declaration is accessible (public) then no error is generated.\n/// Example:\n/// class A {\n/// public:\n/// int f();\n/// };\n/// class B : public A {\n/// private:\n/// using A::f;\n/// };\n/// class C : public B {\n/// private:\n/// using B::f;\n/// };\n///\n/// Here, B::f is private so this should fail in Standard C++, but\n/// because B::f refers to A::f which is public MSVC accepts it.\nstatic bool IsMicrosoftUsingDeclarationAccessBug(Sema &S, SourceLocation AccessLoc, AccessTarget &Entity) {\n if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(Entity.getTargetDecl()))\n if (UsingDecl *UD = dyn_cast<UsingDecl>(Shadow->getIntroducer())) {\n if (Entity.getTargetDecl()->getAccess() == AS_private && (OrigDecl->getAccess() == AS_public || OrigDecl->getAccess() == AS_protected)) {\n S.Diag(AccessLoc, diag::ext_ms_using_declaration_inaccessible) << UD->getQualifiedNameAsString() << OrigDecl->getQualifiedNameAsString();"}} | ||
}, | }, | ||
["ext_multi_line_line_comment"]={ | ["ext_multi_line_line_comment"]={ | ||
Line 6,194: | Line 6,194: | ||
[h]=A, | [h]=A, | ||
[i]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/"}, | [i]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/"}, | ||
[j]={{Z, | [j]={{Z,2549,"/// 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 we read multiple characters, and one of those characters was a \\r or\n // \\n, then we had an escaped newline within the comment. Emit diagnostic\n // unless the next line is also a // comment.\n if (CurPtr != OldPtr + 1 && C != \'/\' && (CurPtr == BufferEnd + 1 || CurPtr[0] != \'/\')) {\n for (; OldPtr != CurPtr; ++OldPtr)\n if (OldPtr[0] == \'\\n\' || OldPtr[0] == \'\\r\') {\n if (!isLexingRawMode())\n Diag(OldPtr - 1, diag::ext_multi_line_line_comment);"}} | ||
}, | }, | ||
["ext_multi_using_declaration"]={ | ["ext_multi_using_declaration"]={ | ||
Line 6,208: | Line 6,208: | ||
[h]=x, | [h]=x, | ||
[i]={"6f1daa4660ed",1481849928,"[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration."}, | [i]={"6f1daa4660ed",1481849928,"[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration."}, | ||
[j]={{L, | [j]={{L,855,"/// 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 (DeclsInGroup.size() > 1)\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx17_compat_multi_using_declaration : diag::ext_multi_using_declaration);"}} | ||
}, | }, | ||
["ext_mutable_reference"]={ | ["ext_mutable_reference"]={ | ||
Line 6,222: | Line 6,222: | ||
[h]=m, | [h]=m, | ||
[i]={"8f01bb983c2a",1423025132,"[MSVC2012] Allow \'mutable\' references"}, | [i]={"8f01bb983c2a",1423025132,"[MSVC2012] Allow \'mutable\' references"}, | ||
[j]={{w, | [j]={{w,18186,"/// 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 // Check that \'mutable\' is consistent with the type of the declaration.\n if (!InvalidDecl && Mutable) {\n if (T->isReferenceType())\n DiagID = getLangOpts().MSVCCompat ? diag::ext_mutable_reference : diag::err_mutable_reference;"},{w,18196,"/// 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 // Check that \'mutable\' is consistent with the type of the declaration.\n if (!InvalidDecl && Mutable) {\n if (DiagID) {\n if (DiagID != diag::ext_mutable_reference) {"}} | ||
}, | }, | ||
["ext_named_variadic_macro"]={ | ["ext_named_variadic_macro"]={ | ||
Line 6,237: | Line 6,237: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,2735,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n while (true) {\n default:\n case tok::ellipsis: // #define X(A... -> GCC extension\n Diag(Tok, diag::ext_named_variadic_macro);"}} | ||
}, | }, | ||
["ext_nested_name_member_ref_lookup_ambiguous"]={ | ["ext_nested_name_member_ref_lookup_ambiguous"]={ | ||
Line 6,251: | Line 6,251: | ||
[h]=m, | [h]=m, | ||
[i]={"2f96e9f5c90d",1275701997,"Add an extension to avoid an error when a global template has the same name as"}, | [i]={"2f96e9f5c90d",1275701997,"Add an extension to avoid an error when a global template has the same name as"}, | ||
[j]={{E, | [j]={{E,605,"bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate, AssumedTemplateKind *ATK, bool AllowTypoCorrection) {\n if (S && !ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n if (FoundOuter.empty()) {\n } else if (FoundOuter.isAmbiguous() || !FoundOuter.isSingleResult() || !(OuterTemplate = getAsTemplateNameDecl(FoundOuter.getFoundDecl()))) {\n } else if (!Found.isSuppressingDiagnostics()) {\n // - if the name found is a class template, it must refer to the same\n // entity as the one found in the class of the object expression,\n // otherwise the program is ill-formed.\n if (!Found.isSingleResult() || getAsTemplateNameDecl(Found.getFoundDecl())->getCanonicalDecl() != OuterTemplate->getCanonicalDecl()) {\n Diag(Found.getNameLoc(), diag::ext_nested_name_member_ref_lookup_ambiguous) << Found.getLookupName() << ObjectType;"}} | ||
}, | }, | ||
["ext_nested_name_spec_is_enum"]={ | ["ext_nested_name_spec_is_enum"]={ | ||
Line 6,265: | Line 6,265: | ||
[h]=m, | [h]=m, | ||
[i]={"25a8afa9579e",1421611475,"Handle unscoped enumeration in nested name specifier."}, | [i]={"25a8afa9579e",1421611475,"Handle unscoped enumeration in nested name specifier."}, | ||
[j]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp", | [j]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",648,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n if (!AcceptSpec && IsExtension) {\n Diag(IdInfo.IdentifierLoc, diag::ext_nested_name_spec_is_enum);"}} | ||
}, | }, | ||
["ext_nested_namespace_definition"]={ | ["ext_nested_namespace_definition"]={ | ||
Line 6,279: | Line 6,279: | ||
[h]=x, | [h]=x, | ||
[i]={"13307f5f2429",1415425054,"[c++1z] Implement nested-namespace-definitions."}, | [i]={"13307f5f2429",1415425054,"[c++1z] Implement nested-namespace-definitions."}, | ||
[j]={{L, | [j]={{L,191,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n if (ExtraNSs.empty()) {\n } else if (InlineLoc.isValid()) {\n } else if (getLangOpts().CPlusPlus20) {\n } else if (getLangOpts().CPlusPlus17) {\n } else {\n if (!rBraceToken.is(tok::r_brace)) {\n Diag(ExtraNSs[0].NamespaceLoc, diag::ext_nested_namespace_definition) << SourceRange(ExtraNSs.front().NamespaceLoc, ExtraNSs.back().IdentLoc);"},{L,208,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n if (ExtraNSs.empty()) {\n } else if (InlineLoc.isValid()) {\n } else if (getLangOpts().CPlusPlus20) {\n } else if (getLangOpts().CPlusPlus17) {\n } else {\n if (!rBraceToken.is(tok::r_brace)) {\n } else {\n Diag(ExtraNSs[0].NamespaceLoc, diag::ext_nested_namespace_definition) << FixItHint::CreateReplacement(SourceRange(ExtraNSs.front().NamespaceLoc, ExtraNSs.back().IdentLoc), NamespaceFix) << FixItHint::CreateInsertion(rBraceToken.getLocation(), RBraces);"}} | ||
}, | }, | ||
["ext_nested_pointer_qualifier_mismatch"]={ | ["ext_nested_pointer_qualifier_mismatch"]={ | ||
Line 6,293: | Line 6,293: | ||
[h]=m, | [h]=m, | ||
[i]={"b98dade25bc9",1257804997,"Changed error for nested type qualifier mismatch to"}, | [i]={"b98dade25bc9",1257804997,"Changed error for nested type qualifier mismatch to"}, | ||
[j]={{Ab, | [j]={{Ab,2678,"void CastOperation::checkAddressSpaceCast(QualType SrcType, QualType DestType) {\n // Converting the top level pointee addrspace is permitted for compatible\n // addrspaces (such as \'generic int *\' to \'local int *\' or vice versa), but\n // if any of the nested pointee addrspaces differ, we emit a warning\n // regardless of addrspace compatibility. This makes\n // local int ** p;\n // return (generic int **) p;\n // warn even though local -> generic is permitted.\n if (Self.getLangOpts().OpenCL) {\n while (isa<PointerType>(DestPtr) && isa<PointerType>(SrcPtr)) {\n DiagID = diag::ext_nested_pointer_qualifier_mismatch;"},{y,17644,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n case IncompatibleNestedPointerQualifiers:\n if (getLangOpts().CPlusPlus) {\n } else {\n DiagKind = diag::ext_nested_pointer_qualifier_mismatch;"}} | ||
}, | }, | ||
["ext_new_paren_array_nonconst"]={ | ["ext_new_paren_array_nonconst"]={ | ||
Line 6,305: | Line 6,305: | ||
[h]=m, | [h]=m, | ||
[i]={"f2753b3b4efb",1279036472,"Downgrade the \"when type is in parentheses, array cannot have dynamic"}, | [i]={"f2753b3b4efb",1279036472,"Downgrade the \"when type is in parentheses, array cannot have dynamic"}, | ||
[j]={{V, | [j]={{V,2237,"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 } else if (TypeIdParens.isValid()) {\n Diag((*ArraySize)->getBeginLoc(), diag::ext_new_paren_array_nonconst) << (*ArraySize)->getSourceRange() << FixItHint::CreateRemoval(TypeIdParens.getBegin()) << FixItHint::CreateRemoval(TypeIdParens.getEnd());"}} | ||
}, | }, | ||
["ext_no_declarators"]={ | ["ext_no_declarators"]={ | ||
Line 6,319: | Line 6,319: | ||
[h]=m, | [h]=m, | ||
[i]={"f19ac0ede900",1270762403,"Downgrade the \"declaration does not declare anything\" error to a"}, | [i]={"f19ac0ede900",1270762403,"Downgrade the \"declaration does not declare anything\" error to a"}, | ||
[j]={{w, | [j]={{w,5266,"/// 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 // C 6.7/2:\n // A declaration [...] shall declare at least a declarator [...], a tag,\n // or the members of an enumeration.\n // C++ [dcl.dcl]p3:\n // [If there are no declarators], and except for the declaration of an\n // unnamed bit-field, the decl-specifier-seq shall introduce one or more\n // names into the program, or shall redeclare a name introduced by a\n // previous declaration.\n if (!DeclaresAnything) {\n Diag(DS.getBeginLoc(), (IsExplicitInstantiation || !TemplateParams.empty()) ? diag::err_no_declarators : diag::ext_no_declarators) << DS.getSourceRange();"},{w,5690,"/// 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 // C++ [dcl.dcl]p3:\n // [If there are no declarators], and except for the declaration of an\n // unnamed bit-field, the decl-specifier-seq shall introduce one or more\n // names into the program\n // C++ [class.mem]p2:\n // each such member-declaration shall either declare at least one member\n // name of the class or declare at least one unnamed bit-field\n //\n // For C this is an error even for a named struct, and is diagnosed elsewhere.\n if (getLangOpts().CPlusPlus && Record->field_empty())\n Diag(DS.getBeginLoc(), diag::ext_no_declarators) << DS.getSourceRange();"}} | ||
}, | }, | ||
["ext_no_named_members_in_struct_union"]={ | ["ext_no_named_members_in_struct_union"]={ | ||
Line 6,334: | Line 6,334: | ||
[h]=m, | [h]=m, | ||
[i]={"89578fd43981",1370698198,"Recognition of empty structures and unions is moved to semantic stage"}, | [i]={"89578fd43981",1370698198,"Recognition of empty structures and unions is moved to semantic stage"}, | ||
[j]={{w, | [j]={{w,19136,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // Okay, we successfully defined \'Record\'.\n if (Record) {\n if (CheckForZeroSize) {\n // Structs without named members are extension in C (C99 6.7.2.1p7),\n // but are accepted by GCC.\n if (NonBitFields == 0 && !getLangOpts().CPlusPlus) {\n Diag(RecLoc, IsEmpty ? diag::ext_empty_struct_union : diag::ext_no_named_members_in_struct_union) << Record->isUnion();"}} | ||
}, | }, | ||
["ext_no_newline_eof"]={ | ["ext_no_newline_eof"]={ | ||
Line 6,349: | Line 6,349: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{Z, | [j]={{Z,3058,"/// LexEndOfFile - CurPtr points to the end of this file. Handle this\n/// condition, reporting diagnostics and handling other edge cases as required.\n/// This returns true if Result contains a token, false if PP.Lex should be\n/// called again.\nbool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {\n // C99 5.1.1.2p2: If the file is non-empty and didn\'t end in a newline, issue\n // a pedwarn.\n if (CurPtr != BufferStart && (CurPtr[-1] != \'\\n\' && CurPtr[-1] != \'\\r\')) {\n if (LangOpts.CPlusPlus11) {\n } else {\n DiagID = diag::ext_no_newline_eof;"}} | ||
}, | }, | ||
["ext_non_c_like_anon_struct_in_typedef"]={ | ["ext_non_c_like_anon_struct_in_typedef"]={ | ||
Line 6,363: | Line 6,363: | ||
[h]=m, | [h]=m, | ||
[i]={yc,1576809732,Ac}, | [i]={yc,1576809732,Ac}, | ||
[j]={{w, | [j]={{w,5011,"void Sema::setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD) {\n if (NonCLike || ChangesLinkage) {\n unsigned DiagID = diag::ext_non_c_like_anon_struct_in_typedef;"}} | ||
}, | }, | ||
["ext_nonclass_type_friend"]={ | ["ext_nonclass_type_friend"]={ | ||
Line 6,377: | Line 6,377: | ||
[h]=m, | [h]=m, | ||
[i]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:"}, | [i]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:"}, | ||
[j]={{z, | [j]={{z,17221,"/// Perform semantic analysis of the given friend type declaration.\n///\n/// \\returns A friend declaration that.\nFriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo) {\n // C++03 [class.friend]p2:\n // An elaborated-type-specifier shall be used in a friend declaration\n // for a class.*\n //\n // * The class-key of the elaborated-type-specifier is required.\n if (!CodeSynthesisContexts.empty()) {\n } else {\n if (!T->isElaboratedTypeSpecifier()) {\n // If we evaluated the type to a record type, suggest putting\n // a tag in front.\n if (const RecordType *RT = T->getAs<RecordType>()) {\n } else {\n Diag(FriendLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_nonclass_type_friend : diag::ext_nonclass_type_friend) << T << TypeRange;"}} | ||
}, | }, | ||
["ext_nonstandard_escape"]={ | ["ext_nonstandard_escape"]={ | ||
Line 6,392: | Line 6,392: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{cb, | [j]={{cb,164,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n case \'e\':\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_nonstandard_escape) << \"e\";"},{cb,170,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n case \'E\':\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_nonstandard_escape) << \"E\";"},{cb,331,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n case \'%\':\n // GCC accepts these as extensions. We warn about them as such though.\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_nonstandard_escape) << std::string(1, ResultChar);"}} | ||
}, | }, | ||
["ext_nonstatic_member_init"]={ | ["ext_nonstatic_member_init"]={ | ||
Line 6,406: | Line 6,406: | ||
[h]=x, | [h]=x, | ||
[i]={"bffe88027cc2",1318650917,"Rename an ExtWarn to ext_ for consistency."}, | [i]={"bffe88027cc2",1318650917,"Rename an ExtWarn to ext_ for consistency."}, | ||
[j]={{L, | [j]={{L,3103,"/// 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 // Handle the initializer.\n if (HasInClassInit != ICIS_NoInit) {\n Diag(Tok, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_nonstatic_member_init : diag::ext_nonstatic_member_init);"}} | ||
}, | }, | ||
["ext_noreturn_main"]={ | ["ext_noreturn_main"]={ | ||
Line 6,420: | Line 6,420: | ||
[h]=m, | [h]=m, | ||
[i]={"0015f0987792",1358460971,"Parsing support for C11\'s _Noreturn keyword. No semantics yet."}, | [i]={"0015f0987792",1358460971,"Parsing support for C11\'s _Noreturn keyword. No semantics yet."}, | ||
[j]={{w, | [j]={{w,12085,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n if (DS.isNoreturnSpecified()) {\n Diag(NoreturnLoc, diag::ext_noreturn_main);"}} | ||
}, | }, | ||
["ext_ns_enum_attribute"]={ | ["ext_ns_enum_attribute"]={ | ||
Line 6,435: | Line 6,435: | ||
[h]=x, | [h]=x, | ||
[i]={"40e202f7d996",1507942584,"Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature."}, | [i]={"40e202f7d996",1507942584,"Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature."}, | ||
[j]={{F, | [j]={{F,5203,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n if (isAllowedCXX11AttributeSpecifier()) {\n if (getLangOpts().CPlusPlus)\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_ns_enum_attribute : diag::ext_ns_enum_attribute) << 1 /*enumerator*/;"},{L,94,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n auto ReadAttributes = [&] {\n do {\n if (getLangOpts().CPlusPlus11 && isCXX11AttributeSpecifier()) {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_ns_enum_attribute : diag::ext_ns_enum_attribute) << 0 /*namespace*/;"}} | ||
}, | }, | ||
["ext_nullability"]={ | ["ext_nullability"]={ | ||
Line 6,450: | Line 6,450: | ||
[h]=x, | [h]=x, | ||
[i]={"261a89b0f70b",1434736265,"Introduce type nullability specifiers for C/C++."}, | [i]={"261a89b0f70b",1434736265,"Introduce type nullability specifiers for C/C++."}, | ||
[j]={{F, | [j]={{F,969,"void Parser::ParseNullabilityTypeSpecifiers(ParsedAttributes &attrs) {\n // Treat these like attributes, even though they\'re type specifiers.\n while (true) {\n case tok::kw__Null_unspecified: {\n if (!getLangOpts().ObjC)\n Diag(AttrNameLoc, diag::ext_nullability) << AttrName;"}} | ||
}, | }, | ||
["ext_offsetof_non_pod_type"]={ | ["ext_offsetof_non_pod_type"]={ | ||
Line 6,464: | Line 6,464: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{y, | [j]={{y,16678,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n for (const OffsetOfComponent &OC : Components) {\n // C++ [lib.support.types]p5:\n // The macro offsetof accepts a restricted set of type arguments in this\n // International Standard. type shall be a POD structure or a POD union\n // (clause 9).\n // C++11 [support.types]p4:\n // If type is not a standard-layout class (Clause 9), the results are\n // undefined.\n if (CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {\n unsigned DiagID = LangOpts.CPlusPlus11 ? diag::ext_offsetof_non_standardlayout_type : diag::ext_offsetof_non_pod_type;"}} | ||
}, | }, | ||
["ext_offsetof_non_standardlayout_type"]={ | ["ext_offsetof_non_standardlayout_type"]={ | ||
Line 6,478: | Line 6,478: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{y, | [j]={{y,16657,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n for (const OffsetOfComponent &OC : Components) {\n // C++ [lib.support.types]p5:\n // The macro offsetof accepts a restricted set of type arguments in this\n // International Standard. type shall be a POD structure or a POD union\n // (clause 9).\n // C++11 [support.types]p4:\n // If type is not a standard-layout class (Clause 9), the results are\n // undefined.\n if (CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {\n unsigned DiagID = LangOpts.CPlusPlus11 ? diag::ext_offsetof_non_standardlayout_type : diag::ext_offsetof_non_pod_type;"}} | ||
}, | }, | ||
["ext_old_implicitly_unsigned_long_cxx"]={ | ["ext_old_implicitly_unsigned_long_cxx"]={ | ||
Line 6,492: | Line 6,492: | ||
[h]=q, | [h]=q, | ||
[i]={"13234ae40db3",1433800799,"Consider unsigned long for non-u/U decimal literals (C90/C++03)"}, | [i]={"13234ae40db3",1433800799,"Consider unsigned long for non-u/U decimal literals (C90/C++03)"}, | ||
[j]={{y, | [j]={{y,4196,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n if (Literal.isFixedPointLiteral()) {\n } else if (Literal.isFloatingLiteral()) {\n } else if (!Literal.isIntegerLiteral()) {\n } else {\n if (Literal.GetIntegerValue(ResultVal)) {\n } else {\n // Are long/unsigned long possibilities?\n if (Ty.isNull() && !Literal.isLongLong && !Literal.isSizeT) {\n // Does it fit in a unsigned long?\n if (ResultVal.isIntN(LongSize)) {\n // Does it fit in a signed long?\n if (!Literal.isUnsigned && ResultVal[LongSize - 1] == 0)\n else if (AllowUnsigned)\n // Check according to the rules of C90 6.1.3.2p5. C++03 [lex.icon]p2\n // is compatible.\n else if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11) {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus ? Literal.isLong ? diag::warn_old_implicitly_unsigned_long_cxx : /*C++98 UB*/ diag::ext_old_implicitly_unsigned_long_cxx : diag::warn_old_implicitly_unsigned_long) << (LongLongSize > LongSize ? /*will have type \'long long\'*/ 0 : /*will be ill-formed*/ 1);"}} | ||
}, | }, | ||
["ext_omp_attributes"]={ | ["ext_omp_attributes"]={ | ||
Line 6,506: | Line 6,506: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{L, | [j]={{L,4432,"/// 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 (ScopeName && ScopeName->isStr(\"omp\")) {\n Diag(AttrNameLoc, getLangOpts().OpenMP >= 51 ? diag::warn_omp51_compat_attributes : diag::ext_omp_attributes);"}} | ||
}, | }, | ||
["ext_omp_loop_not_canonical_init"]={ | ["ext_omp_loop_not_canonical_init"]={ | ||
Line 6,520: | Line 6,520: | ||
[h]="OpenMP Issue", | [h]="OpenMP Issue", | ||
[i]={"a8e9d2eccc6e",1401790607,"[OPENMP] Loop canonical form analysis (Sema)"}, | [i]={"a8e9d2eccc6e",1401790607,"[OPENMP] Loop canonical form analysis (Sema)"}, | ||
[j]={{Ec, | [j]={{Ec,8200,"bool OpenMPIterationSpaceChecker::checkAndSetInit(Stmt *S, bool EmitDiags) {\n if (auto *BO = dyn_cast<BinaryOperator>(S)) {\n } else if (auto *DS = dyn_cast<DeclStmt>(S)) {\n if (DS->isSingleDecl()) {\n if (auto *Var = dyn_cast_or_null<VarDecl>(DS->getSingleDecl())) {\n if (Var->hasInit() && !Var->getType()->isReferenceType()) {\n // Accept non-canonical init form here but emit ext. warning.\n if (Var->getInitStyle() != VarDecl::CInit && EmitDiags)\n SemaRef.Diag(S->getBeginLoc(), diag::ext_omp_loop_not_canonical_init) << S->getSourceRange();"}} | ||
}, | }, | ||
["ext_on_off_switch_syntax"]={ | ["ext_on_off_switch_syntax"]={ | ||
Line 6,534: | Line 6,534: | ||
[h]=A, | [h]=A, | ||
[i]={"3bffa5293303",1297647744,"Make LexOnOffSwitch a Preprocessor member function"}, | [i]={"3bffa5293303",1297647744,"Make LexOnOffSwitch a Preprocessor member function"}, | ||
[j]={{lb, | [j]={{lb,974,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::ext_on_off_switch_syntax);"},{lb,985,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n if (II->isStr(\"ON\"))\n else if (II->isStr(\"OFF\"))\n else if (II->isStr(\"DEFAULT\"))\n else {\n Diag(Tok, diag::ext_on_off_switch_syntax);"}} | ||
}, | }, | ||
["ext_opencl_double_without_pragma"]={ | ["ext_opencl_double_without_pragma"]={ | ||
Line 6,549: | Line 6,549: | ||
[h]=m, | [h]=m, | ||
[i]={bc,1615397021,fc}, | [i]={bc,1615397021,fc}, | ||
[j]={{R, | [j]={{R,1546,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n case DeclSpec::TST_double:\n if (S.getLangOpts().OpenCL) {\n if (!S.getOpenCLOptions().isSupported(\"cl_khr_fp64\", S.getLangOpts()))\n else if (!S.getOpenCLOptions().isAvailableOption(\"cl_khr_fp64\", S.getLangOpts()))\n S.Diag(DS.getTypeSpecTypeLoc(), diag::ext_opencl_double_without_pragma);"}} | ||
}, | }, | ||
["ext_opencl_ext_vector_type_rgba_selector"]={ | ["ext_opencl_ext_vector_type_rgba_selector"]={ | ||
Line 6,563: | Line 6,563: | ||
[h]=m, | [h]=m, | ||
[i]={"98eaa62e369d",1469213383,"Add .rgba syntax extension to ext_vector_type types"}, | [i]={"98eaa62e369d",1469213383,"Add .rgba syntax extension to ext_vector_type types"}, | ||
[j]={{"clang/lib/Sema/SemaExprMember.cpp", | [j]={{"clang/lib/Sema/SemaExprMember.cpp",351,"/// Check an ext-vector component access expression.\n///\n/// VK should be set in advance to the value kind of the base\n/// expression.\nstatic QualType CheckExtVectorComponent(Sema &S, QualType baseType, ExprValueKind &VK, SourceLocation OpLoc, const IdentifierInfo *CompName, SourceLocation CompLoc) {\n // Check that we\'ve found one of the special components, or that the component\n // names must come from the same set.\n if (!strcmp(compStr, \"hi\") || !strcmp(compStr, \"lo\") || !strcmp(compStr, \"even\") || !strcmp(compStr, \"odd\")) {\n } else if (!HexSwizzle && (Idx = vecType->getPointAccessorIdx(*compStr)) != -1) {\n // Emit a warning if an rgba selector is used earlier than OpenCL C 3.0.\n if (HasRGBA || (*compStr && IsRGBA(*compStr))) {\n if (S.getLangOpts().OpenCL && S.getLangOpts().getOpenCLCompatibleVersion() < 300) {\n S.Diag(OpLoc, diag::ext_opencl_ext_vector_type_rgba_selector) << StringRef(DiagBegin, 1) << SourceRange(CompLoc);"}} | ||
}, | }, | ||
["ext_operator_new_delete_declared_inline"]={ | ["ext_operator_new_delete_declared_inline"]={ | ||
Line 6,577: | Line 6,577: | ||
[h]=m, | [h]=m, | ||
[i]={"13dfdc88a9a2",1384562858,"Downgrade the Error on an \'inline\' operator new or delete to an ExtWarn. Some"}, | [i]={"13dfdc88a9a2",1384562858,"Downgrade the Error on an \'inline\' operator new or delete to an ExtWarn. Some"}, | ||
[j]={{w, | [j]={{w,10344,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (!getLangOpts().CPlusPlus) {\n } else {\n // C++11 [replacement.functions]p3:\n // The program\'s definitions shall not be specified as inline.\n //\n // N.B. We diagnose declarations instead of definitions per LWG issue 2340.\n //\n // Suppress the diagnostic if the function is __attribute__((used)), since\n // that forces an external definition to be emitted.\n if (D.getDeclSpec().isInlineSpecified() && NewFD->isReplaceableGlobalAllocationFunction() && !NewFD->hasAttr<UsedAttr>())\n Diag(D.getDeclSpec().getInlineSpecLoc(), diag::ext_operator_new_delete_declared_inline) << NewFD->getDeclName();"}} | ||
}, | }, | ||
["ext_operator_overload_static"]={ | ["ext_operator_overload_static"]={ | ||
Line 6,591: | Line 6,591: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{z, | [j]={{z,16152,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // C++ [over.oper]p7:\n // An operator function shall either be a member function or\n // be a non-member function and have at least one parameter\n // whose type is a class, a reference to a class, an enumeration,\n // or a reference to an enumeration.\n // Note: Before C++23, a member function could not be static. The only member\n // function allowed to be static is the call operator function.\n if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(FnDecl)) {\n if (MethodDecl->isStatic()) {\n if (Op == OO_Call || Op == OO_Subscript)\n Diag(FnDecl->getLocation(), (LangOpts.CPlusPlus23 ? diag::warn_cxx20_compat_operator_overload_static : diag::ext_operator_overload_static)) << FnDecl;"}} | ||
}, | }, | ||
["ext_out_of_line_declaration"]={ | ["ext_out_of_line_declaration"]={ | ||
Line 6,605: | Line 6,605: | ||
[h]=m, | [h]=m, | ||
[i]={"9339605c3545",1279254748,"Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG."}, | [i]={"9339605c3545",1279254748,"Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG."}, | ||
[j]={{w, | [j]={{w,10576,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (!getLangOpts().CPlusPlus) {\n } else {\n if (NewFD->isInvalidDecl()) {\n } else if (!D.isRedeclaration()) {\n } else if (!D.isFunctionDefinition() && isa<CXXMethodDecl>(NewFD) && NewFD->isOutOfLine() && !isFriend && !isFunctionTemplateSpecialization && !isMemberSpecialization) {\n Diag(NewFD->getLocation(), diag::ext_out_of_line_declaration) << D.getCXXScopeSpec().getRange();"}} | ||
}, | }, | ||
["ext_out_of_line_qualified_id_type_names_constructor"]={ | ["ext_out_of_line_qualified_id_type_names_constructor"]={ | ||
Line 6,619: | Line 6,619: | ||
[h]=m, | [h]=m, | ||
[i]={"74f02347ca16",1484859613,"PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310)."}, | [i]={"74f02347ca16",1484859613,"PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310)."}, | ||
[j]={{E, | [j]={{E,4173,"TypeResult Sema::ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, bool IsCtorOrDtorName, bool IsClassName, ImplicitTypenameContext AllowImplicitTypename) {\n if (!IsCtorOrDtorName && !IsClassName && SS.isSet()) {\n if (LookupRD && LookupRD->getIdentifier() == TemplateII) {\n Diag(TemplateIILoc, TemplateKWLoc.isInvalid() ? diag::err_out_of_line_qualified_id_type_names_constructor : diag::ext_out_of_line_qualified_id_type_names_constructor) << TemplateII << 0 /*injected-class-name used as template name*/"},{E,5133,"/// Form a template name from a name that is syntactically required to name a\n/// template, either due to use of the \'template\' keyword or because a name in\n/// this syntactic context is assumed to name a template (C++ [temp.names]p2-4).\n///\n/// This action forms a template name given the name of the template and its\n/// optional scope specifier. This is used when the \'template\' keyword is used\n/// or when the parsing context unambiguously treats a following \'<\' as\n/// introducing a template argument list. Note that this may produce a\n/// non-dependent template name if we can perform the lookup now and identify\n/// the named template.\n///\n/// For example, given \"x.MetaFun::template apply\", the scope specifier\n/// \\p SS will be \"MetaFun::\", \\p TemplateKWLoc contains the location\n/// of the \"template\" keyword, and \"apply\" is the \\p Name.\nTemplateNameKind Sema::ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Result, bool AllowInjectedClassName) {\n if (TNK != TNK_Non_template) {\n if (!AllowInjectedClassName && SS.isNotEmpty() && LookupRD && Name.getKind() == UnqualifiedIdKind::IK_Identifier && Name.Identifier && LookupRD->getIdentifier() == Name.Identifier) {\n Diag(Name.getBeginLoc(), diag::ext_out_of_line_qualified_id_type_names_constructor) << Name.Identifier << 0 /*injected-class-name used as template name*/"},{E,10853,"TypeResult Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateIn, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) {\n // Strangely, non-type results are not ignored by this lookup, so the\n // program is ill-formed if it finds an injected-class-name.\n if (TypenameLoc.isValid()) {\n if (LookupRD && LookupRD->getIdentifier() == TemplateII) {\n Diag(TemplateIILoc, diag::ext_out_of_line_qualified_id_type_names_constructor) << TemplateII << 0 /*injected-class-name used as template name*/"},{E,11108,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n case LookupResult::Found:\n if (TypeDecl *Type = dyn_cast<TypeDecl>(Result.getFoundDecl())) {\n if (Keyword == ETK_Typename && LookupRD && FoundRD && FoundRD->isInjectedClassName() && declaresSameEntity(LookupRD, cast<Decl>(FoundRD->getParent())))\n Diag(IILoc, diag::ext_out_of_line_qualified_id_type_names_constructor) << &II << 1 << 0 /*\'typename\' keyword used*/;"}} | ||
}, | }, | ||
["ext_override_control_keyword"]={ | ["ext_override_control_keyword"]={ | ||
Line 6,633: | Line 6,633: | ||
[h]=x, | [h]=x, | ||
[i]={"5a72fdb05b64",1295737309,"Accept the C++0x override control keywords as an extension in C++98. This is OK since the new syntax..."}, | [i]={"5a72fdb05b64",1295737309,"Accept the C++0x override control keywords as an extension in C++98. This is OK since the new syntax..."}, | ||
[j]={{L, | [j]={{L,2474,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n } else if (Specifier == VirtSpecifiers::VS_Abstract) {\n } else if (Specifier == VirtSpecifiers::VS_GNU_Final) {\n } else {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_override_control_keyword : diag::ext_override_control_keyword) << VirtSpecifiers::getSpecifierName(Specifier);"},{L,3529,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n if (TagType == DeclSpec::TST_interface)\n else if (Specifier == VirtSpecifiers::VS_Final)\n Diag(FinalLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_override_control_keyword : diag::ext_override_control_keyword) << VirtSpecifiers::getSpecifierName(Specifier);"}} | ||
}, | }, | ||
["ext_override_exception_spec"]={ | ["ext_override_exception_spec"]={ | ||
Line 6,647: | Line 6,647: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{Bb, | [j]={{Bb,992,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_override_exception_spec;"},{Bb,996,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n return CheckExceptionSpecSubset(PDiag(DiagID), PDiag(diag::err_deep_exception_specs_differ), PDiag(diag::note_overridden_virtual_function), PDiag(diag::ext_override_exception_spec), Old->getType()->castAs<FunctionProtoType>(), Old->getLocation(), New->getType()->castAs<FunctionProtoType>(), New->getLocation());"}} | ||
}, | }, | ||
["ext_ovl_ambiguous_oper_binary_reversed"]={ | ["ext_ovl_ambiguous_oper_binary_reversed"]={ | ||
Line 6,661: | Line 6,661: | ||
[h]=m, | [h]=m, | ||
[i]={Ub,1567434909,Vb}, | [i]={Ub,1567434909,Vb}, | ||
[j]={{Jb, | [j]={{Jb,14045,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n case OR_Success: {\n if (FnDecl) {\n if (AllowRewrittenCandidates && !IsReversed && CandidateSet.getRewriteInfo().isReversible()) {\n if (!AmbiguousWith.empty()) {\n Diag(OpLoc, diag::ext_ovl_ambiguous_oper_binary_reversed) << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getType() << Args[1]->getType() << AmbiguousWithSelf << Args[0]->getSourceRange() << Args[1]->getSourceRange();"}} | ||
}, | }, | ||
["ext_ovl_rewrite_equalequal_not_bool"]={ | ["ext_ovl_rewrite_equalequal_not_bool"]={ | ||
Line 6,675: | Line 6,675: | ||
[h]=m, | [h]=m, | ||
[i]={Kb,1576908663,Ib}, | [i]={Kb,1576908663,Ib}, | ||
[j]={{Jb, | [j]={{Jb,14010,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n case OR_Success: {\n if (FnDecl) {\n // C++2a [over.match.oper]p9:\n // If a rewritten operator== candidate is selected by overload\n // resolution for an operator@, its return type shall be cv bool\n if (Best->RewriteKind && ChosenOp == OO_EqualEqual && !FnDecl->getReturnType()->isBooleanType()) {\n Diag(OpLoc, IsExtension ? diag::ext_ovl_rewrite_equalequal_not_bool : diag::err_ovl_rewrite_equalequal_not_bool) << FnDecl->getReturnType() << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getSourceRange() << Args[1]->getSourceRange();"}} | ||
}, | }, | ||
["ext_param_default_argument_redefinition"]={ | ["ext_param_default_argument_redefinition"]={ | ||
Line 6,689: | Line 6,689: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{z, | [j]={{z,553,"/// 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++ [dcl.fct.default]p4:\n // For non-template functions, default arguments can be added in\n // later declarations of a function in the same\n // scope. Declarations in different scopes have completely\n // distinct sets of default arguments. That is, declarations in\n // inner scopes do not acquire default arguments from\n // declarations in outer scopes, and vice versa. In a given\n // function declaration, all parameters subsequent to a\n // parameter with a default argument shall have default\n // arguments supplied in this or previous declarations. A\n // default argument shall not be redefined by a later\n // declaration (not even to the same value).\n //\n // C++ [dcl.fct.default]p6:\n // Except for member functions of class templates, the default arguments\n // in a member function definition that appears outside of the class\n // definition are added to the set of default arguments provided by the\n // member function declaration in the class definition.\n for (unsigned p = 0, NumParams = PrevForDefaultArgs ? PrevForDefaultArgs->getNumParams() : 0; p < NumParams; ++p) {\n if (OldParamHasDfl && NewParamHasDfl) {\n if (getLangOpts().MicrosoftExt) {\n if (MD && MD->getParent()->getDescribedClassTemplate()) {\n DiagDefaultParamID = diag::ext_param_default_argument_redefinition;"}} | ||
}, | }, | ||
["ext_param_not_declared"]={ | ["ext_param_not_declared"]={ | ||
Line 6,703: | Line 6,703: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{w, | [j]={{w,14993,"void Sema::ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D, SourceLocation LocAfterDecls) {\n // C99 6.9.1p6 \"If a declarator includes an identifier list, each declaration\n // in the declaration list shall have at least one declarator, those\n // declarators shall only declare identifiers from the identifier list, and\n // every identifier in the identifier list shall be declared.\n //\n // C89 3.7.1p5 \"If a declarator includes an identifier list, only the\n // identifiers it names shall be declared in the declaration list.\"\n //\n // This is why we only diagnose in C99 and later. Note, the other conditions\n // listed are checked elsewhere.\n if (!FTI.hasPrototype) {\n for (int i = FTI.NumParams; i != 0; /* decrement in loop */) {\n if (FTI.Params[i].Param == nullptr) {\n if (getLangOpts().C99) {\n Diag(FTI.Params[i].IdentLoc, diag::ext_param_not_declared) << FTI.Params[i].Ident << FixItHint::CreateInsertion(LocAfterDecls, Code);"}} | ||
}, | }, | ||
["ext_param_promoted_not_compatible_with_prototype"]={ | ["ext_param_promoted_not_compatible_with_prototype"]={ | ||
Line 6,717: | Line 6,717: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,4269,"/// 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 // GNU C permits a K&R definition to follow a prototype declaration\n // if the declared types of the parameters in the K&R definition\n // match the types in the prototype declaration, even when the\n // promoted types of the parameters from the K&R definition differ\n // from the types in the prototype. GCC then keeps the types from\n // the prototype.\n //\n // If a variadic prototype is followed by a non-variadic K&R definition,\n // the K&R definition becomes variadic. This is sort of an edge case, but\n // it\'s legal per the standard depending on how you read C99 6.7.5.3p15 and\n // C99 6.9.1p8.\n if (!getLangOpts().CPlusPlus && Old->hasPrototype() && !New->hasPrototype() && New->getType()->getAs<FunctionProtoType>() && Old->getNumParams() == New->getNumParams()) {\n if (LooseCompatible) {\n for (unsigned Warn = 0; Warn < Warnings.size(); ++Warn) {\n Diag(Warnings[Warn].NewParm->getLocation(), diag::ext_param_promoted_not_compatible_with_prototype) << Warnings[Warn].PromotedType << Warnings[Warn].OldParm->getType();"}} | ||
}, | }, | ||
["ext_parameter_name_omitted_c2x"]={ | ["ext_parameter_name_omitted_c2x"]={ | ||
Line 6,731: | Line 6,731: | ||
[h]=m, | [h]=m, | ||
[i]={Kb,1576908663,Ib}, | [i]={Kb,1576908663,Ib}, | ||
[j]={{bb, | [j]={{bb,16654,"/// 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 // C99 6.9.1p5: If the declarator includes a parameter type list, the\n // declaration of each parameter shall include an identifier.\n if (CheckParameterNames && Param->getIdentifier() == nullptr && !Param->isImplicit() && !getLangOpts().CPlusPlus) {\n // Diagnose this as an extension in C17 and earlier.\n if (!getLangOpts().C2x)\n Diag(Param->getLocation(), diag::ext_parameter_name_omitted_c2x);"},{y,16955,"void Sema::ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope) {\n if (ExplicitSignature) {\n for (unsigned I = 0, E = ExplicitSignature.getNumParams(); I != E; ++I) {\n if (Param->getIdentifier() == nullptr && !Param->isImplicit() && !Param->isInvalidDecl() && !getLangOpts().CPlusPlus) {\n // Diagnose this as an extension in C17 and earlier.\n if (!getLangOpts().C2x)\n Diag(Param->getLocation(), diag::ext_parameter_name_omitted_c2x);"}} | ||
}, | }, | ||
["ext_partial_spec_not_more_specialized_than_primary"]={ | ["ext_partial_spec_not_more_specialized_than_primary"]={ | ||
Line 6,745: | Line 6,745: | ||
[h]=m, | [h]=m, | ||
[i]={"fa4a09d8afbf",1482868989,"Add warning flag for \"partial specialization is not more specialized than primary template\" error (s..."}, | [i]={"fa4a09d8afbf",1482868989,"Add warning flag for \"partial specialization is not more specialized than primary template\" error (s..."}, | ||
[j]={{E, | [j]={{E,4412,"template <typename PartialSpecDecl> static void checkMoreSpecializedThanPrimary(Sema &S, PartialSpecDecl *Partial) {\n S.Diag(Partial->getLocation(), diag::ext_partial_spec_not_more_specialized_than_primary) << isa<VarTemplateDecl>(Template);"}} | ||
}, | }, | ||
["ext_partial_specs_not_deducible"]={ | ["ext_partial_specs_not_deducible"]={ | ||
Line 6,759: | Line 6,759: | ||
[h]=m, | [h]=m, | ||
[i]={"57aae07b4a31",1482892645,"DR1315: a non-type template argument in a partial specialization is permitted"}, | [i]={"57aae07b4a31",1482892645,"DR1315: a non-type template argument in a partial specialization is permitted"}, | ||
[j]={{E, | [j]={{E,4473,"template <typename PartialSpecDecl> static void checkTemplatePartialSpecialization(Sema &S, PartialSpecDecl *Partial) {\n if (!DeducibleParams.all()) {\n S.Diag(Partial->getLocation(), diag::ext_partial_specs_not_deducible) << isa<VarTemplatePartialSpecializationDecl>(Partial) << (NumNonDeducible > 1) << SourceRange(Partial->getLocation(), Partial->getTemplateArgsAsWritten()->RAngleLoc);"}} | ||
}, | }, | ||
["ext_paste_comma"]={ | ["ext_paste_comma"]={ | ||
Line 6,774: | Line 6,774: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{"clang/lib/Lex/TokenLexer.cpp", | [j]={{"clang/lib/Lex/TokenLexer.cpp",168,"bool TokenLexer::MaybeRemoveCommaBeforeVaArgs(SmallVectorImpl<Token> &ResultToks, bool HasPasteOperator, MacroInfo *Macro, unsigned MacroArgNo, Preprocessor &PP) {\n // Issue an extension diagnostic for the paste operator.\n if (HasPasteOperator)\n PP.Diag(ResultToks.back().getLocation(), diag::ext_paste_comma);"},{"clang/lib/Lex/TokenLexer.cpp",526,"/// Expand the arguments of a function-like macro so that we can quickly\n/// return preexpanded tokens from Tokens.\nvoid TokenLexer::ExpandFunctionArguments() {\n for (unsigned I = 0, E = NumTokens; I != E; ++I) {\n if (NumToks) { // Not an empty argument?\n // If this is the GNU \", ## __VA_ARGS__\" extension, and we just learned\n // that __VA_ARGS__ expands to multiple tokens, avoid a pasting error when\n // the expander tries to paste \',\' with the first token of the __VA_ARGS__\n // expansion.\n if (NonEmptyPasteBefore && ResultToks.size() >= 2 && ResultToks[ResultToks.size() - 2].is(tok::comma) && (unsigned)ArgNo == Macro->getNumParams() - 1 && Macro->isVariadic()) {\n PP.Diag(ResultToks.pop_back_val().getLocation(), diag::ext_paste_comma);"}} | ||
}, | }, | ||
["ext_plain_complex"]={ | ["ext_plain_complex"]={ | ||
Line 6,786: | Line 6,786: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{pc, | [j]={{pc,1307,"/// Finish - This does final analysis of the declspec, rejecting things like\n/// \"_Imaginary\" (lacking an FP type). After calling this method, DeclSpec is\n/// guaranteed to be self-consistent, even if an error occurred.\nvoid DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {\n // TODO: if the implementation does not implement _Complex or _Imaginary,\n // disallow their use. Need information about the backend.\n if (TypeSpecComplex != TSC_unspecified) {\n if (TypeSpecType == TST_unspecified) {\n S.Diag(TSCLoc, diag::ext_plain_complex) << FixItHint::CreateInsertion(S.getLocForEndOfToken(getTypeSpecComplexLoc()), \" double\");"}} | ||
}, | }, | ||
["ext_pointer_to_const_ref_member_on_rvalue"]={ | ["ext_pointer_to_const_ref_member_on_rvalue"]={ | ||
Line 6,801: | Line 6,801: | ||
[h]=m, | [h]=m, | ||
[i]={"2592327dae05",1503625675,"[c++2a] P0704R1: Allow pointers to const& member functions to be called on rvalues."}, | [i]={"2592327dae05",1503625675,"[c++2a] P0704R1: Allow pointers to const& member functions to be called on rvalues."}, | ||
[j]={{V, | [j]={{V,6092,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n // C++0x [expr.mptr.oper]p6:\n // In a .* expression whose object expression is an rvalue, the program is\n // ill-formed if the second operand is a pointer to member function with\n // ref-qualifier &. In a ->* expression or in a .* expression whose object\n // expression is an lvalue, the program is ill-formed if the second operand\n // is a pointer to member function with ref-qualifier &&.\n if (const FunctionProtoType *Proto = Result->getAs<FunctionProtoType>()) {\n case RQ_LValue:\n if (!isIndirect && !LHS.get()->Classify(Context).isLValue()) {\n // C++2a allows functions with ref-qualifier & if their cv-qualifier-seq\n // is (exactly) \'const\'.\n if (Proto->isConst() && !Proto->isVolatile())\n Diag(Loc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_pointer_to_const_ref_member_on_rvalue : diag::ext_pointer_to_const_ref_member_on_rvalue);"}} | ||
}, | }, | ||
["ext_pp_bad_paste_ms"]={ | ["ext_pp_bad_paste_ms"]={ | ||
Line 6,815: | Line 6,815: | ||
[h]=A, | [h]=A, | ||
[i]={"7b1573451eac",1392684350,"Fix a non-error diagnostic that had an err_ name. Also move it from Warning to"}, | [i]={"7b1573451eac",1392684350,"Fix a non-error diagnostic that had an err_ name. Also move it from Warning to"}, | ||
[j]={{"clang/lib/Lex/TokenLexer.cpp", | [j]={{"clang/lib/Lex/TokenLexer.cpp",869,"/// LHSTok is the LHS of a ## operator, and CurTokenIdx is the ##\n/// operator. Read the ## and RHS, and paste the LHS/RHS together. If there\n/// are more ## after it, chomp them iteratively. Return the result as LHSTok.\n/// If this returns true, the caller should immediately return the token.\nbool TokenLexer::pasteTokens(Token &LHSTok, ArrayRef<Token> TokenStream, unsigned int &CurIdx) {\n do {\n if (LHSTok.isAnyIdentifier() && RHS.isAnyIdentifier()) {\n } else {\n // If pasting the two tokens didn\'t form a full new token, this is an\n // error. This occurs with \"x ## +\" and other stuff. Return with LHSTok\n // unmodified and with RHS as the next token to lex.\n if (isInvalid) {\n // Do not emit the error when preprocessing assembler code.\n if (!PP.getLangOpts().AsmPreprocessor) {\n PP.Diag(Loc, PP.getLangOpts().MicrosoftExt ? diag::ext_pp_bad_paste_ms : diag::err_pp_bad_paste) << Buffer;"}} | ||
}, | }, | ||
["ext_pp_bad_vaargs_use"]={ | ["ext_pp_bad_vaargs_use"]={ | ||
Line 6,830: | Line 6,830: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{"clang/lib/Lex/Preprocessor.cpp", | [j]={{"clang/lib/Lex/Preprocessor.cpp",122,"Preprocessor::Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts, DiagnosticsEngine &diags, LangOptions &opts, SourceManager &SM, HeaderSearch &Headers, ModuleLoader &TheModuleLoader, IdentifierInfoLookup *IILookup, bool OwnsHeaders, TranslationUnitKind TUKind)\n SetPoisonReason(Ident__VA_ARGS__, diag::ext_pp_bad_vaargs_use);"}} | ||
}, | }, | ||
["ext_pp_bad_vaopt_use"]={ | ["ext_pp_bad_vaopt_use"]={ | ||
Line 6,844: | Line 6,844: | ||
[h]=A, | [h]=A, | ||
[i]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)"}, | [i]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)"}, | ||
[j]={{"clang/lib/Lex/Preprocessor.cpp", | [j]={{"clang/lib/Lex/Preprocessor.cpp",124,"Preprocessor::Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts, DiagnosticsEngine &diags, LangOptions &opts, SourceManager &SM, HeaderSearch &Headers, ModuleLoader &TheModuleLoader, IdentifierInfoLookup *IILookup, bool OwnsHeaders, TranslationUnitKind TUKind)\n SetPoisonReason(Ident__VA_OPT__, diag::ext_pp_bad_vaopt_use);"}} | ||
}, | }, | ||
["ext_pp_comma_expr"]={ | ["ext_pp_comma_expr"]={ | ||
Line 6,859: | Line 6,859: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{rc, | [j]={{rc,808,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n while (true) {\n case tok::comma:\n // Comma is invalid in pp expressions in c89/c++ mode, but is valid in C99\n // if not being evaluated.\n if (!PP.getLangOpts().C99 || ValueLive)\n PP.Diag(OpLoc, diag::ext_pp_comma_expr) << LHS.getRange() << RHS.getRange();"}} | ||
}, | }, | ||
["ext_pp_extra_tokens_at_eol"]={ | ["ext_pp_extra_tokens_at_eol"]={ | ||
Line 6,873: | Line 6,873: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{"clang/examples/AnnotateFunctions/AnnotateFunctions.cpp", | [j]={{"clang/examples/AnnotateFunctions/AnnotateFunctions.cpp",69,"class PragmaAnnotateHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PragmaTok) override {\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{W,440,"/// Ensure that the next token is a tok::eod token.\n///\n/// If not, emit a diagnostic and consume up until the eod. If EnableMacros is\n/// true, then we consider macros that expand to zero tokens as being ok.\n///\n/// Returns the location of the end of the directive.\nSourceLocation Preprocessor::CheckEndOfDirective(const char *DirType, bool EnableMacros) {\n Diag(Tmp, diag::ext_pp_extra_tokens_at_eol) << DirType << Hint;"},{lb,818,"void Preprocessor::HandlePragmaModuleBuild(Token &Tok) {\n if (Tok.isNot(tok::eod)) {\n Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{lb,898,"void Preprocessor::HandlePragmaHdrstop(Token &Tok) {\n if (Tok.isNot(tok::eod))\n Diag(Tok.getLocation(), diag::ext_pp_extra_tokens_at_eol) << \"pragma hdrstop\";"},{lb,1220,"struct PragmaDebugHandler : public PragmaHandler {\n void HandleCaptured(Preprocessor &PP) {\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma clang __debug captured\";"},{lb,1522,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma warning\";"},{lb,1586,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma execution_character_set\";"},{lb,1704,"/// Handle the clang \\#pragma module import extension. The syntax is:\n/// \\code\n/// #pragma clang module import some.module.name\n/// \\endcode\nstruct PragmaModuleImportHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{lb,1741,"/// Handle the clang \\#pragma module begin extension. The syntax is:\n/// \\code\n/// #pragma clang module begin some.module.name\n/// ...\n/// #pragma clang module end\n/// \\endcode\nstruct PragmaModuleBeginHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{lb,1796,"/// Handle the clang \\#pragma module end extension.\nstruct PragmaModuleEndHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{lb,1831,"/// Handle the clang \\#pragma module load extension.\nstruct PragmaModuleLoadHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{lb,1888,"/// PragmaARCCFCodeAuditedHandler -\n/// \\#pragma clang arc_cf_code_audited begin/end\nstruct PragmaARCCFCodeAuditedHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{lb,1943,"/// PragmaAssumeNonNullHandler -\n/// \\#pragma clang assume_nonnull begin/end\nstruct PragmaAssumeNonNullHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"}} | ||
}, | }, | ||
["ext_pp_gnu_line_directive"]={ | ["ext_pp_gnu_line_directive"]={ | ||
Line 6,888: | Line 6,888: | ||
[h]=A, | [h]=A, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{W, | [j]={{W,1583,"/// HandleDigitDirective - Handle a GNU line marker directive, whose syntax is\n/// one of the following forms:\n///\n/// # 42\n/// # 42 \"file\" (\'1\' | \'2\')?\n/// # 42 \"file\" (\'1\' | \'2\')? \'3\' \'4\'?\n///\nvoid Preprocessor::HandleDigitDirective(Token &DigitTok) {\n // If the StrTok is \"eod\", then it wasn\'t present. Otherwise, it must be a\n // string followed by eod.\n if (StrTok.is(tok::eod)) {\n Diag(StrTok, diag::ext_pp_gnu_line_directive);"},{W,1613,"/// HandleDigitDirective - Handle a GNU line marker directive, whose syntax is\n/// one of the following forms:\n///\n/// # 42\n/// # 42 \"file\" (\'1\' | \'2\')?\n/// # 42 \"file\" (\'1\' | \'2\')? \'3\' \'4\'?\n///\nvoid Preprocessor::HandleDigitDirective(Token &DigitTok) {\n // If the StrTok is \"eod\", then it wasn\'t present. Otherwise, it must be a\n // string followed by eod.\n if (StrTok.is(tok::eod)) {\n } else if (StrTok.isNot(tok::string_literal)) {\n } else if (StrTok.hasUDSuffix()) {\n } else {\n if (!SourceMgr.isWrittenInBuiltinFile(DigitTok.getLocation()) && !SourceMgr.isWrittenInCommandLineFile(DigitTok.getLocation()))\n Diag(StrTok, diag::ext_pp_gnu_line_directive);"}} | ||
}, | }, | ||
["ext_pp_ident_directive"]={ | ["ext_pp_ident_directive"]={ | ||
Line 6,903: | Line 6,903: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,1665,"/// HandleIdentSCCSDirective - Handle a #ident/#sccs directive.\n///\nvoid Preprocessor::HandleIdentSCCSDirective(Token &Tok) {\n Diag(Tok, diag::ext_pp_ident_directive);"}} | ||
}, | }, | ||
["ext_pp_import_directive"]={ | ["ext_pp_import_directive"]={ | ||
Line 6,918: | Line 6,918: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,2623,"/// HandleImportDirective - Implements \\#import.\n///\nvoid Preprocessor::HandleImportDirective(SourceLocation HashLoc, Token &ImportTok) {\n if (!LangOpts.ObjC) { // #import is standard for ObjC.\n Diag(ImportTok, diag::ext_pp_import_directive);"}} | ||
}, | }, | ||
["ext_pp_include_next_directive"]={ | ["ext_pp_include_next_directive"]={ | ||
Line 6,933: | Line 6,933: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,2592,"/// HandleIncludeNextDirective - Implements \\#include_next.\n///\nvoid Preprocessor::HandleIncludeNextDirective(SourceLocation HashLoc, Token &IncludeNextTok) {\n Diag(IncludeNextTok, diag::ext_pp_include_next_directive);"}} | ||
}, | }, | ||
["ext_pp_include_search_ms"]={ | ["ext_pp_include_search_ms"]={ | ||
Line 6,947: | Line 6,947: | ||
[h]=A, | [h]=A, | ||
[i]={"0fafd34a6e7a",1388173576,"Implement MSVC header search algorithm in MicrosoftMode."}, | [i]={"0fafd34a6e7a",1388173576,"Implement MSVC header search algorithm in MicrosoftMode."}, | ||
[j]={{"clang/lib/Lex/HeaderSearch.cpp", | [j]={{"clang/lib/Lex/HeaderSearch.cpp",763,"/// Return true with a diagnostic if the file that MSVC would have found\n/// fails to match the one that Clang would have found with MSVC header search\n/// disabled.\nstatic bool checkMSVCHeaderSearch(DiagnosticsEngine &Diags, const FileEntry *MSFE, const FileEntry *FE, SourceLocation IncludeLoc) {\n if (MSFE && FE != MSFE) {\n Diags.Report(IncludeLoc, diag::ext_pp_include_search_ms) << MSFE->getName();"},{"clang/lib/Lex/HeaderSearch.cpp",977,"/// LookupFile - Given a \"foo\" or \\<foo> reference, look up the indicated file,\n/// return null on failure. isAngled indicates whether the file reference is\n/// for system \\#include\'s or not (i.e. using <> instead of \"\"). Includers, if\n/// non-empty, indicates where the \\#including file(s) are, in case a relative\n/// search is needed. Microsoft mode will pass all \\#including files.\nOptionalFileEntryRef HeaderSearch::LookupFile(StringRef Filename, SourceLocation IncludeLoc, bool isAngled, ConstSearchDirIterator FromDir, ConstSearchDirIterator *CurDirArg, ArrayRef<std::pair<const FileEntry *, DirectoryEntryRef>> Includers, SmallVectorImpl<char> *SearchPath, SmallVectorImpl<char> *RelativePath, Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, bool *IsMapped, bool *IsFrameworkFound, bool SkipCache, bool BuildSystemModule, bool OpenFile, bool CacheFailures) {\n // Unless disabled, check to see if the file is in the #includer\'s\n // directory. This cannot be based on CurDir, because each includer could be\n // a #include of a subdirectory (#include \"foo/bar.h\") and a subsequent\n // include of \"baz.h\" should resolve to \"whatever/foo/baz.h\".\n // This search is not done for <> headers.\n if (!Includers.empty() && !isAngled && !NoCurDirSearch) {\n for (const auto &IncluderAndDir : Includers) {\n if (OptionalFileEntryRef FE = getFileAndSuggestModule(TmpDir, IncludeLoc, IncluderAndDir.second, IncluderIsSystemHeader, RequestingModule, SuggestedModule)) {\n if (Diags.isIgnored(diag::ext_pp_include_search_ms, IncludeLoc)) {"}} | ||
}, | }, | ||
["ext_pp_line_too_big"]={ | ["ext_pp_line_too_big"]={ | ||
Line 6,962: | Line 6,962: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,1423,"/// Handle a \\#line directive: C99 6.10.4.\n///\n/// The two acceptable forms are:\n/// \\verbatim\n/// # line digit-sequence\n/// # line digit-sequence \"s-char-sequence\"\n/// \\endverbatim\nvoid Preprocessor::HandleLineDirective() {\n if (LineNo >= LineLimit)\n Diag(DigitTok, diag::ext_pp_line_too_big) << LineLimit;"}} | ||
}, | }, | ||
["ext_pp_line_zero"]={ | ["ext_pp_line_zero"]={ | ||
Line 6,977: | Line 6,977: | ||
[h]=A, | [h]=A, | ||
[i]={"0638c15a52d3",1340745560,"preprocessing: gcc supports #line 0. So, treat this"}, | [i]={"0638c15a52d3",1340745560,"preprocessing: gcc supports #line 0. So, treat this"}, | ||
[j]={{W, | [j]={{W,1415,"/// Handle a \\#line directive: C99 6.10.4.\n///\n/// The two acceptable forms are:\n/// \\verbatim\n/// # line digit-sequence\n/// # line digit-sequence \"s-char-sequence\"\n/// \\endverbatim\nvoid Preprocessor::HandleLineDirective() {\n if (LineNo == 0)\n Diag(DigitTok, diag::ext_pp_line_zero);"}} | ||
}, | }, | ||
["ext_pp_macro_redef"]={ | ["ext_pp_macro_redef"]={ | ||
Line 6,991: | Line 6,991: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,3141,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // Finally, if this identifier already had a macro defined for it, verify that\n // the macro bodies are identical, and issue diagnostics if they are not.\n if (const MacroInfo *OtherMI = getMacroInfo(MacroNameTok.getIdentifierInfo())) {\n // It is very common for system headers to have tons of macro redefinitions\n // and for warnings to be disabled in system headers. If this is the case,\n // then don\'t bother calling MacroInfo::isIdenticalTo.\n if (!getDiagnostics().getSuppressSystemWarnings() || !SourceMgr.isInSystemHeader(DefineTok.getLocation())) {\n // Warn if defining \"__LINE__\" and other builtins, per C99 6.10.8/4 and\n // C++ [cpp.predefined]p4, but allow it as an extension.\n if (isLanguageDefinedBuiltin(SourceMgr, OtherMI, II->getName()))\n // Macros must be identical. This means all tokens and whitespace\n // separation must be the same. C99 6.10.3p2.\n else if (!OtherMI->isAllowRedefinitionsWithoutWarning() && !MI->isIdenticalTo(*OtherMI, *this, /*Syntactic=*/LangOpts.MicrosoftExt)) {\n Diag(MI->getDefinitionLoc(), diag::ext_pp_macro_redef) << MacroNameTok.getIdentifierInfo();"}} | ||
}, | }, | ||
["ext_pp_opencl_variadic_macros"]={ | ["ext_pp_opencl_variadic_macros"]={ | ||
Line 7,006: | Line 7,006: | ||
[h]=A, | [h]=A, | ||
[i]={"545652b96485",1553599357,"[OpenCL] Allow variadic macros as Clang feature."}, | [i]={"545652b96485",1553599357,"[OpenCL] Allow variadic macros as Clang feature."}, | ||
[j]={{W, | [j]={{W,2684,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n while (true) {\n case tok::ellipsis: // #define X(... -> C99 varargs\n // OpenCL v1.2 s6.9.e: variadic macros are not supported.\n if (LangOpts.OpenCL && !LangOpts.OpenCLCPlusPlus) {\n Diag(Tok, diag::ext_pp_opencl_variadic_macros);"}} | ||
}, | }, | ||
["ext_pp_operator_used_as_macro_name"]={ | ["ext_pp_operator_used_as_macro_name"]={ | ||
Line 7,021: | Line 7,021: | ||
[h]=A, | [h]=A, | ||
[i]={"e03e9e15f2a6",1401553942,"Preprocessor: make C++ operator names as macro identifiers a compatible extension"}, | [i]={"e03e9e15f2a6",1401553942,"Preprocessor: make C++ operator names as macro identifiers a compatible extension"}, | ||
[j]={{W, | [j]={{W,335,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n if (II->isCPlusPlusOperatorKeyword()) {\n Diag(MacroNameTok, getLangOpts().MicrosoftExt ? diag::ext_pp_operator_used_as_macro_name : diag::err_pp_operator_used_as_macro_name) << II << MacroNameTok.getKind();"}} | ||
}, | }, | ||
["ext_pp_redef_builtin_macro"]={ | ["ext_pp_redef_builtin_macro"]={ | ||
Line 7,035: | Line 7,035: | ||
[h]=A, | [h]=A, | ||
[i]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,"}, | [i]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,"}, | ||
[j]={{W, | [j]={{W,3136,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // Finally, if this identifier already had a macro defined for it, verify that\n // the macro bodies are identical, and issue diagnostics if they are not.\n if (const MacroInfo *OtherMI = getMacroInfo(MacroNameTok.getIdentifierInfo())) {\n // It is very common for system headers to have tons of macro redefinitions\n // and for warnings to be disabled in system headers. If this is the case,\n // then don\'t bother calling MacroInfo::isIdenticalTo.\n if (!getDiagnostics().getSuppressSystemWarnings() || !SourceMgr.isInSystemHeader(DefineTok.getLocation())) {\n // Warn if defining \"__LINE__\" and other builtins, per C99 6.10.8/4 and\n // C++ [cpp.predefined]p4, but allow it as an extension.\n if (isLanguageDefinedBuiltin(SourceMgr, OtherMI, II->getName()))\n Diag(MacroNameTok, diag::ext_pp_redef_builtin_macro);"}} | ||
}, | }, | ||
["ext_pp_undef_builtin_macro"]={ | ["ext_pp_undef_builtin_macro"]={ | ||
Line 7,049: | Line 7,049: | ||
[h]=A, | [h]=A, | ||
[i]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,"}, | [i]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,"}, | ||
[j]={{W, | [j]={{W,3218,"/// HandleUndefDirective - Implements \\#undef.\n///\nvoid Preprocessor::HandleUndefDirective() {\n // If the macro is not defined, this is a noop undef.\n if (const MacroInfo *MI = MD.getMacroInfo()) {\n // Warn if undefining \"__LINE__\" and other builtins, per C99 6.10.8/4 and\n // C++ [cpp.predefined]p4, but allow it as an extension.\n if (isLanguageDefinedBuiltin(SourceMgr, MI, II->getName()))\n Diag(MacroNameTok, diag::ext_pp_undef_builtin_macro);"}} | ||
}, | }, | ||
["ext_pp_warning_directive"]={ | ["ext_pp_warning_directive"]={ | ||
Line 7,064: | Line 7,064: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,1278,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n default:\n case tok::pp_warning:\n if (LangOpts.CPlusPlus)\n Diag(Result, LangOpts.CPlusPlus23 ? diag::warn_cxx23_compat_warning_directive : diag::ext_pp_warning_directive) << /*C++23*/ 1;"},{W,1282,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n default:\n case tok::pp_warning:\n if (LangOpts.CPlusPlus)\n else\n Diag(Result, LangOpts.C2x ? diag::warn_c2x_compat_warning_directive : diag::ext_pp_warning_directive) << /*C2x*/ 0;"}} | ||
}, | }, | ||
["ext_pragma_syntax_eod"]={ | ["ext_pragma_syntax_eod"]={ | ||
Line 7,078: | Line 7,078: | ||
[h]=A, | [h]=A, | ||
[i]={"2f1e36bfd0c1",1298860671,"Rename tok::eom to tok::eod."}, | [i]={"2f1e36bfd0c1",1298860671,"Rename tok::eom to tok::eod."}, | ||
[j]={{lb, | [j]={{lb,992,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n if (Tok.isNot(tok::eod))\n Diag(Tok, diag::ext_pragma_syntax_eod);"}} | ||
}, | }, | ||
["ext_predef_outside_function"]={ | ["ext_predef_outside_function"]={ | ||
Line 7,092: | Line 7,092: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{y, | [j]={{y,3641,"ExprResult Sema::BuildPredefinedExpr(SourceLocation Loc, PredefinedExpr::IdentKind IK) {\n if (!currentDecl) {\n Diag(Loc, diag::ext_predef_outside_function);"}} | ||
}, | }, | ||
["ext_pseudo_dtor_on_void"]={ | ["ext_pseudo_dtor_on_void"]={ | ||
Line 7,106: | Line 7,106: | ||
[h]=m, | [h]=m, | ||
[i]={"5882927d7a1f",1327297857,"In microsoft mode, downgrade pseudo-destructors on void from error to warning."}, | [i]={"5882927d7a1f",1327297857,"In microsoft mode, downgrade pseudo-destructors on void from error to warning."}, | ||
[j]={{V, | [j]={{V,7768,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n if (!ObjectType->isDependentType() && !ObjectType->isScalarType() && !ObjectType->isVectorType()) {\n if (getLangOpts().MSVCCompat && ObjectType->isVoidType())\n Diag(OpLoc, diag::ext_pseudo_dtor_on_void) << Base->getSourceRange();"}} | ||
}, | }, | ||
["ext_pure_function_definition"]={ | ["ext_pure_function_definition"]={ | ||
Line 7,120: | Line 7,120: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{w, | [j]={{w,15629,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n {\n if (FD) {\n // MSVC permits the use of pure specifier (=0) on function definition,\n // defined at class scope, warn about this non-standard construct.\n if (getLangOpts().MicrosoftExt && FD->isPure() && !FD->isOutOfLine())\n Diag(FD->getLocation(), diag::ext_pure_function_definition);"}} | ||
}, | }, | ||
["ext_qualified_dtor_named_in_lexical_scope"]={ | ["ext_qualified_dtor_named_in_lexical_scope"]={ | ||
Line 7,134: | Line 7,134: | ||
[h]=m, | [h]=m, | ||
[i]={yc,1576809732,Ac}, | [i]={yc,1576809732,Ac}, | ||
[j]={{V, | [j]={{V,400,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n if (SS.isSet()) {\n // For compatibility with other compilers and older versions of Clang,\n //\n // nested-name-specifier type-name :: ~ type-name\n //\n // also looks for type-name in the scope. Unfortunately, we can\'t\n // reasonably apply this fallback for dependent nested-name-specifiers.\n if (SS.isValid() && SS.getScopeRep()->getPrefix()) {\n if (ParsedType T = LookupInScope()) {\n Diag(SS.getEndLoc(), diag::ext_qualified_dtor_named_in_lexical_scope) << FixItHint::CreateRemoval(SS.getRange());"}} | ||
}, | }, | ||
["ext_redefinition_of_typedef"]={ | ["ext_redefinition_of_typedef"]={ | ||
Line 7,148: | Line 7,148: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{w, | [j]={{w,2740,"/// MergeTypedefNameDecl - We just parsed a typedef \'New\' which has the\n/// same name and scope as a previous declaration \'Old\'. Figure out\n/// how to resolve this situation, merging decls or emitting\n/// diagnostics as appropriate. If there was an error, set New to be invalid.\n///\nvoid Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, LookupResult &OldDecls) {\n Diag(New->getLocation(), diag::ext_redefinition_of_typedef) << New->getDeclName();"}} | ||
}, | }, | ||
["ext_ref_qualifier"]={ | ["ext_ref_qualifier"]={ | ||
Line 7,162: | Line 7,162: | ||
[h]=x, | [h]=x, | ||
[i]={"a52713096d31",1296074132,"Improve the extension warning for the use of ref-qualifiers, to"}, | [i]={"a52713096d31",1296074132,"Improve the extension warning for the use of ref-qualifiers, to"}, | ||
[j]={{F, | [j]={{F,7160,"/// ParseRefQualifier - Parses a member function ref-qualifier. Returns\n/// true if a ref-qualifier is found.\nbool Parser::ParseRefQualifier(bool &RefQualifierIsLValueRef, SourceLocation &RefQualifierLoc) {\n if (Tok.isOneOf(tok::amp, tok::ampamp)) {\n Diag(Tok, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_ref_qualifier : diag::ext_ref_qualifier);"}} | ||
}, | }, | ||
["ext_register_storage_class"]={ | ["ext_register_storage_class"]={ | ||
Line 7,176: | Line 7,176: | ||
[h]=m, | [h]=m, | ||
[i]={"291027692fe7",1448487261,"P0001R1: \'register\' storage class specifier is no longer permitted in C++1z."}, | [i]={"291027692fe7",1448487261,"P0001R1: \'register\' storage class specifier is no longer permitted in C++1z."}, | ||
[j]={{w, | [j]={{w,7496,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n if (getLangOpts().CPlusPlus11 && SCSpec == DeclSpec::SCS_register && !D.getAsmLabel() && !getSourceManager().isInSystemMacro(D.getDeclSpec().getStorageClassSpecLoc())) {\n Diag(D.getDeclSpec().getStorageClassSpecLoc(), getLangOpts().CPlusPlus17 ? diag::ext_register_storage_class : diag::warn_deprecated_register) << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"},{w,14738,"/// ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator()\n/// to introduce parameters into function prototype scope.\nDecl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {\n if (DS.getStorageClassSpec() == DeclSpec::SCS_register) {\n // In C++11, the \'register\' storage class specifier is deprecated.\n // In C++17, it is not allowed, but we tolerate it as an extension.\n if (getLangOpts().CPlusPlus11) {\n Diag(DS.getStorageClassSpecLoc(), getLangOpts().CPlusPlus17 ? diag::ext_register_storage_class : diag::warn_deprecated_register) << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());"}} | ||
}, | }, | ||
["ext_reserved_user_defined_literal"]={ | ["ext_reserved_user_defined_literal"]={ | ||
Line 7,190: | Line 7,190: | ||
[h]=A, | [h]=A, | ||
[i]={"0df56f4a9000",1331174361,"Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix not"}, | [i]={"0df56f4a9000",1331174361,"Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix not"}, | ||
[j]={{Z, | [j]={{Z,2053,"/// LexUDSuffix - Lex the ud-suffix production for user-defined literal suffixes\n/// in C++11, or warn on a ud-suffix in C++98.\nconst char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr, bool IsStringLiteral) {\n // C++11 [lex.ext]p10, [usrlit.suffix]p1: A program containing a ud-suffix\n // that does not start with an underscore is ill-formed. As a conforming\n // extension, we treat all such suffixes as if they had whitespace before\n // them. We assume a suffix beginning with a UCN or UTF-8 character is more\n // likely to be a ud-suffix than a macro, however, and accept that.\n if (!Consumed) {\n if (!IsUDSuffix) {\n if (!isLexingRawMode())\n Diag(CurPtr, LangOpts.MSVCCompat ? diag::ext_ms_reserved_user_defined_literal : diag::ext_reserved_user_defined_literal) << FixItHint::CreateInsertion(getSourceLocation(CurPtr), \" \");"}} | ||
}, | }, | ||
["ext_retained_language_linkage"]={ | ["ext_retained_language_linkage"]={ | ||
Line 7,205: | Line 7,205: | ||
[h]=m, | [h]=m, | ||
[i]={"dd551fc3ae9d",1382482381,"Retain previous language linkage of friend function declarations"}, | [i]={"dd551fc3ae9d",1382482381,"Retain previous language linkage of friend function declarations"}, | ||
[j]={{w, | [j]={{w,4085,"/// 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 (haveIncompatibleLanguageLinkages(Old, New)) {\n // As a special case, retain the language linkage from previous\n // declarations of a friend function as an extension.\n //\n // This liberal interpretation of C++ [class.friend]p3 matches GCC/MSVC\n // and is useful because there\'s otherwise no way to specify language\n // linkage within class scope.\n //\n // Check cautiously as the friend object kind isn\'t yet complete.\n if (New->getFriendObjectKind() != Decl::FOK_None) {\n Diag(New->getLocation(), diag::ext_retained_language_linkage) << New;"}} | ||
}, | }, | ||
["ext_return_has_expr"]={ | ["ext_return_has_expr"]={ | ||
Line 7,219: | Line 7,219: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{Ob, | [j]={{Ob,4074,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n } else if (!RetValExp->isTypeDependent()) {\n unsigned D = diag::ext_return_has_expr;"}} | ||
}, | }, | ||
["ext_return_has_void_expr"]={ | ["ext_return_has_void_expr"]={ | ||
Line 7,234: | Line 7,234: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{Ob, | [j]={{Ob,3686,"/// 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 if (RetValExp && !isa<InitListExpr>(RetValExp) && !(getLangOpts().CPlusPlus && (RetValExp->isTypeDependent() || RetValExp->getType()->isVoidType()))) {\n if (!getLangOpts().CPlusPlus && RetValExp->getType()->isVoidType())\n Diag(ReturnLoc, diag::ext_return_has_void_expr) << \"literal\" << 2;"},{Ob,4081,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n } else if (!RetValExp->isTypeDependent()) {\n if (RetValExp->getType()->isVoidType()) {\n if (isa<CXXConstructorDecl>(CurDecl) || isa<CXXDestructorDecl>(CurDecl))\n else\n D = diag::ext_return_has_void_expr;"},{Ob,4099,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n } else if (!RetValExp->isTypeDependent()) {\n else if (D != diag::ext_return_has_void_expr || !getLangOpts().CPlusPlus) {"}} | ||
}, | }, | ||
["ext_return_missing_expr"]={ | ["ext_return_missing_expr"]={ | ||
Line 7,248: | Line 7,248: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{Ob, | [j]={{Ob,4140,"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 } else {\n unsigned DiagID = getLangOpts().C99 ? diag::ext_return_missing_expr : diag::warn_return_missing_expr;"}} | ||
}, | }, | ||
["ext_rvalue_reference"]={ | ["ext_rvalue_reference"]={ | ||
Line 7,262: | Line 7,262: | ||
[h]=x, | [h]=x, | ||
[i]={"0098499f7d8d",1295921852,"Downgrade the error about rvalue references to an extension warning"}, | [i]={"0098499f7d8d",1295921852,"Downgrade the error about rvalue references to an extension warning"}, | ||
[j]={{F, | [j]={{F,6274,"/// ParseDeclaratorInternal - Parse a C or C++ declarator. The direct-declarator\n/// is parsed by the function passed to it. Pass null, and the direct-declarator\n/// isn\'t parsed at all, making this function effectively parse the C++\n/// ptr-operator production.\n///\n/// If the grammar of this construct is extended, matching changes must also be\n/// made to TryParseDeclarator and MightBeDeclarator, and possibly to\n/// isConstructorDeclarator.\n///\n/// declarator: [C99 6.7.5] [C++ 8p4, dcl.decl]\n/// [C] pointer[opt] direct-declarator\n/// [C++] direct-declarator\n/// [C++] ptr-operator declarator\n///\n/// pointer: [C99 6.7.5]\n/// \'*\' type-qualifier-list[opt]\n/// \'*\' type-qualifier-list[opt] pointer\n///\n/// ptr-operator:\n/// \'*\' cv-qualifier-seq[opt]\n/// \'&\'\n/// [C++0x] \'&&\'\n/// [GNU] \'&\' restrict[opt] attributes[opt]\n/// [GNU?] \'&&\' restrict[opt] attributes[opt]\n/// \'::\'[opt] nested-name-specifier \'*\' cv-qualifier-seq[opt]\nvoid Parser::ParseDeclaratorInternal(Declarator &D, DirectDeclParseFunction DirectDeclParser) {\n if (Kind == tok::star || Kind == tok::caret) {\n } else {\n // Complain about rvalue references in C++03, but then go on and build\n // the declarator.\n if (Kind == tok::ampamp)\n Diag(Loc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_rvalue_reference : diag::ext_rvalue_reference);"}} | ||
}, | }, | ||
["ext_rvalue_to_reference_access_ctor"]={ | ["ext_rvalue_to_reference_access_ctor"]={ | ||
Line 7,277: | Line 7,277: | ||
[h]=m, | [h]=m, | ||
[i]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy"}, | [i]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy"}, | ||
[j]={{kc, | [j]={{kc,1654,"/// 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);"}} | ||
}, | }, | ||
["ext_rvalue_to_reference_temp_copy_no_viable"]={ | ["ext_rvalue_to_reference_temp_copy_no_viable"]={ | ||
Line 7,292: | Line 7,292: | ||
[h]=m, | [h]=m, | ||
[i]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy"}, | [i]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy"}, | ||
[j]={{T, | [j]={{T,6788,"/// 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 case OR_No_Viable_Function:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Loc, S.PDiag(IsExtraneousCopy && !S.isSFINAEContext() ? diag::ext_rvalue_to_reference_temp_copy_no_viable : diag::err_temp_copy_no_viable) << (int)Entity.getKind() << CurInitExpr->getType() << CurInitExpr->getSourceRange()), S, OCD_AllCandidates, CurInitExpr);"}} | ||
}, | }, | ||
["ext_scoped_enum"]={ | ["ext_scoped_enum"]={ | ||
Line 7,306: | Line 7,306: | ||
[h]=x, | [h]=x, | ||
[i]={"d0d87b597259",1366685256,"Warn that scoped enumerations are a C++11 extenstion when compiling in"}, | [i]={"d0d87b597259",1366685256,"Warn that scoped enumerations are a C++11 extenstion when compiling in"}, | ||
[j]={{F, | [j]={{F,4793,"/// 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 // In C++11, recognize \'enum class\' and \'enum struct\'.\n if (Tok.isOneOf(tok::kw_class, tok::kw_struct) && getLangOpts().CPlusPlus) {\n Diag(Tok, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_scoped_enum : diag::ext_scoped_enum);"}} | ||
}, | }, | ||
["ext_sizeof_alignof_function_type"]={ | ["ext_sizeof_alignof_function_type"]={ | ||
Line 7,321: | Line 7,321: | ||
[h]=m, | [h]=m, | ||
[i]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode."}, | [i]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode."}, | ||
[j]={{y, | [j]={{y,4310,"static bool CheckExtensionTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) {\n // C99 6.5.3.4p1:\n if (T->isFunctionType() && (TraitKind == UETT_SizeOf || TraitKind == UETT_AlignOf || TraitKind == UETT_PreferredAlignOf)) {\n S.Diag(Loc, diag::ext_sizeof_alignof_function_type) << getTraitSpelling(TraitKind) << ArgRange;"}} | ||
}, | }, | ||
["ext_sizeof_alignof_void_type"]={ | ["ext_sizeof_alignof_void_type"]={ | ||
Line 7,336: | Line 7,336: | ||
[h]=m, | [h]=m, | ||
[i]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode."}, | [i]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode."}, | ||
[j]={{y, | [j]={{y,4326,"static bool CheckExtensionTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) {\n // Allow sizeof(void)/alignof(void) as an extension, unless in OpenCL where\n // this is an error (OpenCL v1.1 s6.3.k)\n if (T->isVoidType()) {\n unsigned DiagID = S.LangOpts.OpenCL ? diag::err_opencl_sizeof_alignof_type : diag::ext_sizeof_alignof_void_type;"}} | ||
}, | }, | ||
["ext_standalone_specifier"]={ | ["ext_standalone_specifier"]={ | ||
Line 7,350: | Line 7,350: | ||
[h]=m, | [h]=m, | ||
[i]={"b1402ae94eb7",1363647167,"Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some rel..."}, | [i]={"b1402ae94eb7",1363647167,"Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some rel..."}, | ||
[j]={{w, | [j]={{w,5281,"/// 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 (getLangOpts().CPlusPlus)\n DiagID = diag::ext_standalone_specifier;"}} | ||
}, | }, | ||
["ext_star_this_lambda_capture_cxx17"]={ | ["ext_star_this_lambda_capture_cxx17"]={ | ||
Line 7,364: | Line 7,364: | ||
[h]="Lambda Issue", | [h]="Lambda Issue", | ||
[i]={"b115e5dda202",1502667449,"Rename cxx1z -> cxx17 across all diagnostic IDs."}, | [i]={"b115e5dda202",1502667449,"Rename cxx1z -> cxx17 across all diagnostic IDs."}, | ||
[j]={{"clang/lib/Sema/SemaLambda.cpp", | [j]={{"clang/lib/Sema/SemaLambda.cpp",1022,"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 if (C->Kind == LCK_StarThis)\n Diag(C->Loc, !getLangOpts().CPlusPlus17 ? diag::ext_star_this_lambda_capture_cxx17 : diag::warn_cxx14_compat_star_this_lambda_capture);"}} | ||
}, | }, | ||
["ext_static_data_member_in_union"]={ | ["ext_static_data_member_in_union"]={ | ||
Line 7,378: | Line 7,378: | ||
[h]=m, | [h]=m, | ||
[i]={"429737556135",1329424882,"C++11 allows unions to have static data members. Remove the corresponding"}, | [i]={"429737556135",1329424882,"C++11 allows unions to have static data members. Remove the corresponding"}, | ||
[j]={{w, | [j]={{w,7607,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n if (!getLangOpts().CPlusPlus) {\n } else {\n if (SC == SC_Static && CurContext->isRecord()) {\n if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(DC)) {\n if (FunctionOrMethod) {\n } else if (AnonStruct) {\n } else if (RD->isUnion()) {\n Diag(D.getIdentifierLoc(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_static_data_member_in_union : diag::ext_static_data_member_in_union) << Name;"}} | ||
}, | }, | ||
["ext_static_non_static"]={ | ["ext_static_non_static"]={ | ||
Line 7,393: | Line 7,393: | ||
[h]=m, | [h]=m, | ||
[i]={"5b63fa02b2fa",1403133985,"Sema: Static redeclaration after extern declarations is a Microsoft Extension"}, | [i]={"5b63fa02b2fa",1403133985,"Sema: Static redeclaration after extern declarations is a Microsoft Extension"}, | ||
[j]={{w, | [j]={{w,3699,"/// 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 // Don\'t complain about this if we\'re in GNU89 mode and the old function\n // is an extern inline function.\n // Don\'t complain about specializations. They are not supposed to have\n // storage classes.\n if (!isa<CXXMethodDecl>(New) && !isa<CXXMethodDecl>(Old) && New->getStorageClass() == SC_Static && Old->hasExternalFormalLinkage() && !New->getTemplateSpecializationInfo() && !canRedefineFunction(Old, getLangOpts())) {\n if (getLangOpts().MicrosoftExt) {\n Diag(New->getLocation(), diag::ext_static_non_static) << New;"},{w,4629,"/// 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 // [dcl.stc]p8: Check if we have a non-static decl followed by a static.\n if (New->getStorageClass() == SC_Static && !New->isStaticDataMember() && Old->hasExternalFormalLinkage()) {\n if (getLangOpts().MicrosoftExt) {\n Diag(New->getLocation(), diag::ext_static_non_static) << New->getDeclName();"}} | ||
}, | }, | ||
["ext_static_out_of_line"]={ | ["ext_static_out_of_line"]={ | ||
Line 7,407: | Line 7,407: | ||
[h]=m, | [h]=m, | ||
[i]={"3e7fda229d3f",1548435702,"Allow \'static\' storage specifier on an out-of-line member function template"}, | [i]={"3e7fda229d3f",1548435702,"Allow \'static\' storage specifier on an out-of-line member function template"}, | ||
[j]={{w, | [j]={{w,10052,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n if (getLangOpts().CPlusPlus) {\n if (SC == SC_Static && isa<CXXMethodDecl>(NewFD) && !CurContext->isRecord()) {\n Diag(D.getDeclSpec().getStorageClassSpecLoc(), ((!getLangOpts().isCompatibleWithMSVC(LangOptions::MSVC2015) && cast<CXXRecordDecl>(DC)->getDescribedClassTemplate()) || (getLangOpts().MSVCCompat && NewFD->getDescribedFunctionTemplate())) ? diag::ext_static_out_of_line : diag::err_static_out_of_line) << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"}} | ||
}, | }, | ||
["ext_stdc_pragma_ignored"]={ | ["ext_stdc_pragma_ignored"]={ | ||
Line 7,421: | Line 7,421: | ||
[h]=x, | [h]=x, | ||
[i]={"a0b1f76d1022",1240176337,"reject invalid stuff in the STDC namespace."}, | [i]={"a0b1f76d1022",1240176337,"reject invalid stuff in the STDC namespace."}, | ||
[j]={{"clang/lib/Parse/ParsePragma.cpp", | [j]={{"clang/lib/Parse/ParsePragma.cpp",160,"/// PragmaSTDC_UnknownHandler - \"\\#pragma STDC ...\".\nstruct PragmaSTDC_UnknownHandler : public PragmaHandler {\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnknownTok) override {\n PP.Diag(UnknownTok, diag::ext_stdc_pragma_ignored);"}} | ||
}, | }, | ||
["ext_string_literal_operator_template"]={ | ["ext_string_literal_operator_template"]={ | ||
Line 7,435: | Line 7,435: | ||
[h]=m, | [h]=m, | ||
[i]={"b8b41d3ea444",1381175878,"Add support for WG21 N3599 (literal operator template for strings) as a GNU"}, | [i]={"b8b41d3ea444",1381175878,"Add support for WG21 N3599 (literal operator template for strings) as a GNU"}, | ||
[j]={{z, | [j]={{z,16330,"static bool checkLiteralOperatorTemplateParameterList(Sema &SemaRef, FunctionTemplateDecl *TpDecl) {\n // Must have one or two template parameters.\n if (TemplateParams->size() == 1) {\n } else if (TemplateParams->size() == 2) {\n // The second template parameter must be a parameter pack with the\n // first template parameter as its type.\n if (PmType && PmArgs && !PmType->isTemplateParameterPack() && PmArgs->isTemplateParameterPack()) {\n if (TArgs && TArgs->getDepth() == PmType->getDepth() && TArgs->getIndex() == PmType->getIndex()) {\n if (!SemaRef.inTemplateInstantiation())\n SemaRef.Diag(TpDecl->getLocation(), diag::ext_string_literal_operator_template);"}} | ||
}, | }, | ||
["ext_string_too_long"]={ | ["ext_string_too_long"]={ | ||
Line 7,450: | Line 7,450: | ||
[h]=A, | [h]=A, | ||
[i]={"b37b46e488a3",1279636400,"Complain when string literals are too long for the active language"}, | [i]={"b37b46e488a3",1279636400,"Complain when string literals are too long for the active language"}, | ||
[j]={{cb, | [j]={{cb,2221,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n if (Pascal) {\n } else if (Diags) {\n if (GetNumStringChars() > MaxChars)\n Diags->Report(StringToks.front().getLocation(), diag::ext_string_too_long) << GetNumStringChars() << MaxChars << (Features.CPlusPlus ? 2 : Features.C99 ? 1 : 0) << SourceRange(StringToks.front().getLocation(), StringToks.back().getLocation());"}} | ||
}, | }, | ||
["ext_subscript_non_lvalue"]={ | ["ext_subscript_non_lvalue"]={ | ||
Line 7,465: | Line 7,465: | ||
[h]=m, | [h]=m, | ||
[i]={"ab2784f2c16e",1240703214,"Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode."}, | [i]={"ab2784f2c16e",1240703214,"Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode."}, | ||
[j]={{y, | [j]={{y,5935,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n if (LHSTy->isDependentType() || RHSTy->isDependentType()) {\n } else if (const PointerType *PTy = LHSTy->getAs<PointerType>()) {\n } else if (const ObjCObjectPointerType *PTy = LHSTy->getAs<ObjCObjectPointerType>()) {\n } else if (const PointerType *PTy = RHSTy->getAs<PointerType>()) {\n } else if (const ObjCObjectPointerType *PTy = RHSTy->getAs<ObjCObjectPointerType>()) {\n } else if (const VectorType *VTy = LHSTy->getAs<VectorType>()) {\n } else if (LHSTy->isBuiltinType() && LHSTy->getAs<BuiltinType>()->isVLSTBuiltinType()) {\n } else if (LHSTy->isArrayType()) {\n Diag(LHSExp->getBeginLoc(), diag::ext_subscript_non_lvalue) << LHSExp->getSourceRange();"},{y,5945,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n if (LHSTy->isDependentType() || RHSTy->isDependentType()) {\n } else if (const PointerType *PTy = LHSTy->getAs<PointerType>()) {\n } else if (const ObjCObjectPointerType *PTy = LHSTy->getAs<ObjCObjectPointerType>()) {\n } else if (const PointerType *PTy = RHSTy->getAs<PointerType>()) {\n } else if (const ObjCObjectPointerType *PTy = RHSTy->getAs<ObjCObjectPointerType>()) {\n } else if (const VectorType *VTy = LHSTy->getAs<VectorType>()) {\n } else if (LHSTy->isBuiltinType() && LHSTy->getAs<BuiltinType>()->isVLSTBuiltinType()) {\n } else if (LHSTy->isArrayType()) {\n } else if (RHSTy->isArrayType()) {\n Diag(RHSExp->getBeginLoc(), diag::ext_subscript_non_lvalue) << RHSExp->getSourceRange();"}} | ||
}, | }, | ||
["ext_subscript_overload"]={ | ["ext_subscript_overload"]={ | ||
Line 7,480: | Line 7,480: | ||
[h]=m, | [h]=m, | ||
[i]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions."}, | [i]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions."}, | ||
[j]={{z, | [j]={{z,16192,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // C++ [over.oper]p8:\n // An operator function cannot have default arguments (8.3.6),\n // except where explicitly stated below.\n //\n // Only the function-call operator (C++ [over.call]p1) and the subscript\n // operator (CWG2507) allow default arguments.\n if (Op != OO_Call) {\n if (FirstDefaultedParam) {\n if (Op == OO_Subscript) {\n Diag(FnDecl->getLocation(), LangOpts.CPlusPlus23 ? diag::ext_subscript_overload : diag::error_subscript_overload) << FnDecl->getDeclName() << 1 << FirstDefaultedParam->getDefaultArgRange();"},{z,16243,"#include \"clang/Basic/OperatorKinds.def\"\n if (Op == OO_Subscript && NumParams != 2) {\n Diag(FnDecl->getLocation(), LangOpts.CPlusPlus23 ? diag::ext_subscript_overload : diag::error_subscript_overload) << FnDecl->getDeclName() << (NumParams == 1 ? 0 : 2);"}} | ||
}, | }, | ||
["ext_template_arg_extra_parens"]={ | ["ext_template_arg_extra_parens"]={ | ||
Line 7,492: | Line 7,492: | ||
[h]=m, | [h]=m, | ||
[i]={"6a0c4097f142",1284358018,"Parentheses around address non-type template argument is demoted to an extension warning."}, | [i]={"6a0c4097f142",1284358018,"Parentheses around address non-type template argument is demoted to an extension warning."}, | ||
[j]={{E, | [j]={{E,6769,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n if (S.getLangOpts().MicrosoftExt) {\n } else {\n while (ParenExpr *Parens = dyn_cast<ParenExpr>(Arg)) {\n if (!Invalid && !ExtraParens) {\n S.Diag(Arg->getBeginLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_extra_parens : diag::ext_template_arg_extra_parens) << Arg->getSourceRange();"},{E,6992,"/// Checks whether the given template argument is a pointer to\n/// member constant according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentPointerToMember(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *&ResultArg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n while (ParenExpr *Parens = dyn_cast<ParenExpr>(Arg)) {\n if (!Invalid && !ExtraParens) {\n S.Diag(Arg->getBeginLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_extra_parens : diag::ext_template_arg_extra_parens) << Arg->getSourceRange();"}} | ||
}, | }, | ||
["ext_template_arg_local_type"]={ | ["ext_template_arg_local_type"]={ | ||
Line 7,506: | Line 7,506: | ||
[h]=m, | [h]=m, | ||
[i]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,"}, | [i]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,"}, | ||
[j]={{E, | [j]={{E,6459,"bool UnnamedLocalNoLinkageFinder::VisitTagDecl(const TagDecl *Tag) {\n if (Tag->getDeclContext()->isFunctionOrMethod()) {\n S.Diag(SR.getBegin(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_local_type : diag::ext_template_arg_local_type) << S.Context.getTypeDeclType(Tag) << SR;"}} | ||
}, | }, | ||
["ext_template_arg_object_internal"]={ | ["ext_template_arg_object_internal"]={ | ||
Line 7,520: | Line 7,520: | ||
[h]=m, | [h]=m, | ||
[i]={"9380e0ea236a",1333573890,"Implement C++11 [temp.arg.nontype]\'s permission to use the address of an object"}, | [i]={"9380e0ea236a",1333573890,"Implement C++11 [temp.arg.nontype]\'s permission to use the address of an object"}, | ||
[j]={{E, | [j]={{E,6873,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // Address / reference template args must have external linkage in C++98.\n if (Entity->getFormalLinkage() == InternalLinkage) {\n S.Diag(Arg->getBeginLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_object_internal : diag::ext_template_arg_object_internal) << !Func << Entity << Arg->getSourceRange();"}} | ||
}, | }, | ||
["ext_template_arg_unnamed_type"]={ | ["ext_template_arg_unnamed_type"]={ | ||
Line 7,534: | Line 7,534: | ||
[h]=m, | [h]=m, | ||
[i]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,"}, | [i]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,"}, | ||
[j]={{E, | [j]={{E,6468,"bool UnnamedLocalNoLinkageFinder::VisitTagDecl(const TagDecl *Tag) {\n if (!Tag->hasNameForLinkage()) {\n S.Diag(SR.getBegin(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_unnamed_type : diag::ext_template_arg_unnamed_type) << SR;"}} | ||
}, | }, | ||
["ext_template_outside_of_template"]={ | ["ext_template_outside_of_template"]={ | ||
Line 7,548: | Line 7,548: | ||
[h]=m, | [h]=m, | ||
[i]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'"}, | [i]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'"}, | ||
[j]={{E, | [j]={{E,5084,"/// Form a template name from a name that is syntactically required to name a\n/// template, either due to use of the \'template\' keyword or because a name in\n/// this syntactic context is assumed to name a template (C++ [temp.names]p2-4).\n///\n/// This action forms a template name given the name of the template and its\n/// optional scope specifier. This is used when the \'template\' keyword is used\n/// or when the parsing context unambiguously treats a following \'<\' as\n/// introducing a template argument list. Note that this may produce a\n/// non-dependent template name if we can perform the lookup now and identify\n/// the named template.\n///\n/// For example, given \"x.MetaFun::template apply\", the scope specifier\n/// \\p SS will be \"MetaFun::\", \\p TemplateKWLoc contains the location\n/// of the \"template\" keyword, and \"apply\" is the \\p Name.\nTemplateNameKind Sema::ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Result, bool AllowInjectedClassName) {\n if (TemplateKWLoc.isValid() && S && !S->getTemplateParamParent())\n Diag(TemplateKWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_outside_of_template : diag::ext_template_outside_of_template) << FixItHint::CreateRemoval(TemplateKWLoc);"}} | ||
}, | }, | ||
["ext_template_param_shadow"]={ | ["ext_template_param_shadow"]={ | ||
Line 7,562: | Line 7,562: | ||
[h]=m, | [h]=m, | ||
[i]={Ub,1567434909,Vb}, | [i]={Ub,1567434909,Vb}, | ||
[j]={{E, | [j]={{E,897,"/// DiagnoseTemplateParameterShadow - Produce a diagnostic complaining\n/// that the template parameter \'PrevDecl\' is being shadowed by a new\n/// declaration at location Loc. Returns true to indicate that this is\n/// an error, and false otherwise.\nvoid Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) {\n unsigned DiagId = getLangOpts().MSVCCompat ? diag::ext_template_param_shadow : diag::err_template_param_shadow;"}} | ||
}, | }, | ||
["ext_template_parameter_default_in_function_template"]={ | ["ext_template_parameter_default_in_function_template"]={ | ||
Line 7,576: | Line 7,576: | ||
[h]=m, | [h]=m, | ||
[i]={"8b481d8ac2af",1296791842,"When a function template\'s template parameter has a default argument,"}, | [i]={"8b481d8ac2af",1296791842,"When a function template\'s template parameter has a default argument,"}, | ||
[j]={{E, | [j]={{E,2724,"/// Diagnose the presence of a default template argument on a\n/// template parameter, which is ill-formed in certain contexts.\n///\n/// \\returns true if the default template argument should be dropped.\nstatic bool DiagnoseDefaultTemplateArgument(Sema &S, Sema::TemplateParamListContext TPC, SourceLocation ParamLoc, SourceRange DefArgRange) {\n case Sema::TPC_FriendFunctionTemplateDefinition:\n S.Diag(ParamLoc, S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_parameter_default_in_function_template : diag::ext_template_parameter_default_in_function_template) << DefArgRange;"}} | ||
}, | }, | ||
["ext_template_template_param_typename"]={ | ["ext_template_template_param_typename"]={ | ||
Line 7,590: | Line 7,590: | ||
[h]=x, | [h]=x, | ||
[i]={"78e1ca692bf0",1402933882,"[C++1z] Implement N4051: \'typename\' is permitted instead of \'class\' when declaring a template templa..."}, | [i]={"78e1ca692bf0",1402933882,"[C++1z] Implement N4051: \'typename\' is permitted instead of \'class\' when declaring a template templa..."}, | ||
[j]={{"clang/lib/Parse/ParseTemplate.cpp", | [j]={{"clang/lib/Parse/ParseTemplate.cpp",935,"/// 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 Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_template_template_param_typename : diag::ext_template_template_param_typename) << (!getLangOpts().CPlusPlus17 ? FixItHint::CreateReplacement(Tok.getLocation(), \"class\") : FixItHint());"}} | ||
}, | }, | ||
["ext_thread_before"]={ | ["ext_thread_before"]={ | ||
Line 7,605: | Line 7,605: | ||
[h]=x, | [h]=x, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{F, | [j]={{F,3946,"/// 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_extern:\n if (DS.getThreadStorageClassSpec() == DeclSpec::TSCS___thread)\n Diag(Tok, diag::ext_thread_before) << \"extern\";"},{F,3958,"/// 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_static:\n if (DS.getThreadStorageClassSpec() == DeclSpec::TSCS___thread)\n Diag(Tok, diag::ext_thread_before) << \"static\";"}} | ||
}, | }, | ||
["ext_token_used"]={ | ["ext_token_used"]={ | ||
Line 7,620: | Line 7,620: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{"clang/lib/Lex/Preprocessor.cpp", | [j]={{"clang/lib/Lex/Preprocessor.cpp",855,"/// HandleIdentifier - This callback is invoked when the lexer reads an\n/// identifier. This callback looks up the identifier in the map and/or\n/// potentially macro expands it or turns it into a named token (like \'for\').\n///\n/// Note that callers of this method are guarded by checking the\n/// IdentifierInfo\'s \'isHandleIdentifierCase\' bit. If this method changes, the\n/// IdentifierInfo methods that compute these properties will need to change to\n/// match.\nbool Preprocessor::HandleIdentifier(Token &Identifier) {\n // If this is an extension token, diagnose its use.\n // We avoid diagnosing tokens that originate from macro definitions.\n // FIXME: This warning is disabled in cases where it shouldn\'t be,\n // like \"#define TY typeof\", \"TY(1) x\".\n if (II.isExtensionToken() && !DisableMacroExpansion)\n Diag(Identifier, diag::ext_token_used);"}} | ||
}, | }, | ||
["ext_type_defined_in_offsetof"]={ | ["ext_type_defined_in_offsetof"]={ | ||
Line 7,635: | Line 7,635: | ||
[h]=m, | [h]=m, | ||
[i]={M,1625925174,N}, | [i]={M,1625925174,N}, | ||
[j]={{w, | [j]={{w,17549,"CreateNewDecl:\n if (OOK != OOK_Outside && TUK == TUK_Definition && !getLangOpts().CPlusPlus)\n Diag(New->getLocation(), diag::ext_type_defined_in_offsetof) << (OOK == OOK_Macro) << New->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_addrof_temporary"]={ | ["ext_typecheck_addrof_temporary"]={ | ||
Line 7,649: | Line 7,649: | ||
[h]=m, | [h]=m, | ||
[i]={"c084bd288815",1359771285,"PR15132: Replace \"address expression must be an lvalue or a function"}, | [i]={"c084bd288815",1359771285,"PR15132: Replace \"address expression must be an lvalue or a function"}, | ||
[j]={{y, | [j]={{y,14950,"/// 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 Diag(OpLoc, isSFINAEContext() ? diag::err_typecheck_addrof_temporary : diag::ext_typecheck_addrof_temporary) << op->getType() << op->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_addrof_void"]={ | ["ext_typecheck_addrof_void"]={ | ||
Line 7,664: | Line 7,664: | ||
[h]=m, | [h]=m, | ||
[i]={"b8c4fd8cfd27",1241390165,"PR2524: downgrade taking address of expression of type \'void\' to an "}, | [i]={"b8c4fd8cfd27",1241390165,"PR2524: downgrade taking address of expression of type \'void\' to an "}, | ||
[j]={{y, | [j]={{y,15073,"/// 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_IncompleteVoidType) {\n Diag(OpLoc, diag::ext_typecheck_addrof_void) << op->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_base_super"]={ | ["ext_typecheck_base_super"]={ | ||
Line 7,679: | Line 7,679: | ||
[h]=m, | [h]=m, | ||
[i]={"10ff786e1eb8",1249348036,"Compare matching selectors in current and"}, | [i]={"10ff786e1eb8",1249348036,"Compare matching selectors in current and"}, | ||
[j]={{ob, | [j]={{ob,4528,"void Sema::CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC) {\n for (ObjCMethodDecl *overridden : overrides) {\n if (CurrentClass && overridden->getDeclContext() != CurrentClass && isa<ObjCInterfaceDecl>(overridden->getDeclContext()) && !overridden->isImplicit() /* not meant for properties */) {\n for (; ParamI != E && PrevI != PrevE; ++ParamI, ++PrevI) {\n // If type of argument of method in this class does not match its\n // respective argument type in the super class method, issue warning;\n if (!Context.typesAreCompatible(T1, T2)) {\n Diag((*ParamI)->getLocation(), diag::ext_typecheck_base_super) << T1 << T2;"}} | ||
}, | }, | ||
["ext_typecheck_cast_nonscalar"]={ | ["ext_typecheck_cast_nonscalar"]={ | ||
Line 7,694: | Line 7,694: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{Ab, | [j]={{Ab,3007,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n if (!DestType->isScalarType() && !DestType->isVectorType() && !DestType->isMatrixType()) {\n if (DestRecordTy && Self.Context.hasSameUnqualifiedType(DestType, SrcType)) {\n Self.Diag(OpRange.getBegin(), diag::ext_typecheck_cast_nonscalar) << DestType << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_cast_to_union"]={ | ["ext_typecheck_cast_to_union"]={ | ||
Line 7,709: | Line 7,709: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{Ab, | [j]={{Ab,3017,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n if (!DestType->isScalarType() && !DestType->isVectorType() && !DestType->isMatrixType()) {\n // GCC\'s cast to union extension.\n if (DestRecordTy && DestRecordTy->getDecl()->isUnion()) {\n if (CastExpr::getTargetFieldForToUnionCast(RD, SrcType)) {\n Self.Diag(OpRange.getBegin(), diag::ext_typecheck_cast_to_union) << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_compare_complete_incomplete_pointers"]={ | ["ext_typecheck_compare_complete_incomplete_pointers"]={ | ||
Line 7,724: | Line 7,724: | ||
[h]=m, | [h]=m, | ||
[i]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata"}, | [i]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata"}, | ||
[j]={{y, | [j]={{y,13131,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n if ((LHSType->isIntegerType() && !LHSIsNull) || (RHSType->isIntegerType() && !RHSIsNull)) {\n } else if (getLangOpts().CPlusPlus) {\n } else if (LHSType->isPointerType() && RHSType->isPointerType()) { // C99 6.5.8p2\n // C99 6.5.9p2 and C99 6.5.8p2\n if (Context.typesAreCompatible(LCanPointeeTy.getUnqualifiedType(), RCanPointeeTy.getUnqualifiedType())) {\n if (IsRelational) {\n // Pointers both need to point to complete or incomplete types\n if ((LCanPointeeTy->isIncompleteType() != RCanPointeeTy->isIncompleteType()) && !getLangOpts().C11) {\n Diag(Loc, diag::ext_typecheck_compare_complete_incomplete_pointers) << LHS.get()->getSourceRange() << RHS.get()->getSourceRange() << LHSType << RHSType << LCanPointeeTy->isIncompleteType() << RCanPointeeTy->isIncompleteType();"}} | ||
}, | }, | ||
["ext_typecheck_comparison_of_distinct_pointers"]={ | ["ext_typecheck_comparison_of_distinct_pointers"]={ | ||
Line 7,738: | Line 7,738: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,12364,"static void diagnoseDistinctPointerComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, bool IsError) { S.Diag(Loc, IsError ? diag::err_typecheck_comparison_of_distinct_pointers : diag::ext_typecheck_comparison_of_distinct_pointers) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); }"}} | ||
}, | }, | ||
["ext_typecheck_comparison_of_fptr_to_void"]={ | ["ext_typecheck_comparison_of_fptr_to_void"]={ | ||
Line 7,753: | Line 7,753: | ||
[h]=m, | [h]=m, | ||
[i]={"16c209610c8b",1250987267,"Catch a few more cases of illegal comparisons."}, | [i]={"16c209610c8b",1250987267,"Catch a few more cases of illegal comparisons."}, | ||
[j]={{y, | [j]={{y,12500,"static void diagnoseFunctionPointerToVoidComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, bool IsError) { S.Diag(Loc, IsError ? diag::err_typecheck_comparison_of_fptr_to_void : diag::ext_typecheck_comparison_of_fptr_to_void) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); }"}} | ||
}, | }, | ||
["ext_typecheck_comparison_of_pointer_integer"]={ | ["ext_typecheck_comparison_of_pointer_integer"]={ | ||
Line 7,767: | Line 7,767: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,13479,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n if (LangOpts.DebuggerSupport) {\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n } else if (getLangOpts().CPlusPlus) {\n } else if (IsOrdered)\n else\n DiagID = diag::ext_typecheck_comparison_of_pointer_integer;"}} | ||
}, | }, | ||
["ext_typecheck_cond_incompatible_operands"]={ | ["ext_typecheck_cond_incompatible_operands"]={ | ||
Line 7,779: | Line 7,779: | ||
[h]=m, | [h]=m, | ||
[i]={"1b821b4fc583",1241666054,"Improve semantic checking for blocks. Radar 6441502"}, | [i]={"1b821b4fc583",1241666054,"Improve semantic checking for blocks. Radar 6441502"}, | ||
[j]={{y, | [j]={{y,9352,"/// 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 constraints for Objective-C object pointers types.\n if (LHSTy->isObjCObjectPointerType() && RHSTy->isObjCObjectPointerType()) {\n // FIXME: Consider unifying with \'areComparableObjCPointerTypes\'.\n // It could return the composite type.\n if (!(compositeType = Context.areCommonBaseCompatible(LHSOPT, RHSOPT)).isNull()) {\n } else if (Context.canAssignObjCInterfaces(LHSOPT, RHSOPT)) {\n } else if (Context.canAssignObjCInterfaces(RHSOPT, LHSOPT)) {\n } else if ((LHSOPT->isObjCQualifiedIdType() || RHSOPT->isObjCQualifiedIdType()) && Context.ObjCQualifiedIdTypesAreCompatible(LHSOPT, RHSOPT, true)) {\n } else if (LHSTy->isObjCIdType() || RHSTy->isObjCIdType()) {\n } else {\n Diag(QuestionLoc, diag::ext_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_cond_incompatible_pointers"]={ | ["ext_typecheck_cond_incompatible_pointers"]={ | ||
Line 7,793: | Line 7,793: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{y, | [j]={{y,8784,"/// Checks compatibility between two pointers and return the resulting\n/// type.\nstatic QualType checkConditionalPointerCompatibility(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) {\n if (CompositeTy.isNull()) {\n S.Diag(Loc, diag::ext_typecheck_cond_incompatible_pointers) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_cond_one_void"]={ | ["ext_typecheck_cond_one_void"]={ | ||
Line 7,808: | Line 7,808: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,9184,"/// Note that LHS is not null here, even if this is the gnu \"x ?: y\" extension.\n/// In that case, LHS = cond.\n/// C99 6.5.15\nQualType Sema::CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n // C99 6.5.15p5: \"If both operands have void type, the result has void type.\"\n // The following || allows only one side to be void (a GCC-ism).\n if (LHSTy->isVoidType() || RHSTy->isVoidType()) {\n if (LHSTy->isVoidType() && RHSTy->isVoidType()) {\n } else if (RHSTy->isVoidType()) {\n Diag(RHS.get()->getBeginLoc(), diag::ext_typecheck_cond_one_void) << RHS.get()->getSourceRange();"},{y,9243,"/// Note that LHS is not null here, even if this is the gnu \"x ?: y\" extension.\n/// In that case, LHS = cond.\n/// C99 6.5.15\nQualType Sema::CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n // C99 6.5.15p5: \"If both operands have void type, the result has void type.\"\n // The following || allows only one side to be void (a GCC-ism).\n if (LHSTy->isVoidType() || RHSTy->isVoidType()) {\n if (LHSTy->isVoidType() && RHSTy->isVoidType()) {\n } else if (RHSTy->isVoidType()) {\n } else {\n Diag(LHS.get()->getBeginLoc(), diag::ext_typecheck_cond_one_void) << LHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_cond_pointer_integer_mismatch"]={ | ["ext_typecheck_cond_pointer_integer_mismatch"]={ | ||
Line 7,822: | Line 7,822: | ||
[h]=m, | [h]=m, | ||
[i]={mb,1405733957,kb}, | [i]={mb,1405733957,kb}, | ||
[j]={{y, | [j]={{y,8883,"/// Return false if the first expression is not an integer and the second\n/// expression is not a pointer, true otherwise.\nstatic bool checkPointerIntegerMismatch(Sema &S, ExprResult &Int, Expr *PointerExpr, SourceLocation Loc, bool IsIntFirstExpr) {\n S.Diag(Loc, diag::ext_typecheck_cond_pointer_integer_mismatch) << Expr1->getType() << Expr2->getType() << Expr1->getSourceRange() << Expr2->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_convert_discards_qualifiers"]={ | ["ext_typecheck_convert_discards_qualifiers"]={ | ||
Line 7,836: | Line 7,836: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{bb, | [j]={{bb,3199,"bool Sema::CheckARMBuiltinExclusiveCall(unsigned BuiltinID, CallExpr *TheCall, unsigned MaxWidth) {\n if (!AddrType.isAtLeastAsQualifiedAs(ValType)) {\n Diag(DRE->getBeginLoc(), diag::ext_typecheck_convert_discards_qualifiers) << PointerArg->getType() << Context.getPointerType(AddrType) << AA_Passing << PointerArg->getSourceRange();"},{y,17638,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n case CompatiblePointerDiscardsQualifiers:\n if (getLangOpts().CPlusPlus) {\n } else {\n DiagKind = diag::ext_typecheck_convert_discards_qualifiers;"}} | ||
}, | }, | ||
["ext_typecheck_convert_incompatible_function_pointer"]={ | ["ext_typecheck_convert_incompatible_function_pointer"]={ | ||
Line 7,850: | Line 7,850: | ||
[h]=m, | [h]=m, | ||
[i]={"d9b7dfe4a4df",1468874226,"[Sema] Create a separate group for incompatible function pointer warning"}, | [i]={"d9b7dfe4a4df",1468874226,"[Sema] Create a separate group for incompatible function pointer warning"}, | ||
[j]={{y, | [j]={{y,17561,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n case IncompatibleFunctionPointer:\n if (getLangOpts().CPlusPlus) {\n } else {\n DiagKind = diag::ext_typecheck_convert_incompatible_function_pointer;"}} | ||
}, | }, | ||
["ext_typecheck_convert_incompatible_pointer"]={ | ["ext_typecheck_convert_incompatible_pointer"]={ | ||
Line 7,864: | Line 7,864: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,17580,"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 } else if (getLangOpts().CPlusPlus) {\n } else {\n DiagKind = diag::ext_typecheck_convert_incompatible_pointer;"},{V,4479,"/// 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 // Diagnose incompatible Objective-C conversions\n if (Action == AA_Initializing || Action == AA_Assigning)\n Diag(From->getBeginLoc(), diag::ext_typecheck_convert_incompatible_pointer) << ToType << From->getType() << Action << From->getSourceRange() << 0;"},{V,4484,"/// 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 // Diagnose incompatible Objective-C conversions\n if (Action == AA_Initializing || Action == AA_Assigning)\n else\n Diag(From->getBeginLoc(), diag::ext_typecheck_convert_incompatible_pointer) << From->getType() << ToType << Action << From->getSourceRange() << 0;"}} | ||
}, | }, | ||
["ext_typecheck_convert_incompatible_pointer_sign"]={ | ["ext_typecheck_convert_incompatible_pointer_sign"]={ | ||
Line 7,878: | Line 7,878: | ||
[h]=m, | [h]=m, | ||
[i]={"80160bd483b3",1237766384,"Partial implementation of PR3342: break out pointer sign "}, | [i]={"80160bd483b3",1237766384,"Partial implementation of PR3342: break out pointer sign "}, | ||
[j]={{y, | [j]={{y,17588,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n case IncompatiblePointerSign:\n if (getLangOpts().CPlusPlus) {\n } else {\n DiagKind = diag::ext_typecheck_convert_incompatible_pointer_sign;"},{y,17743,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n if (DiagKind == diag::ext_typecheck_convert_incompatible_pointer_sign || DiagKind == diag::err_typecheck_convert_incompatible_pointer_sign) {"}} | ||
}, | }, | ||
["ext_typecheck_convert_int_pointer"]={ | ["ext_typecheck_convert_int_pointer"]={ | ||
Line 7,892: | Line 7,892: | ||
[h]="Value Conversion Issue", | [h]="Value Conversion Issue", | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,17545,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n case IntToPointer:\n if (getLangOpts().CPlusPlus) {\n } else {\n DiagKind = diag::ext_typecheck_convert_int_pointer;"}} | ||
}, | }, | ||
["ext_typecheck_convert_pointer_int"]={ | ["ext_typecheck_convert_pointer_int"]={ | ||
Line 7,906: | Line 7,906: | ||
[h]="Value Conversion Issue", | [h]="Value Conversion Issue", | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,17535,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n case PointerToInt:\n if (getLangOpts().CPlusPlus) {\n } else {\n DiagKind = diag::ext_typecheck_convert_pointer_int;"}} | ||
}, | }, | ||
["ext_typecheck_convert_pointer_void_func"]={ | ["ext_typecheck_convert_pointer_void_func"]={ | ||
Line 7,921: | Line 7,921: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{y, | [j]={{y,17603,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n case FunctionVoidPointer:\n if (getLangOpts().CPlusPlus) {\n } else {\n DiagKind = diag::ext_typecheck_convert_pointer_void_func;"}} | ||
}, | }, | ||
["ext_typecheck_decl_incomplete_type"]={ | ["ext_typecheck_decl_incomplete_type"]={ | ||
Line 7,935: | Line 7,935: | ||
[h]=m, | [h]=m, | ||
[i]={"47d2859b3e27",1248115619,"Improve GCC compatibility by allowing static tentative definitions of"}, | [i]={"47d2859b3e27",1248115619,"Improve GCC compatibility by allowing static tentative definitions of"}, | ||
[j]={{w, | [j]={{w,13816,"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 } else if (Var->getStorageClass() == SC_Static) {\n // C99 6.9.2p3: If the declaration of an identifier for an object is\n // a tentative definition and has internal linkage (C99 6.2.2p3), the\n // declared type shall not be an incomplete type.\n // NOTE: code such as the following\n // static struct s;\n // struct s { int a; };\n // is accepted by gcc. Hence here we issue a warning instead of\n // an error and we do not invalidate the static declaration.\n // NOTE: to avoid multiple warnings, only check the first declaration.\n if (Var->isFirstDecl())\n RequireCompleteType(Var->getLocation(), Type, diag::ext_typecheck_decl_incomplete_type);"}} | ||
}, | }, | ||
["ext_typecheck_indirection_through_void_pointer"]={ | ["ext_typecheck_indirection_through_void_pointer"]={ | ||
Line 7,949: | Line 7,949: | ||
[h]=m, | [h]=m, | ||
[i]={"80877c228d01",1399499607,"Add an Extension warning for applying unary * to an operand of type \'void*\' in"}, | [i]={"80877c228d01",1399499607,"Add an Extension warning for applying unary * to an operand of type \'void*\' in"}, | ||
[j]={{y, | [j]={{y,15294,"/// CheckIndirectionOperand - Type check unary indirection (prefix \'*\').\nstatic QualType CheckIndirectionOperand(Sema &S, Expr *Op, ExprValueKind &VK, SourceLocation OpLoc, bool IsAfterAmp = false) {\n if (Result->isVoidType()) {\n if (LO.CPlusPlus)\n else if (!(LO.C99 && IsAfterAmp) && !S.isUnevaluatedContext())\n S.Diag(OpLoc, diag::ext_typecheck_indirection_through_void_pointer) << OpTy << Op->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_ordered_comparison_of_function_pointers"]={ | ["ext_typecheck_ordered_comparison_of_function_pointers"]={ | ||
Line 7,963: | Line 7,963: | ||
[h]=m, | [h]=m, | ||
[i]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by"}, | [i]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by"}, | ||
[j]={{y, | [j]={{y,13109,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n if (IsOrdered && LHSType->isFunctionPointerType() && RHSType->isFunctionPointerType()) {\n auto DiagID = IsError ? diag::err_typecheck_ordered_comparison_of_function_pointers : getLangOpts().CPlusPlus ? diag::warn_typecheck_ordered_comparison_of_function_pointers : diag::ext_typecheck_ordered_comparison_of_function_pointers;"}} | ||
}, | }, | ||
["ext_typecheck_ordered_comparison_of_pointer_and_zero"]={ | ["ext_typecheck_ordered_comparison_of_pointer_and_zero"]={ | ||
Line 7,978: | Line 7,978: | ||
[h]=m, | [h]=m, | ||
[i]={"d99bd52c7395",1250985824,"Eli points out that we really must diagnose \"void* > 0\" as an extension. "}, | [i]={"d99bd52c7395",1250985824,"Eli points out that we really must diagnose \"void* > 0\" as an extension. "}, | ||
[j]={{y, | [j]={{y,13352,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n if (LangOpts.DebuggerSupport) {\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n if (IsOrdered) {\n DiagID = isError ? diag::err_typecheck_ordered_comparison_of_pointer_and_zero : diag::ext_typecheck_ordered_comparison_of_pointer_and_zero;"}} | ||
}, | }, | ||
["ext_typecheck_ordered_comparison_of_pointer_integer"]={ | ["ext_typecheck_ordered_comparison_of_pointer_integer"]={ | ||
Line 7,990: | Line 7,990: | ||
[h]=m, | [h]=m, | ||
[i]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by"}, | [i]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by"}, | ||
[j]={{y, | [j]={{y,13357,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n if (LangOpts.DebuggerSupport) {\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n } else if (getLangOpts().CPlusPlus) {\n } else if (IsOrdered)\n DiagID = diag::ext_typecheck_ordered_comparison_of_pointer_integer;"}} | ||
}, | }, | ||
["ext_typecheck_zero_array_size"]={ | ["ext_typecheck_zero_array_size"]={ | ||
Line 8,005: | Line 8,005: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{T, | [j]={{T,2075,"void InitListChecker::CheckArrayType(const InitializedEntity &Entity, InitListExpr *IList, QualType &DeclType, llvm::APSInt elementIndex, bool SubobjectIsDesignatorContext, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n if (!hadError && DeclType->isIncompleteArrayType() && !VerifyOnly) {\n if (maxElements == Zero && !Entity.isVariableLengthArrayNew()) {\n SemaRef.Diag(IList->getBeginLoc(), diag::ext_typecheck_zero_array_size);"},{R,2649,"/// 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 (ConstVal == 0 && !T.isWebAssemblyReferenceType()) {\n Diag(ArraySize->getBeginLoc(), isSFINAEContext() ? diag::err_typecheck_zero_array_size : diag::ext_typecheck_zero_array_size) << 0 << ArraySize->getSourceRange();"}} | ||
}, | }, | ||
["ext_typedef_without_a_name"]={ | ["ext_typedef_without_a_name"]={ | ||
Line 8,019: | Line 8,019: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{w, | [j]={{w,5239,"/// 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.isMissingDeclaratorOk()) {\n // Customize diagnostic for a typedef missing a name.\n if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef)\n Diag(DS.getBeginLoc(), diag::ext_typedef_without_a_name) << DS.getSourceRange();"}} | ||
}, | }, | ||
["ext_typename_missing"]={ | ["ext_typename_missing"]={ | ||
Line 8,033: | Line 8,033: | ||
[h]=m, | [h]=m, | ||
[i]={"32506ed8be37",1402614228,"Recover from missing \'typename\' in sizeof(T::InnerType)"}, | [i]={"32506ed8be37",1402614228,"Recover from missing \'typename\' in sizeof(T::InnerType)"}, | ||
[j]={{w, | [j]={{w,821,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n if (!SS || (!SS->isSet() && !SS->isInvalid()))\n else if (DeclContext *DC = computeDeclContext(*SS, false))\n else if (SS->isValid() && SS->getScopeRep()->containsErrors()) {\n } else if (isDependentScopeSpecifier(*SS)) {\n if (getLangOpts().MSVCCompat && isMicrosoftMissingTypename(SS, S))\n DiagID = diag::ext_typename_missing;"},{y,2880,"/// BuildQualifiedDeclarationNameExpr - Build a C++ qualified\n/// declaration name, generally during template instantiation.\n/// There\'s a large number of things which don\'t need to be done along\n/// this path.\nExprResult Sema::BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, const Scope *S, TypeSourceInfo **RecoveryTSI) {\n if (const TypeDecl *TD = R.getAsSingle<TypeDecl>()) {\n if (RecoveryTSI && getLangOpts().MSVCCompat)\n DiagID = diag::ext_typename_missing;"}} | ||
}, | }, | ||
["ext_typename_outside_of_template"]={ | ["ext_typename_outside_of_template"]={ | ||
Line 8,047: | Line 8,047: | ||
[h]=m, | [h]=m, | ||
[i]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'"}, | [i]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'"}, | ||
[j]={{E, | [j]={{E,10811,"TypeResult Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc, ImplicitTypenameContext IsImplicitTypename) {\n if (TypenameLoc.isValid() && S && !S->getTemplateParamParent())\n Diag(TypenameLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_typename_outside_of_template : diag::ext_typename_outside_of_template) << FixItHint::CreateRemoval(TypenameLoc);"},{E,10843,"TypeResult Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateIn, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) {\n if (TypenameLoc.isValid() && S && !S->getTemplateParamParent())\n Diag(TypenameLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_typename_outside_of_template : diag::ext_typename_outside_of_template) << FixItHint::CreateRemoval(TypenameLoc);"}} | ||
}, | }, | ||
["ext_undeclared_unqual_id_with_dependent_base"]={ | ["ext_undeclared_unqual_id_with_dependent_base"]={ | ||
Line 8,061: | Line 8,061: | ||
[h]=m, | [h]=m, | ||
[i]={"10ca24c63162",1402444888,"Allow lookup into dependent bases in more places under -fms-compatibility"}, | [i]={"10ca24c63162",1402444888,"Allow lookup into dependent bases in more places under -fms-compatibility"}, | ||
[j]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp", | [j]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",798,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // In Microsoft mode, if we are within a templated function and we can\'t\n // resolve Identifier, then extend the SS with Identifier. This will have\n // the effect of resolving Identifier during template instantiation.\n // The goal is to be able to resolve a function call whose\n // nested-name-specifier is located inside a dependent base class.\n // Example:\n //\n // class C {\n // public:\n // static void foo2() { }\n // };\n // template <class T> class A { public: typedef C D; };\n //\n // template <class T> class B : public A<T> {\n // public:\n // void foo() { D::foo2(); }\n // };\n if (getLangOpts().MSVCCompat) {\n if (DC->isDependentContext() && DC->isFunctionOrMethod()) {\n if (ContainingClass && ContainingClass->hasAnyDependentBases()) {\n Diag(IdInfo.IdentifierLoc, diag::ext_undeclared_unqual_id_with_dependent_base) << IdInfo.Identifier << ContainingClass;"},{w,645,"ParsedType Sema::ActOnMSVCUnknownTypeName(const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg) {\n if (IsTemplateTypeArg && getCurScope()->isTemplateParamScope()) {\n } else if (const CXXRecordDecl *RD = findRecordWithDependentBasesOfEnclosingMethod(CurContext)) {\n Diag(NameLoc, diag::ext_undeclared_unqual_id_with_dependent_base) << &II << RD;"},{y,2561,"/// In Microsoft mode, if we are inside a template class whose parent class has\n/// dependent base classes, and we can\'t resolve an unqualified identifier, then\n/// assume the identifier is a member of a dependent base class. We can only\n/// recover successfully in static methods, instance methods, and other contexts\n/// where \'this\' is available. This doesn\'t precisely match MSVC\'s\n/// instantiation model, but it\'s close enough.\nstatic Expr *recoverFromMSUnqualifiedLookup(Sema &S, ASTContext &Context, DeclarationNameInfo &NameInfo, SourceLocation TemplateKWLoc, const TemplateArgumentListInfo *TemplateArgs) {\n auto DB = S.Diag(Loc, diag::ext_undeclared_unqual_id_with_dependent_base);"}} | ||
}, | }, | ||
["ext_undefined_internal_type"]={ | ["ext_undefined_internal_type"]={ | ||
Line 8,076: | Line 8,076: | ||
[h]=m, | [h]=m, | ||
[i]={"405e2dbf3767",1505892120,"Implement C++ [basic.link]p8."}, | [i]={"405e2dbf3767",1505892120,"Implement C++ [basic.link]p8."}, | ||
[j]={{"clang/lib/Sema/Sema.cpp", | [j]={{"clang/lib/Sema/Sema.cpp",884,"/// checkUndefinedButUsed - Check for undefined objects with internal linkage\n/// or that are inline.\nstatic void checkUndefinedButUsed(Sema &S) {\n for (const auto &Undef : Undefined) {\n if (S.isExternalWithNoLinkageType(VD)) {\n S.Diag(VD->getLocation(), isExternallyVisible(VD->getType()->getLinkage()) ? diag::ext_undefined_internal_type : diag::err_undefined_internal_type) << isa<VarDecl>(VD) << VD;"}} | ||
}, | }, | ||
["ext_unelaborated_friend_type"]={ | ["ext_unelaborated_friend_type"]={ | ||
Line 8,090: | Line 8,090: | ||
[h]=m, | [h]=m, | ||
[i]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:"}, | [i]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:"}, | ||
[j]={{z, | [j]={{z,17212,"/// Perform semantic analysis of the given friend type declaration.\n///\n/// \\returns A friend declaration that.\nFriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo) {\n // C++03 [class.friend]p2:\n // An elaborated-type-specifier shall be used in a friend declaration\n // for a class.*\n //\n // * The class-key of the elaborated-type-specifier is required.\n if (!CodeSynthesisContexts.empty()) {\n } else {\n if (!T->isElaboratedTypeSpecifier()) {\n // If we evaluated the type to a record type, suggest putting\n // a tag in front.\n if (const RecordType *RT = T->getAs<RecordType>()) {\n Diag(TypeRange.getBegin(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_unelaborated_friend_type : diag::ext_unelaborated_friend_type) << (unsigned)RD->getTagKind() << T << FixItHint::CreateInsertion(getLocForEndOfToken(FriendLoc), InsertionText);"}} | ||
}, | }, | ||
["ext_unicode_whitespace"]={ | ["ext_unicode_whitespace"]={ | ||
Line 8,104: | Line 8,104: | ||
[h]=A, | [h]=A, | ||
[i]={"7f43dddae066",1359060646,"Handle universal character names and Unicode characters outside of literals."}, | [i]={"7f43dddae066",1359060646,"Handle universal character names and Unicode characters outside of literals."}, | ||
[j]={{Z, | [j]={{Z,3537,"bool Lexer::CheckUnicodeWhitespace(Token &Result, uint32_t C, const char *CurPtr) {\n if (!isLexingRawMode() && !PP->isPreprocessedOutput() && isUnicodeWhitespace(C)) {\n Diag(BufferPtr, diag::ext_unicode_whitespace) << makeCharRange(*this, BufferPtr, CurPtr);"}} | ||
}, | }, | ||
["ext_union_member_of_reference_type"]={ | ["ext_union_member_of_reference_type"]={ | ||
Line 8,118: | Line 8,118: | ||
[h]=m, | [h]=m, | ||
[i]={"ed0ae1d70bf8",1369930800,"Microsoft has a language extension which allows union members to be"}, | [i]={"ed0ae1d70bf8",1369930800,"Microsoft has a language extension which allows union members to be"}, | ||
[j]={{w, | [j]={{w,18240,"/// 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 && getLangOpts().CPlusPlus) {\n if (Record->isUnion()) {\n // C++ [class.union]p1: If a union contains a member of reference type,\n // the program is ill-formed, except when compiling with MSVC extensions\n // enabled.\n if (EltTy->isReferenceType()) {\n Diag(NewFD->getLocation(), getLangOpts().MicrosoftExt ? diag::ext_union_member_of_reference_type : diag::err_union_member_of_reference_type) << NewFD->getDeclName() << EltTy;"}} | ||
}, | }, | ||
["ext_unknown_escape"]={ | ["ext_unknown_escape"]={ | ||
Line 8,132: | Line 8,132: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{cb, | [j]={{cb,340,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n default:\n if (isPrintable(ResultChar))\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_unknown_escape) << std::string(1, ResultChar);"},{cb,344,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n default:\n if (isPrintable(ResultChar))\n else\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_unknown_escape) << \"x\" + llvm::utohexstr(ResultChar);"}} | ||
}, | }, | ||
["ext_unqualified_base_class"]={ | ["ext_unqualified_base_class"]={ | ||
Line 8,146: | Line 8,146: | ||
[h]=m, | [h]=m, | ||
[i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | [i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs"}, | ||
[j]={{z, | [j]={{z,4461,"/// Handle a C++ member initializer.\nMemInitResult Sema::BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc) {\n if (TemplateTypeTy) {\n } else if (DS.getTypeSpecType() == TST_decltype) {\n } else if (DS.getTypeSpecType() == TST_decltype_auto) {\n } else {\n if (!TyD) {\n if (getLangOpts().MSVCCompat && !getLangOpts().CPlusPlus20) {\n if (auto UnqualifiedBase = R.getAsSingle<ClassTemplateDecl>()) {\n for (auto const &Base : ClassDecl->bases()) {\n if (BaseTemplate && Context.hasSameTemplateName(BaseTemplate->getTemplateName(), TN)) {\n Diag(IdLoc, diag::ext_unqualified_base_class) << SourceRange(IdLoc, Init->getSourceRange().getEnd());"}} | ||
}, | }, | ||
["ext_unterminated_char_or_string"]={ | ["ext_unterminated_char_or_string"]={ | ||
Line 8,160: | Line 8,160: | ||
[h]=A, | [h]=A, | ||
[i]={"7f5ff2175f68",1447466995,"Use %select to merge similar diagnostics. NFC"}, | [i]={"7f5ff2175f68",1447466995,"Use %select to merge similar diagnostics. NFC"}, | ||
[j]={{Z, | [j]={{Z,2100,"/// LexStringLiteral - Lex the remainder of a string literal, after having lexed\n/// either \" or L\" or u8\" or u\" or U\".\nbool Lexer::LexStringLiteral(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n while (C != \'\"\') {\n if (C == \'\\n\' || C == \'\\r\' || // Newline.\n if (!isLexingRawMode() && !LangOpts.AsmPreprocessor)\n Diag(BufferPtr, diag::ext_unterminated_char_or_string) << 1;"},{Z,2325,"/// LexCharConstant - Lex the remainder of a character constant, after having\n/// lexed either \' or L\' or u8\' or u\' or U\'.\nbool Lexer::LexCharConstant(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n while (C != \'\\\'\') {\n if (C == \'\\n\' || C == \'\\r\' || // Newline.\n if (!isLexingRawMode() && !LangOpts.AsmPreprocessor)\n Diag(BufferPtr, diag::ext_unterminated_char_or_string) << 0;"}} | ||
}, | }, | ||
["ext_use_out_of_scope_declaration"]={ | ["ext_use_out_of_scope_declaration"]={ | ||
Line 8,174: | Line 8,174: | ||
[h]=m, | [h]=m, | ||
[i]={"9bfa970a4009",1507081762,"PR34822: Fix a collection of related bugs with our handling of C89 implicit function declarations."}, | [i]={"9bfa970a4009",1507081762,"PR34822: Fix a collection of related bugs with our handling of C89 implicit function declarations."}, | ||
[j]={{w, | [j]={{w,16040,"/// ImplicitlyDefineFunction - An undeclared identifier was used in a function\n/// call, forming a call to an implicitly defined function (per C99 6.5.1p2).\nNamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II, Scope *S) {\n if (ExternCPrev) {\n // C89 footnote 38:\n // If in fact it is not defined as having type \"function returning int\",\n // the behavior is undefined.\n if (!isa<FunctionDecl>(ExternCPrev) || !Context.typesAreCompatible(cast<FunctionDecl>(ExternCPrev)->getType(), Context.getFunctionNoProtoType(Context.IntTy))) {\n Diag(Loc, diag::ext_use_out_of_scope_declaration) << ExternCPrev << !getLangOpts().C99;"}} | ||
}, | }, | ||
["ext_using_attribute_ns"]={ | ["ext_using_attribute_ns"]={ | ||
Line 8,188: | Line 8,188: | ||
[h]=x, | [h]=x, | ||
[i]={"b7d7a046d8e0",1466770512,"Using for attributes voted into C++17."}, | [i]={"b7d7a046d8e0",1466770512,"Using for attributes voted into C++17."}, | ||
[j]={{L, | [j]={{L,4540,"/// Parse a C++11 or C2x attribute-specifier.\n///\n/// [C++11] attribute-specifier:\n/// \'[\' \'[\' attribute-list \']\' \']\'\n/// alignment-specifier\n///\n/// [C++11] attribute-list:\n/// attribute[opt]\n/// attribute-list \',\' attribute[opt]\n/// attribute \'...\'\n/// attribute-list \',\' attribute \'...\'\n///\n/// [C++11] attribute:\n/// attribute-token attribute-argument-clause[opt]\n///\n/// [C++11] attribute-token:\n/// identifier\n/// attribute-scoped-token\n///\n/// [C++11] attribute-scoped-token:\n/// attribute-namespace \'::\' identifier\n///\n/// [C++11] attribute-namespace:\n/// identifier\nvoid Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, CachedTokens &OpenMPTokens, SourceLocation *EndLoc) {\n if (Tok.is(tok::kw_using)) {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_using_attribute_ns : diag::ext_using_attribute_ns);"}} | ||
}, | }, | ||
["ext_using_decl_scoped_enumerator"]={ | ["ext_using_decl_scoped_enumerator"]={ | ||
Line 8,202: | Line 8,202: | ||
[h]=m, | [h]=m, | ||
[i]={bc,1615397021,fc}, | [i]={bc,1615397021,fc}, | ||
[j]={{z, | [j]={{z,13032,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n if (NamedContext) {\n if (auto *ED = dyn_cast<EnumDecl>(NamedContext)) {\n // C++14 [namespace.udecl]p7:\n // A using-declaration shall not name a scoped enumerator.\n // C++20 p1099 permits enumerators.\n if (EC && R && ED->isScoped())\n Diag(SS.getBeginLoc(), getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_using_decl_scoped_enumerator : diag::ext_using_decl_scoped_enumerator) << SS.getRange();"}} | ||
}, | }, | ||
["ext_using_declaration_pack"]={ | ["ext_using_declaration_pack"]={ | ||
Line 8,216: | Line 8,216: | ||
[h]=x, | [h]=x, | ||
[i]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations."}, | [i]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations."}, | ||
[j]={{L, | [j]={{L,662,"/// Parse a using-declarator (or the identifier in a C++11 alias-declaration).\n///\n/// using-declarator:\n/// \'typename\'[opt] nested-name-specifier unqualified-id\n///\nbool Parser::ParseUsingDeclarator(DeclaratorContext Context, UsingDeclarator &D) {\n if (TryConsumeToken(tok::ellipsis, D.EllipsisLoc))\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx17_compat_using_declaration_pack : diag::ext_using_declaration_pack);"}} | ||
}, | }, | ||
["ext_using_enum_declaration"]={ | ["ext_using_enum_declaration"]={ | ||
Line 8,230: | Line 8,230: | ||
[h]=x, | [h]=x, | ||
[i]={tb,1612659633,sb}, | [i]={tb,1612659633,sb}, | ||
[j]={{L, | [j]={{L,702,"/// 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 (TryConsumeToken(tok::kw_enum, UELoc) && !InInitStatement) {\n Diag(UELoc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_using_enum_declaration : diag::ext_using_enum_declaration);"}} | ||
}, | }, | ||
["ext_using_undefined_std"]={ | ["ext_using_undefined_std"]={ | ||
Line 8,242: | Line 8,242: | ||
[h]=m, | [h]=m, | ||
[i]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace"}, | [i]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace"}, | ||
[j]={{z, | [j]={{z,11948,"Decl *Sema::ActOnUsingDirective(Scope *S, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList) {\n if (R.empty()) {\n // Allow \"using namespace std;\" or \"using namespace ::std;\" even if\n // \"std\" hasn\'t been defined yet, for GCC compatibility.\n if ((!Qualifier || Qualifier->getKind() == NestedNameSpecifier::Global) && NamespcName->isStr(\"std\")) {\n Diag(IdentLoc, diag::ext_using_undefined_std);"}} | ||
}, | }, | ||
["ext_variable_sized_type_in_struct"]={ | ["ext_variable_sized_type_in_struct"]={ | ||
Line 8,256: | Line 8,256: | ||
[h]=m, | [h]=m, | ||
[i]={H,1237025389,I}, | [i]={H,1237025389,I}, | ||
[j]={{w, | [j]={{w,18864,"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 (Record && FDTTy->getDecl()->hasFlexibleArrayMember()) {\n if (!Record->isUnion()) {\n // If this is a struct/class and this is not the last element, reject\n // it. Note that GCC supports variable sized arrays in the middle of\n // structures.\n if (!IsLastField)\n Diag(FD->getLocation(), diag::ext_variable_sized_type_in_struct) << FD->getDeclName() << FD->getType();"}} | ||
}, | }, | ||
["ext_variable_template"]={ | ["ext_variable_template"]={ | ||
Line 8,270: | Line 8,270: | ||
[h]=m, | [h]=m, | ||
[i]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som..."}, | [i]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som..."}, | ||
[j]={{w, | [j]={{w,7653,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n if (!getLangOpts().CPlusPlus) {\n } else {\n if (TemplateParams) {\n if (!TemplateParams->size() && D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {\n } else {\n if (D.getName().getKind() == UnqualifiedIdKind::IK_TemplateId) {\n } else { // if (TemplateParams->size() > 0)\n Diag(D.getIdentifierLoc(), getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_variable_template : diag::ext_variable_template);"}} | ||
}, | }, | ||
["ext_variadic_macro"]={ | ["ext_variadic_macro"]={ | ||
Line 8,285: | Line 8,285: | ||
[h]=A, | [h]=A, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{W, | [j]={{W,2680,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n while (true) {\n case tok::ellipsis: // #define X(... -> C99 varargs\n if (!LangOpts.C99)\n Diag(Tok, LangOpts.CPlusPlus11 ? diag::warn_cxx98_compat_variadic_macro : diag::ext_variadic_macro);"}} | ||
}, | }, | ||
["ext_variadic_main"]={ | ["ext_variadic_main"]={ | ||
Line 8,299: | Line 8,299: | ||
[h]=m, | [h]=m, | ||
[i]={"1710cc994ecd",1429805562,"Diagnose variadic main() as an extension; addresses PR17905."}, | [i]={"1710cc994ecd",1429805562,"Diagnose variadic main() as an extension; addresses PR17905."}, | ||
[j]={{w, | [j]={{w,12162,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n if (FTP->isVariadic()) {\n Diag(FD->getLocation(), diag::ext_variadic_main);"}} | ||
}, | }, | ||
["ext_variadic_templates"]={ | ["ext_variadic_templates"]={ | ||
Line 8,313: | Line 8,313: | ||
[h]=x, | [h]=x, | ||
[i]={"b25d8c3af4a9",1295474355,"Downgrade the \"variadic templates are a C++0x feature\" error to an"}, | [i]={"b25d8c3af4a9",1295474355,"Downgrade the \"variadic templates are a C++0x feature\" error to an"}, | ||
[j]={{"clang/lib/Parse/ParseTemplate.cpp", | [j]={{"clang/lib/Parse/ParseTemplate.cpp",828,"/// ParseTypeParameter - Parse a template type parameter (C++ [temp.param]).\n/// Other kinds of template parameters are parsed in\n/// ParseTemplateTemplateParameter and ParseNonTypeTemplateParameter.\n///\n/// type-parameter: [C++ temp.param]\n/// \'class\' ...[opt][C++0x] identifier[opt]\n/// \'class\' identifier[opt] \'=\' type-id\n/// \'typename\' ...[opt][C++0x] identifier[opt]\n/// \'typename\' identifier[opt] \'=\' type-id\nNamedDecl *Parser::ParseTypeParameter(unsigned Depth, unsigned Position) {\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) {\n Diag(EllipsisLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_variadic_templates : diag::ext_variadic_templates);"},{"clang/lib/Parse/ParseTemplate.cpp",960,"/// 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 if (TryConsumeToken(tok::ellipsis, EllipsisLoc))\n Diag(EllipsisLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_variadic_templates : diag::ext_variadic_templates);"},{R,5946,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // If there was an ellipsis in the declarator, the declaration declares a\n // parameter pack whose type may be a pack expansion type.\n if (D.hasEllipsis()) {\n case DeclaratorContext::TemplateParam:\n // C++0x [temp.param]p15:\n // If a template-parameter is a [...] is a parameter-declaration that\n // declares a parameter pack (8.3.5), then the template-parameter is a\n // template parameter pack (14.5.3).\n //\n // Note: core issue 778 clarifies that, if there are any unexpanded\n // parameter packs in the type of the non-type template parameter, then\n // it expands those parameter packs.\n if (T->containsUnexpandedParameterPack())\n else\n S.Diag(D.getEllipsisLoc(), LangOpts.CPlusPlus11 ? diag::warn_cxx98_compat_variadic_templates : diag::ext_variadic_templates);"}} | ||
}, | }, | ||
["ext_vla"]={ | ["ext_vla"]={ | ||
Line 8,328: | Line 8,328: | ||
[h]=m, | [h]=m, | ||
[i]={B,1236199783,C}, | [i]={B,1236199783,C}, | ||
[j]={{R, | [j]={{R,2592,"/// 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().OpenCL) {\n } else if (getLangOpts().C99) {\n } else if (isSFINAEContext()) {\n } else if (getLangOpts().OpenMP && isInOpenMPTaskUntiedContext()) {\n } else {\n VLADiag = diag::ext_vla;"}} | ||
}, | }, | ||
["ext_vla_folded_to_constant"]={ | ["ext_vla_folded_to_constant"]={ | ||
Line 8,342: | Line 8,342: | ||
[h]=m, | [h]=m, | ||
[i]={"f35de48c9058",1308033490,"when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant"}, | [i]={"f35de48c9058",1308033490,"when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant"}, | ||
[j]={{w, | [j]={{w,6602,"/// 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 (FixedTInfo) {\n Diag(Loc, diag::ext_vla_folded_to_constant);"},{w,6722,"void Sema::CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *NewTD) {\n if (T->isVariablyModifiedType()) {\n if (S->getFnParent() == nullptr) {\n if (FixedTInfo) {\n Diag(NewTD->getLocation(), diag::ext_vla_folded_to_constant);"},{w,8725,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n Diag(NewVD->getLocation(), diag::ext_vla_folded_to_constant);"},{R,2425,"/// 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 diagnoseFold(Sema &S, SourceLocation Loc) override { return S.Diag(Loc, diag::ext_vla_folded_to_constant); }"}} | ||
}, | }, | ||
["ext_warn_duplicate_declspec"]={ | ["ext_warn_duplicate_declspec"]={ | ||
Line 8,356: | Line 8,356: | ||
[h]=q, | [h]=q, | ||
[i]={"150ca5309e7c",1538608169,"[SEMA] split ExtWarn dupl-decl-spec\'s into Extension and ExtWarn"}, | [i]={"150ca5309e7c",1538608169,"[SEMA] split ExtWarn dupl-decl-spec\'s into Extension and ExtWarn"}, | ||
[j]={{F, | [j]={{F,4488,"#include \"clang/Basic/TransformTypeTraits.def\"\n // If the specifier wasn\'t legal, issue a diagnostic.\n if (isInvalid) {\n if (DiagID == diag::ext_duplicate_declspec || DiagID == diag::ext_warn_duplicate_declspec || DiagID == diag::err_duplicate_declspec)"},{pc,482,"template <class T> static bool BadSpecifier(T TNew, T TPrev, const char *&PrevSpec, unsigned &DiagID, bool IsExtension = true) {\n if (TNew != TPrev)\n else\n DiagID = IsExtension ? diag::ext_warn_duplicate_declspec : diag::warn_duplicate_declspec;"},{pc,1046,"bool DeclSpec::setFunctionSpecExplicit(SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, ExplicitSpecifier ExplicitSpec, SourceLocation CloseParenLoc) {\n // \'explicit explicit\' is ok, but warn as this is likely not what the user\n // intended.\n if (hasExplicitSpecifier()) {\n DiagID = (ExplicitSpec.getExpr() || FS_explicit_specifier.getExpr()) ? diag::err_duplicate_declspec : diag::ext_warn_duplicate_declspec;"},{pc,1093,"bool DeclSpec::setModulePrivateSpec(SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID) {\n if (isModulePrivateSpecified()) {\n DiagID = diag::ext_warn_duplicate_declspec;"}} | ||
}, | }, | ||
["ext_warn_gnu_final"]={ | ["ext_warn_gnu_final"]={ | ||
Line 8,370: | Line 8,370: | ||
[h]=x, | [h]=x, | ||
[i]={"276055bb2f4a",1469788968,"[GCC] Support for __final specifier"}, | [i]={"276055bb2f4a",1469788968,"[GCC] Support for __final specifier"}, | ||
[j]={{L, | [j]={{L,2469,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n } else if (Specifier == VirtSpecifiers::VS_Abstract) {\n } else if (Specifier == VirtSpecifiers::VS_GNU_Final) {\n Diag(Tok.getLocation(), diag::ext_warn_gnu_final);"},{L,3536,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n if (TagType == DeclSpec::TST_interface)\n else if (Specifier == VirtSpecifiers::VS_Final)\n else if (Specifier == VirtSpecifiers::VS_Sealed)\n else if (Specifier == VirtSpecifiers::VS_Abstract)\n else if (Specifier == VirtSpecifiers::VS_GNU_Final)\n Diag(FinalLoc, diag::ext_warn_gnu_final);"}} | ||
}, | }, | ||
["ext_wchar_t_sign_spec"]={ | ["ext_wchar_t_sign_spec"]={ | ||
Line 8,384: | Line 8,384: | ||
[h]=m, | [h]=m, | ||
[i]={"e8b659fc1ff0",1564430446,"Give the \'signed/unsigned wchar_t\' extension a warning flag, and follow"}, | [i]={"e8b659fc1ff0",1564430446,"Give the \'signed/unsigned wchar_t\' extension a warning flag, and follow"}, | ||
[j]={{R, | [j]={{R,1307,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n case DeclSpec::TST_wchar:\n if (DS.getTypeSpecSign() == TypeSpecifierSign::Unspecified)\n else if (DS.getTypeSpecSign() == TypeSpecifierSign::Signed) {\n S.Diag(DS.getTypeSpecSignLoc(), diag::ext_wchar_t_sign_spec) << DS.getSpecifierName(DS.getTypeSpecType(), Context.getPrintingPolicy());"},{R,1314,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n case DeclSpec::TST_wchar:\n if (DS.getTypeSpecSign() == TypeSpecifierSign::Unspecified)\n else if (DS.getTypeSpecSign() == TypeSpecifierSign::Signed) {\n } else {\n S.Diag(DS.getTypeSpecSignLoc(), diag::ext_wchar_t_sign_spec) << DS.getSpecifierName(DS.getTypeSpecType(), Context.getPrintingPolicy());"}} | ||
}, | }, | ||
["fatal_too_many_errors"]={ | ["fatal_too_many_errors"]={ | ||
Line 8,396: | Line 8,396: | ||
[h]=q, | [h]=q, | ||
[i]={"75a0393eb580",1270671718,"add capabilities to stop emitting errors after some limit."}, | [i]={"75a0393eb580",1270671718,"add capabilities to stop emitting errors after some limit."}, | ||
[j]={{zc, | [j]={{zc,563,"/// Based on the way the client configured the Diagnostic\n/// object, classify the specified diagnostic ID into a Level, consumable by\n/// the DiagnosticClient.\n///\n/// \\param Loc The source location we are interested in finding out the\n/// diagnostic state. Can be null in order to query the latest state.\ndiag::Severity DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, const DiagnosticsEngine &Diag) const {\n if (Result == diag::Severity::Fatal && Diag.CurDiagID != diag::fatal_too_many_errors && Diag.FatalsAsError)"},{zc,806,"/// ProcessDiag - This is the method used to report a diagnostic that is\n/// finally fully formed.\nbool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const {\n if (DiagLevel >= DiagnosticIDs::Error) {\n // If we\'ve emitted a lot of errors, emit a fatal error instead of it to\n // stop a flood of bogus errors.\n if (Diag.ErrorLimit && Diag.NumErrors > Diag.ErrorLimit && DiagLevel == DiagnosticIDs::Error) {\n Diag.SetDelayedDiagnostic(diag::fatal_too_many_errors);"},{zc,813,"/// ProcessDiag - This is the method used to report a diagnostic that is\n/// finally fully formed.\nbool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const {\n if (Diag.CurDiagID == diag::fatal_too_many_errors)"},{"clang/lib/Frontend/TextDiagnosticPrinter.cpp",59,"/// Print any diagnostic option information to a raw_ostream.\n///\n/// This implements all of the logic for adding diagnostic options to a message\n/// (via OS). Each relevant option is comma separated and all are enclosed in\n/// the standard bracketing: \" [...]\".\nstatic void printDiagnosticOptions(raw_ostream &OS, DiagnosticsEngine::Level Level, const Diagnostic &Info, const DiagnosticOptions &DiagOpts) {\n if (DiagOpts.ShowOptionNames) {\n if (Info.getID() == diag::fatal_too_many_errors) {"},{"clang/tools/libclang/CXStoredDiagnostic.cpp",62,"CXString CXStoredDiagnostic::getDiagnosticOption(CXString *Disable) const {\n if (ID == diag::fatal_too_many_errors) {"}} | ||
}, | }, | ||
["note_access_constrained_by_path"]={ | ["note_access_constrained_by_path"]={ | ||
Line 8,408: | Line 8,408: | ||
[h]=m, | [h]=m, | ||
[i]={"553c0796eedc",1264207592,"Implement elementary access control."}, | [i]={"553c0796eedc",1264207592,"Implement elementary access control."}, | ||
[j]={{kc, | [j]={{kc,1266,"/// Diagnose the path which caused the given declaration or base class\n/// to become inaccessible.\nstatic void DiagnoseAccessPath(Sema &S, const EffectiveContext &EC, AccessTarget &entity) {\n if (entity.isMemberAccess() || constrainingBase + 1 != path.end()) {\n diagnostic = diag::note_access_constrained_by_path;"}} | ||
}, | }, | ||
["note_access_natural"]={ | ["note_access_natural"]={ | ||
Line 8,420: | Line 8,420: | ||
[h]=m, | [h]=m, | ||
[i]={"553c0796eedc",1264207592,"Implement elementary access control."}, | [i]={"553c0796eedc",1264207592,"Implement elementary access control."}, | ||
[j]={{kc, | [j]={{kc,1167,"/// We are unable to access a given declaration due to its direct\n/// access control; diagnose that.\nstatic void diagnoseBadDirectAccess(Sema &S, const EffectiveContext &EC, AccessTarget &entity) {\n S.Diag(D->getLocation(), diag::note_access_natural) << (unsigned)(D->getAccess() == AS_protected) << isImplicit;"},{kc,1268,"/// Diagnose the path which caused the given declaration or base class\n/// to become inaccessible.\nstatic void DiagnoseAccessPath(Sema &S, const EffectiveContext &EC, AccessTarget &entity) {\n if (entity.isMemberAccess() || constrainingBase + 1 != path.end()) {\n } else {\n diagnostic = diag::note_access_natural;"}} | ||
}, | }, | ||
["note_access_protected_restricted_ctordtor"]={ | ["note_access_protected_restricted_ctordtor"]={ | ||
Line 8,432: | Line 8,432: | ||
[h]=m, | [h]=m, | ||
[i]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:"}, | [i]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:"}, | ||
[j]={{kc, | [j]={{kc,1102,"/// Given that an entity has protected natural access, check whether\n/// access might be denied because of the protected member access\n/// restriction.\n///\n/// \\return true if a note was emitted\nstatic bool TryDiagnoseProtectedAccess(Sema &S, const EffectiveContext &EC, AccessTarget &Target) {\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // Use a special diagnostic for constructors and destructors.\n if (isa<CXXConstructorDecl>(D) || isa<CXXDestructorDecl>(D) || (isa<FunctionTemplateDecl>(D) && isa<CXXConstructorDecl>(cast<FunctionTemplateDecl>(D)->getTemplatedDecl()))) {\n return S.Diag(D->getLocation(), diag::note_access_protected_restricted_ctordtor) << isa<CXXDestructorDecl>(D->getAsFunction());"}} | ||
} | } | ||
}; | }; |
edits