Module:ClangDiags/DiagsLongData11
Jump to navigation
Jump to search
Documentation for this module may be created at Module:ClangDiags/DiagsLongData11/doc
local a="source"; local b="hierarchical_hist"; local c="id_hist"; local d="message_hist"; local e="category_hist"; local f="regex3"; local g="regex2"; local h="regex1"; local i="commit"; local j="groups"; local k="maingroup"; local l="tests2"; local m="(?:warning|error|fatal error)\\: "; local n="Semantic Issue"; local o="pedantic"; local p="clang/lib/Sema/SemaDecl.cpp"; local q="11.0"; local r="clang/lib/Sema/SemaExpr.cpp"; local s="Parse Issue"; local t="10.0"; local u="Lexical or Preprocessor Issue"; local v="b1c4d5507fad"; local w="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; local x="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format.\n\nllvm-svn: 66064"; local y="c++11-extensions"; local z="microsoft"; local A=""; local B="gnu"; local C="13.0"; local D="15.0"; local E="6.0"; local F="(?:error|warning|fatal error)\\: "; local G="9.0"; local H="clang/lib/Sema/SemaTemplate.cpp"; local I="5a8987ca5113"; local J="Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"; local K="Update tablegen diagnostic files to be in sync with the def files."; local L="clang/lib/Parse/ParseDeclCXX.cpp"; local M=" \\[(?:\\-Werror,)?\\-Wpedantic[^\\]]*\\]"; local N="c++17-extensions"; local O="8.0"; local P="c++0x-extensions"; local Q="microsoft-template"; local R=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-extensions[^\\]]*\\]"; local S="c++20-extensions"; local T="clang/lib/Lex/PPDirectives.cpp"; local U="16.0"; local V="clang/lib/Sema/SemaInit.cpp"; local W="clang/lib/Parse/ParseDecl.cpp"; local X="12.0"; local Y="PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus\nExtWarn/Warnings. Mostly the name of the warning was changed to match the\nsemantics, but in the PR20356 cases, the warning was about valid code, so the\ndiagnostic was changed from ExtWarn to Warning instead.\n\nllvm-svn: 213443"; local Z="clang/lib/Sema/SemaDeclCXX.cpp"; local ab="1b98ccc4e957"; local bb="CL4"; local cb="PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus"; local db="clang/lib/Lex/Lexer.cpp"; local eb="clang/lib/Lex/Pragma.cpp"; local fb="14.0"; local gb="most"; local hb="clang/lib/Sema/SemaType.cpp"; local ib="all"; local jb="c++1z-extensions"; local kb=" \\[(?:\\-Werror,)?\\-Wc\\+\\+17\\-extensions[^\\]]*\\]"; local lb="c99-extensions"; local mb=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-template[^\\]]*\\]"; local nb=" \\[(?:\\-Werror,)?\\-Wc\\+\\+20\\-extensions[^\\]]*\\]"; local ob="c99-designator"; local pb="clang/lib/Lex/LiteralSupport.cpp"; local qb="c++2a-extensions"; local rb="microsoft-exception-spec"; local sb="5.0"; local tb="returning A from a function with result type B"; local ub="note\\: "; local vb="assigning to A from B"; local wb="passing to parameter of different type"; local xb="passing A to parameter of type B"; local yb="(?: \\[(?:\\-Werror)?[^\\]]*\\])?"; local zb="clang/lib/Sema/SemaExceptionSpec.cpp"; local Ab="returning from function with different return type"; local Bb="converting A to type B"; local Cb="clang/lib/Sema/SemaExprCXX.cpp"; local Db="converting between types"; local Eb="initializing A with an expression of type B"; local Fb="initializing with expression of different type"; local Gb="sending A to parameter of type B"; local Hb="sending to parameter of different type"; local Ib="casting A to type B"; local Jb="casting between types"; local Kb="assigning to different types"; local Lb="excess-initializers"; local Mb="clang/lib/Sema/SemaAccess.cpp"; local Nb="Implement P2361 Unevaluated string literals\n\nThis patch proposes to handle in an uniform fashion\nthe parsing of strings that are never evaluated,\nin asm statement, static assert, attrributes, extern,\netc.\n\nUnevaluated strings are UTF-8 internally and so currently\nbehave as narrow strings, but these things will diverge with\nD93031.\n\nThe big question both for this patch and the P2361 paper\nis whether we risk breaking code by disallowing\nencoding prefixes in this context.\nI hope this patch may allow to gather some data on that.\n\nFuture work:\nImprove the rendering of unicode characters, line break\nand so forth in static-assert messages\n\nReviewed By: aaron.ballman, shafik\n\nDifferential Revision: https://reviews.llvm.org/D105759"; local Ob="Implement P2361 Unevaluated string literals"; local Pb="95f50964fbf5"; local Qb="implicit"; local Rb="None"; local Sb="7.1"; local Tb="clang/lib/Parse/ParseExpr.cpp"; local Ub="struct"; local Vb="pointer-arith"; local Wb="clang/lib/Sema/SemaStmt.cpp"; local Xb="class"; local Yb="11.1"; local Zb="c++11-compat-pedantic"; local ac="gnu-pointer-arith"; local bc="unknown-pragmas"; local cc="c++11-compat"; local dc="variadic-macros"; local ec="clang/lib/Parse/ParseStmt.cpp"; local fc="main"; local gc="c++11-narrowing"; local hc="gnu-folding-constant"; local ic="gnu-empty-struct"; local jc="function"; local kc="union"; local lc="implicit-function-declaration"; local mc="dtor-name"; local nc="gnu-designator"; local oc="missing-declarations"; local pc="[c++20] Implement semantic restrictions for C++20 designated"; local qc="[c++20] Implement semantic restrictions for C++20 designated\ninitializers.\n\nThis has some interesting interactions with our existing extensions to\nsupport C99 designated initializers as an extension in C++. Those are\nresolved as follows:\n\n * We continue to permit the full breadth of C99 designated initializers\n in C++, with the exception that we disallow a partial overwrite of an\n initializer with a non-trivially-destructible type. (Full overwrite\n is OK, because we won\'t run the first initializer at all.)\n\n * The C99 extensions are disallowed in SFINAE contexts and during\n overload resolution, where they could change the meaning of valid\n programs.\n\n * C++20 disallows reordering of initializers. We only check for that for\n the simple cases that the C++20 rules permit (designators of the form\n \'.field_name =\' and continue to allow reordering in other cases).\n It would be nice to improve this behavior in future.\n\n * All C99 designated initializer extensions produce a warning by\n default in C++20 mode. People are going to learn the C++ rules based\n on what Clang diagnoses, so it\'s important we diagnose these properly\n by default.\n\n * In C++ <= 17, we apply the C++20 rules rather than the C99 rules, and\n so still diagnose C99 extensions as described above. We continue to\n accept designated C++20-compatible initializers in C++ <= 17 silently\n by default (but naturally still reject under -pedantic-errors).\n\nThis is not a complete implementation of P0329R4. In particular, that\npaper introduces new non-C99-compatible syntax { .field { init } }, and\nwe do not support that yet.\n\nThis is based on a previous patch by Don Hinton, though I\'ve made\nsubstantial changes when addressing the above interactions.\n\nDifferential Revision: https://reviews.llvm.org/D59754\n\nllvm-svn: 370544"; local rc="5030928d60a1"; local sc=" \\[(?:\\-Werror,)?\\-Wc99\\-designator[^\\]]*\\]"; local tc="7.0"; local uc="[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comments on r352930:\n\n - Removes redundant diagnostic checking code\n - Removes errnoneous use of diag::err_alias_is_definition, which\n turned out to be ineffective anyway since functions can be defined later\n in the translation unit and avoid detection.\n - Adds a test for various invalid cases for import_name and import_module.\n\nDifferential Revision: https://reviews.llvm.org/D59520"; local vc="931fcd3ba011"; local wc="[C++20][Modules][3/8] Initial handling for module partitions."; local xc="[WebAssembly] Improve clang diagnostics for wasm attributes"; local yc="variable"; local zc="clang/lib/Parse/Parser.cpp"; local Ac="clang/lib/Sema/SemaOverload.cpp"; local Bc="incompatible-pointer-types"; local Cc="clang/lib/Sema/DeclSpec.cpp"; local Dc="c++0x-compat"; local Ec=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-exception\\-spec[^\\]]*\\]"; local Fc="69350e569dc4"; local Gc="[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recognition of module partition CMIs\nand removes the FIXMEs in the parser.\n\nModule partitions are recognised in the base computation of visibility,\nhowever additional amendments to visibility follow in subsequent patches.\n\nDifferential Revision: https://reviews.llvm.org/D118586"; return { ["ext_delimited_escape_sequence"]={ [j]={"delimited-escape-sequence-extension",o}, [k]="delimited-escape-sequence-extension", [c]={{nil,fb,"ext_delimited_escape_sequence"}}, [d]="%select{delimited|named}0 escape sequences are a %select{Clang|C++23}1 extension", [b]={{nil,nil,{{"delimited","named"}," escape sequences are a ",{"Clang","C++23"}," extension"}},{U,D,{{"delimited","named"}," escape sequences are a ",{"Clang","C++2b"}," extension"}},{fb,fb,"delimited escape sequences are a Clang extension"}}, [h]=m, [g]="(?:delimited|named) escape sequences are a (?:Clang|C\\+\\+23) extension", [f]=" \\[(?:\\-Werror,)?\\-Wdelimited\\-escape\\-sequence\\-extension[^\\]]*\\]", [e]={{nil,fb,u}}, [i]={Pb,1625925174,Ob,Nb}, [a]={{db,3354,"std::optional<uint32_t> Lexer::tryReadNumericUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\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);"},{db,3442,"std::optional<uint32_t> Lexer::tryReadNamedUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\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);"},{pb,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 // ...\n if (Delimited && Diags) {\n if (!EndDelimiterFound)\n // ...\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);"},{pb,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 // ...\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);"}}, [l]={ ["clang/test/Sema/ucn-identifiers.c"]={"clang/test/Sema/ucn-identifiers.c:20:3: warning: delimited escape sequences are a C++23 extension [-Wdelimited-escape-sequence-extension]","clang/test/Sema/ucn-identifiers.c:21:3: warning: named escape sequences are a C++23 extension [-Wdelimited-escape-sequence-extension]"} } }, ["ext_deprecated_string_literal_conversion"]={ [j]={"writable-strings","write-strings"}, [k]="writable-strings", [c]="ext_deprecated_string_literal_conversion", [d]="ISO C++11 does not allow conversion from string literal to %0", [b]="ISO C++11 does not allow conversion from string literal to A", [h]=m, [g]="ISO C\\+\\+11 does not allow conversion from string literal to (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wwritable\\-strings[^\\]]*\\]", [e]=n, [i]={"1121de36c26b",1389992932,"Fix string-literal to char* conversion in overload resolution for C++11","Fix string-literal to char* conversion in overload resolution for C++11\n\nString literal to char* conversion is deprecated in C++03, and is removed in\nC++11. We still accept this conversion in C++11 mode as an extension, if we find\nit in the best viable function.\n\nllvm-svn: 199513"}, [a]={{Cb,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 // ...\n case ICK_Qualification: {\n // ...\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();"}}, [l]={ ["clang/test/SemaCXX/cxx0x-type-convert-construct.cpp"]={"clang/test/SemaCXX/cxx0x-type-convert-construct.cpp:12:10: warning: ISO C++11 does not allow conversion from string literal to \'char *\' [-Wwritable-strings]","clang/test/SemaCXX/cxx0x-type-convert-construct.cpp:14:11: warning: ISO C++11 does not allow conversion from string literal to \'wchar_t *\' [-Wwritable-strings]"} } }, ["ext_designated_init"]={ [j]={ob,lb,o}, [k]=ob, [c]="ext_designated_init", [d]="designated initializers are a C99 feature", [b]="designated initializers are a C99 feature", [h]=m, [g]="designated initializers are a C99 feature", [f]=sc, [e]=n, [i]={"c124e59c90a3",1295194396,"Emit an extension diagnostic for C99 designated initializers that appear in C++ code","Emit an extension diagnostic for C99 designated initializers that appear in C++ code\n\nllvm-svn: 123582"}, [a]={{r,7959,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // ...\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 // ...\n } else if (!getLangOpts().CPlusPlus && !getLangOpts().C99) {\n Diag(FirstDesignator, diag::ext_designated_init);"}}, [l]={ ["clang/test/Sema/c89.c"]={"clang/test/Sema/c89.c:80:19: warning: designated initializers are a C99 feature [-Wc99-designator]"} } }, ["ext_designated_init_array"]={ [j]={ob,lb}, [k]=ob, [c]={{nil,t,"ext_designated_init_array"}}, [d]={{nil,t,"array designators are a C99 extension"}}, [b]={{nil,t,"array designators are a C99 extension"}}, [h]=m, [g]="array designators are a C99 extension", [f]=sc, [e]={{nil,t,n}}, [i]={rc,1567205575,pc,qc}, [a]={{r,7808,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // ...\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 // ...\n for (auto &Desig : DIE->designators()) {\n if (!Desig.isFieldDesignator() && !DiagnosedArrayDesignator) {\n // ...\n Diag(Desig.getBeginLoc(), diag::ext_designated_init_array) << Desig.getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/eval-crashes.cpp"]={"clang/test/SemaCXX/eval-crashes.cpp:40:22: warning: array designators are a C99 extension [-Wc99-designator]"} } }, ["ext_designated_init_brace_elision"]={ [j]={ob,lb}, [k]=ob, [c]={{nil,C,"ext_designated_init_brace_elision"}}, [d]={{nil,C,"brace elision for designated initializer is a C99 extension"}}, [b]={{nil,C,"brace elision for designated initializer is a C99 extension"}}, [h]=m, [g]="brace elision for designated initializer is a C99 extension", [f]=sc, [e]={{nil,C,n}}, [i]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types","Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to support fadd/fsub:\n\nhttps://reviews.llvm.org/D53965\n\nHowever clang atomic builtins fetch add/sub still does not support\nemitting atomicrmw fadd/fsub.\n\nThis patch adds that.\n\nReviewed by: John McCall, Artem Belevich, Matt Arsenault, JF Bastien,\nJames Y Knight, Louis Dionne, Olivier Giroux\n\nDifferential Revision: https://reviews.llvm.org/D71726"}, [a]={{V,1560,"void InitListChecker::CheckSubElementType(const InitializedEntity &Entity, InitListExpr *IList, QualType ElemType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool DirectlyDesignated) {\n // ...\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 // ...\n // In C++20, brace elision is not permitted for a designated initializer.\n if (DirectlyDesignated && SemaRef.getLangOpts().CPlusPlus && !hadError) {\n // ...\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()), \"}\");"}}, [l]={ ["clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:57:14: error: brace elision for designated initializer is a C99 extension [-Werror,-Wc99-designator]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:58:14: error: brace elision for designated initializer is a C99 extension [-Werror,-Wc99-designator]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:59:14: error: brace elision for designated initializer is a C99 extension [-Werror,-Wc99-designator]"} } }, ["ext_designated_init_mixed"]={ [j]={ob,lb}, [k]=ob, [c]={{nil,t,"ext_designated_init_mixed"}}, [d]={{nil,t,"mixture of designated and non-designated initializers in the same initializer list is a C99 extension"}}, [b]={{nil,t,"mixture of designated and non-designated initializers in the same initializer list is a C99 extension"}}, [h]=m, [g]="mixture of designated and non\\-designated initializers in the same initializer list is a C99 extension", [f]=sc, [e]={{nil,t,n}}, [i]={rc,1567205575,pc,qc}, [a]={{r,7810,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // ...\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 // ...\n if (!DiagnosedMixedDesignator && !isa<DesignatedInitExpr>(InitArgList[0])) {\n // ...\n Diag(DIE->getBeginLoc(), diag::ext_designated_init_mixed) << DIE->getSourceRange();"},{r,7819,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // ...\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 // ...\n } else if (getLangOpts().CPlusPlus && !DiagnosedMixedDesignator && isa<DesignatedInitExpr>(InitArgList[0])) {\n // ...\n Diag(DIE->getBeginLoc(), diag::ext_designated_init_mixed) << DIE->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/designated-initializers-base-class.cpp"]={"clang/test/SemaCXX/designated-initializers-base-class.cpp:11:25: warning: mixture of designated and non-designated initializers in the same initializer list is a C99 extension [-Wc99-designator]"} } }, ["ext_designated_init_nested"]={ [j]={ob,lb}, [k]=ob, [c]={{nil,t,"ext_designated_init_nested"}}, [d]={{nil,t,"nested designators are a C99 extension"}}, [b]={{nil,t,"nested designators are a C99 extension"}}, [h]=m, [g]="nested designators are a C99 extension", [f]=sc, [e]={{nil,t,n}}, [i]={rc,1567205575,pc,qc}, [a]={{r,7800,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // ...\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 // ...\n if (!DiagnosedNestedDesignator && DIE->size() > 1) {\n // ...\n Diag(DIE->getBeginLoc(), diag::ext_designated_init_nested) << DIE->getDesignatorsSourceRange();"}}, [l]={ ["clang/test/SemaTemplate/instantiate-init.cpp"]={"clang/test/SemaTemplate/instantiate-init.cpp:162:13: warning: nested designators are a C99 extension [-Wc99-designator]","clang/test/SemaTemplate/instantiate-init.cpp:163:13: warning: nested designators are a C99 extension [-Wc99-designator]"} } }, ["ext_designated_init_reordered"]={ [j]={bb,ib,gb,"reorder","reorder-init-list"}, [k]="reorder-init-list", [c]={{nil,t,"ext_designated_init_reordered"}}, [d]={{nil,t,"ISO C++ requires field designators to be specified in declaration order; field %1 will be initialized after field %0"}}, [b]={{nil,t,"ISO C++ requires field designators to be specified in declaration order; field B will be initialized after field A"}}, [h]=m, [g]="ISO C\\+\\+ requires field designators to be specified in declaration order; field (.*?) will be initialized after field (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wreorder\\-init\\-list[^\\]]*\\]", [e]={{nil,t,n}}, [i]={rc,1567205575,pc,qc}, [a]={{V,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 // ...\n if (D->isFieldDesignator()) {\n // ...\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 // ...\n if (PrevField && PrevField->getFieldIndex() > KnownField->getFieldIndex()) {\n SemaRef.Diag(DIE->getBeginLoc(), diag::ext_designated_init_reordered) << KnownField << PrevField << DIE->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:37:3: error: ISO C++ requires field designators to be specified in declaration order; field \'y\' will be initialized after field \'x\' [-Werror,-Wreorder-init-list]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:67:3: error: ISO C++ requires field designators to be specified in declaration order; field \'y\' will be initialized after field \'x\' [-Werror,-Wreorder-init-list]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:109:16: error: ISO C++ requires field designators to be specified in declaration order; field \'y\' will be initialized after field \'x\' [-Werror,-Wreorder-init-list]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:206:4: error: ISO C++ requires field designators to be specified in declaration order; field \'z\' will be initialized after field \'y\' [-Werror,-Wreorder-init-list]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:208:4: error: ISO C++ requires field designators to be specified in declaration order; field \'y\' will be initialized after field \'x\' [-Werror,-Wreorder-init-list]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:210:4: error: ISO C++ requires field designators to be specified in declaration order; field \'b\' will be initialized after field \'a\' [-Werror,-Wreorder-init-list]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:213:5: error: ISO C++ requires field designators to be specified in declaration order; field \'e\' will be initialized after field \'d\' [-Werror,-Wreorder-init-list]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:215:5: error: ISO C++ requires field designators to be specified in declaration order; field \'d\' will be initialized after field \'c\' [-Werror,-Wreorder-init-list]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:216:5: error: ISO C++ requires field designators to be specified in declaration order; field \'c\' will be initialized after field \'b\' [-Werror,-Wreorder-init-list]","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:217:5: error: ISO C++ requires field designators to be specified in declaration order; field \'b\' will be initialized after field \'a\' [-Werror,-Wreorder-init-list]"} } }, ["ext_destructor_typedef_name"]={ [j]={"dtor-typedef"}, [k]="dtor-typedef", [c]={{nil,q,"ext_destructor_typedef_name"}}, [d]={{nil,q,"destructor cannot be declared using a %select{typedef|type alias}1 %0 of the class name"}}, [b]={{nil,q,{"destructor cannot be declared using a ",{"typedef","type alias"}," A of the class name"}}}, [h]=F, [g]="destructor cannot be declared using a (?:typedef|type alias) (.*?) of the class name", [f]=" \\[[^\\]]*\\-Wdtor\\-typedef[^\\]]*\\]", [e]={{nil,q,n}}, [i]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, [a]={{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 // ...\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 // ...\n if (const TypedefType *TT = DeclaratorType->getAs<TypedefType>())\n // ...\n else if (const TemplateSpecializationType *TST = DeclaratorType->getAs<TemplateSpecializationType>())\n if (TST->isTypeAlias())\n Diag(D.getIdentifierLoc(), diag::ext_destructor_typedef_name) << DeclaratorType << 1;"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:114:3: error: destructor cannot be declared using a type alias \'X\' (aka \'CtorDtorName\') of the class name [-Wdtor-typedef]"} } }, ["ext_dollar_in_identifier"]={ [j]={"dollar-in-identifier-extension",o}, [k]="dollar-in-identifier-extension", [c]="ext_dollar_in_identifier", [d]="\'$\' in identifier", [b]="\'$\' in identifier", [h]=m, [g]="\'\\$\' in identifier", [f]=" \\[(?:\\-Werror,)?\\-Wdollar\\-in\\-identifier\\-extension[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{db,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 // ...\n if (C == \'$\') {\n // ...\n // Otherwise, emit a diagnostic and continue.\n if (!isLexingRawMode())\n Diag(CurPtr, diag::ext_dollar_in_identifier);"},{db,3881,"LexStart:\n // ...\n case \'$\': // $ in identifiers.\n if (LangOpts.DollarIdents) {\n if (!isLexingRawMode())\n Diag(CurPtr - 1, diag::ext_dollar_in_identifier);"}}, [l]={ ["clang/test/Preprocessor/c90.c"]={"clang/test/Preprocessor/c90.c:10:13: error: \'$\' in identifier [-Werror,-Wdollar-in-identifier-extension]"} } }, ["ext_dtor_name_ambiguous"]={ [j]={mc,o}, [k]=mc, [c]={{nil,q,"ext_dtor_name_ambiguous"}}, [d]={{nil,q,"ISO C++ considers this destructor name lookup to be ambiguous"}}, [b]={{nil,q,"ISO C++ considers this destructor name lookup to be ambiguous"}}, [h]=m, [g]="ISO C\\+\\+ considers this destructor name lookup to be ambiguous", [f]=" \\[(?:\\-Werror,)?\\-Wdtor\\-name[^\\]]*\\]", [e]={{nil,q,n}}, [i]={vc,1576908663,xc,uc}, [a]={{Cb,228,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\n auto CheckLookupResult = [&](LookupResult &Found) -> ParsedType {\n // ...\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"]={ [j]={mc,o}, [k]=mc, [c]={{nil,q,"ext_dtor_named_in_wrong_scope"}}, [d]={{nil,q,"ISO C++ requires the name after \'::~\' to be found in the same scope as the name before \'::~\'"}}, [b]={{nil,q,"ISO C++ requires the name after \'::~\' to be found in the same scope as the name before \'::~\'"}}, [h]=m, [g]="ISO C\\+\\+ requires the name after \'\\:\\:~\' to be found in the same scope as the name before \'\\:\\:~\'", [f]=" \\[(?:\\-Werror,)?\\-Wdtor\\-name[^\\]]*\\]", [e]={{nil,q,n}}, [i]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, [a]={{Cb,385,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\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());"}}, [l]={ ["clang/test/CXX/drs/dr2xx.cpp"]={"clang/test/CXX/drs/dr2xx.cpp:544:8: error: ISO C++ requires the name after \'::~\' to be found in the same scope as the name before \'::~\' [-Werror,-Wdtor-name]","clang/test/CXX/drs/dr2xx.cpp:550:11: error: ISO C++ requires the name after \'::~\' to be found in the same scope as the name before \'::~\' [-Werror,-Wdtor-name]"} } }, ["ext_duplicate_declspec"]={ [j]={"duplicate-decl-specifier",o}, [k]="duplicate-decl-specifier", [c]="ext_duplicate_declspec", [d]="duplicate \'%0\' declaration specifier", [b]="duplicate \'A\' declaration specifier", [h]=m, [g]="duplicate \'(.*?)\' declaration specifier", [f]=" \\[(?:\\-Werror,)?\\-Wduplicate\\-decl\\-specifier[^\\]]*\\]", [e]={{nil,O,Rb},{Sb,nil,n}}, [i]={v,1236199783,w,x}, [a]={{W,4487,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n // If the specifier wasn\'t legal, issue a diagnostic.\n if (isInvalid) {\n // ...\n if (DiagID == diag::ext_duplicate_declspec || DiagID == diag::ext_warn_duplicate_declspec || DiagID == diag::err_duplicate_declspec)"},{hb,1894,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n // Apply const/volatile/restrict qualifiers to T.\n if (unsigned TypeQuals = DS.getTypeQualifiers()) {\n // ...\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\";"},{hb,1899,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n // Apply const/volatile/restrict qualifiers to T.\n if (unsigned TypeQuals = DS.getTypeQualifiers()) {\n // ...\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 // ...\n if (TypeQuals & DeclSpec::TQ_volatile && Result.isVolatileQualified()) {\n S.Diag(DS.getVolatileSpecLoc(), diag::ext_duplicate_declspec) << \"volatile\";"}}, [l]={ ["clang/test/Parser/MicrosoftExtensions.c"]={"clang/test/Parser/MicrosoftExtensions.c:25:20: warning: duplicate \'__forceinline\' declaration specifier [-Wduplicate-decl-specifier]"} } }, ["ext_dynamic_exception_spec"]={ [j]={"dynamic-exception-spec"}, [k]="dynamic-exception-spec", [c]="ext_dynamic_exception_spec", [d]="ISO C++1z does not allow dynamic exception specifications", [b]="ISO C++1z does not allow dynamic exception specifications", [h]=F, [g]="ISO C\\+\\+17 does not allow dynamic exception specifications", [f]=" \\[[^\\]]*\\-Wdynamic\\-exception\\-spec[^\\]]*\\]", [e]={{nil,O,s},{Sb,nil,n}}, [i]={"82da19ddb327",1481165347,"[c++1z] P0003R5: Removing dynamic exception specifications.","[c++1z] P0003R5: Removing dynamic exception specifications.\n\nWe continue to support dynamic exception specifications in C++1z as an\nextension, but produce an error-by-default warning when we encounter one. This\nallows users to opt back into the feature with a warning flag, and implicitly\nopts system headers back into the feature should they happen to use it.\n\nThere is one semantic change implied by P0003R5 but not implemented here:\nviolating a throw() exception specification should now call std::terminate\ndirectly instead of calling std::unexpected(), but since P0003R5 also removes\nstd::unexpected() and std::set_unexpected, and the default unexpected handler\ncalls std::terminate(), a conforming C++1z program cannot tell that we are\nstill calling it. The upside of this strategy is perfect backwards\ncompatibility; the downside is that we don\'t get the more efficient \'noexcept\'\ncodegen for \'throw()\'.\n\nllvm-svn: 289019"}, [a]={{L,4010,"static void diagnoseDynamicExceptionSpecification(Parser &P, SourceRange Range, bool IsNoexcept) {\n if (P.getLangOpts().CPlusPlus11) {\n // ...\n P.Diag(Range.getBegin(), P.getLangOpts().CPlusPlus17 && !IsNoexcept ? diag::ext_dynamic_exception_spec : diag::warn_exception_spec_deprecated) << Range;"}}, [l]={ ["clang/test/SemaCXX/ms-exception-spec.cpp"]={"clang/test/SemaCXX/ms-exception-spec.cpp:11:10: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]","clang/test/SemaCXX/ms-exception-spec.cpp:19:11: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]"} } }, ["ext_elaborated_enum_class"]={ [j]={"elaborated-enum-class"}, [k]="elaborated-enum-class", [c]={{nil,q,"ext_elaborated_enum_class"}}, [d]={{nil,q,"reference to enumeration must use \'enum\' not \'enum %select{struct|class}0\'"}}, [b]={{nil,q,{"reference to enumeration must use \'enum\' not \'enum ",{Ub,Xb},"\'"}}}, [h]=F, [g]="reference to enumeration must use \'enum\' not \'enum (?:struct|class)\'", [f]=" \\[[^\\]]*\\-Welaborated\\-enum\\-class[^\\]]*\\]", [e]={{nil,q,s}}, [i]={"d6425e2c1437",1589141691,"Properly implement \'enum class\' parsing.","Properly implement \'enum class\' parsing.\n\nThe \'class\' or \'struct\' keyword is only permitted as part of either an\nenum definition or a standalone opaque-enum-declaration, not as part of\nan elaborated type specifier. We previously failed to diagnose this, and\ngenerally didn\'t properly implement the restrictions on elaborated type\nspecifiers for enumeration types.\n\nIn passing, also fixed incorrect parsing for enum-bases, which we\npreviously parsed as a type-name, but are actually a type-specifier-seq.\nThis matters for cases like \'enum E : int *p;\', which is valid as a\nMicrosoft extension.\n\nPlus some minor parse diagnostic improvements.\n\nBumped the recently-added ExtWarn for \'enum E : int x;\' to be\nDefaultError; this is not an intentional extension, so producing an\nerror by default seems appropriate, but the warning flag to disable it\nmay still be useful for code written against old Clang. The same\ntreatment is given here to the diagnostic for \'enum class E x;\', which\nwe similarly have incorrectly accepted for many years. These diagnostics\ncontinue to be suppressed under -fms-extensions and when compiling\nObjective-C code. We will need to decide separately whether Objective-C\nshould follow the C++ rules or the (older) MSVC rules."}, [a]={{W,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 // ...\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 // ...\n if (BaseType.isUsable())\n // ...\n else if (ScopedEnumKWLoc.isValid())\n Diag(ScopedEnumKWLoc, diag::ext_elaborated_enum_class) << FixItHint::CreateRemoval(ScopedEnumKWLoc) << IsScopedUsingClassTag;"}}, [l]={ ["clang/test/Parser/cxx0x-decl.cpp"]={"clang/test/Parser/cxx0x-decl.cpp:47:10: error: reference to enumeration must use \'enum\' not \'enum struct\' [-Welaborated-enum-class]","clang/test/Parser/cxx0x-decl.cpp:48:10: error: reference to enumeration must use \'enum\' not \'enum class\' [-Welaborated-enum-class]","clang/test/Parser/cxx0x-decl.cpp:54:10: error: reference to enumeration must use \'enum\' not \'enum struct\' [-Welaborated-enum-class]","clang/test/Parser/cxx0x-decl.cpp:55:10: error: reference to enumeration must use \'enum\' not \'enum class\' [-Welaborated-enum-class]"} } }, ["ext_ellipsis_exception_spec"]={ [j]={z,rb,o}, [k]=rb, [c]="ext_ellipsis_exception_spec", [d]="exception specification of \'...\' is a Microsoft extension", [b]="exception specification of \'...\' is a Microsoft extension", [h]=m, [g]="exception specification of \'\\.\\.\\.\' is a Microsoft extension", [f]=Ec, [e]=s, [i]={v,1236199783,w,x}, [a]={{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 // ...\n // Parse throw(...), a Microsoft extension that means \"this function\n // can throw anything\".\n if (Tok.is(tok::ellipsis)) {\n // ...\n if (!getLangOpts().MicrosoftExt)\n Diag(EllipsisLoc, diag::ext_ellipsis_exception_spec);"}} }, ["ext_embedded_directive"]={ [j]={"embedded-directive",o}, [k]="embedded-directive", [c]="ext_embedded_directive", [d]="embedding a directive within macro arguments has undefined behavior", [b]="embedding a directive within macro arguments has undefined behavior", [h]=m, [g]="embedding a directive within macro arguments has undefined behavior", [f]=" \\[(?:\\-Werror,)?\\-Wembedded\\-directive[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{T,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 // ...\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 // ...\n Diag(Result, diag::ext_embedded_directive);"}}, [l]={ ["clang/test/C/drs/dr2xx.c"]={"clang/test/C/drs/dr2xx.c:218:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive]"} } }, ["ext_empty_character"]={ [j]={"invalid-pp-token"}, [k]="invalid-pp-token", [c]="ext_empty_character", [d]="empty character constant", [b]="empty character constant", [h]=m, [g]="empty character constant", [f]=" \\[(?:\\-Werror,)?\\-Winvalid\\-pp\\-token[^\\]]*\\]", [e]=u, [i]={"608c0b65d785",1340869916,"Add warning flag -Winvalid-pp-token for preprocessing-tokens which have","Add warning flag -Winvalid-pp-token for preprocessing-tokens which have\nundefined behaviour, and move the diagnostic for \'\' from an Error into\nan ExtWarn in this group. This is important for some users of the preprocessor,\nand is necessary for gcc compatibility.\n\nllvm-svn: 159335"}, [a]={{db,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 // ...\n if (C == \'\\\'\') {\n if (!isLexingRawMode() && !LangOpts.AsmPreprocessor)\n Diag(BufferPtr, diag::ext_empty_character);"}}, [l]={ ["clang/test/CodeGen/opt-record-MIR.c"]={"build/tools/clang/test/CodeGen/Output/opt-record-MIR.c.tmp.yaml:206:22: warning: empty character constant [-Winvalid-pp-token]"} } }, ["ext_empty_fnmacro_arg"]={ [j]={lb,o}, [k]=lb, [c]="ext_empty_fnmacro_arg", [d]="empty macro arguments are a C99 feature", [b]="empty macro arguments are a C99 feature", [h]=m, [g]="empty macro arguments are a C99 feature", [f]=" \\[(?:\\-Werror,)?\\-Wc99\\-extensions[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{"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 // ...\n while (Tok.isNot(tok::r_paren)) {\n // ...\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);"}}, [l]={ ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:16:7: warning: empty macro arguments are a C99 feature [-Wc99-extensions]","clang/test/Preprocessor/macro_fn.c:23:8: warning: empty macro arguments are a C99 feature [-Wc99-extensions]","clang/test/Preprocessor/macro_fn.c:26:5: warning: empty macro arguments are a C99 feature [-Wc99-extensions]","clang/test/Preprocessor/macro_fn.c:27:5: warning: empty macro arguments are a C99 feature [-Wc99-extensions]","clang/test/Preprocessor/macro_fn.c:29:5: warning: empty macro arguments are a C99 feature [-Wc99-extensions]","clang/test/Preprocessor/macro_fn.c:30:5: warning: empty macro arguments are a C99 feature [-Wc99-extensions]","clang/test/Preprocessor/macro_fn.c:30:6: warning: empty macro arguments are a C99 feature [-Wc99-extensions]"} } }, ["ext_empty_struct_union"]={ [j]={B,ic,o}, [k]=ic, [c]="ext_empty_struct_union", [d]="empty %select{struct|union}0 is a GNU extension", [b]={{nil,nil,{"empty ",{Ub,kc}," is a GNU extension"}}}, [h]=m, [g]="empty (?:struct|union) is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-empty\\-struct[^\\]]*\\]", [e]=n, [i]={"da2955ed744e",1280413774,"Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, si...","Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, size 1 in C++. Put this warning under -Wc++-compat.\n\nllvm-svn: 109748"}, [a]={{p,19135,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n // Okay, we successfully defined \'Record\'.\n if (Record) {\n // ...\n if (CheckForZeroSize) {\n // ...\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();"}}, [l]={ ["clang/test/Sema/empty2.c"]={"clang/test/Sema/empty2.c:3:1: warning: empty struct is a GNU extension [-Wgnu-empty-struct]","clang/test/Sema/empty2.c:6:1: warning: empty union is a GNU extension [-Wgnu-empty-struct]"} } }, ["ext_empty_translation_unit"]={ [j]={"empty-translation-unit",o}, [k]="empty-translation-unit", [c]="ext_empty_translation_unit", [d]="ISO C requires a translation unit to contain at least one declaration", [b]="ISO C requires a translation unit to contain at least one declaration", [h]=m, [g]="ISO C requires a translation unit to contain at least one declaration", [f]=" \\[(?:\\-Werror,)?\\-Wempty\\-translation\\-unit[^\\]]*\\]", [e]=s, [i]={"ccf43ca05cb1",1339003521,"Add pedantic warning -Wempty-translation-unit (C11 6.9p1).","Add pedantic warning -Wempty-translation-unit (C11 6.9p1).\n\nIn standard C since C89, a \'translation-unit\' is syntactically defined to have\nat least one \"external-declaration\", which is either a decl or a function\ndefinition. In Clang the latter gives us a declaration as well.\n\nThe tricky bit about this warning is that our predefines can contain external\ndeclarations (__builtin_va_list and the 128-bit integer types). Therefore our\nAST parser now makes sure we have at least one declaration that doesn\'t come\nfrom the predefines buffer.\n\nAlso, remove bogus warning about empty source files. This doesn\'t catch source\nfiles that only contain comments, and never fired anyway because of our\npredefines.\n\nPR12665 and <rdar://problem/9165548>\n\nllvm-svn: 158085"}, [a]={{zc,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 // ...\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);"}}, [l]={ ["clang/test/Preprocessor/comment_save_if.c"]={"clang/test/Preprocessor/comment_save_if.c:12:1: warning: ISO C requires a translation unit to contain at least one declaration [-Wempty-translation-unit]"} } }, ["ext_enum_base_in_type_specifier"]={ [j]={"elaborated-enum-base"}, [k]="elaborated-enum-base", [c]={{nil,q,"ext_enum_base_in_type_specifier"}}, [d]={{nil,q,"non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration%select{|; missing list of enumerators?}0"}}, [b]={{nil,q,{"non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration",{A,"; missing list of enumerators?"}}}}, [h]=F, [g]="non\\-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration(?:|; missing list of enumerators\\?)", [f]=" \\[[^\\]]*\\-Welaborated\\-enum\\-base[^\\]]*\\]", [e]={{nil,q,s}}, [i]={"c90e19810743",1588991058,"Fix parsing of enum-base to follow C++11 rules.","Fix parsing of enum-base to follow C++11 rules.\n\nPreviously we implemented non-standard disambiguation rules to\ndistinguish an enum-base from a bit-field but otherwise treated a :\nafter an elaborated-enum-specifier as introducing an enum-base. That\nmisparses various examples (anywhere an elaborated-type-specifier can\nappear followed by a colon, such as within a ternary operator or\n_Generic).\n\nWe now implement the C++11 rules, with the old cases accepted as\nextensions where that seemed reasonable. These amount to:\n * an enum-base must always be accompanied by an enum definition (except\n in a standalone declaration of the form \'enum E : T;\')\n * in a member-declaration, \'enum E :\' always introduces an enum-base,\n never a bit-field\n * in a type-specifier (or similar context), \'enum E :\' is not\n permitted; the colon means whatever else it would mean in that\n context.\n\nFixed underlying types for enums are also permitted in Objective-C and\nunder MS extensions, plus as a language extension in all other modes.\nThe behavior in ObjC and MS extensions modes is unchanged (but the\nbit-field disambiguation is a bit better); remaining language modes\nfollow the C++11 rules.\n\nFixes PR45726, PR39979, PR19810, PR44941, and most of PR24297, plus C++\ncore issues 1514 and 1966."}, [a]={{W,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 // ...\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 // ...\n if (BaseType.isUsable())\n Diag(BaseRange.getBegin(), diag::ext_enum_base_in_type_specifier) << (AllowEnumSpecifier == AllowDefiningTypeSpec::Yes) << BaseRange;"}}, [l]={ ["clang/test/Parser/cxx0x-decl.cpp"]={"clang/test/Parser/cxx0x-decl.cpp:33:10: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:34:18: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:35:18: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:37:20: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:41:20: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:44:23: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:49:12: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:50:19: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:51:18: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:56:12: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:57:19: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]","clang/test/Parser/cxx0x-decl.cpp:58:18: error: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? [-Welaborated-enum-base]"} } }, ["ext_enum_friend"]={ [j]={P,y}, [k]=y, [c]="ext_enum_friend", [d]="befriending enumeration type %0 is a C++11 extension", [b]="befriending enumeration type A is a C++11 extension", [h]=m, [g]="befriending enumeration type (.*?) is a C\\+\\+11 extension", [f]=R, [e]=n, [i]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:","Improve handling of friend types in several ways:\n - When instantiating a friend type template, perform semantic\n analysis on the resulting type.\n - Downgrade the errors concerning friend type declarations that do\n not refer to classes to ExtWarns in C++98/03. C++0x allows\n practically any type to be befriended, and ignores the friend\n declaration if the type is not a class.\n\nllvm-svn: 100635"}, [a]={{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 // ...\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 // ...\n } else {\n if (!T->isElaboratedTypeSpecifier()) {\n // ...\n } else if (T->getAs<EnumType>()) {\n Diag(FriendLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_enum_friend : diag::ext_enum_friend) << T << TypeRange;"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp:19:3: warning: befriending enumeration type \'enum E\' is a C++11 extension [-Wc++11-extensions]"} } }, ["ext_enum_too_large"]={ [j]={"enum-too-large"}, [k]="enum-too-large", [c]="ext_enum_too_large", [d]="enumeration values exceed range of largest integer", [b]="enumeration values exceed range of largest integer", [h]=m, [g]="enumeration values exceed range of largest integer", [f]=" \\[(?:\\-Werror,)?\\-Wenum\\-too\\-large[^\\]]*\\]", [e]=n, [i]={"faf156ad158b",1394060098,"Tests for DR370-380.","Tests for DR370-380.\n\nAlso promote a couple of Warnings on ill-formed code found by this testing to\nExtWarns.\n\nllvm-svn: 203021"}, [a]={{p,19818,"void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange, Decl *EnumDeclX, ArrayRef<Decl *> Elements, Scope *S, const ParsedAttributesView &Attrs) {\n // ...\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 // ...\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 // ...\n } else if (Packed && NumNegativeBits <= ShortWidth && NumPositiveBits < ShortWidth) {\n // ...\n } else if (NumNegativeBits <= IntWidth && NumPositiveBits < IntWidth) {\n // ...\n } else {\n // ...\n if (NumNegativeBits <= BestWidth && NumPositiveBits < BestWidth) {\n // ...\n } else {\n // ...\n if (NumNegativeBits > BestWidth || NumPositiveBits >= BestWidth)\n Diag(Enum->getLocation(), diag::ext_enum_too_large);"}}, [l]={ ["clang/test/Sema/enum.c"]={"clang/test/Sema/enum.c:17:6: warning: enumeration values exceed range of largest integer [-Wenum-too-large]"} } }, ["ext_enum_value_not_int"]={ [j]={o}, [k]=o, [c]="ext_enum_value_not_int", [d]="ISO C restricts enumerator values to range of \'int\' (%0 is too %select{small|large}1)", [b]={{nil,nil,{"ISO C restricts enumerator values to range of \'int\' (A is too ",{"small","large"},")"}}}, [h]=m, [g]="ISO C restricts enumerator values to range of \'int\' \\((.*?) is too (?:small|large)\\)", [f]=M, [e]=n, [i]={I,1237025389,K,J}, [a]={{p,19321,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n // ...\n if (Val) {\n if (Enum->isDependentType() || Val->isTypeDependent() || Val->containsErrors())\n // ...\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 // ...\n } else if (!Val->isValueDependent() && !(Val = VerifyIntegerConstantExpression(Val, &EnumVal, AllowFold).get())) {\n // ...\n } else {\n if (Enum->isComplete()) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n // ...\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());"},{p,19408,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n // ...\n if (!Val) {\n if (Enum->isDependentType())\n // ...\n else if (!LastEnumConst) {\n // ...\n } else {\n // ...\n // Check for overflow on increment.\n if (EnumVal < LastEnumConst->getInitVal()) {\n // ...\n } else if (!getLangOpts().CPlusPlus && !EltTy->isDependentType() && !isRepresentableIntegerValue(Context, EnumVal, EltTy)) {\n // ...\n Diag(IdLoc, diag::ext_enum_value_not_int) << toString(EnumVal, 10) << 1;"}}, [l]={ ["clang/test/Sema/enum.c"]={"clang/test/Sema/enum.c:3:9: warning: ISO C restricts enumerator values to range of \'int\' (180388626432 is too large) [-Wpedantic]","clang/test/Sema/enum.c:9:4: warning: ISO C restricts enumerator values to range of \'int\' (-2147483649 is too small) [-Wpedantic]","clang/test/Sema/enum.c:12:4: warning: ISO C restricts enumerator values to range of \'int\' (2147483648 is too large) [-Wpedantic]","clang/test/Sema/enum.c:13:3: warning: ISO C restricts enumerator values to range of \'int\' (4294901760 is too large) [-Wpedantic]","clang/test/Sema/enum.c:18:3: warning: ISO C restricts enumerator values to range of \'int\' (-9223372036854775808 is too small) [-Wpedantic]","clang/test/Sema/enum.c:19:1: warning: ISO C restricts enumerator values to range of \'int\' (9223372036854775808 is too large) [-Wpedantic]"} } }, ["ext_enumerator_increment_too_large"]={ [j]={"enum-too-large"}, [k]="enum-too-large", [c]="ext_enumerator_increment_too_large", [d]="incremented enumerator value %0 is not representable in the largest integer type", [b]="incremented enumerator value A is not representable in the largest integer type", [h]=m, [g]="incremented enumerator value (.*?) is not representable in the largest integer type", [f]=" \\[(?:\\-Werror,)?\\-Wenum\\-too\\-large[^\\]]*\\]", [e]=n, [i]={"faf156ad158b",1394060098,"Tests for DR370-380.","Tests for DR370-380.\n\nAlso promote a couple of Warnings on ill-formed code found by this testing to\nExtWarns.\n\nllvm-svn: 203021"}, [a]={{p,19383,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n // ...\n if (!Val) {\n if (Enum->isDependentType())\n // ...\n else if (!LastEnumConst) {\n // ...\n } else {\n // ...\n // Check for overflow on increment.\n if (EnumVal < LastEnumConst->getInitVal()) {\n // ...\n if (T.isNull() || Enum->isFixed()) {\n // ...\n if (Enum->isFixed())\n // ...\n else\n Diag(IdLoc, diag::ext_enumerator_increment_too_large) << toString(EnumVal, 10);"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.enum/p5.cpp"]={"clang/test/CXX/dcl.dcl/dcl.enum/p5.cpp:51:3: warning: incremented enumerator value 18446744073709551616 is not representable in the largest integer type [-Wenum-too-large]"} } }, ["ext_enumerator_list_comma_c"]={ [j]={lb,o}, [k]=lb, [c]="ext_enumerator_list_comma_c", [d]="commas at the end of enumerator lists are a C99-specific feature", [b]="commas at the end of enumerator lists are a C99-specific feature", [h]=m, [g]="commas at the end of enumerator lists are a C99\\-specific feature", [f]=" \\[(?:\\-Werror,)?\\-Wc99\\-extensions[^\\]]*\\]", [e]=s, [i]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace","Add diagnostics for comma at end of enum and for extra semicolon at namespace\nscope to -Wc++11-extensions. Move extra semicolon after member function\ndefinition diagnostic out of -pedantic, since C++ allows a single semicolon\nthere. Keep it in -Wextra-semi, though, since it\'s still questionable.\n\nllvm-svn: 160618"}, [a]={{W,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 // ...\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // ...\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"]={ [j]={P,y,o}, [k]=y, [c]="ext_enumerator_list_comma_cxx", [d]="commas at the end of enumerator lists are a C++11 extension", [b]="commas at the end of enumerator lists are a C++11 extension", [h]=m, [g]="commas at the end of enumerator lists are a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace","Add diagnostics for comma at end of enum and for extra semicolon at namespace\nscope to -Wc++11-extensions. Move extra semicolon after member function\ndefinition diagnostic out of -pedantic, since C++ allows a single semicolon\nthere. Keep it in -Wextra-semi, though, since it\'s still questionable.\n\nllvm-svn: 160618"}, [a]={{W,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 // ...\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // ...\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);"}}, [l]={ ["clang/test/Parser/cxx-decl.cpp"]={"clang/test/Parser/cxx-decl.cpp:53:19: error: commas at the end of enumerator lists are a C++11 extension [-Werror,-Wc++11-extensions]"} } }, ["ext_enumerator_too_large"]={ [j]={z,"microsoft-enum-value",o}, [k]="microsoft-enum-value", [c]="ext_enumerator_too_large", [d]="enumerator value is not representable in the underlying type %0", [b]="enumerator value is not representable in the underlying type A", [h]=m, [g]="enumerator value is not representable in the underlying type (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-enum\\-value[^\\]]*\\]", [e]=n, [i]={"a310806ae57f",1287414073,"Microsoft enum extensions. 2 things will change on -fms-extensions:","Microsoft enum extensions. 2 things will change on -fms-extensions:\n1. enum underlying type is int by default.\n2. Error \"enumerator value is not representable in the underlying type\"is a ExtWarning\n\nllvm-svn: 116704"}, [a]={{p,19295,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n // ...\n if (Val) {\n if (Enum->isDependentType() || Val->isTypeDependent() || Val->containsErrors())\n // ...\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 // ...\n } else if (!Val->isValueDependent() && !(Val = VerifyIntegerConstantExpression(Val, &EnumVal, AllowFold).get())) {\n // ...\n } else {\n if (Enum->isComplete()) {\n // ...\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;"}}, [l]={ ["clang/test/Sema/MicrosoftCompatibility.c"]={"clang/test/Sema/MicrosoftCompatibility.c:18:3: warning: enumerator value is not representable in the underlying type \'int\' [-Wmicrosoft-enum-value]","clang/test/Sema/MicrosoftCompatibility.c:19:3: warning: enumerator value is not representable in the underlying type \'int\' [-Wmicrosoft-enum-value]"} } }, ["ext_equals_this_lambda_capture_cxx20"]={ [j]={S,qb}, [k]=S, [c]={{nil,q,"ext_equals_this_lambda_capture_cxx20"}}, [d]={{nil,q,"explicit capture of \'this\' with a capture default of \'=\' is a C++20 extension"}}, [b]={{nil,q,"explicit capture of \'this\' with a capture default of \'=\' is a C++20 extension"}}, [h]=m, [g]="explicit capture of \'this\' with a capture default of \'\\=\' is a C\\+\\+20 extension", [f]=nb, [e]={{nil,q,"Lambda Issue"}}, [i]={"8194a3e975e5",1503114187,"[c++2a] Implement P0409R2 - Allow lambda capture [=,this] (by hamzasood)","[c++2a] Implement P0409R2 - Allow lambda capture [=,this] (by hamzasood)\n\nThis patch, by hamzasood, implements P0409R2, and allows [=, this] pre-C++2a as an extension (with appropriate warnings) for consistency.\n\nhttps://reviews.llvm.org/D36572\n\nThanks Hamza!\n\nllvm-svn: 311224"}, [a]={{"clang/lib/Sema/SemaLambda.cpp",1043,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n // ...\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 // ...\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);"}}, [l]={ ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp:11:15: warning: explicit capture of \'this\' with a capture default of \'=\' is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp:26:13: warning: explicit capture of \'this\' with a capture default of \'=\' is a C++20 extension [-Wc++20-extensions]"} } }, ["ext_equivalent_internal_linkage_decl_in_modules"]={ [j]={"modules-ambiguous-internal-linkage"}, [k]="modules-ambiguous-internal-linkage", [c]="ext_equivalent_internal_linkage_decl_in_modules", [d]="ambiguous use of internal linkage declaration %0 defined in multiple modules", [b]="ambiguous use of internal linkage declaration A defined in multiple modules", [h]=m, [g]="ambiguous use of internal linkage declaration (.*?) defined in multiple modules", [f]=" \\[(?:\\-Werror,)?\\-Wmodules\\-ambiguous\\-internal\\-linkage[^\\]]*\\]", [e]="Modules Issue", [i]={"2dbe4043e8f5",1446665192,"[modules] Generalize the workaround for multiple ambiguous definitions of","[modules] Generalize the workaround for multiple ambiguous definitions of\ninternal linkage entities in different modules from r250884 to apply to all\nnames, not just function names.\n\nThis is really awkward: we don\'t want to merge internal-linkage symbols from\nseparate modules, because they might not actually be defining the same entity.\nBut we don\'t want to reject programs that use such an ambiguous symbol if those\ninternal-linkage symbols are in fact equivalent. For now, we\'re resolving the\nambiguity by picking one of the equivalent definitions as an extension.\n\nllvm-svn: 252063"}, [a]={{Ac,10303,"void Sema::diagnoseEquivalentInternalLinkageDeclarations(SourceLocation Loc, const NamedDecl *D, ArrayRef<const NamedDecl *> Equiv) {\n // ...\n Diag(Loc, diag::ext_equivalent_internal_linkage_decl_in_modules) << D;"}}, [l]={ ["clang/test/Modules/submodules-merge-defs.cpp"]={"clang/test/Modules/submodules-merge-defs.cpp:110:28: warning: ambiguous use of internal linkage declaration \'g\' defined in multiple modules [-Wmodules-ambiguous-internal-linkage]","clang/test/Modules/submodules-merge-defs.cpp:116:24: warning: ambiguous use of internal linkage declaration \'g\' defined in multiple modules [-Wmodules-ambiguous-internal-linkage]","clang/test/Modules/submodules-merge-defs.cpp:116:24: warning: ambiguous use of internal linkage declaration \'g\' defined in multiple modules [-Wmodules-ambiguous-internal-linkage]","clang/test/Modules/submodules-merge-defs.cpp:116:24: warning: ambiguous use of internal linkage declaration \'g\' defined in multiple modules [-Wmodules-ambiguous-internal-linkage]"} } }, ["ext_excess_initializers"]={ [j]={Lb}, [k]=Lb, [c]="ext_excess_initializers", [d]="excess elements in %select{array|vector|scalar|union|struct}0 initializer", [b]={{nil,nil,{"excess elements in ",{"array","vector","scalar",kc,Ub}," initializer"}}}, [h]=m, [g]="excess elements in (?:array|vector|scalar|union|struct) initializer", [f]=" \\[(?:\\-Werror,)?\\-Wexcess\\-initializers[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{V,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 // ...\n // Don\'t complain for incomplete types, since we\'ll get an error elsewhere.\n if (Index < IList->getNumInits() && !T->isIncompleteType()) {\n // ...\n if (VerifyOnly) {\n // ...\n } else if (StructuredIndex == 1 && IsStringInit(StructuredList->getInit(0), T, SemaRef.Context) == SIF_None) {\n // ...\n } else if (T->isSizelessBuiltinType()) {\n // ...\n } else {\n // ...\n unsigned DK = ExtraInitsIsError ? diag::err_excess_initializers : diag::ext_excess_initializers;"}}, [l]={ ["clang/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c"]={"clang/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c:7:32: warning: excess elements in struct initializer [-Wexcess-initializers]"} } }, ["ext_excess_initializers_for_sizeless_type"]={ [j]={Lb}, [k]=Lb, [c]={{nil,q,"ext_excess_initializers_for_sizeless_type"}}, [d]={{nil,q,"excess elements in initializer for indivisible sizeless type %0"}}, [b]={{nil,q,"excess elements in initializer for indivisible sizeless type A"}}, [h]=m, [g]="excess elements in initializer for indivisible sizeless type (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wexcess\\-initializers[^\\]]*\\]", [e]={{nil,q,n}}, [i]={vc,1576908663,xc,uc}, [a]={{V,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 // ...\n // Don\'t complain for incomplete types, since we\'ll get an error elsewhere.\n if (Index < IList->getNumInits() && !T->isIncompleteType()) {\n // ...\n if (VerifyOnly) {\n // ...\n } else if (StructuredIndex == 1 && IsStringInit(StructuredList->getInit(0), T, SemaRef.Context) == SIF_None) {\n // ...\n } else if (T->isSizelessBuiltinType()) {\n unsigned DK = ExtraInitsIsError ? diag::err_excess_initializers_for_sizeless_type : diag::ext_excess_initializers_for_sizeless_type;"}}, [l]={ ["clang/test/Sema/sizeless-1.c"]={"clang/test/Sema/sizeless-1.c:89:49: warning: excess elements in initializer for indivisible sizeless type \'svint8_t\' (aka \'__SVInt8_t\') [-Wexcess-initializers]"} } }, ["ext_excess_initializers_in_char_array_initializer"]={ [j]={Lb}, [k]=Lb, [c]="ext_excess_initializers_in_char_array_initializer", [d]="excess elements in char array initializer", [b]="excess elements in char array initializer", [h]=m, [g]="excess elements in char array initializer", [f]=" \\[(?:\\-Werror,)?\\-Wexcess\\-initializers[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{V,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 // ...\n // Don\'t complain for incomplete types, since we\'ll get an error elsewhere.\n if (Index < IList->getNumInits() && !T->isIncompleteType()) {\n // ...\n if (VerifyOnly) {\n // ...\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;"}}, [l]={ ["clang/test/Sema/array-init.c"]={"clang/test/Sema/array-init.c:160:41: warning: excess elements in char array initializer [-Wexcess-initializers]","clang/test/Sema/array-init.c:172:26: warning: excess elements in char array initializer [-Wexcess-initializers]"} } }, ["ext_expected_semi_decl_list"]={ [c]="ext_expected_semi_decl_list", [d]="expected \';\' at end of declaration list", [b]="expected \';\' at end of declaration list", [h]=m, [g]="expected \';\' at end of declaration list", [f]=yb, [e]=s, [i]={v,1236199783,w,x}, [a]={{W,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 // ...\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 // ...\n if (Tok.is(tok::r_brace)) {\n ExpectAndConsume(tok::semi, diag::ext_expected_semi_decl_list);"}}, [l]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:76:8: warning: expected \';\' at end of declaration list"} } }, ["ext_explicit_bool"]={ [j]={S,qb}, [k]=S, [c]={{nil,t,"ext_explicit_bool"}}, [d]={{nil,t,"explicit(bool) is a C++20 extension"}}, [b]={{nil,t,"explicit(bool) is a C++20 extension"}}, [h]=m, [g]="explicit\\(bool\\) is a C\\+\\+20 extension", [f]=nb, [e]={{nil,t,s}}, [i]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit","Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\nSee\nhttps://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview\nfor background discussion.\n\nThis adds a warning, flags and pragmas to limit the number of\npre-processor tokens either at a certain point in a translation unit, or\noverall.\n\nThe idea is that this would allow projects to limit the size of certain\nwidely included headers, or for translation units overall, as a way to\ninsert backstops for header bloat and prevent compile-time regressions.\n\nDifferential revision: https://reviews.llvm.org/D72703"}, [a]={{W,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 // ...\n while (true) {\n // ...\n case tok::kw_explicit: {\n // ...\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);"}}, [l]={ ["clang/test/Parser/explicit-bool.cpp"]={"clang/test/Parser/explicit-bool.cpp:47:12: warning: explicit(bool) is a C++20 extension [-Wc++20-extensions]","clang/test/Parser/explicit-bool.cpp:52:12: warning: explicit(bool) is a C++20 extension [-Wc++20-extensions]"} } }, ["ext_explicit_conversion_functions"]={ [j]={P,y}, [k]=y, [c]="ext_explicit_conversion_functions", [d]="explicit conversion functions are a C++11 extension", [b]="explicit conversion functions are a C++11 extension", [h]=m, [g]="explicit conversion functions are a C\\+\\+11 extension", [f]=R, [e]=n, [i]={"0bf8a492fd75",1318970984,"-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.","-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.\n\nllvm-svn: 142419"}, [a]={{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 // ...\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());"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp:9:3: warning: explicit conversion functions are a C++11 extension [-Wc++11-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp:20:1: warning: explicit conversion functions are a C++11 extension [-Wc++11-extensions]"} } }, ["ext_explicit_instantiation_duplicate"]={ [j]={z,Q}, [k]=Q, [c]="ext_explicit_instantiation_duplicate", [d]="duplicate explicit instantiation of %0 ignored as a Microsoft extension", [b]="duplicate explicit instantiation of A ignored as a Microsoft extension", [h]=m, [g]="duplicate explicit instantiation of (.*?) ignored as a Microsoft extension", [f]=mb, [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{H,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 // ...\n case TSK_ExplicitInstantiationDefinition:\n // ...\n case TSK_ExplicitInstantiationDefinition:\n // ...\n Diag(NewLoc, (getLangOpts().MSVCCompat) ? diag::ext_explicit_instantiation_duplicate : diag::err_explicit_instantiation_duplicate) << PrevDecl;"}}, [l]={ ["clang/test/SemaTemplate/ms-class-specialization-duplicate.cpp"]={"clang/test/SemaTemplate/ms-class-specialization-duplicate.cpp:9:16: warning: duplicate explicit instantiation of \'A<int>\' ignored as a Microsoft extension [-Wmicrosoft-template]"} } }, ["ext_explicit_instantiation_without_qualified_id"]={ [j]={o}, [k]=o, [c]="ext_explicit_instantiation_without_qualified_id", [d]="qualifier in explicit instantiation of %q0 requires a template-id (a typedef is not permitted)", [b]="qualifier in explicit instantiation of A requires a template-id (a typedef is not permitted)", [h]=m, [g]="qualifier in explicit instantiation of (.*?) requires a template\\-id \\(a typedef is not permitted\\)", [f]=M, [e]=n, [i]={"010815a20b7a",1276705607,"Downgrade the error when using a typedef in the nested-name-specifier","Downgrade the error when using a typedef in the nested-name-specifier\nof an explicit instantiation to an ExtWarn, since nobody else seems to\ndiagnose this problem.\n\nllvm-svn: 106109"}, [a]={{H,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 // ...\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();"},{H,10532,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!R->isFunctionType()) {\n // ...\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();"},{H,10754,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\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();"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.explicit/p2.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p2.cpp:30:1: warning: qualifier in explicit instantiation of \'X0<int>::Inner\' requires a template-id (a typedef is not permitted) [-Wpedantic]","clang/test/CXX/temp/temp.spec/temp.explicit/p2.cpp:31:21: warning: qualifier in explicit instantiation of \'X0<int>::f\' requires a template-id (a typedef is not permitted) [-Wpedantic]","clang/test/CXX/temp/temp.spec/temp.explicit/p2.cpp:32:20: warning: qualifier in explicit instantiation of \'X0<int>::value\' requires a template-id (a typedef is not permitted) [-Wpedantic]"} } }, ["ext_explicit_specialization_storage_class"]={ [c]="ext_explicit_specialization_storage_class", [d]="explicit specialization cannot have a storage class", [b]="explicit specialization cannot have a storage class", [h]=m, [g]="explicit specialization cannot have a storage class", [f]=yb, [e]=n, [i]={"c976f01d3f9e",1308282095,"Downgrade the error complaining about presence of a storage class","Downgrade the error complaining about presence of a storage class\nspecifier on an explicit specialization to a warning, since neither\nEDG nor GCC diagnose this code as ill-formed.\n\nllvm-svn: 133232"}, [a]={{p,10434,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else {\n // ...\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 // ...\n } else if (isFunctionTemplateSpecialization) {\n // ...\n if (Info && SC != SC_None) {\n if (SC != Info->getTemplate()->getTemplatedDecl()->getStorageClass())\n // ...\n else\n Diag(NewFD->getLocation(), diag::ext_explicit_specialization_storage_class) << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp:16:24: warning: explicit specialization cannot have a storage class"} } }, ["ext_expr_not_ice"]={ [j]={B,hc,o}, [k]=hc, [c]="ext_expr_not_ice", [d]="expression is not an %select{integer|integral}0 constant expression; folding it to a constant is a GNU extension", [b]={{nil,nil,{"expression is not an ",{"integer","integral"}," constant expression; folding it to a constant is a GNU extension"}}}, [h]=m, [g]="expression is not an (?:integer|integral) constant expression; folding it to a constant is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-folding\\-constant[^\\]]*\\]", [e]=n, [i]={v,1236199783,w,x}, [a]={{r,17861,"Sema::SemaDiagnosticBuilder Sema::VerifyICEDiagnoser::diagnoseFold(Sema &S, SourceLocation Loc) { return S.Diag(Loc, diag::ext_expr_not_ice) << S.LangOpts.CPlusPlus; }"}}, [l]={ ["clang/test/Sema/PR2963-enum-constant.c"]={"clang/test/Sema/PR2963-enum-constant.c:16:21: warning: expression is not an integer constant expression; folding it to a constant is a GNU extension [-Wgnu-folding-constant]"} } }, ["ext_extern_template"]={ [j]={P,y,o}, [k]=y, [c]="ext_extern_template", [d]="extern templates are a C++11 extension", [b]="extern templates are a C++11 extension", [h]=m, [g]="extern templates are a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"f411196d15a9",1319135758,"\'extern template\' is a C++11 feature. Add an Extension for C++98 (this matches","\'extern template\' is a C++11 feature. Add an Extension for C++98 (this matches\ngcc\'s behaviour), and a -Wc++98-compat-pedantic warning for C++11.\n\nllvm-svn: 142597"}, [a]={{zc,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 // ...\n case tok::kw_extern:\n if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_template)) {\n // ...\n Diag(ExternLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_extern_template : diag::ext_extern_template) << SourceRange(ExternLoc, TemplateLoc);"}}, [l]={ ["clang/test/CXX/drs/dr0xx.cpp"]={"clang/test/CXX/drs/dr0xx.cpp:969:3: error: extern templates are a C++11 extension [-Werror,-Wc++11-extensions]"} } }, ["ext_extra_semi"]={ [j]={"extra-semi",o}, [k]="extra-semi", [c]="ext_extra_semi", [d]="extra \';\' %select{outside of a function|inside a %1|inside instance variable list|after member function definition}0", [b]={{nil,nil,{"extra \';\' ",{"outside of a function","inside a B","inside instance variable list","after member function definition"}}}}, [h]=m, [g]="extra \';\' (?:outside of a function|inside a (.*?)|inside instance variable list|after member function definition)", [f]=" \\[(?:\\-Werror,)?\\-Wextra\\-semi[^\\]]*\\]", [e]=s, [i]={"2f7dc46a5868",1337195099,"Move the warnings for extra semi-colons under -Wextra-semi. Also, added","Move the warnings for extra semi-colons under -Wextra-semi. Also, added\na warning for an extra semi-colon after function definitions. Added logic\nso that a block of semi-colons on a line will only get one warning instead\nof a warning for each semi-colon.\n\nllvm-svn: 156934"}, [a]={{zc,207,"void Parser::ConsumeExtraSemi(ExtraSemiKind Kind, DeclSpec::TST TST) {\n // ...\n if (Kind != AfterMemberFunctionDefinition || HadMultipleSemis)\n Diag(StartLoc, diag::ext_extra_semi) << Kind << DeclSpec::getSpecifierName(TST, Actions.getASTContext().getPrintingPolicy()) << FixItHint::CreateRemoval(SourceRange(StartLoc, EndLoc));"}}, [l]={ ["clang/test/Parser/objc-quirks.m"]={"clang/test/Parser/objc-quirks.m:9:2: warning: extra \';\' outside of a function [-Wextra-semi]"} } }, ["ext_extra_semi_cxx11"]={ [j]={P,y,"c++11-extra-semi","extra-semi",o}, [k]="c++11-extra-semi", [c]="ext_extra_semi_cxx11", [d]="extra \';\' outside of a function is a C++11 extension", [b]="extra \';\' outside of a function is a C++11 extension", [h]=m, [g]="extra \';\' outside of a function is a C\\+\\+11 extension", [f]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-extra\\-semi[^\\]]*\\]", [e]=s, [i]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace","Add diagnostics for comma at end of enum and for extra semicolon at namespace\nscope to -Wc++11-extensions. Move extra semicolon after member function\ndefinition diagnostic out of -pedantic, since C++ allows a single semicolon\nthere. Keep it in -Wextra-semi, though, since it\'s still questionable.\n\nllvm-svn: 160618"}, [a]={{zc,201,"void Parser::ConsumeExtraSemi(ExtraSemiKind Kind, DeclSpec::TST TST) {\n // ...\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 // ...\n else\n Diag(StartLoc, diag::ext_extra_semi_cxx11) << FixItHint::CreateRemoval(SourceRange(StartLoc, EndLoc));"}}, [l]={ ["clang/test/SemaCXX/extra-semi.cpp"]={"clang/test/SemaCXX/extra-semi.cpp:14:1: warning: extra \';\' outside of a function is a C++11 extension [-Wc++11-extra-semi]","clang/test/SemaCXX/extra-semi.cpp:26:1: warning: extra \';\' outside of a function is a C++11 extension [-Wc++11-extra-semi]","clang/test/SemaCXX/extra-semi.cpp:29:1: warning: extra \';\' outside of a function is a C++11 extension [-Wc++11-extra-semi]"} } }, ["ext_flexible_array_empty_aggregate_gnu"]={ [j]={B,ic,o}, [k]=ic, [c]="ext_flexible_array_empty_aggregate_gnu", [d]="flexible array member %0 in otherwise empty %select{struct|interface|union|class|enum}1 is a GNU extension", [b]={{nil,nil,{"flexible array member A in otherwise empty ",{Ub,"interface",kc,Xb,"enum"}," is a GNU extension"}}}, [h]=m, [g]="flexible array member (.*?) in otherwise empty (?:struct|interface|union|class|enum) is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-empty\\-struct[^\\]]*\\]", [e]=n, [i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays.","g++ is more permissive regarding flexible arrays.\nIt will accept flexible array in union and also as the sole element of a struct/class.\n\nFixes rdar://9065507.\n\nllvm-svn: 127171"}, [a]={{p,18808,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n if (!Record->isUnion() && !IsLastField) {\n // ...\n } else if (Record->isUnion())\n // ...\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;"}}, [l]={ ["clang/test/SemaCXX/gnu-flags.cpp"]={"clang/test/SemaCXX/gnu-flags.cpp:99:18: warning: flexible array member \'a\' in otherwise empty struct is a GNU extension [-Wgnu-empty-struct]"} } }, ["ext_flexible_array_empty_aggregate_ms"]={ [j]={z,"microsoft-flexible-array",o}, [k]="microsoft-flexible-array", [c]="ext_flexible_array_empty_aggregate_ms", [d]="flexible array member %0 in otherwise empty %select{struct|interface|union|class|enum}1 is a Microsoft extension", [b]={{nil,nil,{"flexible array member A in otherwise empty ",{Ub,"interface",kc,Xb,"enum"}," is a Microsoft extension"}}}, [h]=m, [g]="flexible array member (.*?) in otherwise empty (?:struct|interface|union|class|enum) is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-flexible\\-array[^\\]]*\\]", [e]=n, [i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays.","g++ is more permissive regarding flexible arrays.\nIt will accept flexible array in union and also as the sole element of a struct/class.\n\nFixes rdar://9065507.\n\nllvm-svn: 127171"}, [a]={{p,18806,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n if (!Record->isUnion() && !IsLastField) {\n // ...\n } else if (Record->isUnion())\n // ...\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;"}}, [l]={ ["clang/test/Sema/MicrosoftExtensions.c"]={"clang/test/Sema/MicrosoftExtensions.c:5:8: warning: flexible array member \'a\' in otherwise empty struct is a Microsoft extension [-Wmicrosoft-flexible-array]","clang/test/Sema/MicrosoftExtensions.c:11:7: warning: flexible array member \'a\' in otherwise empty struct is a Microsoft extension [-Wmicrosoft-flexible-array]"} } }, ["ext_flexible_array_in_array"]={ [j]={"flexible-array-extensions",o}, [k]="flexible-array-extensions", [c]="ext_flexible_array_in_array", [d]="%0 may not be used as an array element due to flexible array member", [b]="A may not be used as an array element due to flexible array member", [h]=m, [g]="(.*?) may not be used as an array element due to flexible array member", [f]=" \\[(?:\\-Werror,)?\\-Wflexible\\-array\\-extensions[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{hb,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 // ...\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;"}}, [l]={ ["clang/test/Sema/array-constraint.c"]={"clang/test/Sema/array-constraint.c:23:32: warning: \'struct vari\' may not be used as an array element due to flexible array member [-Wflexible-array-extensions]"} } }, ["ext_flexible_array_in_struct"]={ [j]={"flexible-array-extensions",o}, [k]="flexible-array-extensions", [c]="ext_flexible_array_in_struct", [d]="%0 may not be nested in a struct due to flexible array member", [b]="A may not be nested in a struct due to flexible array member", [h]=m, [g]="(.*?) may not be nested in a struct due to flexible array member", [f]=" \\[(?:\\-Werror,)?\\-Wflexible\\-array\\-extensions[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{p,18869,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n // ...\n } else if (!FDTy->isDependentType() && RequireCompleteSizedType(FD->getLocation(), FD->getType(), diag::err_field_incomplete_or_sizeless)) {\n // ...\n } else if (const RecordType *FDTTy = FDTy->getAs<RecordType>()) {\n if (Record && FDTTy->getDecl()->hasFlexibleArrayMember()) {\n // ...\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 // ...\n else {\n // ...\n Diag(FD->getLocation(), diag::ext_flexible_array_in_struct) << FD->getDeclName();"}}, [l]={ ["clang/test/Sema/flexible-array-init.c"]={"clang/test/Sema/flexible-array-init.c:22:25: warning: \'z\' may not be nested in a struct due to flexible array member [-Wflexible-array-extensions]"} } }, ["ext_flexible_array_init"]={ [j]={B,"gnu-flexible-array-initializer",o}, [k]="gnu-flexible-array-initializer", [c]="ext_flexible_array_init", [d]="flexible array initialization is a GNU extension", [b]="flexible array initialization is a GNU extension", [h]=m, [g]="flexible array initialization is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-flexible\\-array\\-initializer[^\\]]*\\]", [e]=n, [i]={"07d8e3a50047",1237509176,"Allow flexible array initializers that are not surrounded by","Allow flexible array initializers that are not surrounded by\nbraces. We now build the appropriate fully-structured initializer list\nfor such things. Per PR3618, verified that we\'re getting the right\ncode generation.\n\nllvm-svn: 67353"}, [a]={{V,2103,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n // ...\n if (isa<InitListExpr>(InitExpr) && cast<InitListExpr>(InitExpr)->getNumInits() == 0) {\n // ...\n FlexArrayDiag = diag::ext_flexible_array_init;"},{V,2115,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n // ...\n if (isa<InitListExpr>(InitExpr) && cast<InitListExpr>(InitExpr)->getNumInits() == 0) {\n // ...\n } else if (!TopLevelObject) {\n // ...\n } else if (Entity.getKind() != InitializedEntity::EK_Variable) {\n // ...\n } else if (cast<VarDecl>(Entity.getDecl())->hasLocalStorage()) {\n // ...\n } else {\n // ...\n FlexArrayDiag = diag::ext_flexible_array_init;"},{V,2125,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n // ...\n return FlexArrayDiag != diag::ext_flexible_array_init;"}}, [l]={ ["clang/test/Sema/flexible-array-init.c"]={"clang/test/Sema/flexible-array-init.c:5:11: warning: flexible array initialization is a GNU extension [-Wgnu-flexible-array-initializer]","clang/test/Sema/flexible-array-init.c:7:22: warning: flexible array initialization is a GNU extension [-Wgnu-flexible-array-initializer]","clang/test/Sema/flexible-array-init.c:13:25: warning: flexible array initialization is a GNU extension [-Wgnu-flexible-array-initializer]","clang/test/Sema/flexible-array-init.c:24:21: warning: flexible array initialization is a GNU extension [-Wgnu-flexible-array-initializer]","clang/test/Sema/flexible-array-init.c:26:23: warning: flexible array initialization is a GNU extension [-Wgnu-flexible-array-initializer]","clang/test/Sema/flexible-array-init.c:32:31: warning: flexible array initialization is a GNU extension [-Wgnu-flexible-array-initializer]","clang/test/Sema/flexible-array-init.c:33:33: warning: flexible array initialization is a GNU extension [-Wgnu-flexible-array-initializer]"} } }, ["ext_flexible_array_union_gnu"]={ [j]={B,"gnu-flexible-array-union-member",o}, [k]="gnu-flexible-array-union-member", [c]="ext_flexible_array_union_gnu", [d]="flexible array member %0 in a union is a GNU extension", [b]="flexible array member A in a union is a GNU extension", [h]=m, [g]="flexible array member (.*?) in a union is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-flexible\\-array\\-union\\-member[^\\]]*\\]", [e]=n, [i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays.","g++ is more permissive regarding flexible arrays.\nIt will accept flexible array in union and also as the sole element of a struct/class.\n\nFixes rdar://9065507.\n\nllvm-svn: 127171"}, [a]={{p,18802,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n if (!Record->isUnion() && !IsLastField) {\n // ...\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;"}}, [l]={ ["clang/test/SemaCXX/gnu-flags.cpp"]={"clang/test/SemaCXX/gnu-flags.cpp:81:12: warning: flexible array member \'c1\' in a union is a GNU extension [-Wgnu-flexible-array-union-member]"} } }, ["ext_flexible_array_union_ms"]={ [j]={z,"microsoft-flexible-array",o}, [k]="microsoft-flexible-array", [c]="ext_flexible_array_union_ms", [d]="flexible array member %0 in a union is a Microsoft extension", [b]="flexible array member A in a union is a Microsoft extension", [h]=m, [g]="flexible array member (.*?) in a union is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-flexible\\-array[^\\]]*\\]", [e]=n, [i]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays.","g++ is more permissive regarding flexible arrays.\nIt will accept flexible array in union and also as the sole element of a struct/class.\n\nFixes rdar://9065507.\n\nllvm-svn: 127171"}, [a]={{p,18800,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n if (!Record->isUnion() && !IsLastField) {\n // ...\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;"}}, [l]={ ["clang/test/Sema/MicrosoftExtensions.c"]={"clang/test/Sema/MicrosoftExtensions.c:17:12: warning: flexible array member \'c1\' in a union is a Microsoft extension [-Wmicrosoft-flexible-array]","clang/test/Sema/MicrosoftExtensions.c:18:13: warning: flexible array member \'c2\' in a union is a Microsoft extension [-Wmicrosoft-flexible-array]"} } }, ["ext_fold_expression"]={ [j]={N,jb}, [k]=N, [c]="ext_fold_expression", [d]="pack fold expression is a C++1z extension", [b]="pack fold expression is a C++1z extension", [h]=m, [g]="pack fold expression is a C\\+\\+17 extension", [f]=kb, [e]=s, [i]={"0f0af19b0581",1415423236,"[c++1z] N4295: fold-expressions.","[c++1z] N4295: fold-expressions.\n\nThis is a new form of expression of the form:\n\n (expr op ... op expr)\n\nwhere one of the exprs is a parameter pack. It expands into\n\n (expr1 op (expr2onwards op ... op expr))\n\n(and likewise if the pack is on the right). The non-pack operand can be\nomitted; in that case, an empty pack gives a fallback value or an error,\ndepending on the operator.\n\nllvm-svn: 221573"}, [a]={{Tb,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 // ...\n Diag(EllipsisLoc, getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_fold_expression : diag::ext_fold_expression);"}}, [l]={ ["clang/test/Parser/cxx0x-attributes.cpp"]={"clang/test/Parser/cxx0x-attributes.cpp:273:41: warning: pack fold expression is a C++17 extension [-Wc++17-extensions]"} } }, ["ext_for_range"]={ [j]={P,y}, [k]=y, [c]="ext_for_range", [d]="range-based for loop is a C++11 extension", [b]="range-based for loop is a C++11 extension", [h]=m, [g]="range\\-based for loop is a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"58c743370994",1315166054,"PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ...","PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class.\n\nllvm-svn: 139102"}, [a]={{ec,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 // ...\n // Parse the first part of the for specifier.\n if (Tok.is(tok::semi)) { // for (;\n // ...\n } else if (getLangOpts().CPlusPlus && Tok.is(tok::identifier) && isForRangeIdentifier()) {\n // ...\n } else if (isForInitDeclaration()) { // for (int X = 4;\n // ...\n if (Tok.is(tok::kw_using)) {\n // ...\n } else {\n // ...\n if (ForRangeInfo.ParsedForRangeDecl()) {\n Diag(ForRangeInfo.ColonLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_for_range : diag::ext_for_range);"}}, [l]={ ["clang/test/SemaCXX/PR10458.cpp"]={"clang/test/SemaCXX/PR10458.cpp:5:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]"} } }, ["ext_for_range_begin_end_types_differ"]={ [j]={N,jb}, [k]=N, [c]="ext_for_range_begin_end_types_differ", [d]="\'begin\' and \'end\' returning different types (%0 and %1) is a C++1z extension", [b]="\'begin\' and \'end\' returning different types (A and B) is a C++1z extension", [h]=m, [g]="\'begin\' and \'end\' returning different types \\((.*?) and (.*?)\\) is a C\\+\\+17 extension", [f]=kb, [e]=n, [i]={"01694c340db8",1458470020,"P0184R0: Allow types of \'begin\' and \'end\' expressions in range-based for loops to differ.","P0184R0: Allow types of \'begin\' and \'end\' expressions in range-based for loops to differ.\n\nllvm-svn: 263895"}, [a]={{Wb,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 // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\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;"}}, [l]={ ["clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp"]={"clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:141:17: warning: \'begin\' and \'end\' returning different types (\'int *\' and \'null_t\') is a C++17 extension [-Wc++17-extensions]"} } }, ["ext_for_range_init_stmt"]={ [j]={S,qb}, [k]=S, [c]={{nil,O,"ext_for_range_init_stmt"}}, [d]={{nil,t,"range-based for loop initialization statements are a C++20 extension"},{G,O,"range-based for loop initialization statements are a C++2a extension"}}, [b]={{nil,t,"range-based for loop initialization statements are a C++20 extension"},{G,O,"range-based for loop initialization statements are a C++2a extension"}}, [h]=m, [g]="range\\-based for loop initialization statements are a C\\+\\+20 extension", [f]=nb, [e]={{nil,O,s}}, [i]={"8baa50013c86",1538160249,"[cxx2a] P0614R1: Support init-statements in range-based for loops.","[cxx2a] P0614R1: Support init-statements in range-based for loops.\n\nWe don\'t yet support this for the case where a range-based for loop is\nimplicitly rewritten to an ObjC for..in statement.\n\nllvm-svn: 343350"}, [a]={{ec,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 // ...\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 // ...\n } else if (Tok.is(tok::r_paren)) {\n // ...\n } else {\n if (getLangOpts().CPlusPlus) {\n // ...\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());"}}, [l]={ ["clang/test/SemaObjCXX/foreach.mm"]={"clang/test/SemaObjCXX/foreach.mm:18:8: warning: range-based for loop initialization statements are a C++20 extension [-Wc++20-extensions]","clang/test/SemaObjCXX/foreach.mm:21:8: warning: range-based for loop initialization statements are a C++20 extension [-Wc++20-extensions]"} } }, ["ext_forward_ref_enum"]={ [j]={o}, [k]=o, [c]="ext_forward_ref_enum", [d]="ISO C forbids forward references to \'enum\' types", [b]="ISO C forbids forward references to \'enum\' types", [h]=m, [g]="ISO C forbids forward references to \'enum\' types", [f]=M, [e]=n, [i]={I,1237025389,K,J}, [a]={{p,17510,"CreateNewDecl:\n // ...\n if (Kind == TTK_Enum) {\n // ...\n // If this is an undefined enum, warn.\n if (TUK != TUK_Definition && !Invalid) {\n // ...\n if (IsFixed && cast<EnumDecl>(New)->isFixed()) {\n // ...\n } else if (PrevDecl && (Def = cast<EnumDecl>(PrevDecl)->getDefinition())) {\n // ...\n } else {\n unsigned DiagID = diag::ext_forward_ref_enum;"}}, [l]={ ["clang/test/Sema/enum.c"]={"clang/test/Sema/enum.c:25:6: warning: ISO C forbids forward references to \'enum\' types [-Wpedantic]","clang/test/Sema/enum.c:40:13: warning: ISO C forbids forward references to \'enum\' types [-Wpedantic]","clang/test/Sema/enum.c:66:8: warning: ISO C forbids forward references to \'enum\' types [-Wpedantic]","clang/test/Sema/enum.c:67:8: warning: ISO C forbids forward references to \'enum\' types [-Wpedantic]","clang/test/Sema/enum.c:80:8: warning: ISO C forbids forward references to \'enum\' types [-Wpedantic]","clang/test/Sema/enum.c:101:13: warning: ISO C forbids forward references to \'enum\' types [-Wpedantic]","clang/test/Sema/enum.c:115:17: warning: ISO C forbids forward references to \'enum\' types [-Wpedantic]","clang/test/Sema/enum.c:172:6: warning: ISO C forbids forward references to \'enum\' types [-Wpedantic]"} } }, ["ext_forward_ref_enum_def"]={ [j]={B,"gnu-redeclared-enum",o}, [k]="gnu-redeclared-enum", [c]="ext_forward_ref_enum_def", [d]="redeclaration of already-defined enum %0 is a GNU extension", [b]="redeclaration of already-defined enum A is a GNU extension", [h]=m, [g]="redeclaration of already\\-defined enum (.*?) is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-redeclared\\-enum[^\\]]*\\]", [e]=n, [i]={"c9ea2d5a672b",1277216795,"In C++, allow a declaration of an enum to follow a definition of that","In C++, allow a declaration of an enum to follow a definition of that\nenum as a GNU extension.\n\nllvm-svn: 106540"}, [a]={{p,17506,"CreateNewDecl:\n // ...\n if (Kind == TTK_Enum) {\n // ...\n // If this is an undefined enum, warn.\n if (TUK != TUK_Definition && !Invalid) {\n // ...\n if (IsFixed && cast<EnumDecl>(New)->isFixed()) {\n // ...\n } else if (PrevDecl && (Def = cast<EnumDecl>(PrevDecl)->getDefinition())) {\n Diag(Loc, diag::ext_forward_ref_enum_def) << New;"}}, [l]={ ["clang/test/SemaCXX/enum.cpp"]={"clang/test/SemaCXX/enum.cpp:8:6: warning: redeclaration of already-defined enum \'E\' is a GNU extension [-Wgnu-redeclared-enum]"} } }, ["ext_found_in_dependent_base"]={ [j]={z,Q}, [k]=Q, [c]={{nil,X,"ext_found_in_dependent_base"}}, [d]={{nil,X,"use of member %0 found via unqualified lookup into dependent bases of class templates is a Microsoft extension"}}, [b]={{nil,X,"use of member A found via unqualified lookup into dependent bases of class templates is a Microsoft extension"}}, [h]=m, [g]="use of member (.*?) found via unqualified lookup into dependent bases of class templates is a Microsoft extension", [f]=mb, [e]={{nil,X,n}}, [i]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types","Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to support fadd/fsub:\n\nhttps://reviews.llvm.org/D53965\n\nHowever clang atomic builtins fetch add/sub still does not support\nemitting atomicrmw fadd/fsub.\n\nThis patch adds that.\n\nReviewed by: John McCall, Artem Belevich, Matt Arsenault, JF Bastien,\nJames Y Knight, Louis Dionne, Olivier Giroux\n\nDifferential Revision: https://reviews.llvm.org/D71726"}, [a]={{p,265,"static ParsedType recoverFromTypeInKnownDependentBase(Sema &S, const IdentifierInfo &II, SourceLocation NameLoc) {\n // ...\n S.Diag(NameLoc, diag::ext_found_in_dependent_base) << &II;"},{r,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 // ...\n if (R.getRepresentativeDecl()->getDeclContext()->Equals(R.getNamingClass())) {\n // ...\n } else if (getLangOpts().MSVCCompat) {\n DiagID = diag::ext_found_in_dependent_base;"}}, [l]={ ["clang/test/CodeGenCXX/ms-lookup-template-base-classes.cpp"]={"clang/test/CodeGenCXX/ms-lookup-template-base-classes.cpp:9:14: warning: use of member \'b\' found via unqualified lookup into dependent bases of class templates is a Microsoft extension [-Wmicrosoft-template]"} } }, ["ext_found_later_in_class"]={ [j]={z,Q}, [k]=Q, [c]={{nil,X,"ext_found_later_in_class"}}, [d]={{nil,X,"use of member %0 before its declaration is a Microsoft extension"}}, [b]={{nil,X,"use of member A before its declaration is a Microsoft extension"}}, [h]=m, [g]="use of member (.*?) before its declaration is a Microsoft extension", [f]=mb, [e]={{nil,X,n}}, [i]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types","Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to support fadd/fsub:\n\nhttps://reviews.llvm.org/D53965\n\nHowever clang atomic builtins fetch add/sub still does not support\nemitting atomicrmw fadd/fsub.\n\nThis patch adds that.\n\nReviewed by: John McCall, Artem Belevich, Matt Arsenault, JF Bastien,\nJames Y Knight, Louis Dionne, Olivier Giroux\n\nDifferential Revision: https://reviews.llvm.org/D71726"}, [a]={{r,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 // ...\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"]={ [j]={o}, [k]=o, [c]="ext_freestanding_complex", [d]="complex numbers are an extension in a freestanding C99 implementation", [b]="complex numbers are an extension in a freestanding C99 implementation", [h]=m, [g]="complex numbers are an extension in a freestanding C99 implementation", [f]=M, [e]=n, [i]={I,1237025389,K,J}, [a]={{hb,1790,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\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);"}}, [l]={ ["clang/test/Sema/warn-freestanding-complex.c"]={"clang/test/Sema/warn-freestanding-complex.c:3:16: warning: complex numbers are an extension in a freestanding C99 implementation [-Wpedantic]"} } }, ["ext_friend_tag_redecl_outside_namespace"]={ [j]={z,"microsoft-unqualified-friend"}, [k]="microsoft-unqualified-friend", [c]="ext_friend_tag_redecl_outside_namespace", [d]="unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier", [b]="unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier", [h]=m, [g]="unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-unqualified\\-friend[^\\]]*\\]", [e]=n, [i]={"0902a51bafc7",1405035892,"MSVC compat: Allow lookup of friend types in enclosing namespaces","MSVC compat: Allow lookup of friend types in enclosing namespaces\n\nThe relevant portion of C++ standard says [namespace.memdef]p3:\n\n If the name in a friend declaration is neither qualified nor a\n template-id and the declaration is a function or an\n elaborated-type-specifier, the lookup to determine whether the entity\n has been previously declared shall not consider any scopes outside the\n innermost enclosing namespace.\n\nMSVC does not implement that rule for types. If there is a type in an\nenclosing namespace, they consider an unqualified tag declaration with\nthe same name to be a redeclaration of the type from another namespace.\n\nImplementing compatibility is a simple matter of disabling our\nimplementation of this rule for types, which was added in r177473.\n\nReviewers: rsmith\n\nDifferential Revision: http://reviews.llvm.org/D4443\n\nllvm-svn: 212784"}, [a]={{p,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 // ...\n if (Name && SS.isNotEmpty()) {\n // ...\n } else if (Name) {\n // ...\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 // ...\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 // ...\n Diag(NameLoc, diag::ext_friend_tag_redecl_outside_namespace) << createFriendTagNNSFixIt(*this, ND, S, NameLoc);"}}, [l]={ ["clang/test/SemaCXX/ms-friend-lookup.cpp"]={"clang/test/SemaCXX/ms-friend-lookup.cpp:7:17: warning: unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend]","clang/test/SemaCXX/ms-friend-lookup.cpp:16:17: warning: unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend]","clang/test/SemaCXX/ms-friend-lookup.cpp:75:17: warning: unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend]"} } }, ["ext_generalized_initializer_lists"]={ [j]={P,y}, [k]=y, [c]="ext_generalized_initializer_lists", [d]="generalized initializer lists are a C++11 extension", [b]="generalized initializer lists are a C++11 extension", [h]=m, [g]="generalized initializer lists are a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"e9e27d95db1d",1299885044,"Implement a hack intended to allow Clang to parse libstdc++ 4.5\'s","Implement a hack intended to allow Clang to parse libstdc++ 4.5\'s\nheaders, which use C++0x generalized initializer lists. Per PR7069, it\nappears that the only use is as the return type of a function, so this\ncommit enables this extension just in that narrow case. If it\'s enough\nfor libstdc++ 4.5, or if it can be trivially extended to work with\nlibstdc++ 4.5, we\'ll keep it. Otherwise, or if this breaks anything,\nwe\'ll revert and wait for the real feature.\n\nllvm-svn: 127507"}, [a]={{ec,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 // ...\n if (Tok.isNot(tok::semi)) {\n // ...\n if (Tok.is(tok::l_brace) && getLangOpts().CPlusPlus) {\n // ...\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();"}}, [l]={ ["clang/test/SemaCXX/cxx0x-return-init-list.cpp"]={"clang/test/SemaCXX/cxx0x-return-init-list.cpp:7:10: warning: generalized initializer lists are a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/cxx0x-return-init-list.cpp:12:10: warning: generalized initializer lists are a C++11 extension [-Wc++11-extensions]"} } }, ["ext_generic_with_type_arg"]={ [j]={"generic-type-extension",o}, [k]="generic-type-extension", [c]="ext_generic_with_type_arg", [d]="passing a type argument as the first operand to \'_Generic\' is a Clang extension", [b]="passing a type argument as the first operand to \'_Generic\' is a Clang extension", [h]=m, [g]="passing a type argument as the first operand to \'_Generic\' is a Clang extension", [f]=" \\[(?:\\-Werror,)?\\-Wgeneric\\-type\\-extension[^\\]]*\\]", [e]=s, [i]={"ef9ec4bbcca2",1677810915,"[OpenMP] Add the `ompx_attribute` clause for target directives","[OpenMP] Add the `ompx_attribute` clause for target directives\n\nCUDA and HIP have kernel attributes to tune the code generation (in the\nbackend). To reuse this functionality for OpenMP target regions we\nintroduce the `ompx_attribute` clause that takes these kernel\nattributes and emits code as if they had been attached to the kernel\nfuction (which is implicitly generated).\n\nTo limit the impact, we only support three kernel attributes:\n`amdgpu_waves_per_eu`, for AMDGPU\n`amdgpu_flat_work_group_size`, for AMDGPU\n`launch_bounds`, for NVPTX\n\nThe existing implementations of those attributes are used for error\nchecking and code generation. `ompx_attribute` can be attached to any\nexecutable target region and it can hold more than one kernel attribute.\n\nDifferential Revision: https://reviews.llvm.org/D156184"}, [a]={{Tb,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 // ...\n if (isTypeIdForGenericSelection()) {\n // ...\n Diag(Loc, diag::ext_generic_with_type_arg);"}}, [l]={ ["clang/test/Parser/generic-selection-type-extension-pedantic.c"]={"clang/test/Parser/generic-selection-type-extension-pedantic.c:7:4: warning: passing a type argument as the first operand to \'_Generic\' is a Clang extension [-Wgeneric-type-extension]"} } }, ["ext_gnu_address_of_label"]={ [j]={B,"gnu-label-as-value",o}, [k]="gnu-label-as-value", [c]="ext_gnu_address_of_label", [d]="use of GNU address-of-label extension", [b]="use of GNU address-of-label extension", [h]=m, [g]="use of GNU address\\-of\\-label extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-label\\-as\\-value[^\\]]*\\]", [e]=s, [i]={v,1236199783,w,x}, [a]={{Tb,1462,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::ampamp: { // unary-expression: \'&&\' identifier\n // ...\n Diag(AmpAmpLoc, diag::ext_gnu_address_of_label);"}}, [l]={ ["clang/test/Sema/gnu-flags.c"]={"clang/test/Sema/gnu-flags.c:76:8: warning: use of GNU address-of-label extension [-Wgnu-label-as-value]"} } }, ["ext_gnu_anonymous_struct"]={ [j]={B,"gnu-anonymous-struct",o}, [k]="gnu-anonymous-struct", [c]="ext_gnu_anonymous_struct", [d]="anonymous structs are a GNU extension", [b]="anonymous structs are a GNU extension", [h]=m, [g]="anonymous structs are a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-anonymous\\-struct[^\\]]*\\]", [e]=n, [i]={"b64a1fa65ca1",1328284024,"Don\'t warn about anonymous struct/union in C11.","Don\'t warn about anonymous struct/union in C11.\n\nAlso, in C, call this a C11 extension rather than a GNU extension.\n\nllvm-svn: 149695"}, [a]={{p,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 // ...\n // Diagnose whether this anonymous struct/union is an extension.\n if (Record->isUnion() && !getLangOpts().CPlusPlus && !getLangOpts().C11)\n // ...\n else if (!Record->isUnion() && getLangOpts().CPlusPlus)\n Diag(Record->getLocation(), diag::ext_gnu_anonymous_struct);"}}, [l]={ ["clang/test/CXX/module/module.interface/p3.cpp"]={"clang/test/CXX/module/module.interface/p3.cpp:19:8: error: anonymous structs are a GNU extension [-Werror,-Wgnu-anonymous-struct]"} } }, ["ext_gnu_array_range"]={ [j]={B,nc,o}, [k]=nc, [c]="ext_gnu_array_range", [d]="use of GNU array range extension", [b]="use of GNU array range extension", [h]=m, [g]="use of GNU array range extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-designator[^\\]]*\\]", [e]=s, [i]={v,1236199783,w,x}, [a]={{"clang/lib/Parse/ParseInit.cpp",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 // ...\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 // ...\n // If this is a normal array designator, remember it.\n if (Tok.isNot(tok::ellipsis)) {\n // ...\n } else {\n // ...\n Diag(Tok, diag::ext_gnu_array_range);"}} }, ["ext_gnu_case_range"]={ [j]={B,"gnu-case-range",o}, [k]="gnu-case-range", [c]="ext_gnu_case_range", [d]="use of GNU case range extension", [b]="use of GNU case range extension", [h]=m, [g]="use of GNU case range extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-case\\-range[^\\]]*\\]", [e]=s, [i]={v,1236199783,w,x}, [a]={{ec,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 // ...\n do {\n // ...\n if (TryConsumeToken(tok::ellipsis, DotDotDotLoc)) {\n Diag(DotDotDotLoc, diag::ext_gnu_case_range);"}}, [l]={ ["clang/test/Sema/gnu-flags.c"]={"clang/test/Sema/gnu-flags.c:50:11: warning: use of GNU case range extension [-Wgnu-case-range]"} } }, ["ext_gnu_conditional_expr"]={ [j]={B,"gnu-conditional-omitted-operand",o}, [k]="gnu-conditional-omitted-operand", [c]="ext_gnu_conditional_expr", [d]="use of GNU ?: conditional expression extension, omitting middle operand", [b]="use of GNU ?: conditional expression extension, omitting middle operand", [h]=m, [g]="use of GNU \\?\\: conditional expression extension, omitting middle operand", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-conditional\\-omitted\\-operand[^\\]]*\\]", [e]=s, [i]={v,1236199783,w,x}, [a]={{Tb,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 // ...\n while (true) {\n // ...\n if (NextTokPrec == prec::Conditional) {\n if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {\n // ...\n } else if (Tok.isNot(tok::colon)) {\n // ...\n } else {\n // ...\n Diag(Tok, diag::ext_gnu_conditional_expr);"}}, [l]={ ["clang/test/Sema/i-c-e.c"]={"clang/test/Sema/i-c-e.c:96:19: warning: use of GNU ?: conditional expression extension, omitting middle operand [-Wgnu-conditional-omitted-operand]"} } }, ["ext_gnu_indirect_goto"]={ [j]={B,"gnu-label-as-value",o}, [k]="gnu-label-as-value", [c]="ext_gnu_indirect_goto", [d]="use of GNU indirect-goto extension", [b]="use of GNU indirect-goto extension", [h]=m, [g]="use of GNU indirect\\-goto extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-label\\-as\\-value[^\\]]*\\]", [e]=s, [i]={v,1236199783,w,x}, [a]={{ec,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 // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.is(tok::star)) {\n // ...\n Diag(Tok, diag::ext_gnu_indirect_goto);"}}, [l]={ ["clang/test/Sema/gnu-flags.c"]={"clang/test/Sema/gnu-flags.c:78:7: warning: use of GNU indirect-goto extension [-Wgnu-label-as-value]"} } }, ["ext_gnu_missing_equal_designator"]={ [j]={B,nc}, [k]=nc, [c]="ext_gnu_missing_equal_designator", [d]="use of GNU \'missing =\' extension in designator", [b]="use of GNU \'missing =\' extension in designator", [h]=m, [g]="use of GNU \'missing \\=\' extension in designator", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-designator[^\\]]*\\]", [e]=s, [i]={v,1236199783,w,x}, [a]={{"clang/lib/Parse/ParseInit.cpp",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);"},{"clang/lib/Parse/ParseInit.cpp",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 // ...\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(), \"= \");"}}, [l]={ ["clang/test/Parser/designator.c"]={"clang/test/Parser/designator.c:4:6: warning: use of GNU \'missing =\' extension in designator [-Wgnu-designator]"} } }, ["ext_gnu_old_style_field_designator"]={ [j]={B,nc}, [k]=nc, [c]="ext_gnu_old_style_field_designator", [d]="use of GNU old-style field designator extension", [b]="use of GNU old-style field designator extension", [h]=m, [g]="use of GNU old\\-style field designator extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-designator[^\\]]*\\]", [e]=s, [i]={v,1236199783,w,x}, [a]={{"clang/lib/Parse/ParseInit.cpp",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 // ...\n Diag(NameLoc, diag::ext_gnu_old_style_field_designator) << FixItHint::CreateReplacement(SourceRange(NameLoc, ColonLoc), NewSyntax);"}}, [l]={ ["clang/test/CodeGen/2003-11-01-C99-CompoundLiteral.c"]={"clang/test/CodeGen/2003-11-01-C99-CompoundLiteral.c:6:37: warning: use of GNU old-style field designator extension [-Wgnu-designator]"} } }, ["ext_gnu_ptr_func_arith"]={ [j]={B,ac,o,Vb}, [k]=ac, [c]="ext_gnu_ptr_func_arith", [d]="arithmetic on%select{ a|}0 pointer%select{|s}0 to%select{ the|}2 function type%select{|s}2 %1%select{| and %3}2 is a GNU extension", [b]={{nil,nil,{"arithmetic on",{" a",A}," pointer",{A,"s"}," to",{" the",A}," function type",{A,"s"}," B",{A," and D"}," is a GNU extension"}}}, [h]=m, [g]="arithmetic on(?: a|) pointer(?:|s) to(?: the|) function type(?:|s) (.*?)(?:| and (.*?)) is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-pointer\\-arith[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{r,11499,"/// Diagnose invalid arithmetic on two function pointers.\nstatic void diagnoseArithmeticOnTwoFunctionPointers(Sema &S, SourceLocation Loc, Expr *LHS, Expr *RHS) {\n // ...\n S.Diag(Loc, S.getLangOpts().CPlusPlus ? diag::err_typecheck_pointer_arith_function_type : diag::ext_gnu_ptr_func_arith) << 1 /* two pointers */"},{r,11519,"/// Diagnose invalid arithmetic on a function pointer.\nstatic void diagnoseArithmeticOnFunctionPointer(Sema &S, SourceLocation Loc, Expr *Pointer) {\n // ...\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 */"}}, [l]={ ["clang/test/Sema/pointer-subtract-compat.c"]={"clang/test/Sema/pointer-subtract-compat.c:10:14: warning: arithmetic on pointers to the function type \'void (void)\' is a GNU extension [-Wgnu-pointer-arith]"} } }, ["ext_gnu_statement_expr"]={ [j]={B,"gnu-statement-expression",o}, [k]="gnu-statement-expression", [c]="ext_gnu_statement_expr", [d]="use of GNU statement expression extension", [b]="use of GNU statement expression extension", [h]=m, [g]="use of GNU statement expression extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-statement\\-expression[^\\]]*\\]", [e]=s, [i]={v,1236199783,w,x}, [a]={{Tb,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 // ...\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);"}}, [l]={ ["clang/test/SemaCXX/statements.cpp"]={"clang/test/SemaCXX/statements.cpp:43:11: warning: use of GNU statement expression extension [-Wgnu-statement-expression]","clang/test/SemaCXX/statements.cpp:60:14: warning: use of GNU statement expression extension [-Wgnu-statement-expression]"} } }, ["ext_gnu_statement_expr_macro"]={ [j]={B,"gnu-statement-expression","gnu-statement-expression-from-macro-expansion",o}, [k]="gnu-statement-expression-from-macro-expansion", [c]={{nil,D,"ext_gnu_statement_expr_macro"}}, [d]={{nil,D,"use of GNU statement expression extension from macro expansion"}}, [b]={{nil,D,"use of GNU statement expression extension from macro expansion"}}, [h]=m, [g]="use of GNU statement expression extension from macro expansion", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-statement\\-expression\\-from\\-macro\\-expansion[^\\]]*\\]", [e]={{nil,D,s}}, [i]={"7689c7fc9e08",1653629944,"Create specialization of -Wgnu-statement-expression for expressions found in macros.","Create specialization of -Wgnu-statement-expression for expressions found in macros.\n\n-Wgnu-statement-expression currently warns for both direct source uses of statement expressions but also macro expansions; since they may be used by macros to avoid multiple evaluation of macro arguments, engineers might want to suppress warnings when statement expressions are expanded from macros but see them if introduced directly in source code.\n\nDifferential Revision: https://reviews.llvm.org/D126522"}, [a]={{Tb,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 // ...\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);"}}, [l]={ ["clang/test/Sema/gnu-flags.c"]={"clang/test/Sema/gnu-flags.c:97:11: warning: use of GNU statement expression extension from macro expansion [-Wgnu-statement-expression-from-macro-expansion]"} } }, ["ext_gnu_subscript_void_type"]={ [j]={B,ac,o,Vb}, [k]=ac, [c]="ext_gnu_subscript_void_type", [d]="subscript of a pointer to void is a GNU extension", [b]="subscript of a pointer to void is a GNU extension", [h]=m, [g]="subscript of a pointer to void is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-pointer\\-arith[^\\]]*\\]", [e]=n, [i]={"4cc3f296a907",1309192347,"Cleanup a fixme by using a specific diagnostic for subscripting","Cleanup a fixme by using a specific diagnostic for subscripting\na pointer to void.\n\nllvm-svn: 133912"}, [a]={{r,5981,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n if (ResultType->isVoidType() && !getLangOpts().CPlusPlus) {\n // ...\n Diag(LLoc, diag::ext_gnu_subscript_void_type) << BaseExpr->getSourceRange();"}}, [l]={ ["clang/test/Sema/pointer-addition.c"]={"clang/test/Sema/pointer-addition.c:18:11: warning: subscript of a pointer to void is a GNU extension [-Wgnu-pointer-arith]"} } }, ["ext_gnu_void_ptr"]={ [j]={B,ac,o,Vb}, [k]=ac, [c]="ext_gnu_void_ptr", [d]="arithmetic on%select{ a|}0 pointer%select{|s}0 to void is a GNU extension", [b]={{nil,nil,{"arithmetic on",{" a",A}," pointer",{A,"s"}," to void is a GNU extension"}}}, [h]=m, [g]="arithmetic on(?: a|) pointer(?:|s) to void is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-pointer\\-arith[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{r,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(); }"},{r,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(); }"}}, [l]={ ["clang/test/Sema/typecheck-binop.c"]={"clang/test/Sema/typecheck-binop.c:14:11: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]","clang/test/Sema/typecheck-binop.c:18:11: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"} } }, ["ext_goto_into_protected_scope"]={ [j]={z,"microsoft-goto"}, [k]="microsoft-goto", [c]="ext_goto_into_protected_scope", [d]="jump from this goto statement to its label is a Microsoft extension", [b]="jump from this goto statement to its label is a Microsoft extension", [h]=m, [g]="jump from this goto statement to its label is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-goto[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{"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 // ...\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 // ...\n // We only get indirect gotos here when they have a constant target.\n if (IndirectGotoStmt *IGS = dyn_cast<IndirectGotoStmt>(Jump)) {\n // ...\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);"}}, [l]={ ["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:66:7: warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:77:3: warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:103:3: warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]"} } }, ["ext_hex_constant_invalid"]={ [j]={lb,o}, [k]=lb, [c]="ext_hex_constant_invalid", [d]="hexadecimal floating constants are a C99 feature", [b]="hexadecimal floating constants are a C99 feature", [h]=m, [g]="hexadecimal floating constants are a C99 feature", [f]=" \\[(?:\\-Werror,)?\\-Wc99\\-extensions[^\\]]*\\]", [e]=u, [i]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17.","Update diagnostics now that hexadecimal literals look likely to be part of C++17.\n\nllvm-svn: 262753"}, [a]={{pb,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 // ...\n // Handle a hex number like 0x1234.\n if ((c1 == \'x\' || c1 == \'X\') && (isHexDigit(s[1]) || s[1] == \'.\')) {\n // ...\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 // ...\n if (!LangOpts.HexFloats)\n Diags.Report(TokLoc, LangOpts.CPlusPlus ? diag::ext_hex_literal_invalid : diag::ext_hex_constant_invalid);"}}, [l]={ ["clang/test/Lexer/rdr-6096838-2.c"]={"clang/test/Lexer/rdr-6096838-2.c:5:17: warning: hexadecimal floating constants are a C99 feature [-Wc99-extensions]"} } }, ["ext_hex_literal_invalid"]={ [j]={N,jb,o}, [k]=N, [c]="ext_hex_literal_invalid", [d]="hexadecimal floating literals are a C++1z feature", [b]="hexadecimal floating literals are a C++1z feature", [h]=m, [g]="hexadecimal floating literals are a C\\+\\+17 feature", [f]=kb, [e]=u, [i]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17.","Update diagnostics now that hexadecimal literals look likely to be part of C++17.\n\nllvm-svn: 262753"}, [a]={{pb,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 // ...\n // Handle a hex number like 0x1234.\n if ((c1 == \'x\' || c1 == \'X\') && (isHexDigit(s[1]) || s[1] == \'.\')) {\n // ...\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 // ...\n if (!LangOpts.HexFloats)\n Diags.Report(TokLoc, LangOpts.CPlusPlus ? diag::ext_hex_literal_invalid : diag::ext_hex_constant_invalid);"}}, [l]={ ["clang/test/Lexer/hexfloat.cpp"]={"clang/test/Lexer/hexfloat.cpp:7:11: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]","clang/test/Lexer/hexfloat.cpp:8:12: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]","clang/test/Lexer/hexfloat.cpp:9:11: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]","clang/test/Lexer/hexfloat.cpp:10:12: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]"} } }, ["ext_hlsl_access_specifiers"]={ [j]={"hlsl-extensions"}, [k]="hlsl-extensions", [c]={{nil,D,"ext_hlsl_access_specifiers"}}, [d]={{nil,D,"access specifiers are a clang HLSL extension"}}, [b]={{nil,D,"access specifiers are a clang HLSL extension"}}, [h]=m, [g]="access specifiers are a clang HLSL extension", [f]=" \\[(?:\\-Werror,)?\\-Whlsl\\-extensions[^\\]]*\\]", [e]={{nil,D,Rb}}, [i]={"0d6b574b8717",1651158800,"[HLSL] Adjust access specifier behavior","[HLSL] Adjust access specifier behavior\n\nHLSL doesn\'t support access specifiers. This change has two components:\n\n1) Make default access for classes public\n2) Diagnose the use of access specifiers as a clang HLSL extension\n\nAs long as the default behavior for access specifiers matches HLSL,\nallowing them to be used doesn\'t cause sourece incompatability with\nvalid code. As such enabling them as a clang extension seems like a\nreasonable approach.\n\nFixes #55124\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D124487"}, [a]={{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 // ...\n if (Access != AS_none) {\n // ...\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 // ...\n case tok::kw_public:\n case tok::kw_protected: {\n if (getLangOpts().HLSL)\n Diag(Tok.getLocation(), diag::ext_hlsl_access_specifiers);"}}, [l]={ ["clang/test/ParserHLSL/access_specifiers.hlsl"]={"clang/test/ParserHLSL/access_specifiers.hlsl:12:1: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:14:1: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:18:24: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:26:24: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:30:31: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]"} } }, ["ext_ident_list_in_param"]={ [j]={o}, [k]=o, [c]="ext_ident_list_in_param", [d]="type-less parameter names in function declaration", [b]="type-less parameter names in function declaration", [h]=m, [g]="type\\-less parameter names in function declaration", [f]=M, [e]=s, [i]={v,1236199783,w,x}, [a]={{W,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 // ...\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"]={ [j]={B,"gnu-imaginary-constant",o}, [k]="gnu-imaginary-constant", [c]="ext_imaginary_constant", [d]="imaginary constants are a GNU extension", [b]="imaginary constants are a GNU extension", [h]=m, [g]="imaginary constants are a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-imaginary\\-constant[^\\]]*\\]", [e]={{nil,E,n},{sb,nil,u}}, [i]={v,1236199783,w,x}, [a]={{r,4279,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n // If this is an imaginary literal, create the ImaginaryLiteral wrapper.\n if (Literal.isImaginary) {\n // ...\n Diag(Tok.getLocation(), diag::ext_imaginary_constant);"}}, [l]={ ["clang/test/Sema/exprs.c"]={"clang/test/Sema/exprs.c:43:10: warning: imaginary constants are a GNU extension [-Wgnu-imaginary-constant]"} } }, ["ext_implicit_exception_spec_mismatch"]={ [j]={"implicit-exception-spec-mismatch"}, [k]="implicit-exception-spec-mismatch", [c]="ext_implicit_exception_spec_mismatch", [d]="function previously declared with an %select{explicit|implicit}0 exception specification redeclared with an %select{implicit|explicit}0 exception specification", [b]={{nil,nil,{"function previously declared with an ",{"explicit",Qb}," exception specification redeclared with an ",{Qb,"explicit"}," exception specification"}}}, [h]=m, [g]="function previously declared with an (?:explicit|implicit) exception specification redeclared with an (?:implicit|explicit) exception specification", [f]=" \\[(?:\\-Werror,)?\\-Wimplicit\\-exception\\-spec\\-mismatch[^\\]]*\\]", [e]=n, [i]={"66f3ac9d2197",1350721611,"Rework implementation of DR1492: Apply the resolution to operator delete too,","Rework implementation of DR1492: Apply the resolution to operator delete too,\nsince it also has an implicit exception specification. Downgrade the error to\nan extwarn, since at least for operator delete, system headers like to declare\nit as \'noexcept\' whereas the implicit definition does not have an explicit\nexception specification. Move the exception specification for user-declared\n\'operator delete\' functions from the type-as-written into the type, to reflect\nreality and to allow us to detect whether there was an implicit exception spec\nor not.\n\nllvm-svn: 166372"}, [a]={{zb,340,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\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 // ...\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);"}}, [l]={ ["clang/test/CXX/special/class.dtor/p3.cpp"]={"clang/test/CXX/special/class.dtor/p3.cpp:7:6: warning: function previously declared with an implicit exception specification redeclared with an explicit exception specification [-Wimplicit-exception-spec-mismatch]","clang/test/CXX/special/class.dtor/p3.cpp:10:6: warning: function previously declared with an explicit exception specification redeclared with an implicit exception specification [-Wimplicit-exception-spec-mismatch]"} } }, ["ext_implicit_function_decl_c99"]={ [j]={bb,ib,Qb,lc,gb}, [k]=lc, [c]={{nil,D,"ext_implicit_function_decl_c99"}}, [d]={{nil,D,"call to undeclared function %0; ISO C99 and later do not support implicit function declarations"}}, [b]={{nil,D,"call to undeclared function A; ISO C99 and later do not support implicit function declarations"}}, [h]=F, [g]="call to undeclared function (.*?); ISO C99 and later do not support implicit function declarations", [f]=" \\[[^\\]]*\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", [e]={{nil,D,n}}, [i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, [a]={{p,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 // ...\n if (II.getName().startswith(\"__builtin_\"))\n // ...\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;"}}, [l]={ ["clang/test/Sema/cxx-as-c.c"]={"clang/test/Sema/cxx-as-c.c:5:16: error: call to undeclared function \'n_\'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]"} } }, ["ext_implicit_lib_function_decl"]={ [j]={bb,ib,Qb,lc,gb}, [k]=lc, [c]="ext_implicit_lib_function_decl", [d]="implicitly declaring library function \'%0\' with type %1", [b]="implicitly declaring library function \'A\' with type B", [h]=m, [g]="implicitly declaring library function \'(.*?)\' with type (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", [e]=n, [i]={v,1236199783,w,x}, [a]={{p,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 // ...\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;"}}, [l]={ ["clang/test/Sema/implicit-intel-builtin-decl.c"]={"clang/test/Sema/implicit-intel-builtin-decl.c:5:9: warning: implicitly declaring library function \'_mm_getcsr\' with type \'unsigned int () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:8:3: warning: implicitly declaring library function \'_mm_setcsr\' with type \'void (unsigned int) noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:11:3: warning: implicitly declaring library function \'_mm_sfence\' with type \'void () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:15:3: warning: implicitly declaring library function \'_mm_clflush\' with type \'void (const void *) noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:18:3: warning: implicitly declaring library function \'_mm_lfence\' with type \'void () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:21:3: warning: implicitly declaring library function \'_mm_mfence\' with type \'void () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:24:3: warning: implicitly declaring library function \'_mm_pause\' with type \'void () noexcept\' [-Wimplicit-function-declaration]"} } }, ["ext_implicit_lib_function_decl_c99"]={ [j]={bb,ib,Qb,lc,gb}, [k]=lc, [c]={{nil,D,"ext_implicit_lib_function_decl_c99"}}, [d]={{nil,D,"call to undeclared library function \'%0\' with type %1; ISO C99 and later do not support implicit function declarations"}}, [b]={{nil,D,"call to undeclared library function \'A\' with type B; ISO C99 and later do not support implicit function declarations"}}, [h]=F, [g]="call to undeclared library function \'(.*?)\' with type (.*?); ISO C99 and later do not support implicit function declarations", [f]=" \\[[^\\]]*\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", [e]={{nil,D,n}}, [i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, [a]={{p,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 // ...\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;"}}, [l]={ ["clang/test/SemaObjC/ivar-lookup-resolution-builtin.m"]={"clang/test/SemaObjC/ivar-lookup-resolution-builtin.m:31:10: error: call to undeclared library function \'index\' with type \'char *(const char *, int)\'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]"} } }, ["ext_implicit_typename"]={ [j]={S,qb}, [k]=S, [c]={{nil,U,"ext_implicit_typename"}}, [d]={{nil,U,"missing \'typename\' prior to dependent type name %0%1; implicit \'typename\' is a C++20 extension"}}, [b]={{nil,U,"missing \'typename\' prior to dependent type name AB; implicit \'typename\' is a C++20 extension"}}, [h]=m, [g]="missing \'typename\' prior to dependent type name (.*?)(.*?); implicit \'typename\' is a C\\+\\+20 extension", [f]=nb, [e]={{nil,U,n}}, [i]={Pb,1625925174,Ob,Nb}, [a]={{p,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 // ...\n if (ObjectTypePtr) {\n // ...\n } else if (SS && SS->isNotEmpty()) {\n // ...\n if (!LookupCtx) {\n if (isDependentScopeSpecifier(*SS)) {\n // ...\n if (IsImplicitTypename) {\n // ...\n if (getLangOpts().CPlusPlus20)\n // ...\n else\n Diag(QualifiedLoc, diag::ext_implicit_typename) << SS->getScopeRep() << II.getName() << FixItHint::CreateInsertion(QualifiedLoc, \"typename \");"},{H,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 // ...\n if (!IsCtorOrDtorName && !IsClassName && SS.isSet()) {\n // ...\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 // ...\n else\n Diag(SS.getBeginLoc(), diag::ext_implicit_typename) << SS.getScopeRep() << TemplateII->getName() << FixItHint::CreateInsertion(SS.getBeginLoc(), \"typename \");"}}, [l]={ ["clang/test/SemaCXX/rounding-math-crash.cpp"]={"clang/test/SemaCXX/rounding-math-crash.cpp:3:20: warning: missing \'typename\' prior to dependent type name b::a; implicit \'typename\' is a C++20 extension [-Wc++20-extensions]"} } }, ["ext_in_class_initializer_float_type"]={ [j]={B,"gnu-static-float-init","static-float-init"}, [k]="gnu-static-float-init", [c]="ext_in_class_initializer_float_type", [d]="in-class initializer for static data member of type %0 is a GNU extension", [b]="in-class initializer for static data member of type A is a GNU extension", [h]=m, [g]="in\\-class initializer for static data member of type (.*?) is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-static\\-float\\-init[^\\]]*\\]", [e]=n, [i]={"db76892e72e4",1284160882,"Support in-class initialization of static const floating-point data members.","Support in-class initialization of static const floating-point data members.\n\nllvm-svn: 113663"}, [a]={{p,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 // ...\n if (VDecl->isLocalVarDecl()) {\n // ...\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // ...\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n // ...\n } else if (VDecl->isConstexpr()) {\n // ...\n } else if (!DclT.isConstQualified()) {\n // ...\n } else if (DclT->isIntegralOrEnumerationType()) {\n // ...\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 // ...\n } else {\n Diag(VDecl->getLocation(), diag::ext_in_class_initializer_float_type) << DclT << Init->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:190:24: warning: in-class initializer for static data member of type \'const float\' is a GNU extension [-Wgnu-static-float-init]","clang/test/SemaCXX/class.cpp:191:24: warning: in-class initializer for static data member of type \'const float\' is a GNU extension [-Wgnu-static-float-init]"} } }, ["ext_in_class_initializer_float_type_cxx11"]={ [j]={"static-float-init"}, [k]="static-float-init", [c]="ext_in_class_initializer_float_type_cxx11", [d]="in-class initializer for static data member of type %0 requires \'constexpr\' specifier", [b]="in-class initializer for static data member of type A requires \'constexpr\' specifier", [h]=F, [g]="in\\-class initializer for static data member of type (.*?) requires \'constexpr\' specifier", [f]=" \\[[^\\]]*\\-Wstatic\\-float\\-init[^\\]]*\\]", [e]=n, [i]={"cf656385ea2d",1359087736,"Sync \'in class initialization of static const double\' extension up with GCC,","Sync \'in class initialization of static const double\' extension up with GCC,\nand split it out of -Wgnu into its own warning flag.\n\n * In C++11, this is now a hard error (GCC has no extension here in C++11 mode).\n The error can be disabled with -Wno-static-float-init, and has a fixit to\n add \'constexpr\'.\n\n * In C++98, this is still an ExtWarn, but is now controlled by\n -Wstatic-float-init as well as -Wgnu.\n\nllvm-svn: 173414"}, [a]={{p,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 // ...\n if (VDecl->isLocalVarDecl()) {\n // ...\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // ...\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n // ...\n } else if (VDecl->isConstexpr()) {\n // ...\n } else if (!DclT.isConstQualified()) {\n // ...\n } else if (DclT->isIntegralOrEnumerationType()) {\n // ...\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();"}}, [l]={ ["clang/test/SemaCXX/cxx0x-class.cpp"]={"clang/test/SemaCXX/cxx0x-class.cpp:23:24: warning: in-class initializer for static data member of type \'const float\' requires \'constexpr\' specifier [-Wstatic-float-init]","clang/test/SemaCXX/cxx0x-class.cpp:24:24: warning: in-class initializer for static data member of type \'const float\' requires \'constexpr\' specifier [-Wstatic-float-init]"} } }, ["ext_in_class_initializer_non_constant"]={ [j]={B,hc,o}, [k]=hc, [c]="ext_in_class_initializer_non_constant", [d]="in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension", [b]="in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension", [h]=m, [g]="in\\-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-folding\\-constant[^\\]]*\\]", [e]=n, [i]={"9925ec8bf446",1308030389,"fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member","fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member\nas an extension.\n\nllvm-svn: 132980"}, [a]={{p,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 // ...\n if (VDecl->isLocalVarDecl()) {\n // ...\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // ...\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n // ...\n } else if (VDecl->isConstexpr()) {\n // ...\n } else if (!DclT.isConstQualified()) {\n // ...\n } else if (DclT->isIntegralOrEnumerationType()) {\n // ...\n if (getLangOpts().CPlusPlus11 && DclT.isVolatileQualified())\n // ...\n else if (Init->isValueDependent())\n // ...\n else if (Init->isIntegerConstantExpr(Context, &Loc))\n // ...\n else if (Init->getType()->isScopedEnumeralType() && Init->isCXX11ConstantExpr(Context))\n // ...\n else if (Init->isEvaluatable(Context)) {\n // ...\n Diag(Loc, diag::ext_in_class_initializer_non_constant) << Init->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/i-c-e-cxx.cpp"]={"clang/test/SemaCXX/i-c-e-cxx.cpp:60:28: warning: in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension [-Wgnu-folding-constant]"} } }, ["ext_incomplete_in_exception_spec"]={ [j]={z,rb}, [k]=rb, [c]="ext_incomplete_in_exception_spec", [d]="%select{|pointer to |reference to }0incomplete type %1 is not allowed in exception specification", [b]={{nil,nil,{{A,"pointer to ","reference to "},"incomplete type B is not allowed in exception specification"}}}, [h]=m, [g]="(?:|pointer to |reference to )incomplete type (.*?) is not allowed in exception specification", [f]=Ec, [e]=n, [i]={"b2b0da4ad08d",1465583081,"[-fms-extensions] Permit incomplete types in dynamic exception specifications","[-fms-extensions] Permit incomplete types in dynamic exception specifications\n\nMicrosoft headers, comdef.h and comutil.h, assume that this is an OK\nthing to do. Downgrade the hard error to a warning if we are in\n-fms-extensions mode.\n\nThis fixes PR28080.\n\nllvm-svn: 272412"}, [a]={{zb,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 // ...\n if (getLangOpts().MSVCCompat) {\n DiagID = diag::ext_incomplete_in_exception_spec;"}}, [l]={ ["clang/test/SemaCXX/ms-exception-spec.cpp"]={"clang/test/SemaCXX/ms-exception-spec.cpp:19:17: warning: incomplete type \'S\' is not allowed in exception specification [-Wmicrosoft-exception-spec]"} } }, ["ext_increment_bool"]={ [j]={"increment-bool"}, [k]="increment-bool", [c]="ext_increment_bool", [d]="ISO C++1z does not allow incrementing expression of type bool", [b]="ISO C++1z does not allow incrementing expression of type bool", [h]=F, [g]="ISO C\\+\\+17 does not allow incrementing expression of type bool", [f]=" \\[[^\\]]*\\-Wincrement\\-bool[^\\]]*\\]", [e]=n, [i]={"4a0cd893257d",1448504197,"P0002R1: increment on expressions of type bool is no longer allowed in C++1z.","P0002R1: increment on expressions of type bool is no longer allowed in C++1z.\n\nllvm-svn: 254122"}, [a]={{r,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 // ...\n if (S.getLangOpts().CPlusPlus && ResType->isBooleanType()) {\n // ...\n S.Diag(OpLoc, S.getLangOpts().CPlusPlus17 ? diag::ext_increment_bool : diag::warn_increment_bool) << Op->getSourceRange();"}}, [l]={ ["clang/test/CXX/over/over.built/p4.cpp"]={"clang/test/CXX/over/over.built/p4.cpp:7:9: error: ISO C++17 does not allow incrementing expression of type bool [-Wincrement-bool]","clang/test/CXX/over/over.built/p4.cpp:8:10: error: ISO C++17 does not allow incrementing expression of type bool [-Wincrement-bool]"} } }, ["ext_init_capture"]={ [j]={"c++14-extensions","c++1y-extensions"}, [k]="c++14-extensions", [c]="ext_init_capture", [d]="initialized lambda captures are a C++14 extension", [b]="initialized lambda captures are a C++14 extension", [h]=m, [g]="initialized lambda captures are a C\\+\\+14 extension", [f]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+14\\-extensions[^\\]]*\\]", [e]="Lambda Issue", [i]={"5b013f505068",1380346707,"Add compat/extension warnings for init captures.","Add compat/extension warnings for init captures.\n\nllvm-svn: 191609"}, [a]={{"clang/lib/Sema/SemaLambda.cpp",1072,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n // ...\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n // ...\n if (C->Init.isUsable()) {\n Diag(C->Loc, getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_init_capture : diag::ext_init_capture);"}}, [l]={ ["clang/test/Parser/objcxx11-invalid-lambda.cpp"]={"clang/test/Parser/objcxx11-invalid-lambda.cpp:6:7: warning: initialized lambda captures are a C++14 extension [-Wc++14-extensions]"} } }, ["ext_init_capture_pack"]={ [j]={S,qb}, [k]=S, [c]={{nil,G,"ext_init_capture_pack"}}, [d]={{nil,t,"initialized lambda pack captures are a C++20 extension"},{G,G,"initialized lambda pack captures are a C++2a extension"}}, [b]={{nil,t,"initialized lambda pack captures are a C++20 extension"},{G,G,"initialized lambda pack captures are a C++2a extension"}}, [h]=m, [g]="initialized lambda pack captures are a C\\+\\+20 extension", [f]=nb, [e]={{nil,G,"Lambda Issue"}}, [i]={"b2997f579a8b",1558469450,"[c++20] P0780R2: Support pack-expansion of init-captures.","[c++20] P0780R2: Support pack-expansion of init-captures.\n\nThis permits an init-capture to introduce a new pack:\n\n template<typename ...T> auto x = [...a = T()] { /* a is a pack */ };\n\nTo support this, the mechanism for allowing ParmVarDecls to be packs has\nbeen extended to support arbitrary local VarDecls.\n\nllvm-svn: 361300"}, [a]={{"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 // ...\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);"}}, [l]={ ["clang/test/SemaTemplate/sizeof-pack.cpp"]={"clang/test/SemaTemplate/sizeof-pack.cpp:9:11: warning: initialized lambda pack captures are a C++20 extension [-Wc++20-extensions]"} } }, ["ext_init_from_predefined"]={ [j]={z,"microsoft-init-from-predefined"}, [k]="microsoft-init-from-predefined", [c]="ext_init_from_predefined", [d]="initializing an array from a \'%0\' predefined identifier is a Microsoft extension", [b]="initializing an array from a \'A\' predefined identifier is a Microsoft extension", [h]=m, [g]="initializing an array from a \'(.*?)\' predefined identifier is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-init\\-from\\-predefined[^\\]]*\\]", [e]=n, [i]={Pb,1625925174,Ob,Nb}, [a]={{V,8619,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n if (S.getLangOpts().MicrosoftExt && Args.size() == 1 && isa<PredefinedExpr>(Args[0]) && Entity.getType()->isArrayType()) {\n // ...\n S.Diag(Init->getBeginLoc(), diag::ext_init_from_predefined) << Init;"}}, [l]={ ["clang/test/Sema/ms_predefined_expr.cpp"]={"clang/test/Sema/ms_predefined_expr.cpp:4:19: warning: initializing an array from a \'__FUNCTION__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:5:19: warning: initializing an array from a \'__FUNCDNAME__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:6:19: warning: initializing an array from a \'__FUNCSIG__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:7:19: warning: initializing an array from a \'__func__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:8:19: warning: initializing an array from a \'__PRETTY_FUNCTION__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]"} } }, ["ext_init_list_constant_narrowing"]={ [j]={Dc,"c++0x-narrowing",cc,Zb,gc,"narrowing"}, [k]=gc, [c]="ext_init_list_constant_narrowing", [d]="constant expression evaluates to %0 which cannot be narrowed to type %1", [b]="constant expression evaluates to A which cannot be narrowed to type B", [h]=F, [g]="constant expression evaluates to (.*?) which cannot be narrowed to type (.*?)", [f]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", [e]=n, [i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a","Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow a flag to be set on the Diagnostic object,\nto mark it as \'causes substitution failure\'.\n\nRefactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior\nrather than a bunch of flags.\n\nllvm-svn: 194444"}, [a]={{V,10426,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n // ...\n case NK_Constant_Narrowing:\n // ...\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();"}}, [l]={ ["clang/test/SemaCXX/cxx0x-initializer-scalars.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:48:21: error: constant expression evaluates to 100000 which cannot be narrowed to type \'short\' [-Wc++11-narrowing]","clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:49:24: error: constant expression evaluates to 100000 which cannot be narrowed to type \'short\' [-Wc++11-narrowing]"} } }, ["ext_init_list_type_narrowing"]={ [j]={Dc,"c++0x-narrowing",cc,Zb,gc,"narrowing"}, [k]=gc, [c]="ext_init_list_type_narrowing", [d]="type %0 cannot be narrowed to %1 in initializer list", [b]="type A cannot be narrowed to B in initializer list", [h]=F, [g]="type (.*?) cannot be narrowed to (.*?) in initializer list", [f]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", [e]=n, [i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a","Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow a flag to be set on the Diagnostic object,\nto mark it as \'causes substitution failure\'.\n\nRefactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior\nrather than a bunch of flags.\n\nllvm-svn: 194444"}, [a]={{V,10415,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n // ...\n case NK_Type_Narrowing:\n // ...\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();"}}, [l]={ ["clang/test/CXX/expr/expr.const/p6.cpp"]={"clang/test/CXX/expr/expr.const/p6.cpp:38:20: error: type \'float\' cannot be narrowed to \'int\' in initializer list [-Wc++11-narrowing]"} } }, ["ext_init_list_variable_narrowing"]={ [j]={Dc,"c++0x-narrowing",cc,Zb,gc,"narrowing"}, [k]=gc, [c]="ext_init_list_variable_narrowing", [d]="non-constant-expression cannot be narrowed from type %0 to %1 in initializer list", [b]="non-constant-expression cannot be narrowed from type A to B in initializer list", [h]=F, [g]="non\\-constant\\-expression cannot be narrowed from type (.*?) to (.*?) in initializer list", [f]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", [e]=n, [i]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a","Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow a flag to be set on the Diagnostic object,\nto mark it as \'causes substitution failure\'.\n\nRefactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior\nrather than a bunch of flags.\n\nllvm-svn: 194444"}, [a]={{V,10437,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n // ...\n case NK_Variable_Narrowing:\n // ...\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();"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp:10:9: error: non-constant-expression cannot be narrowed from type \'int\' to \'float\' in initializer list [-Wc++11-narrowing]","clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp:12:9: error: non-constant-expression cannot be narrowed from type \'int\' to \'float\' in initializer list [-Wc++11-narrowing]"} } }, ["ext_init_statement"]={ [j]={N,jb}, [k]=N, [c]="ext_init_statement", [d]="\'%select{if|switch}0\' initialization statements are a C++1z extension", [b]={{nil,sb,{"\'",{"if","switch"},"\' initialization statements are a C++17 extension"}},{nil,nil,{"\'",{"if","switch"},"\' initialization statements are a C++1z extension"}}}, [h]=m, [g]="\'(?:if|switch)\' initialization statements are a C\\+\\+17 extension", [f]=kb, [e]=s, [i]={"fccb5128b201",1476822436,"Add missing warning for use of C++1z init-statements in C++14 and before.","Add missing warning for use of C++1z init-statements in C++14 and before.\n\nllvm-svn: 284530"}, [a]={{"clang/lib/Parse/ParseExprCXX.cpp",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 // ...\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); };"}}, [l]={ ["clang/test/SemaCXX/warn-c++1z-extensions.cpp"]={"clang/test/SemaCXX/warn-c++1z-extensions.cpp:4:7: warning: \'if\' initialization statements are a C++17 extension [-Wc++17-extensions]","clang/test/SemaCXX/warn-c++1z-extensions.cpp:5:11: warning: \'switch\' initialization statements are a C++17 extension [-Wc++17-extensions]"} } }, ["ext_initializer_overrides"]={ [j]={A,bb,"extra","initializer-overrides","override-init"}, [k]="initializer-overrides", [c]={{nil,t,"ext_initializer_overrides"}}, [d]={{nil,t,"initializer %select{partially |}0overrides prior initialization of this subobject"}}, [b]={{nil,t,{"initializer ",{"partially ",A},"overrides prior initialization of this subobject"}}}, [h]=m, [g]="initializer (?:partially |)overrides prior initialization of this subobject", [f]=" \\[(?:\\-Werror,)?\\-Winitializer\\-overrides[^\\]]*\\]", [e]={{nil,t,n}}, [i]={rc,1567205575,pc,qc}, [a]={{V,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 // ...\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 // ...\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"]={ [j]={Lb}, [k]=Lb, [c]="ext_initializer_string_for_char_array_too_long", [d]="initializer-string for char array is too long", [b]="initializer-string for char array is too long", [h]=m, [g]="initializer\\-string for char array is too long", [f]=" \\[(?:\\-Werror,)?\\-Wexcess\\-initializers[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{V,258,"static void CheckStringInit(Expr *Str, QualType &DeclT, const ArrayType *AT, Sema &S) {\n // ...\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 // ...\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();"}}, [l]={ ["clang/test/CodeGen/globalinit.c"]={"clang/test/CodeGen/globalinit.c:20:19: warning: initializer-string for char array is too long [-Wexcess-initializers]"} } }, ["ext_initializer_union_overrides"]={ [j]={A,bb,"extra","initializer-overrides","override-init"}, [k]="initializer-overrides", [c]="ext_initializer_union_overrides", [d]="initializer %select{partially |}0overrides prior initialization of this subobject", [b]={{nil,nil,{"initializer ",{"partially ",A},"overrides prior initialization of this subobject"}}}, [h]=F, [g]="initializer (?:partially |)overrides prior initialization of this subobject", [f]=" \\[[^\\]]*\\-Winitializer\\-overrides[^\\]]*\\]", [e]=n, [i]={Pb,1625925174,Ob,Nb}, [a]={{V,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 // ...\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 // ...\n unsigned DiagID = SemaRef.getLangOpts().CPlusPlus ? (UnionOverride ? diag::ext_initializer_union_overrides : diag::ext_initializer_overrides) : diag::warn_initializer_overrides;"}}, [l]={ ["clang/test/SemaCXX/cxx2b-designated-initializers.cpp"]={"clang/test/SemaCXX/cxx2b-designated-initializers.cpp:41:9: error: initializer partially overrides prior initialization of this subobject [-Winitializer-overrides]"} } }, ["ext_inline_namespace"]={ [j]={P,y,"c++11-inline-namespace"}, [k]="c++11-inline-namespace", [c]="ext_inline_namespace", [d]="inline namespaces are a C++11 feature", [b]="inline namespaces are a C++11 feature", [h]=m, [g]="inline namespaces are a C\\+\\+11 feature", [f]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-inline\\-namespace[^\\]]*\\]", [e]=s, [i]={"5a5f2c76b6f7",1283215005,"Enable inline namespaces in C++03 as an extension.","Enable inline namespaces in C++03 as an extension.\n\nllvm-svn: 112566"}, [a]={{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 // ...\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);"}}, [l]={ ["clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp:7:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp:8:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp:9:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]"} } }, ["ext_inline_nested_namespace_definition"]={ [j]={S,qb}, [k]=S, [c]={{nil,O,"ext_inline_nested_namespace_definition"}}, [d]={{nil,t,"inline nested namespace definition is a C++20 extension"},{G,O,"inline nested namespace definition is a C++2a extension"}}, [b]={{nil,t,"inline nested namespace definition is a C++20 extension"},{G,O,"inline nested namespace definition is a C++2a extension"}}, [h]=m, [g]="inline nested namespace definition is a C\\+\\+20 extension", [f]=nb, [e]={{nil,O,s}}, [i]={"53f391dcb323",1542043188,"Implement P1094R2 (nested inline namespaces)","Implement P1094R2 (nested inline namespaces)\n\nAs approved for the Working Paper in San Diego, support annotating\ninline namespaces with \'inline\'.\n\nChange-Id: I51a654e11ffb475bf27cccb2458768151619e384\nllvm-svn: 346677"}, [a]={{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 // ...\n if (ExtraNSs.empty()) {\n // ...\n } else if (InlineLoc.isValid()) {\n // ...\n } else if (getLangOpts().CPlusPlus20) {\n // ...\n } else if (getLangOpts().CPlusPlus17) {\n // ...\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 // ...\n if (ExtraNSs.empty()) {\n // ...\n } else if (InlineLoc.isValid()) {\n // ...\n } else if (getLangOpts().CPlusPlus20) {\n // ...\n } else if (getLangOpts().CPlusPlus17) {\n // ...\n } else {\n // ...\n // Warn about nested inline namespaces.\n if (FirstNestedInlineLoc.isValid())\n Diag(FirstNestedInlineLoc, diag::ext_inline_nested_namespace_definition);"}}, [l]={ ["clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp"]={"clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:19:27: warning: inline nested namespace definition is a C++20 extension [-Wc++20-extensions]","clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:36:27: warning: inline nested namespace definition is a C++20 extension [-Wc++20-extensions]"} } }, ["ext_inline_variable"]={ [j]={N,jb}, [k]=N, [c]="ext_inline_variable", [d]="inline variables are a C++1z extension", [b]="inline variables are a C++1z extension", [h]=m, [g]="inline variables are a C\\+\\+17 extension", [f]=kb, [e]=n, [i]={"62f19e700d31",1466813756,"Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a","Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a\nvariable weak discardable linkage and partially-ordered initialization, and is\nimplied for constexpr static data members.)\n\nllvm-svn: 273754"}, [a]={{p,7732,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (D.getDeclSpec().isInlineSpecified()) {\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else if (CurContext->isFunctionOrMethod()) {\n // ...\n } else {\n Diag(D.getDeclSpec().getInlineSpecLoc(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_inline_variable : diag::ext_inline_variable);"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.inst/p1.cpp"]={"clang/test/CXX/temp/temp.spec/temp.inst/p1.cpp:62:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]"} } }, ["ext_integer_complement_complex"]={ [j]={o}, [k]=o, [c]="ext_integer_complement_complex", [d]="ISO C does not support \'~\' for complex conjugation of %0", [b]="ISO C does not support \'~\' for complex conjugation of A", [h]=m, [g]="ISO C does not support \'~\' for complex conjugation of (.*?)", [f]=M, [e]=n, [i]={I,1237025389,K,J}, [a]={{r,16246,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_Not: // bitwise complement\n // ...\n // C99 6.5.3.3p1. We allow complex int and float as a GCC extension.\n if (resultType->isComplexType() || resultType->isComplexIntegerType())\n // ...\n Diag(OpLoc, diag::ext_integer_complement_complex) << resultType << Input.get()->getSourceRange();"}} }, ["ext_integer_complex"]={ [j]={B,"gnu-complex-integer",o}, [k]="gnu-complex-integer", [c]="ext_integer_complex", [d]="complex integer types are a GNU extension", [b]="complex integer types are a GNU extension", [h]=m, [g]="complex integer types are a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-complex\\-integer[^\\]]*\\]", [e]=n, [i]={v,1236199783,w,x}, [a]={{Cc,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 // ...\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 // ...\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);"}}, [l]={ ["clang/test/Sema/complex-init-list.c"]={"clang/test/Sema/complex-init-list.c:28:10: warning: complex integer types are a GNU extension [-Wgnu-complex-integer]"} } }, ["ext_integer_increment_complex"]={ [j]={o}, [k]=o, [c]="ext_integer_increment_complex", [d]="ISO C does not support \'++\'/\'--\' on complex integer type %0", [b]="ISO C does not support \'++\'/\'--\' on complex integer type A", [h]=m, [g]="ISO C does not support \'\\+\\+\'\\/\'\\-\\-\' on complex integer type (.*?)", [f]=M, [e]=n, [i]={I,1237025389,K,J}, [a]={{r,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 // ...\n if (S.getLangOpts().CPlusPlus && ResType->isBooleanType()) {\n // ...\n } else if (S.getLangOpts().CPlusPlus && ResType->isEnumeralType()) {\n // ...\n } else if (ResType->isRealType()) {\n // ...\n } else if (ResType->isPointerType()) {\n // ...\n } else if (ResType->isObjCObjectPointerType()) {\n // ...\n } else if (ResType->isAnyComplexType()) {\n // ...\n S.Diag(OpLoc, diag::ext_integer_increment_complex) << ResType << Op->getSourceRange();"}} }, ["ext_integer_literal_too_large_for_signed"]={ [j]={"implicitly-unsigned-literal"}, [k]="implicitly-unsigned-literal", [c]="ext_integer_literal_too_large_for_signed", [d]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", [b]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", [h]=m, [g]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", [f]=" \\[(?:\\-Werror,)?\\-Wimplicitly\\-unsigned\\-literal[^\\]]*\\]", [e]=Rb, [i]={"31f42318d833",1406213483,"Improving the \"integer constant too large\" diagnostics based on post-commit feedback from Richard Sm...","Improving the \"integer constant too large\" diagnostics based on post-commit feedback from Richard Smith. Amends r213657.\n\nllvm-svn: 213865"}, [a]={{"clang/lib/Lex/PPExpressions.cpp",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 // ...\n case tok::numeric_constant: {\n // ...\n // Parse the integer literal into Result.\n if (Literal.GetIntegerValue(Result.Val)) {\n // ...\n } else {\n // ...\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);"},{r,4257,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n } else if (Literal.isFloatingLiteral()) {\n // ...\n } else if (!Literal.isIntegerLiteral()) {\n // ...\n } else {\n // ...\n if (Literal.GetIntegerValue(ResultVal)) {\n // ...\n } else {\n // ...\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 // ...\n else\n Diag(Tok.getLocation(), diag::ext_integer_literal_too_large_for_signed);"}}, [l]={ ["clang/test/Lexer/bitint-constants.c"]={"clang/test/Lexer/bitint-constants.c:40:5: warning: integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]"} } }, ["ext_internal_in_extern_inline"]={ [j]={"static-in-inline"}, [k]="static-in-inline", [c]="ext_internal_in_extern_inline", [d]="static %select{function|variable}0 %1 is used in an inline function with external linkage", [b]={{nil,nil,{"static ",{jc,yc}," B is used in an inline function with external linkage"}}}, [h]=m, [g]="static (?:function|variable) (.*?) is used in an inline function with external linkage", [f]=" \\[(?:\\-Werror,)?\\-Wstatic\\-in\\-inline[^\\]]*\\]", [e]=n, [i]={"edff0200115c",1340041798,"Allow internal decls in inline functions if the function is in the main file.","Allow internal decls in inline functions if the function is in the main file.\n\nThis handles the very common case of people writing inline functions in their\nmain source files and not tagging them as inline. These cases should still\nbehave as the user intended. (The diagnostic is still emitted as an extension.)\n\nI\'m reworking this code anyway to account for C++\'s equivalent restriction in\n[basic.def.odr]p6, but this should get some bots back to green.\n\nllvm-svn: 158666"}, [a]={{r,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 // ...\n S.Diag(Loc, DowngradeWarning ? diag::ext_internal_in_extern_inline_quiet : diag::ext_internal_in_extern_inline) << /*IsVar=*/!UsedFn << D;"}}, [l]={ ["clang/test/Sema/inline.c"]={"clang/test/Sema/inline.c:14:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:15:9: warning: static variable \'staticStruct\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:16:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:20:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:21:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:70:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:71:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]","XXX.h:2:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","XXX.h:3:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]"} } }, ["ext_internal_in_extern_inline_quiet"]={ [j]={o,"static-in-inline"}, [k]="static-in-inline", [c]="ext_internal_in_extern_inline_quiet", [d]="static %select{function|variable}0 %1 is used in an inline function with external linkage", [b]={{nil,nil,{"static ",{jc,yc}," B is used in an inline function with external linkage"}}}, [h]=m, [g]="static (?:function|variable) (.*?) is used in an inline function with external linkage", [f]=" \\[(?:\\-Werror,)?\\-Wstatic\\-in\\-inline[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{r,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 // ...\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"]={ [j]={"keyword-compat"}, [k]="keyword-compat", [c]="ext_keyword_as_ident", [d]="keyword \'%0\' will be made available as an identifier %select{here|for the remainder of the translation unit}1", [b]={{nil,nil,{"keyword \'A\' will be made available as an identifier ",{"here","for the remainder of the translation unit"}}}}, [h]=m, [g]="keyword \'(.*?)\' will be made available as an identifier (?:here|for the remainder of the translation unit)", [f]=" \\[(?:\\-Werror,)?\\-Wkeyword\\-compat[^\\]]*\\]", [e]=s, [i]={"47642d2b7ea1",1386051181,"Emit an extension warning when changing system header tokens","Emit an extension warning when changing system header tokens\n\nclang converts keywords to identifiers for compatibility with various system\nheaders such as GNU libc.\n\nImplement a -Wkeyword-compat extension warning to diagnose those cases. The\nwarning is on by default but will generally be ignored in system headers. It\ncan however be enabled globally to aid standards conformance testing.\n\nThis also changes the __uptr keyword avoidance from r195710 to no longer\nspecial-case system headers, bringing it in line with other similar workarounds\nin clang.\n\nImplementation returns bool for symmetry with token annotation functions.\n\nSome examples:\n\nwarning: keyword \'__is_pod\' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat]\nstruct __is_pod\n\nwarning: keyword \'__uptr\' will be treated as an identifier here [-Wkeyword-compat]\nunion w *__uptr;\n\nllvm-svn: 196212"}, [a]={{Tb,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 // ...\n Diag(Tok, diag::ext_keyword_as_ident) << Tok.getIdentifierInfo()->getName() << 0;"},{"clang/lib/Parse/ParseExprCXX.cpp",3134,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (!NextToken().is(tok::l_paren)) {\n // ...\n Diag(Tok, diag::ext_keyword_as_ident) << Tok.getIdentifierInfo()->getName() << 0;"},{zc,1915,"bool Parser::TryKeywordIdentFallback(bool DisableKeyword) {\n // ...\n Diag(Tok, diag::ext_keyword_as_ident) << PP.getSpelling(Tok) << DisableKeyword;"},{ec,274,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (NextToken().is(tok::less)) {\n // ...\n Diag(Tok, diag::ext_keyword_as_ident) << Tok.getIdentifierInfo()->getName() << 0;"}}, [l]={ ["clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp:10:8: warning: keyword \'__is_pod\' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]","clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp:18:8: warning: keyword \'__is_same\' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]","clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp:27:21: warning: keyword \'__is_signed\' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]"} } }, ["ext_lambda_missing_parens"]={ [j]={"c++23-extensions","c++2b-extensions"}, [k]="c++23-extensions", [c]={{nil,C,"ext_lambda_missing_parens"}}, [d]="lambda without a parameter clause is a C++23 extension", [b]="lambda without a parameter clause is a C++23 extension", [h]=m, [g]="lambda without a parameter clause is a C\\+\\+23 extension", [f]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+23\\-extensions[^\\]]*\\]", [e]={{nil,C,s}}, [i]={Fc,1612659633,wc,Gc}, [a]={{"clang/lib/Parse/ParseExprCXX.cpp",1511,"/// ParseLambdaExpressionAfterIntroducer - Parse the rest of a lambda\n/// expression.\nExprResult Parser::ParseLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro) {\n // ...\n if (HasSpecifiers && !HasParentheses && !getLangOpts().CPlusPlus23) {\n // ...\n Diag(Tok, diag::ext_lambda_missing_parens) << FixItHint::CreateInsertion(Tok.getLocation(), \"() \");"}}, [l]={ ["clang/test/Parser/cxx-concepts-requires-clause.cpp"]={"clang/test/Parser/cxx-concepts-requires-clause.cpp:167:19: warning: lambda without a parameter clause is a C++23 extension [-Wc++23-extensions]"} } }, ["ext_lambda_template_parameter_list"]={ [j]={S,qb}, [k]=S, [c]={{nil,G,"ext_lambda_template_parameter_list"}}, [d]={{nil,t,"explicit template parameter list for lambdas is a C++20 extension"},{G,G,"explicit template parameter list for lambdas is a C++2a extension"}}, [b]={{nil,t,"explicit template parameter list for lambdas is a C++20 extension"},{G,G,"explicit template parameter list for lambdas is a C++2a extension"}}, [h]=m, [g]="explicit template parameter list for lambdas is a C\\+\\+20 extension", [f]=nb, [e]={{nil,G,s}}, [i]={"8205a814a691",1556966986,"[c++20] Implement P0428R2 - Familiar template syntax for generic lambdas","[c++20] Implement P0428R2 - Familiar template syntax for generic lambdas\n\nDifferential Revision: https://reviews.llvm.org/D36527\n\nllvm-svn: 359967"}, [a]={{"clang/lib/Parse/ParseExprCXX.cpp",1331,"/// ParseLambdaExpressionAfterIntroducer - Parse the rest of a lambda\n/// expression.\nExprResult Parser::ParseLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro) {\n // ...\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);"}}, [l]={ ["clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp"]={"clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp:138:12: warning: explicit template parameter list for lambdas is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp:139:12: warning: explicit template parameter list for lambdas is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp:140:12: warning: explicit template parameter list for lambdas is a C++20 extension [-Wc++20-extensions]"} } }, ["ext_line_comment"]={ [j]={bb,ib,"comment","comments",gb,o}, [k]="comment", [c]="ext_line_comment", [d]="// comments are not allowed in this language", [b]="// comments are not allowed in this language", [h]=m, [g]="\\/\\/ comments are not allowed in this language", [f]=" \\[(?:\\-Werror,)?\\-Wcomment[^\\]]*\\]", [e]=u, [i]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/","s/BCPLComment/LineComment/\n\nllvm-svn: 167690"}, [a]={{db,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);"}}, [l]={ ["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:12:1: error: // comments are not allowed in this language [-Werror,-Wcomment]"} } }, ["ext_main_returns_nonint"]={ [j]={"main-return-type"}, [k]="main-return-type", [c]="ext_main_returns_nonint", [d]="return type of \'main\' is not \'int\'", [b]="return type of \'main\' is not \'int\'", [h]=m, [g]="return type of \'main\' is not \'int\'", [f]=" \\[(?:\\-Werror,)?\\-Wmain\\-return\\-type[^\\]]*\\]", [e]=n, [i]={"5ed3caf2e364",1329249052,"Warn about non-int main() results in GNU C mode instead of erroring.","Warn about non-int main() results in GNU C mode instead of erroring.\n\nBased on a patch by Vasiliy Korchagin!\n\nllvm-svn: 150500"}, [a]={{p,12128,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (getLangOpts().GNUMode && !getLangOpts().CPlusPlus) {\n // ...\n // GCC in C mode accepts qualified \'int\'.\n if (Context.hasSameUnqualifiedType(FT->getReturnType(), Context.IntTy))\n // ...\n else {\n Diag(FD->getTypeSpecStartLoc(), diag::ext_main_returns_nonint);"}}, [l]={ ["clang/test/Sema/gnu89.c"]={"clang/test/Sema/gnu89.c:5:1: warning: return type of \'main\' is not \'int\' [-Wmain-return-type]"} } }, ["ext_main_used"]={ [j]={fc,o}, [k]=fc, [c]="ext_main_used", [d]="ISO C++ does not allow \'main\' to be used by a program", [b]="ISO C++ does not allow \'main\' to be used by a program", [h]=m, [g]="ISO C\\+\\+ does not allow \'main\' to be used by a program", [f]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", [e]=n, [i]={"b63b6ee9a00e",1390354999,"Enforce restrictions that \'main\' is not allowed to be deleted, or to be used by","Enforce restrictions that \'main\' is not allowed to be deleted, or to be used by\nthe program, in C++. (We allow the latter as an extension, since we\'ve always\npermitted it, and GCC does the same, and our supported C++ ABIs don\'t do\nanything special in main.)\n\nllvm-svn: 199782"}, [a]={{r,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 // ...\n if (getLangOpts().CPlusPlus && isa<FunctionDecl>(D)) {\n // ...\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);"}}, [l]={ ["clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp"]={"clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp:19:32: error: ISO C++ does not allow \'main\' to be used by a program [-Werror,-Wmain]","clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp:22:5: error: ISO C++ does not allow \'main\' to be used by a program [-Werror,-Wmain]"} } }, ["ext_many_braces_around_init"]={ [j]={"many-braces-around-scalar-init"}, [k]="many-braces-around-scalar-init", [c]={{nil,q,"ext_many_braces_around_init"}}, [d]={{nil,q,"too many braces around %select{scalar |}0initializer"}}, [b]={{nil,q,{"too many braces around ",{"scalar ",A},"initializer"}}}, [h]=m, [g]="too many braces around (?:scalar |)initializer", [f]=" \\[(?:\\-Werror,)?\\-Wmany\\-braces\\-around\\-scalar\\-init[^\\]]*\\]", [e]={{nil,q,n}}, [i]={vc,1576908663,xc,uc}, [a]={{V,1655,"void InitListChecker::CheckScalarType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\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();"}}, [l]={ ["clang/test/Sema/array-init.c"]={"clang/test/Sema/array-init.c:225:11: warning: too many braces around scalar initializer [-Wmany-braces-around-scalar-init]"} } }, ["ext_mathematical_notation"]={ [j]={"mathematical-notation-identifier-extension"}, [k]="mathematical-notation-identifier-extension", [c]={{nil,U,"ext_mathematical_notation"}}, [d]={{nil,U,"mathematical notation character <U+%0> in an identifier is a Clang extension"}}, [b]={{nil,U,"mathematical notation character <U+A> in an identifier is a Clang extension"}}, [h]=m, [g]="mathematical notation character \\<U\\+(.*?)\\> in an identifier is a Clang extension", [f]=" \\[(?:\\-Werror,)?\\-Wmathematical\\-notation\\-identifier\\-extension[^\\]]*\\]", [e]={{nil,U,u}}, [i]={Pb,1625925174,Ob,Nb}, [a]={{db,1556,"static void diagnoseExtensionInIdentifier(DiagnosticsEngine &Diags, uint32_t C, CharSourceRange Range) {\n // ...\n Diags.Report(Range.getBegin(), diag::ext_mathematical_notation) << codepointAsHexString(C) << Range;"}}, [l]={ ["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:49:12: warning: mathematical notation character <U+1D6DB> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:6: warning: mathematical notation character <U+00B9> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:9: warning: mathematical notation character <U+208D> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:12: warning: mathematical notation character <U+2084> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:15: warning: mathematical notation character <U+2082> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:18: warning: mathematical notation character <U+208E> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:21: warning: mathematical notation character <U+2207> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:55:5: warning: mathematical notation character <U+221E> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:56:5: warning: mathematical notation character <U+1D7C3> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:59:6: warning: mathematical notation character <U+208C> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]"} } }, ["ext_member_redeclared"]={ [j]={B,"redeclared-class-member"}, [k]="redeclared-class-member", [c]="ext_member_redeclared", [d]="class member cannot be redeclared", [b]="class member cannot be redeclared", [h]=m, [g]="class member cannot be redeclared", [f]=" \\[(?:\\-Werror,)?\\-Wredeclared\\-class\\-member[^\\]]*\\]", [e]=n, [i]={"55890bfaa6c2",1370922683,"Implement DR85: Redeclaration of member is forbidden","Implement DR85: Redeclaration of member is forbidden\n\nDisallow the existence of a declaration of a member class that isn\'t a\nforward declaration before it\'s definition.\n\nllvm-svn: 183722"}, [a]={{p,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 // ...\n if (!Previous.empty()) {\n // ...\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 // ...\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);"}}, [l]={ ["clang/test/SemaCXX/access.cpp"]={"clang/test/SemaCXX/access.cpp:32:11: warning: class member cannot be redeclared [-Wredeclared-class-member]"} } }, ["ext_mismatched_exception_spec"]={ [j]={z,rb}, [k]=rb, [c]="ext_mismatched_exception_spec", [d]="exception specification in declaration does not match previous declaration", [b]="exception specification in declaration does not match previous declaration", [h]=m, [g]="exception specification in declaration does not match previous declaration", [f]=Ec, [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{zb,314,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat) {\n DiagID = diag::ext_mismatched_exception_spec;"},{zb,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 // ...\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_mismatched_exception_spec;"}}, [l]={ ["clang/test/CodeGenCXX/pr18661.cpp"]={"clang/test/CodeGenCXX/pr18661.cpp:7:8: warning: exception specification in declaration does not match previous declaration [-Wmicrosoft-exception-spec]"} } }, ["ext_mismatched_exception_spec_explicit_instantiation"]={ [j]={z,rb}, [k]=rb, [c]="ext_mismatched_exception_spec_explicit_instantiation", [d]="exception specification in explicit instantiation does not match instantiated one", [b]="exception specification in explicit instantiation does not match instantiated one", [h]=m, [g]="exception specification in explicit instantiation does not match instantiated one", [f]=Ec, [e]=n, [i]={"73983918c45b",1415268650,"Fix for exception specification mismatch in explicit instantiation.","Fix for exception specification mismatch in explicit instantiation.\nAccording to C++ standard if an exception-specification is specified in an explicit instantiation directive, it shall be compatible with the exception-specifications of other declarations of that function. This patch adds checks for this.\nDifferential Revision: http://reviews.llvm.org/D5822\n\nllvm-svn: 221448"}, [a]={{H,10669,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\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 // ...\n if (getLangOpts().MicrosoftExt)\n DiagID = diag::ext_mismatched_exception_spec_explicit_instantiation;"}} }, ["ext_missing_exception_specification"]={ [j]={"missing-exception-spec"}, [k]="missing-exception-spec", [c]="ext_missing_exception_specification", [d]="%0 is missing exception specification \'%1\'", [b]="A is missing exception specification \'B\'", [h]=m, [g]="(.*?) is missing exception specification \'(.*?)\'", [f]=" \\[(?:\\-Werror,)?\\-Wmissing\\-exception\\-spec[^\\]]*\\]", [e]=n, [i]={"a91de375f278",1443574130,"Promote a warning on ill-formed code (redeclaration missing an exception","Promote a warning on ill-formed code (redeclaration missing an exception\nspecification) to an error. No compiler other than Clang seems to allow this,\nand it doesn\'t seem like a useful thing to accept as an extension in general.\n\nThe current behavior was added for PR5957, where the problem was specifically\nrelated to mismatches of the exception specification on the implicitly-declared\nglobal operator new and delete. To retain that workaround, we downgrade the\nerror to an ExtWarn when the declaration is of a replaceable global allocation\nfunction.\n\nNow that this is an error, stop trying (and failing) to recover from a missing\ncomputed noexcept specification. That recovery didn\'t work, and led to crashes\nin code like the added testcase.\n\nllvm-svn: 248867"}, [a]={{zb,401,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n DiagID = diag::ext_missing_exception_specification;"},{zb,407,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n // ...\n } else if (New->isReplaceableGlobalAllocationFunction() && ESI.Type != EST_DependentNoexcept) {\n // ...\n DiagID = diag::ext_missing_exception_specification;"},{zb,416,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n // ...\n } else if (New->isReplaceableGlobalAllocationFunction() && ESI.Type != EST_DependentNoexcept) {\n // ...\n } else if (ESI.Type == EST_NoThrow) {\n // ...\n DiagID = diag::ext_missing_exception_specification;"}}, [l]={ ["clang/test/SemaCXX/nothrow-vs-exception-specs.cpp"]={"clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:83:12: warning: \'bar\' is missing exception specification \'__attribute__((nothrow))\' [-Wmissing-exception-spec]"} } }, ["ext_missing_type_specifier"]={ [j]={bb,ib,Qb,"implicit-int",gb}, [k]="implicit-int", [c]="ext_missing_type_specifier", [d]={{nil,D,"type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int"},{fb,nil,"type specifier missing, defaults to \'int\'"}}, [b]={{nil,D,"type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int"},{fb,nil,"type specifier missing, defaults to \'int\'"}}, [h]=F, [g]="type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int", [f]=" \\[[^\\]]*\\-Wimplicit\\-int[^\\]]*\\]", [e]=n, [i]={"aef810900a7a",1244031721,"Minor cleanup for implicit int warnings.","Minor cleanup for implicit int warnings.\n\nllvm-svn: 72770"}, [a]={{hb,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 // ...\n case DeclSpec::TST_unspecified:\n // ...\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 // ...\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 // ...\n } else if (S.getLangOpts().getOpenCLCompatibleVersion() >= 200 && DS.isTypeSpecPipe()) {\n // ...\n } else {\n // ...\n S.Diag(DeclLoc, diag::ext_missing_type_specifier) << DS.getSourceRange() << FixItHint::CreateInsertion(DS.getBeginLoc(), \"int\");"}}, [l]={ ["clang/test/Sema/crash-invalid-builtin.c"]={"clang/test/Sema/crash-invalid-builtin.c:4:1: error: type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int [-Wimplicit-int]"} } }, ["ext_missing_varargs_arg"]={ [j]={B,"gnu-zero-variadic-macro-arguments",o}, [k]="gnu-zero-variadic-macro-arguments", [c]="ext_missing_varargs_arg", [d]="must specify at least one argument for \'...\' parameter of variadic macro", [b]="must specify at least one argument for \'...\' parameter of variadic macro", [h]=m, [g]="must specify at least one argument for \'\\.\\.\\.\' parameter of variadic macro", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-variadic\\-macro\\-arguments[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{"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 // ...\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 // ...\n } else if ((FoundElidedComma || MI->isVariadic()) && (NumActuals + 1 == MinArgsExpected || // A(x, ...) -> A(X)\n // ...\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 // ...\n Diag(Tok, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_missing_varargs_arg : diag::ext_missing_varargs_arg);"}}, [l]={ ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:40:10: warning: must specify at least one argument for \'...\' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]","clang/test/Preprocessor/macro_fn.c:41:9: warning: must specify at least one argument for \'...\' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]"} } }, ["ext_missing_whitespace_after_macro_name"]={ [c]="ext_missing_whitespace_after_macro_name", [d]="whitespace required after macro name", [b]="whitespace required after macro name", [h]=m, [g]="whitespace required after macro name", [f]=yb, [e]=u, [i]={"2425bcb49ae4",1240021405,"enforce requirements imposed by C90 6.8 TC1, fixing PR3919.","enforce requirements imposed by C90 6.8 TC1, fixing PR3919.\n\nllvm-svn: 69415"}, [a]={{T,2875,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\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 // ...\n } else if (Tok.hasLeadingSpace()) {\n // ...\n } else if (Tok.is(tok::l_paren)) {\n // ...\n } else if (LangOpts.C99 || LangOpts.CPlusPlus11) {\n // ...\n } else {\n // ...\n if (isInvalid)\n Diag(Tok, diag::ext_missing_whitespace_after_macro_name);"}}, [l]={ ["clang/test/Preprocessor/c90.c"]={"clang/test/Preprocessor/c90.c:7:12: warning: whitespace required after macro name"} } }, ["ext_mixed_decls_code"]={ [j]={"declaration-after-statement",o}, [k]="declaration-after-statement", [c]="ext_mixed_decls_code", [d]={{nil,fb,"mixing declarations and code is a C99 extension"},{C,nil,"ISO C90 forbids mixing declarations and code"}}, [b]={{nil,fb,"mixing declarations and code is a C99 extension"},{C,nil,"ISO C90 forbids mixing declarations and code"}}, [h]=m, [g]="mixing declarations and code is a C99 extension", [f]=" \\[(?:\\-Werror,)?\\-Wdeclaration\\-after\\-statement[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{Wb,420,"StmtResult Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R, ArrayRef<Stmt *> Elts, bool isStmtExpr) {\n // ...\n const unsigned MixedDeclsCodeID = getLangOpts().C99 ? diag::warn_mixed_decls_code : diag::ext_mixed_decls_code;"}}, [l]={ ["clang/test/Sema/c89.c"]={"clang/test/Sema/c89.c:7:9: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]","clang/test/Sema/c89.c:12:9: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]","clang/test/Sema/c89.c:17:23: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]"} } }, ["ext_module_import_in_extern_c"]={ [j]={"module-import-in-extern-c"}, [k]="module-import-in-extern-c", [c]="ext_module_import_in_extern_c", [d]="import of C++ module \'%0\' appears within extern \"C\" language linkage specification", [b]="import of C++ module \'A\' appears within extern \"C\" language linkage specification", [h]=F, [g]="import of C\\+\\+ module \'(.*?)\' appears within extern \"C\" language linkage specification", [f]=" \\[[^\\]]*\\-Wmodule\\-import\\-in\\-extern\\-c[^\\]]*\\]", [e]="Modules Issue", [i]={"e69bdd10ead6",1444696780,"[modules] Allow the error on importing a C++ module within an extern \"C\"","[modules] Allow the error on importing a C++ module within an extern \"C\"\ncontext (but otherwise at the top level) to be disabled, to support use of C++\nstandard library implementations that (legitimately) mark their <blah.h>\nheaders as being C++ headers from C libraries that wrap things in \'extern \"C\"\'\na bit too enthusiastically.\n\nllvm-svn: 250137"}, [a]={{"clang/lib/Sema/SemaModule.cpp",54,"static void checkModuleImportContext(Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude = false) {\n // ...\n if (!isa<TranslationUnitDecl>(DC)) {\n // ...\n } else if (!M->IsExternC && ExternCLoc.isValid()) {\n S.Diag(ImportLoc, diag::ext_module_import_in_extern_c) << M->getFullModuleName();"}}, [l]={ ["clang/test/Modules/auto-module-import.m"]={"clang/test/Modules/auto-module-import.m:98:1: error: import of C++ module \'NoUmbrella.A\' appears within extern \"C\" language linkage specification [-Wmodule-import-in-extern-c]"} } }, ["ext_module_import_not_at_top_level_noop"]={ [j]={"modules-import-nested-redundant"}, [k]="modules-import-nested-redundant", [c]="ext_module_import_not_at_top_level_noop", [d]="redundant #include of module \'%0\' appears within %1", [b]="redundant #include of module \'A\' appears within B", [h]=F, [g]="redundant \\#include of module \'(.*?)\' appears within (.*?)", [f]=" \\[[^\\]]*\\-Wmodules\\-import\\-nested\\-redundant[^\\]]*\\]", [e]="Modules Issue", [i]={"752ada870d7b",1447803121,"[modules] When a #include is mapped to a module import and appears somewhere","[modules] When a #include is mapped to a module import and appears somewhere\nother than the top level, we issue an error. This breaks a fair amount of C++\ncode wrapping C libraries, where the C library is #included within a namespace\n/ extern \"C\" combination, because the C library (probably) includes C++\nstandard library headers which may be within modules.\n\nWithout modules, this setup is harmless if (and *only* if) the corresponding\nstandard library module was already included outside the namespace, so\ndowngrade the error to a default-error extension in that case, so that it can\nbe selectively disabled for such misbehaving libraries.\n\nllvm-svn: 253398"}, [a]={{"clang/lib/Sema/SemaModule.cpp",47,"static void checkModuleImportContext(Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude = false) {\n // ...\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;"}}, [l]={ ["clang/test/Modules/redundant-include.mm"]={"clang/test/Modules/redundant-include.mm:7:3: error: redundant #include of module \'cxx_library\' appears within function \'includeNotAtTopLevel\' [-Wmodules-import-nested-redundant]","clang/test/Modules/redundant-include.mm:11:3: error: redundant #include of module \'cxx_library\' appears within namespace \'NS\' [-Wmodules-import-nested-redundant]"} } }, ["ext_ms_abstract_keyword"]={ [j]={z,"microsoft-abstract"}, [k]="microsoft-abstract", [c]={{nil,C,"ext_ms_abstract_keyword"}}, [d]={{nil,C,"\'abstract\' keyword is a Microsoft extension"}}, [b]={{nil,C,"\'abstract\' keyword is a Microsoft extension"}}, [h]=m, [g]="\'abstract\' keyword is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-abstract[^\\]]*\\]", [e]={{nil,C,s}}, [i]={Fc,1612659633,wc,Gc}, [a]={{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 // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n // ...\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 // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Final)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Sealed)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Abstract)\n Diag(AbstractLoc, diag::ext_ms_abstract_keyword);"}}, [l]={ ["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:479:21: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:490:30: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:516:36: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:524:30: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:524:30: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:532:20: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:534:12: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:537:20: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:543:20: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]"} } }, ["ext_ms_ambiguous_direct_base"]={ [j]={"microsoft-inaccessible-base"}, [k]="microsoft-inaccessible-base", [c]={{nil,E,"ext_ms_ambiguous_direct_base"}}, [d]={{nil,E,"accessing inaccessible direct base %0 of %1 is a Microsoft extension"}}, [b]={{nil,E,"accessing inaccessible direct base A of B is a Microsoft extension"}}, [h]=m, [g]="accessing inaccessible direct base (.*?) of (.*?) is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-inaccessible\\-base[^\\]]*\\]", [e]={{nil,E,n}}, [i]={"2e87a21c7cac",1509144521,"[MS] Allow access to ambiguous, inaccessible direct bases","[MS] Allow access to ambiguous, inaccessible direct bases\n\nSummary:\nClang typically warns that in the following class hierarchy, \'A\' is\ninaccessible because there is no series of casts that the user can\nwrite to access it unambiguously:\n struct A { };\n struct B : A { };\n struct C : A, B { };\n\nMSVC allows the user to convert from C* to A*, though, and we\'ve\nencountered this issue in the latest Windows SDK headers.\n\nThis patch allows this conversion when -fms-compatibility is set and\nadds a warning for it under -Wmicrosoft-inaccessible-base.\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D39389\n\nllvm-svn: 316807"}, [a]={{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 // ...\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 // ...\n if (AmbiguousBaseConvID)\n Diag(Loc, diag::ext_ms_ambiguous_direct_base) << Base << Derived << Range;"}}, [l]={ ["clang/test/CodeGenCXX/microsoft-inaccessible-base.cpp"]={"clang/test/CodeGenCXX/microsoft-inaccessible-base.cpp:9:39: warning: accessing inaccessible direct base \'A\' of \'C\' is a Microsoft extension [-Wmicrosoft-inaccessible-base]","clang/test/CodeGenCXX/microsoft-inaccessible-base.cpp:17:39: warning: accessing inaccessible direct base \'A\' of \'D\' is a Microsoft extension [-Wmicrosoft-inaccessible-base]"} } }, ["ext_ms_anonymous_record"]={ [j]={z,"microsoft-anon-tag"}, [k]="microsoft-anon-tag", [c]="ext_ms_anonymous_record", [d]="anonymous %select{structs|unions}0 are a Microsoft extension", [b]={{nil,nil,{"anonymous ",{"structs","unions"}," are a Microsoft extension"}}}, [h]=m, [g]="anonymous (?:structs|unions) are a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-anon\\-tag[^\\]]*\\]", [e]=n, [i]={"8f0ed914902f",1407742194,"Sema: Handle declspecs without declarators in records properly in C mode","Sema: Handle declspecs without declarators in records properly in C mode\n\nWe had two bugs:\n- We wouldn\'t properly warn when a struct/union/enum was mentioned\n inside of a record definition if no declarator was provided. We\n should have mentioned that this declaration declares nothing.\n- We didn\'t properly support Microsoft\'s extension where certain\n declspecs without declarators would act as anonymous structs/unions.\n * We completely ignored the case where such a declspec could be a\n union.\n * We didn\'t properly handle the case where a record was defined inside\n another record:\n struct X {\n int a;\n struct Y {\n int b;\n };\n };\n\nllvm-svn: 215347"}, [a]={{p,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 // ...\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 // ...\n if (Record && getLangOpts().MicrosoftExt) {\n Diag(DS.getBeginLoc(), diag::ext_ms_anonymous_record) << Record->isUnion() << DS.getSourceRange();"}}, [l]={ ["clang/test/Sema/MicrosoftExtensions.c"]={"clang/test/Sema/MicrosoftExtensions.c:46:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:53:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:56:3: warning: anonymous unions are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:67:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:68:3: warning: anonymous unions are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:109:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:113:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]"} } }, ["ext_ms_c_enum_fixed_underlying_type"]={ [j]={z,"microsoft-fixed-enum",o}, [k]="microsoft-fixed-enum", [c]={{nil,O,"ext_ms_c_enum_fixed_underlying_type"}}, [d]={{nil,O,"enumeration types with a fixed underlying type are a Microsoft extension"}}, [b]={{nil,O,"enumeration types with a fixed underlying type are a Microsoft extension"}}, [h]=m, [g]="enumeration types with a fixed underlying type are a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-fixed\\-enum[^\\]]*\\]", [e]={{nil,O,s}}, [i]={"6f11db137034",1538166298,"Support enums with a fixed underlying type in all language modes.","Support enums with a fixed underlying type in all language modes.\n\nPreviously we supported these in C++, ObjC, and C with -fms-extensions.\n\nrdar://43831380\n\nDifferential revision: https://reviews.llvm.org/D52339\n\nllvm-svn: 343360"}, [a]={{W,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 // ...\n // Parse the fixed underlying type.\n if (Tok.is(tok::colon)) {\n // ...\n if (CanBeBitfield && !isEnumBase(CanBeOpaqueEnumDeclaration)) {\n // ...\n } else if (CanHaveEnumBase || !ColonIsSacred) {\n // ...\n if (!getLangOpts().ObjC) {\n if (getLangOpts().CPlusPlus11)\n // ...\n else if (getLangOpts().CPlusPlus)\n // ...\n else if (getLangOpts().MicrosoftExt)\n Diag(ColonLoc, diag::ext_ms_c_enum_fixed_underlying_type) << BaseRange;"}}, [l]={ ["clang/test/Sema/MicrosoftExtensions.c"]={"clang/test/Sema/MicrosoftExtensions.c:86:11: warning: enumeration types with a fixed underlying type are a Microsoft extension [-Wmicrosoft-fixed-enum]","clang/test/Sema/MicrosoftExtensions.c:90:6: warning: enumeration types with a fixed underlying type are a Microsoft extension [-Wmicrosoft-fixed-enum]"} } }, ["ext_ms_cast_fn_obj"]={ [j]={z,"microsoft-cast"}, [k]="microsoft-cast", [c]="ext_ms_cast_fn_obj", [d]="static_cast between pointer-to-function and pointer-to-object is a Microsoft extension", [b]="static_cast between pointer-to-function and pointer-to-object is a Microsoft extension", [h]=m, [g]="static_cast between pointer\\-to\\-function and pointer\\-to\\-object is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-cast[^\\]]*\\]", [e]=n, [i]={"85bd1206796d",1433283312,"[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr","[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr\n\nThe MSVC 2013 and 2015 implementation of std::atomic is specialized for\npointer types. The member functions are implemented using a static_cast\nfrom void-ptr to function-ptr which is not allowed in the standard.\nPermit this conversion if -fms-compatibility is present.\n\nThis fixes PR23733.\n\nllvm-svn: 238877"}, [a]={{"clang/lib/Sema/SemaCast.cpp",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 // ...\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 // ...\n if (SrcPointee->isVoidType()) {\n if (const PointerType *DestPointer = DestType->getAs<PointerType>()) {\n // ...\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;"}}, [l]={ ["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:315:23: warning: static_cast between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]"} } }, ["ext_ms_delayed_template_argument"]={ [j]={z,Q}, [k]=Q, [c]="ext_ms_delayed_template_argument", [d]="using the undeclared type %0 as a default template argument is a Microsoft extension", [b]="using the undeclared type A as a default template argument is a Microsoft extension", [h]=m, [g]="using the undeclared type (.*?) as a default template argument is a Microsoft extension", [f]=mb, [e]=n, [i]={"df6e4a06e42b",1402094196,"Delay lookup of simple default template arguments under -fms-compatibility","Delay lookup of simple default template arguments under -fms-compatibility\n\nMSVC delays parsing of default arguments until instantiation. If the\ndefault argument is never used, it is never parsed. We don\'t model\nthis.\n\nInstead, if lookup of a type name fails in a template argument context,\nwe form a DependentNameType, which will be looked up at instantiation\ntime.\n\nThis fixes errors about \'CControlWinTraits\' in atlwin.h.\n\nReviewers: rsmith\n\nDifferential Revision: http://reviews.llvm.org/D3995\n\nllvm-svn: 210382"}, [a]={{p,635,"ParsedType Sema::ActOnMSVCUnknownTypeName(const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg) {\n // ...\n if (IsTemplateTypeArg && getCurScope()->isTemplateParamScope()) {\n // ...\n Diag(NameLoc, diag::ext_ms_delayed_template_argument) << &II;"}}, [l]={ ["clang/test/SemaTemplate/ms-delayed-default-template-args.cpp"]={"clang/test/SemaTemplate/ms-delayed-default-template-args.cpp:6:24: warning: using the undeclared type \'Baz\' as a default template argument is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-delayed-default-template-args.cpp:14:24: warning: using the undeclared type \'Baz\' as a default template argument is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-delayed-default-template-args.cpp:26:26: warning: using the undeclared type \'Baz\' as a default template argument is a Microsoft extension [-Wmicrosoft-template]"} } }, ["ext_ms_deref_template_argument"]={ [j]={z,Q}, [k]=Q, [c]="ext_ms_deref_template_argument", [d]="non-type template argument containing a dereference operation is a Microsoft extension", [b]="non-type template argument containing a dereference operation is a Microsoft extension", [h]=m, [g]="non\\-type template argument containing a dereference operation is a Microsoft extension", [f]=mb, [e]=n, [i]={"da45a0fa6f72",1377236539,"arc commit didn\'t add this because it wasn\'t in the patch...","arc commit didn\'t add this because it wasn\'t in the patch...\n\nllvm-svn: 189088"}, [a]={{H,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 // ...\n if (S.getLangOpts().MicrosoftExt) {\n // ...\n if (FirstOpLoc.isValid()) {\n if (ExtWarnMSTemplateArg)\n S.Diag(ArgIn->getBeginLoc(), diag::ext_ms_deref_template_argument) << ArgIn->getSourceRange();"}}, [l]={ ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:132:46: warning: non-type template argument containing a dereference operation is a Microsoft extension [-Wmicrosoft-template]"} } }, ["ext_ms_explicit_constructor_call"]={ [j]={z,"microsoft-explicit-constructor-call"}, [k]="microsoft-explicit-constructor-call", [c]="ext_ms_explicit_constructor_call", [d]="explicit constructor calls are a Microsoft extension", [b]="explicit constructor calls are a Microsoft extension", [h]=m, [g]="explicit constructor calls are a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-explicit\\-constructor\\-call[^\\]]*\\]", [e]=n, [i]={"64225794119e",1295327079,"Add support for explicit constructor calls in Microsoft mode.","Add support for explicit constructor calls in Microsoft mode.\nFor example: \n\nclass A{ \npublic:\n A& operator=(const A& that) {\n if (this != &that) {\n this->A::~A();\n this->A::A(that); // <=== explicit constructor call.\n }\n return *this;\n }\n};\n\nMore work will be needed to support an explicit call to a template constructor.\n\nllvm-svn: 123735"}, [a]={{"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 // ...\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);"}}, [l]={ ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:180:25: warning: explicit constructor calls are a Microsoft extension [-Wmicrosoft-explicit-constructor-call]"} } }, ["ext_ms_forward_ref_enum"]={ [j]={z,"microsoft-enum-forward-reference"}, [k]="microsoft-enum-forward-reference", [c]="ext_ms_forward_ref_enum", [d]="forward references to \'enum\' types are a Microsoft extension", [b]="forward references to \'enum\' types are a Microsoft extension", [h]=m, [g]="forward references to \'enum\' types are a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-enum\\-forward\\-reference[^\\]]*\\]", [e]=n, [i]={"488b4a7d943b",1284268015,"Add basic support for Microsoft enum forward declaration. ","Add basic support for Microsoft enum forward declaration. \nAssigning an underlying integral type to an enum forward declaration will come in a next patch.\n\nllvm-svn: 113716"}, [a]={{p,17512,"CreateNewDecl:\n // ...\n if (Kind == TTK_Enum) {\n // ...\n // If this is an undefined enum, warn.\n if (TUK != TUK_Definition && !Invalid) {\n // ...\n if (IsFixed && cast<EnumDecl>(New)->isFixed()) {\n // ...\n } else if (PrevDecl && (Def = cast<EnumDecl>(PrevDecl)->getDefinition())) {\n // ...\n } else {\n // ...\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_ms_forward_ref_enum;"}}, [l]={ ["clang/test/SemaTemplate/enum-forward.cpp"]={"clang/test/SemaTemplate/enum-forward.cpp:5:8: warning: forward references to \'enum\' types are a Microsoft extension [-Wmicrosoft-enum-forward-reference]"} } }, ["ext_ms_impcast_fn_obj"]={ [j]={z,"microsoft-cast"}, [k]="microsoft-cast", [c]="ext_ms_impcast_fn_obj", [d]="implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension", [b]="implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension", [h]=m, [g]="implicit conversion between pointer\\-to\\-function and pointer\\-to\\-object is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-cast[^\\]]*\\]", [e]=n, [i]={"6bf02820bced",1446280934,"[MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff -fms-compatibilit...","[MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff -fms-compatibility\n\nWe permit implicit conversion from pointer-to-function to\npointer-to-object when -fms-extensions is specified. This is rather\nunfortunate, move this into -fms-compatibility and only permit it within\nsystem headers unless -Wno-error=microsoft-cast is specified.\n\nllvm-svn: 251738"}, [a]={{Ac,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 // ...\n if (const PointerType *ToPtrType = ToType->getAs<PointerType>()) {\n if (const PointerType *FromPtrType = FromType->getAs<PointerType>()) {\n // ...\n if (Diagnose && !IsCStyleOrFunctionalCast && FromPointeeType->isFunctionType() && ToPointeeType->isVoidType()) {\n // ...\n Diag(From->getExprLoc(), diag::ext_ms_impcast_fn_obj) << From->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:324:14: warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:325:14: warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:326:14: warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]"} } }, ["ext_ms_reserved_user_defined_literal"]={ [j]={"reserved-user-defined-literal"}, [k]="reserved-user-defined-literal", [c]="ext_ms_reserved_user_defined_literal", [d]="invalid suffix on literal; C++11 requires a space between literal and identifier", [b]="invalid suffix on literal; C++11 requires a space between literal and identifier", [h]=m, [g]="invalid suffix on literal; C\\+\\+11 requires a space between literal and identifier", [f]=" \\[(?:\\-Werror,)?\\-Wreserved\\-user\\-defined\\-literal[^\\]]*\\]", [e]=u, [i]={"7ebc4c191058",1333840163,"ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_re...","ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_reserved_user_defined_literal that doesn\'t default to Error; otherwise MSVC headers won\'t parse. \n\nFixes PR12383.\n\nllvm-svn: 154273"}, [a]={{db,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 // ...\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 // ...\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"]={ [j]={z,"microsoft-sealed"}, [k]="microsoft-sealed", [c]="ext_ms_sealed_keyword", [d]="\'sealed\' keyword is a Microsoft extension", [b]="\'sealed\' keyword is a Microsoft extension", [h]=m, [g]="\'sealed\' keyword is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-sealed[^\\]]*\\]", [e]=s, [i]={"a543308ce556",1382056411,"[-fms-extensions] Permit \'override\' in C++98 and \'sealed\' as a synonym for \'final\'","[-fms-extensions] Permit \'override\' in C++98 and \'sealed\' as a synonym for \'final\'\n\nSummary: Some MS headers use these features.\n\nReviewers: rnk, rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1948\n\nllvm-svn: 192936"}, [a]={{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 // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n // ...\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 // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Final)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Sealed)\n Diag(FinalLoc, diag::ext_ms_sealed_keyword);"}}, [l]={ ["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:454:33: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:459:19: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:475:33: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:490:39: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:508:30: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]"} } }, ["ext_ms_static_assert"]={ [j]={z,"microsoft-static-assert"}, [k]="microsoft-static-assert", [c]={{nil,C,"ext_ms_static_assert"}}, [d]={{nil,C,"use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension"}}, [b]={{nil,C,"use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension"}}, [h]=m, [g]="use of \'static_assert\' without inclusion of \\<assert\\.h\\> is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-static\\-assert[^\\]]*\\]", [e]={{nil,C,s}}, [i]={Fc,1612659633,wc,Gc}, [a]={{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 // ...\n if (Tok.is(tok::kw_static_assert)) {\n if (!getLangOpts().CPlusPlus) {\n if (getLangOpts().C2x)\n // ...\n else\n Diag(Tok, diag::ext_ms_static_assert) << FixItHint::CreateReplacement(Tok.getLocation(), \"_Static_assert\");"}}, [l]={ ["clang/test/Sema/static-assert.c"]={"clang/test/Sema/static-assert.c:16:1: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]","clang/test/Sema/static-assert.c:24:3: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]","clang/test/Sema/static-assert.c:37:3: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]","clang/test/Sema/static-assert.c:72:1: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]"} } }, ["ext_ms_template_spec_redecl_out_of_scope"]={ [j]={z,Q}, [k]=Q, [c]="ext_ms_template_spec_redecl_out_of_scope", [d]={{nil,tc,"%select{class template|class template partial|variable template|variable template partial|function template|member function|static data member|member class|member enumeration}0 specialization of %1 not in %select{a namespace enclosing %2|class %2 or an enclosing namespace}3 is a Microsoft extension"},{E,nil,"%select{class template|class template partial|variable template|variable template partial|function template|member function|static data member|member class|member enumeration}0 specialization of %1 outside namespace enclosing %2 is a Microsoft extension"}}, [b]={{nil,tc,{{"class template","class template partial","variable template","variable template partial","function template","member function","static data member","member class","member enumeration"}," specialization of B not in ",{"a namespace enclosing C","class C or an enclosing namespace"}," is a Microsoft extension"}},{E,nil,{{"class template","class template partial","variable template","variable template partial","function template","member function","static data member","member class","member enumeration"}," specialization of B outside namespace enclosing C is a Microsoft extension"}}}, [h]=m, [g]="(?:class template|class template partial|variable template|variable template partial|function template|member function|static data member|member class|member enumeration) specialization of (.*?) not in (?:a namespace enclosing (.*?)|class (.*?) or an enclosing namespace) is a Microsoft extension", [f]=mb, [e]=n, [i]={"0068cb249965",1426836106,"[MSVC] Explicit specializations can be declared in any namespace (fix for http://llvm.org/PR13738)","[MSVC] Explicit specializations can be declared in any namespace (fix for http://llvm.org/PR13738)\n\nMS compiler emits no errors in case of explicit specializations outside declaration enclosing namespaces, even when language extensions are disabled.\nThe patch is to suppress errors and emit extension warnings if explicit specializations are not declared in the corresponding namespaces.\nThis fixes PR13738.\n\nPatch by Alexey Frolov.\n\nDifferential Revision: http://reviews.llvm.org/D8283\n\nllvm-svn: 232800"}, [a]={{H,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 // ...\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 // ...\n else {\n // ...\n if (S.getLangOpts().MicrosoftExt && !DC->isRecord())\n Diag = diag::ext_ms_template_spec_redecl_out_of_scope;"}}, [l]={ ["clang/test/SemaTemplate/ext_ms_template_spec.cpp"]={"clang/test/SemaTemplate/ext_ms_template_spec.cpp:21:10: warning: class template specialization of \'ClassTemplate\' not in a namespace enclosing \'A\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ext_ms_template_spec.cpp:24:10: warning: class template partial specialization of \'ClassTemplatePartial\' not in a namespace enclosing \'A\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ext_ms_template_spec.cpp:27:19: warning: member class specialization of \'MemberClass\' not in class \'X\' or an enclosing namespace is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ext_ms_template_spec.cpp:30:17: warning: member enumeration specialization of \'MemberEnumeration\' not in class \'X\' or an enclosing namespace is a Microsoft extension [-Wmicrosoft-template]"} } }, ["ext_ms_template_type_arg_missing_typename"]={ [j]={z,Q}, [k]=Q, [c]="ext_ms_template_type_arg_missing_typename", [d]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", [b]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", [h]=m, [g]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", [f]=mb, [e]=n, [i]={"377c1592f8d3",1402442988,"Recover from missing typenames on template args for MSVC compatibility","Recover from missing typenames on template args for MSVC compatibility\n\nWhile matching a non-type template argument against a known template\ntype parameter we now modify the AST\'s TemplateArgumentLoc to assume the\nuser wrote typename. Under -fms-compatibility, we downgrade our\ndiagnostic from an error to an extwarn.\n\nReviewed by: rsmith\n\nDifferential Revision: http://reviews.llvm.org/D4049\n\nllvm-svn: 210607"}, [a]={{H,5254,"bool Sema::CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, TemplateArgumentLoc &AL, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted) {\n // ...\n case TemplateArgument::Expression: {\n // ...\n if (auto *II = NameInfo.getName().getAsIdentifierInfo()) {\n // ...\n if (Result.getAsSingle<TypeDecl>() || Result.getResultKind() == LookupResult::NotFoundInCurrentInstantiation) {\n // ...\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 \");"}}, [l]={ ["clang/test/SemaTemplate/typename-specifier.cpp"]={"clang/test/SemaTemplate/typename-specifier.cpp:174:8: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:192:8: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:165:10: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:185:10: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:210:7: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:217:7: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]"} } }, ["ext_ms_using_declaration_inaccessible"]={ [j]={z,"microsoft-using-decl"}, [k]="microsoft-using-decl", [c]="ext_ms_using_declaration_inaccessible", [d]="using declaration referring to inaccessible member \'%0\' (which refers to accessible member \'%1\') is a Microsoft compatibility extension", [b]="using declaration referring to inaccessible member \'A\' (which refers to accessible member \'B\') is a Microsoft compatibility extension", [h]=m, [g]="using declaration referring to inaccessible member \'(.*?)\' \\(which refers to accessible member \'(.*?)\'\\) is a Microsoft compatibility extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-using\\-decl[^\\]]*\\]", [e]=n, [i]={"e434590bd90d",1325195853,"Change the diagnostics which said \'accepted as an extension\' to instead say","Change the diagnostics which said \'accepted as an extension\' to instead say\n\'is an extension\'. The former is inappropriate and confusing when building with\n-Werror/-pedantic-errors.\n\nllvm-svn: 147357"}, [a]={{Mb,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 // ...\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();"}}, [l]={ ["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:167:12: warning: using declaration referring to inaccessible member \'ms_using_declaration_bug::B::f\' (which refers to accessible member \'ms_using_declaration_bug::A::f\') is a Microsoft compatibility extension [-Wmicrosoft-using-decl]"} } }, ["ext_multi_line_line_comment"]={ [j]={bb,ib,"comment","comments",gb,o}, [k]="comment", [c]="ext_multi_line_line_comment", [d]="multi-line // comment", [b]="multi-line // comment", [h]=m, [g]="multi\\-line \\/\\/ comment", [f]=" \\[(?:\\-Werror,)?\\-Wcomment[^\\]]*\\]", [e]=u, [i]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/","s/BCPLComment/LineComment/\n\nllvm-svn: 167690"}, [a]={{db,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 // ...\n while (true) {\n // ...\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 // ...\n if (!isLexingRawMode())\n Diag(OldPtr - 1, diag::ext_multi_line_line_comment);"}} }, ["ext_multi_using_declaration"]={ [j]={N,jb}, [k]=N, [c]="ext_multi_using_declaration", [d]="use of multiple declarators in a single using declaration is a C++1z extension", [b]="use of multiple declarators in a single using declaration is a C++1z extension", [h]=m, [g]="use of multiple declarators in a single using declaration is a C\\+\\+17 extension", [f]=kb, [e]=s, [i]={"6f1daa4660ed",1481849928,"[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration.","[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration.\n\nllvm-svn: 289905"}, [a]={{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 // ...\n if (DeclsInGroup.size() > 1)\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx17_compat_multi_using_declaration : diag::ext_multi_using_declaration);"}}, [l]={ ["clang/test/Parser/cxx0x-keyword-attributes.cpp"]={"clang/test/Parser/cxx0x-keyword-attributes.cpp:144:51: warning: use of multiple declarators in a single using declaration is a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx0x-keyword-attributes.cpp:155:105: warning: use of multiple declarators in a single using declaration is a C++17 extension [-Wc++17-extensions]"} } }, ["ext_mutable_reference"]={ [j]={z,"microsoft-mutable-reference"}, [k]="microsoft-mutable-reference", [c]="ext_mutable_reference", [d]="\'mutable\' on a reference type is a Microsoft extension", [b]="\'mutable\' on a reference type is a Microsoft extension", [h]=m, [g]="\'mutable\' on a reference type is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-mutable\\-reference[^\\]]*\\]", [e]=n, [i]={"8f01bb983c2a",1423025132,"[MSVC2012] Allow \'mutable\' references","[MSVC2012] Allow \'mutable\' references\nSome standard header files from MSVC2012 use \'mutable\' on references, though it is directly prohibited by the standard.\nFix for http://llvm.org/PR22444\nDifferential Revision: http://reviews.llvm.org/D7370\n\nllvm-svn: 228113"}, [a]={{p,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 // ...\n // Check that \'mutable\' is consistent with the type of the declaration.\n if (!InvalidDecl && Mutable) {\n // ...\n if (T->isReferenceType())\n DiagID = getLangOpts().MSVCCompat ? diag::ext_mutable_reference : diag::err_mutable_reference;"},{p,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 // ...\n // Check that \'mutable\' is consistent with the type of the declaration.\n if (!InvalidDecl && Mutable) {\n // ...\n if (DiagID) {\n // ...\n if (DiagID != diag::ext_mutable_reference) {"}}, [l]={ ["clang/test/SemaCXX/ms_mutable_reference_member.cpp"]={"clang/test/SemaCXX/ms_mutable_reference_member.cpp:4:3: warning: \'mutable\' on a reference type is a Microsoft extension [-Wmicrosoft-mutable-reference]"} } }, ["ext_named_variadic_macro"]={ [j]={o,dc}, [k]=dc, [c]="ext_named_variadic_macro", [d]="named variadic macros are a GNU extension", [b]="named variadic macros are a GNU extension", [h]=m, [g]="named variadic macros are a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{T,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 // ...\n while (true) {\n // ...\n default:\n // ...\n case tok::ellipsis: // #define X(A... -> GCC extension\n // ...\n Diag(Tok, diag::ext_named_variadic_macro);"}} }, ["ext_nested_name_member_ref_lookup_ambiguous"]={ [j]={"ambiguous-member-template"}, [k]="ambiguous-member-template", [c]="ext_nested_name_member_ref_lookup_ambiguous", [d]="lookup of %0 in member access expression is ambiguous; using member of %1", [b]="lookup of A in member access expression is ambiguous; using member of B", [h]=m, [g]="lookup of (.*?) in member access expression is ambiguous; using member of (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wambiguous\\-member\\-template[^\\]]*\\]", [e]=n, [i]={"2f96e9f5c90d",1275701997,"Add an extension to avoid an error when a global template has the same name as","Add an extension to avoid an error when a global template has the same name as\na member template, and you try to call the member template with an explicit\ntemplate argument. See PR7247 \n\nFor example, this downgrades the error to a warning in:\n\ntemplate<typename T> struct set{};\nstruct Value {\n template<typename T>\n void set(T value) {\n }\n};\nvoid foo() {\n Value v;\n v.set<double>(3.2); // Warning here.\n}\n\nllvm-svn: 105518"}, [a]={{H,605,"bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate, AssumedTemplateKind *ATK, bool AllowTypoCorrection) {\n // ...\n if (S && !ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (FoundOuter.empty()) {\n // ...\n } else if (FoundOuter.isAmbiguous() || !FoundOuter.isSingleResult() || !(OuterTemplate = getAsTemplateNameDecl(FoundOuter.getFoundDecl()))) {\n // ...\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;"}}, [l]={ ["clang/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp:47:7: warning: lookup of \'set\' in member access expression is ambiguous; using member of \'Value\' [-Wambiguous-member-template]"} } }, ["ext_nested_name_spec_is_enum"]={ [j]={P,y}, [k]=y, [c]="ext_nested_name_spec_is_enum", [d]="use of enumeration in a nested name specifier is a C++11 extension", [b]="use of enumeration in a nested name specifier is a C++11 extension", [h]=m, [g]="use of enumeration in a nested name specifier is a C\\+\\+11 extension", [f]=R, [e]=n, [i]={"25a8afa9579e",1421611475,"Handle unscoped enumeration in nested name specifier.","Handle unscoped enumeration in nested name specifier.\n\nIf an unscoped enum is used as a nested name specifier and the language dialect\nis not C++ 11, issue an extension warning.\nThis fixes PR16951.\n\nDifferential Revision: http://reviews.llvm.org/D6389\n\nllvm-svn: 226413"}, [a]={{"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 // ...\n if (!AcceptSpec && IsExtension) {\n // ...\n Diag(IdInfo.IdentifierLoc, diag::ext_nested_name_spec_is_enum);"}}, [l]={ ["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:119:14: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:428:16: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:430:16: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:433:16: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:440:12: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:441:12: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]"} } }, ["ext_nested_namespace_definition"]={ [j]={N,jb}, [k]=N, [c]="ext_nested_namespace_definition", [d]="nested namespace definition is a C++1z extension; define each namespace separately", [b]="nested namespace definition is a C++1z extension; define each namespace separately", [h]=m, [g]="nested namespace definition is a C\\+\\+17 extension; define each namespace separately", [f]=kb, [e]=s, [i]={"13307f5f2429",1415425054,"[c++1z] Implement nested-namespace-definitions.","[c++1z] Implement nested-namespace-definitions.\n\nThis allows \'namespace A::B { ... }\' as a shorthand for \'namespace A {\nnamespace B { ... } }\'. We already supported this correctly for error recovery;\npromote that support to a full implementation.\n\nThis is not the right implementation: we do not maintain source fidelity\nbecause we desugar the nested namespace definition in the parser. This is\ntricky to avoid, since the definition genuinely does inject one named\nentity per level in the namespace name.\n\nllvm-svn: 221574"}, [a]={{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 // ...\n if (ExtraNSs.empty()) {\n // ...\n } else if (InlineLoc.isValid()) {\n // ...\n } else if (getLangOpts().CPlusPlus20) {\n // ...\n } else if (getLangOpts().CPlusPlus17) {\n // ...\n } else {\n // ...\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 // ...\n if (ExtraNSs.empty()) {\n // ...\n } else if (InlineLoc.isValid()) {\n // ...\n } else if (getLangOpts().CPlusPlus20) {\n // ...\n } else if (getLangOpts().CPlusPlus17) {\n // ...\n } else {\n // ...\n if (!rBraceToken.is(tok::r_brace)) {\n // ...\n } else {\n // ...\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);"}}, [l]={ ["clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp"]={"clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:19:17: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]","clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:26:17: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]","clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:36:17: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]"} } }, ["ext_nested_pointer_qualifier_mismatch"]={ [j]={Bc,"incompatible-pointer-types-discards-qualifiers"}, [k]="incompatible-pointer-types-discards-qualifiers", [c]="ext_nested_pointer_qualifier_mismatch", [d]="%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 discards qualifiers in nested pointer types", [b]={{nil,nil,{{{{vb,Kb}},{{xb,wb}},{{tb,Ab}},{{Bb,Db}},{{Eb,Fb}},{{Gb,Hb}},{{Ib,Jb}}}," discards qualifiers in nested pointer types"}}}, [h]=m, [g]="(?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types)) discards qualifiers in nested pointer types", [f]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types\\-discards\\-qualifiers[^\\]]*\\]", [e]=n, [i]={"b98dade25bc9",1257804997,"Changed error for nested type qualifier mismatch to","Changed error for nested type qualifier mismatch to\nwarning, to match gcc. It used to be warning, so\nbetter keep it a warning (it broke a certain project).\n\nllvm-svn: 86597"}, [a]={{"clang/lib/Sema/SemaCast.cpp",2678,"void CastOperation::checkAddressSpaceCast(QualType SrcType, QualType DestType) {\n // ...\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 // ...\n while (isa<PointerType>(DestPtr) && isa<PointerType>(SrcPtr)) {\n // ...\n DiagID = diag::ext_nested_pointer_qualifier_mismatch;"},{r,17644,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatibleNestedPointerQualifiers:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_nested_pointer_qualifier_mismatch;"}}, [l]={ ["clang/test/Sema/pointer-conversion.c"]={"clang/test/Sema/pointer-conversion.c:4:15: warning: initializing \'const char **\' with an expression of type \'char **\' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]","clang/test/Sema/pointer-conversion.c:7:11: warning: initializing \'dchar ***\' (aka \'char ***\') with an expression of type \'const char ***\' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]","clang/test/Sema/pointer-conversion.c:10:9: warning: initializing \'char **\' with an expression of type \'volatile char **\' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]"} } }, ["ext_new_paren_array_nonconst"]={ [c]="ext_new_paren_array_nonconst", [d]="when type is in parentheses, array cannot have dynamic size", [b]="when type is in parentheses, array cannot have dynamic size", [h]=m, [g]="when type is in parentheses, array cannot have dynamic size", [f]=yb, [e]=n, [i]={"f2753b3b4efb",1279036472,"Downgrade the \"when type is in parentheses, array cannot have dynamic","Downgrade the \"when type is in parentheses, array cannot have dynamic\nsize\" error for code like \n\n new (int [size])\n\nto a warning, add a Fix-It to remove the parentheses, and make this\ndiagnostic work properly when it occurs in a template\ninstantiation. <rdar://problem/8018245>.\n\nllvm-svn: 108242"}, [a]={{Cb,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 // ...\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n // ...\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 // ...\n } else if (TypeIdParens.isValid()) {\n // ...\n Diag((*ArraySize)->getBeginLoc(), diag::ext_new_paren_array_nonconst) << (*ArraySize)->getSourceRange() << FixItHint::CreateRemoval(TypeIdParens.getBegin()) << FixItHint::CreateRemoval(TypeIdParens.getEnd());"}}, [l]={ ["clang/test/SemaCXX/new-delete.cpp"]={"clang/test/SemaCXX/new-delete.cpp:108:18: warning: when type is in parentheses, array cannot have dynamic size","clang/test/SemaCXX/new-delete.cpp:402:21: warning: when type is in parentheses, array cannot have dynamic size"} } }, ["ext_no_declarators"]={ [j]={oc}, [k]=oc, [c]="ext_no_declarators", [d]="declaration does not declare anything", [b]="declaration does not declare anything", [h]=m, [g]="declaration does not declare anything", [f]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", [e]=n, [i]={"f19ac0ede900",1270762403,"Downgrade the \"declaration does not declare anything\" error to a","Downgrade the \"declaration does not declare anything\" error to a\nwarning. It\'s not harmful to have such pointless declarations, and GCC\ndoes not diagnose this issue consistently.\n\nllvm-svn: 100814"}, [a]={{p,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 // ...\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 // ...\n Diag(DS.getBeginLoc(), (IsExplicitInstantiation || !TemplateParams.empty()) ? diag::err_no_declarators : diag::ext_no_declarators) << DS.getSourceRange();"},{p,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 // ...\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();"}}, [l]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:116:3: warning: declaration does not declare anything [-Wmissing-declarations]"} } }, ["ext_no_named_members_in_struct_union"]={ [j]={B,ic,o}, [k]=ic, [c]="ext_no_named_members_in_struct_union", [d]="%select{struct|union}0 without named members is a GNU extension", [b]={{nil,nil,{{Ub,kc}," without named members is a GNU extension"}}}, [h]=m, [g]="(?:struct|union) without named members is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-empty\\-struct[^\\]]*\\]", [e]=n, [i]={"89578fd43981",1370698198,"Recognition of empty structures and unions is moved to semantic stage","Recognition of empty structures and unions is moved to semantic stage\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D586\n\nllvm-svn: 183609"}, [a]={{p,19136,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n // Okay, we successfully defined \'Record\'.\n if (Record) {\n // ...\n if (CheckForZeroSize) {\n // ...\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();"}}, [l]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:114:1: warning: struct without named members is a GNU extension [-Wgnu-empty-struct]"} } }, ["ext_no_newline_eof"]={ [j]={"newline-eof",o}, [k]="newline-eof", [c]="ext_no_newline_eof", [d]="no newline at end of file", [b]="no newline at end of file", [h]=m, [g]="no newline at end of file", [f]=" \\[(?:\\-Werror,)?\\-Wnewline\\-eof[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{db,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 // ...\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 // ...\n if (LangOpts.CPlusPlus11) {\n // ...\n } else {\n DiagID = diag::ext_no_newline_eof;"}} }, ["ext_non_c_like_anon_struct_in_typedef"]={ [j]={"non-c-typedef-for-linkage"}, [k]="non-c-typedef-for-linkage", [c]={{nil,q,"ext_non_c_like_anon_struct_in_typedef"}}, [d]={{nil,q,"anonymous non-C-compatible type given name for linkage purposes by %select{typedef|alias}0 declaration; add a tag name here"}}, [b]={{nil,q,{"anonymous non-C-compatible type given name for linkage purposes by ",{"typedef","alias"}," declaration; add a tag name here"}}}, [h]=m, [g]="anonymous non\\-C\\-compatible type given name for linkage purposes by (?:typedef|alias) declaration; add a tag name here", [f]=" \\[(?:\\-Werror,)?\\-Wnon\\-c\\-typedef\\-for\\-linkage[^\\]]*\\]", [e]={{nil,q,n}}, [i]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, [a]={{p,5011,"void Sema::setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD) {\n // ...\n if (NonCLike || ChangesLinkage) {\n // ...\n unsigned DiagID = diag::ext_non_c_like_anon_struct_in_typedef;"}}, [l]={ ["clang/test/SemaCXX/warn-unused-local-typedef.cpp"]={"clang/test/SemaCXX/warn-unused-local-typedef.cpp:111:17: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]","clang/test/SemaCXX/warn-unused-local-typedef.cpp:116:20: warning: anonymous non-C-compatible type given name for linkage purposes by alias declaration; add a tag name here [-Wnon-c-typedef-for-linkage]"} } }, ["ext_nonclass_type_friend"]={ [j]={P,y}, [k]=y, [c]="ext_nonclass_type_friend", [d]="non-class friend type %0 is a C++11 extension", [b]="non-class friend type A is a C++11 extension", [h]=m, [g]="non\\-class friend type (.*?) is a C\\+\\+11 extension", [f]=R, [e]=n, [i]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:","Improve handling of friend types in several ways:\n - When instantiating a friend type template, perform semantic\n analysis on the resulting type.\n - Downgrade the errors concerning friend type declarations that do\n not refer to classes to ExtWarns in C++98/03. C++0x allows\n practically any type to be befriended, and ignores the friend\n declaration if the type is not a class.\n\nllvm-svn: 100635"}, [a]={{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 // ...\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 // ...\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 // ...\n } else {\n Diag(FriendLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_nonclass_type_friend : diag::ext_nonclass_type_friend) << T << TypeRange;"}}, [l]={ ["clang/test/CXX/class.access/class.friend/p2-cxx03.cpp"]={"clang/test/CXX/class.access/class.friend/p2-cxx03.cpp:6:3: warning: non-class friend type \'T\' is a C++11 extension [-Wc++11-extensions]"} } }, ["ext_nonstandard_escape"]={ [j]={o}, [k]=o, [c]="ext_nonstandard_escape", [d]="use of non-standard escape character \'\\%0\'", [b]="use of non-standard escape character \'\\A\'", [h]=m, [g]="use of non\\-standard escape character \'\\\\(.*?)\'", [f]=M, [e]=u, [i]={v,1236199783,w,x}, [a]={{pb,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 // ...\n case \'e\':\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_nonstandard_escape) << \"e\";"},{pb,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 // ...\n case \'E\':\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_nonstandard_escape) << \"E\";"},{pb,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 // ...\n case \'(\':\n case \'{\':\n case \'[\':\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);"}}, [l]={ ["clang/test/Lexer/char-escapes.c"]={"clang/test/Lexer/char-escapes.c:10:11: warning: use of non-standard escape character \'\\e\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:11:11: warning: use of non-standard escape character \'\\E\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:19:11: warning: use of non-standard escape character \'\\(\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:20:11: warning: use of non-standard escape character \'\\{\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:21:11: warning: use of non-standard escape character \'\\[\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:22:11: warning: use of non-standard escape character \'\\%\' [-Wpedantic]"} } }, ["ext_nonstatic_member_init"]={ [j]={P,y}, [k]=y, [c]="ext_nonstatic_member_init", [d]={{nil,X,"default member initializer for non-static data member is a C++11 extension"},{Yb,nil,"in-class initialization of non-static data member is a C++11 extension"}}, [b]={{nil,X,"default member initializer for non-static data member is a C++11 extension"},{Yb,nil,"in-class initialization of non-static data member is a C++11 extension"}}, [h]=m, [g]="default member initializer for non\\-static data member is a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"bffe88027cc2",1318650917,"Rename an ExtWarn to ext_ for consistency.","Rename an ExtWarn to ext_ for consistency.\n\nllvm-svn: 142049"}, [a]={{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 // ...\n while (true) {\n // ...\n // Handle the initializer.\n if (HasInClassInit != ICIS_NoInit) {\n // ...\n Diag(Tok, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_nonstatic_member_init : diag::ext_nonstatic_member_init);"}}, [l]={ ["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:45:9: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]"} } }, ["ext_noreturn_main"]={ [j]={fc}, [k]=fc, [c]="ext_noreturn_main", [d]="\'main\' is not allowed to be declared _Noreturn", [b]="\'main\' is not allowed to be declared _Noreturn", [h]=m, [g]="\'main\' is not allowed to be declared _Noreturn", [f]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", [e]=n, [i]={"0015f0987792",1358460971,"Parsing support for C11\'s _Noreturn keyword. No semantics yet.","Parsing support for C11\'s _Noreturn keyword. No semantics yet.\n\nllvm-svn: 172761"}, [a]={{p,12085,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (DS.isNoreturnSpecified()) {\n // ...\n Diag(NoreturnLoc, diag::ext_noreturn_main);"}}, [l]={ ["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:27:1: warning: \'main\' is not allowed to be declared _Noreturn [-Wmain]"} } }, ["ext_ns_enum_attribute"]={ [j]={N,jb,o}, [k]=N, [c]={{nil,E,"ext_ns_enum_attribute"}}, [d]={{nil,E,"attributes on %select{a namespace|an enumerator}0 declaration are a C++17 extension"}}, [b]={{nil,E,{"attributes on ",{"a namespace","an enumerator"}," declaration are a C++17 extension"}}}, [h]=m, [g]="attributes on (?:a namespace|an enumerator) declaration are a C\\+\\+17 extension", [f]=kb, [e]={{nil,E,s}}, [i]={"40e202f7d996",1507942584,"Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature.","Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature.\n\nllvm-svn: 315784"}, [a]={{W,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 // ...\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // ...\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 // ...\n auto ReadAttributes = [&] {\n // ...\n do {\n // ...\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*/;"}}, [l]={ ["clang/test/Parser/cxx0x-keyword-attributes.cpp"]={"clang/test/Parser/cxx0x-keyword-attributes.cpp:127:11: warning: attributes on a namespace declaration are a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx0x-keyword-attributes.cpp:188:9: warning: attributes on an enumerator declaration are a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx0x-keyword-attributes.cpp:344:11: warning: attributes on a namespace declaration are a C++17 extension [-Wc++17-extensions]"} } }, ["ext_nullability"]={ [j]={"nullability-extension",o}, [k]="nullability-extension", [c]="ext_nullability", [d]="type nullability specifier %0 is a Clang extension", [b]="type nullability specifier A is a Clang extension", [h]=m, [g]="type nullability specifier (.*?) is a Clang extension", [f]=" \\[(?:\\-Werror,)?\\-Wnullability\\-extension[^\\]]*\\]", [e]=s, [i]={"261a89b0f70b",1434736265,"Introduce type nullability specifiers for C/C++.","Introduce type nullability specifiers for C/C++.\n\nIntroduces the type specifiers __nonnull, __nullable, and\n__null_unspecified that describe the nullability of the pointer type\nto which the specifier appertains. Nullability type specifiers improve\non the existing nonnull attributes in a few ways:\n - They apply to types, so one can represent a pointer to a non-null\n pointer, use them in function pointer types, etc.\n - As type specifiers, they are syntactically more lightweight than\n __attribute__s or [[attribute]]s.\n - They can express both the notion of \'should never be null\' and\n also \'it makes sense for this to be null\', and therefore can more\n easily catch errors of omission where one forgot to annotate the\n nullability of a particular pointer (this will come in a subsequent\n patch).\n\nNullability type specifiers are maintained as type sugar, and\ntherefore have no effect on mangling, encoding, overloading,\netc. Nonetheless, they will be used for warnings about, e.g., passing\n\'null\' to a method that does not accept it.\n\nThis is the C/C++ part of rdar://problem/18868820.\n\nllvm-svn: 240146"}, [a]={{W,969,"void Parser::ParseNullabilityTypeSpecifiers(ParsedAttributes &attrs) {\n // Treat these like attributes, even though they\'re type specifiers.\n while (true) {\n // ...\n case tok::kw__Nonnull:\n case tok::kw__Nullable:\n case tok::kw__Nullable_result:\n case tok::kw__Null_unspecified: {\n // ...\n if (!getLangOpts().ObjC)\n Diag(AttrNameLoc, diag::ext_nullability) << AttrName;"}}, [l]={ ["clang/test/Parser/nullability.c"]={"clang/test/Parser/nullability.c:3:1: warning: type nullability specifier \'_Nonnull\' is a Clang extension [-Wnullability-extension]"} } }, ["ext_offsetof_non_pod_type"]={ [j]={"invalid-offsetof"}, [k]="invalid-offsetof", [c]="ext_offsetof_non_pod_type", [d]="offset of on non-POD type %0", [b]="offset of on non-POD type A", [h]=m, [g]="offset of on non\\-POD type (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Winvalid\\-offsetof[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{r,16678,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n // ...\n for (const OffsetOfComponent &OC : Components) {\n // ...\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 // ...\n unsigned DiagID = LangOpts.CPlusPlus11 ? diag::ext_offsetof_non_standardlayout_type : diag::ext_offsetof_non_pod_type;"}}, [l]={ ["clang/test/SemaCXX/offsetof.cpp"]={"clang/test/SemaCXX/offsetof.cpp:13:11: warning: offset of on non-POD type \'P\' [-Winvalid-offsetof]","clang/test/SemaCXX/offsetof.cpp:18:9: warning: offset of on non-POD type \'Derived\' [-Winvalid-offsetof]","clang/test/SemaCXX/offsetof.cpp:82:22: warning: offset of on non-POD type \'Derived\' [-Winvalid-offsetof]"} } }, ["ext_offsetof_non_standardlayout_type"]={ [j]={"invalid-offsetof"}, [k]="invalid-offsetof", [c]="ext_offsetof_non_standardlayout_type", [d]="offset of on non-standard-layout type %0", [b]="offset of on non-standard-layout type A", [h]=m, [g]="offset of on non\\-standard\\-layout type (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Winvalid\\-offsetof[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{r,16657,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n // ...\n for (const OffsetOfComponent &OC : Components) {\n // ...\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 // ...\n unsigned DiagID = LangOpts.CPlusPlus11 ? diag::ext_offsetof_non_standardlayout_type : diag::ext_offsetof_non_pod_type;"}}, [l]={ ["clang/test/SemaCXX/offsetof-0x.cpp"]={"clang/test/SemaCXX/offsetof-0x.cpp:13:11: warning: offset of on non-standard-layout type \'P\' [-Winvalid-offsetof]"} } }, ["ext_old_implicitly_unsigned_long_cxx"]={ [j]={Dc,cc,Zb}, [k]=cc, [c]="ext_old_implicitly_unsigned_long_cxx", [d]="integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C++98, interpreting as \'unsigned long\'; this literal will %select{have type \'long long\'|be ill-formed}0 in C++11 onwards", [b]={{nil,nil,{"integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C++98, interpreting as \'unsigned long\'; this literal will ",{"have type \'long long\'","be ill-formed"}," in C++11 onwards"}}}, [h]=m, [g]="integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C\\+\\+98, interpreting as \'unsigned long\'; this literal will (?:have type \'long long\'|be ill\\-formed) in C\\+\\+11 onwards", [f]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-compat[^\\]]*\\]", [e]=Rb, [i]={"13234ae40db3",1433800799,"Consider unsigned long for non-u/U decimal literals (C90/C++03)","Consider unsigned long for non-u/U decimal literals (C90/C++03)\n\nSummary:\nThis modifies Clang to reflect that under pre-C99 ISO C, decimal\nconstants may have type `unsigned long` even if they do not contain `u`\nor `U` in their suffix (C90 subclause 6.1.3.2 paragraph 5). The same is\ndone for C++ without C++11 which--because of undefined behaviour--allows\nfor behaviour compatible with ISO C90 in the case of an unsuffixed\ndecimal literal and is otherwise identical to C90 in its treatment of\ninteger literals (C++03 subclause 2.13.1 [lex.icon] paragraph 2).\n\nMessages are added to the `c99-compat` and `c++11-compat` groups to warn\non such literals, since they behave differently under the newer\nstandards.\n\nFixes PR 16678.\n\nTest Plan:\nA new test file is added to exercise both pre-C99/C++11 and C99/C++11-up\non decimal literals with no suffix or suffixes `l`/`L` for both 32-bit\nand 64-bit `long`.\n\nIn the file, 2^31 (being `INT_MAX+1`) is tested for the expected type\nusing `__typeof__` and multiple declarations of the same entity. 2^63\nis similarly tested when it is within the range of `unsigned long`.\n\nPreprocessor arithmetic tests are added to ensure consistency given\nthat Clang (like GCC) uses greater than 32 bits for preprocessor\narithmetic even when `long` and `unsigned long` is 32 bits and a\npre-C99/C++11 mode is in effect.\n\nTests added:\n test/Sema/PR16678.c\n\nReviewers: fraggamuffin, rsmith\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D9794\n\nllvm-svn: 239356"}, [a]={{r,4196,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n } else if (Literal.isFloatingLiteral()) {\n // ...\n } else if (!Literal.isIntegerLiteral()) {\n // ...\n } else {\n // ...\n if (Literal.GetIntegerValue(ResultVal)) {\n // ...\n } else {\n // ...\n // Are long/unsigned long possibilities?\n if (Ty.isNull() && !Literal.isLongLong && !Literal.isSizeT) {\n // ...\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 // ...\n else if (AllowUnsigned)\n // ...\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 // ...\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);"}}, [l]={ ["clang/test/Sema/PR16678.c"]={"clang/test/Sema/PR16678.c:74:19: warning: integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C++98, interpreting as \'unsigned long\'; this literal will be ill-formed in C++11 onwards [-Wc++11-compat]"} } }, ["ext_omp_attributes"]={ [j]={"openmp","openmp-51-extensions"}, [k]="openmp-51-extensions", [c]={{nil,C,"ext_omp_attributes"}}, [d]={{nil,C,"specifying OpenMP directives with [[]] is an OpenMP 5.1 extension"}}, [b]={{nil,C,"specifying OpenMP directives with [[]] is an OpenMP 5.1 extension"}}, [h]=m, [g]="specifying OpenMP directives with \\[\\[\\]\\] is an OpenMP 5\\.1 extension", [f]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-51\\-extensions[^\\]]*\\]", [e]={{nil,C,s}}, [i]={Fc,1612659633,wc,Gc}, [a]={{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 // ...\n if (ScopeName && ScopeName->isStr(\"omp\")) {\n Diag(AttrNameLoc, getLangOpts().OpenMP >= 51 ? diag::warn_omp51_compat_attributes : diag::ext_omp_attributes);"}}, [l]={ ["clang/test/OpenMP/openmp_attribute_compat.cpp"]={"clang/test/OpenMP/openmp_attribute_compat.cpp:17:8: warning: specifying OpenMP directives with [[]] is an OpenMP 5.1 extension [-Wopenmp-51-extensions]"} } }, ["ext_omp_loop_not_canonical_init"]={ [j]={"openmp","openmp-loop-form"}, [k]="openmp-loop-form", [c]="ext_omp_loop_not_canonical_init", [d]="initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\')", [b]="initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\')", [h]=m, [g]="initialization clause of OpenMP for loop is not in canonical form \\(\'var \\= init\' or \'T var \\= init\'\\)", [f]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-loop\\-form[^\\]]*\\]", [e]="OpenMP Issue", [i]={"a8e9d2eccc6e",1401790607,"[OPENMP] Loop canonical form analysis (Sema)","[OPENMP] Loop canonical form analysis (Sema)\n\nThis patch implements semantic analysis to make sure that the loop is in OpenMP canonical form.\nThis is the form required for \'omp simd\', \'omp for\' and other loop pragmas.\n\nDifferential revision: http://reviews.llvm.org/D3778\n\nllvm-svn: 210095"}, [a]={{"clang/lib/Sema/SemaOpenMP.cpp",8200,"bool OpenMPIterationSpaceChecker::checkAndSetInit(Stmt *S, bool EmitDiags) {\n // ...\n if (auto *BO = dyn_cast<BinaryOperator>(S)) {\n // ...\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();"}}, [l]={ ["clang/test/OpenMP/parallel_for_simd_loop_messages.cpp"]={"clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:306:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:393:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:397:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:401:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:405:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:463:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:481:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]"} } }, ["ext_on_off_switch_syntax"]={ [j]={bb,ib,gb,"pragmas",bc}, [k]=bc, [c]="ext_on_off_switch_syntax", [d]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", [b]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", [h]=m, [g]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", [f]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", [e]=u, [i]={"3bffa5293303",1297647744,"Make LexOnOffSwitch a Preprocessor member function","Make LexOnOffSwitch a Preprocessor member function\n\nllvm-svn: 125473"}, [a]={{eb,974,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::ext_on_off_switch_syntax);"},{eb,985,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n // ...\n if (II->isStr(\"ON\"))\n // ...\n else if (II->isStr(\"OFF\"))\n // ...\n else if (II->isStr(\"DEFAULT\"))\n // ...\n else {\n Diag(Tok, diag::ext_on_off_switch_syntax);"}}, [l]={ ["clang/test/Parser/opencl-pragma.cl"]={"clang/test/Parser/opencl-pragma.cl:15:28: warning: expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma [-Wunknown-pragmas]"} } }, ["ext_opencl_double_without_pragma"]={ [j]={o}, [k]=o, [c]={{nil,C,"ext_opencl_double_without_pragma"}}, [d]={{nil,C,"Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported"}}, [b]={{nil,C,"Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported"}}, [h]=m, [g]="Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported", [f]=M, [e]={{nil,C,n}}, [i]={"3dbcea8b957a",1615397021,"Reland [clang] Check unsupported types in expressions","Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"}, [a]={{hb,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 // ...\n case DeclSpec::TST_double:\n // ...\n if (S.getLangOpts().OpenCL) {\n if (!S.getOpenCLOptions().isSupported(\"cl_khr_fp64\", S.getLangOpts()))\n // ...\n else if (!S.getOpenCLOptions().isAvailableOption(\"cl_khr_fp64\", S.getLangOpts()))\n S.Diag(DS.getTypeSpecTypeLoc(), diag::ext_opencl_double_without_pragma);"}}, [l]={ ["clang/test/SemaOpenCL/fp64-fp16-options.cl"]={"clang/test/SemaOpenCL/fp64-fp16-options.cl:61:9: warning: Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported [-Wpedantic]","clang/test/SemaOpenCL/fp64-fp16-options.cl:67:3: warning: Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported [-Wpedantic]","clang/test/SemaOpenCL/fp64-fp16-options.cl:136:3: warning: Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported [-Wpedantic]"} } }, ["ext_opencl_ext_vector_type_rgba_selector"]={ [j]={"opencl-unsupported-rgba"}, [k]="opencl-unsupported-rgba", [c]="ext_opencl_ext_vector_type_rgba_selector", [d]={{nil,fb,"vector component name \'%0\' is a feature from OpenCL version 3.0 onwards"},{C,C,"vector component name \'%0\' is an OpenCL C version 3.0 feature"},{X,nil,"vector component name \'%0\' is an OpenCL version 2.2 feature"}}, [b]={{nil,fb,"vector component name \'A\' is a feature from OpenCL version 3.0 onwards"},{C,C,"vector component name \'A\' is an OpenCL C version 3.0 feature"},{X,nil,"vector component name \'A\' is an OpenCL version 2.2 feature"}}, [h]=m, [g]="vector component name \'(.*?)\' is a feature from OpenCL version 3\\.0 onwards", [f]=" \\[(?:\\-Werror,)?\\-Wopencl\\-unsupported\\-rgba[^\\]]*\\]", [e]=n, [i]={"98eaa62e369d",1469213383,"Add .rgba syntax extension to ext_vector_type types","Add .rgba syntax extension to ext_vector_type types\n\nSummary:\nThis patch enables .rgba accessors to ext_vector_type types and adds\ntests for syntax validation and code generation.\n\n\'a\' and \'b\' can appear either in the point access mode or the numeric\naccess mode (for indices 10 and 11). To disambiguate between the two\nusages, the accessor type is explicitly passed to relevant methods.\n\nReviewers: rsmith\n\nSubscribers: Anastasia, bader, srhines, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D20602\n\nllvm-svn: 276455"}, [a]={{"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 // ...\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 // ...\n } else if (!HexSwizzle && (Idx = vecType->getPointAccessorIdx(*compStr)) != -1) {\n // ...\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 // ...\n S.Diag(OpLoc, diag::ext_opencl_ext_vector_type_rgba_selector) << StringRef(DiagBegin, 1) << SourceRange(CompLoc);"}}, [l]={ ["clang/test/SemaOpenCL/ext_vectors.cl"]={"clang/test/SemaOpenCL/ext_vectors.cl:13:8: warning: vector component name \'a\' is a feature from OpenCL version 3.0 onwards [-Wopencl-unsupported-rgba]","clang/test/SemaOpenCL/ext_vectors.cl:18:8: warning: vector component name \'r\' is a feature from OpenCL version 3.0 onwards [-Wopencl-unsupported-rgba]"} } }, ["ext_operator_new_delete_declared_inline"]={ [j]={"inline-new-delete"}, [k]="inline-new-delete", [c]="ext_operator_new_delete_declared_inline", [d]="replacement function %0 cannot be declared \'inline\'", [b]="replacement function A cannot be declared \'inline\'", [h]=m, [g]="replacement function (.*?) cannot be declared \'inline\'", [f]=" \\[(?:\\-Werror,)?\\-Winline\\-new\\-delete[^\\]]*\\]", [e]=n, [i]={"13dfdc88a9a2",1384562858,"Downgrade the Error on an \'inline\' operator new or delete to an ExtWarn. Some","Downgrade the Error on an \'inline\' operator new or delete to an ExtWarn. Some\nprojects are relying on such (questionable) practices, so we should give them\na way to opt out of this diagnostic.\n\nllvm-svn: 194905"}, [a]={{p,10344,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\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();"}}, [l]={ ["clang/test/CXX/drs/dr412.cpp"]={"clang/test/CXX/drs/dr412.cpp:14:1: error: replacement function \'operator new\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]","clang/test/CXX/drs/dr412.cpp:15:1: error: replacement function \'operator new[]\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]","clang/test/CXX/drs/dr412.cpp:16:1: error: replacement function \'operator delete\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]","clang/test/CXX/drs/dr412.cpp:17:1: error: replacement function \'operator delete[]\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]"} } }, ["ext_operator_overload_static"]={ [j]={"c++23-extensions","c++2b-extensions"}, [k]="c++23-extensions", [c]={{nil,U,"ext_operator_overload_static"}}, [d]="declaring overloaded %0 as \'static\' is a C++23 extension", [b]="declaring overloaded A as \'static\' is a C++23 extension", [h]=m, [g]="declaring overloaded (.*?) as \'static\' is a C\\+\\+23 extension", [f]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+23\\-extensions[^\\]]*\\]", [e]={{nil,U,n}}, [i]={Pb,1625925174,Ob,Nb}, [a]={{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 // ...\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;"}}, [l]={ ["clang/test/SemaCXX/overloaded-operator-decl.cpp"]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:54:17: warning: declaring overloaded \'operator()\' as \'static\' is a C++23 extension [-Wc++23-extensions]"} } }, ["ext_out_of_line_declaration"]={ [j]={"out-of-line-declaration"}, [k]="out-of-line-declaration", [c]="ext_out_of_line_declaration", [d]="out-of-line declaration of a member must be a definition", [b]="out-of-line declaration of a member must be a definition", [h]=F, [g]="out\\-of\\-line declaration of a member must be a definition", [f]=" \\[[^\\]]*\\-Wout\\-of\\-line\\-declaration[^\\]]*\\]", [e]=n, [i]={"9339605c3545",1279254748,"Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.","Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.\n\nllvm-svn: 108505"}, [a]={{p,10576,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else {\n // ...\n if (NewFD->isInvalidDecl()) {\n // ...\n } else if (!D.isRedeclaration()) {\n // ...\n } else if (!D.isFunctionDefinition() && isa<CXXMethodDecl>(NewFD) && NewFD->isOutOfLine() && !isFriend && !isFunctionTemplateSpecialization && !isMemberSpecialization) {\n // ...\n Diag(NewFD->getLocation(), diag::ext_out_of_line_declaration) << D.getCXXScopeSpec().getRange();"}}, [l]={ ["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:107:18: error: out-of-line declaration of a member must be a definition [-Wout-of-line-declaration]"} } }, ["ext_out_of_line_qualified_id_type_names_constructor"]={ [j]={"injected-class-name"}, [k]="injected-class-name", [c]={{nil,sb,"ext_out_of_line_qualified_id_type_names_constructor"}}, [d]={{nil,sb,"ISO C++ specifies that qualified reference to %0 is a constructor name rather than a %select{template name|type}1 in this context, despite preceding %select{\'typename\'|\'template\'}2 keyword"}}, [b]={{nil,sb,{"ISO C++ specifies that qualified reference to A is a constructor name rather than a ",{"template name","type"}," in this context, despite preceding ",{"\'typename\'","\'template\'"}," keyword"}}}, [h]=m, [g]="ISO C\\+\\+ specifies that qualified reference to (.*?) is a constructor name rather than a (?:template name|type) in this context, despite preceding (?:\'typename\'|\'template\') keyword", [f]=" \\[(?:\\-Werror,)?\\-Winjected\\-class\\-name[^\\]]*\\]", [e]={{nil,sb,n}}, [i]={"74f02347ca16",1484859613,"PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).","PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).\n\nUnder this defect resolution, the injected-class-name of a class or class\ntemplate cannot be used except in very limited circumstances (when declaring a\nconstructor, in a nested-name-specifier, in a base-specifier, or in an\nelaborated-type-specifier). This is apparently done to make parsing easier, but\nit\'s a pain for us since we don\'t know whether a template-id using the\ninjected-class-name is valid at the point when we annotate it (we don\'t yet\nknow whether the template-id will become part of an elaborated-type-specifier).\n\nAs a tentative resolution to a perceived language defect, mem-initializer-ids\nare added to the list of exceptions here (they generally follow the same rules\nas base-specifiers).\n\nWhen the reference to the injected-class-name uses the \'typename\' or \'template\'\nkeywords, we permit it to be used to name a type or template as an extension;\nother compilers also accept some cases in this area. There are also a couple of\ncorner cases with dependent template names that we do not yet diagnose, but\nwhich will also get this treatment.\n\nllvm-svn: 292518"}, [a]={{H,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 // ...\n if (!IsCtorOrDtorName && !IsClassName && SS.isSet()) {\n // ...\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*/"},{H,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 // ...\n if (TNK != TNK_Non_template) {\n // ...\n if (!AllowInjectedClassName && SS.isNotEmpty() && LookupRD && Name.getKind() == UnqualifiedIdKind::IK_Identifier && Name.Identifier && LookupRD->getIdentifier() == Name.Identifier) {\n // ...\n Diag(Name.getBeginLoc(), diag::ext_out_of_line_qualified_id_type_names_constructor) << Name.Identifier << 0 /*injected-class-name used as template name*/"},{H,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 // ...\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 // ...\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*/"},{H,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 // ...\n case LookupResult::Found:\n if (TypeDecl *Type = dyn_cast<TypeDecl>(Result.getFoundDecl())) {\n // ...\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*/;"}}, [l]={ ["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:38:47: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'template\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:39:47: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'template\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:61:18: warning: ISO C++ specifies that qualified reference to \'X0\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:62:23: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:81:15: warning: ISO C++ specifies that qualified reference to \'X0\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:88:15: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:89:24: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'template\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:106:17: warning: ISO C++ specifies that qualified reference to \'B\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]"} } }, ["ext_override_control_keyword"]={ [j]={P,y}, [k]=y, [c]="ext_override_control_keyword", [d]="\'%0\' keyword is a C++11 extension", [b]="\'A\' keyword is a C++11 extension", [h]=m, [g]="\'(.*?)\' keyword is a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"5a72fdb05b64",1295737309,"Accept the C++0x override control keywords as an extension in C++98. This is OK since the new syntax...","Accept the C++0x override control keywords as an extension in C++98. This is OK since the new syntax is unambiguous and can\'t be confused with C++98 syntax. If anyone disagrees, please shout!\n\nllvm-svn: 124048"}, [a]={{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 // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Abstract) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_GNU_Final) {\n // ...\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 // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n // ...\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);"}}, [l]={ ["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:15:10: warning: \'final\' keyword is a C++11 extension [-Wc++11-extensions]","clang/test/Parser/cxx0x-in-cxx98.cpp:16:20: warning: \'override\' keyword is a C++11 extension [-Wc++11-extensions]","clang/test/Parser/cxx0x-in-cxx98.cpp:17:20: warning: \'final\' keyword is a C++11 extension [-Wc++11-extensions]"} } }, ["ext_override_exception_spec"]={ [j]={z,rb}, [k]=rb, [c]="ext_override_exception_spec", [d]="exception specification of overriding function is more lax than base version", [b]="exception specification of overriding function is more lax than base version", [h]=m, [g]="exception specification of overriding function is more lax than base version", [f]=Ec, [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{zb,992,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_override_exception_spec;"},{zb,996,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\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());"}}, [l]={ ["clang/test/SemaCXX/nothrow-vs-exception-specs.cpp"]={"clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:88:8: warning: exception specification of overriding function is more lax than base version [-Wmicrosoft-exception-spec]"} } }, ["ext_ovl_ambiguous_oper_binary_reversed"]={ [j]={"ambiguous-reversed-operator"}, [k]="ambiguous-reversed-operator", [c]={{nil,t,"ext_ovl_ambiguous_oper_binary_reversed"}}, [d]={{nil,q,"ISO C++20 considers use of overloaded operator \'%0\' (with operand types %1 and %2) to be ambiguous despite there being a unique best viable function%select{ with non-reversed arguments|}3"},{t,t,"ISO C++20 considers use of overloaded operator \'%0\' (with operand types %1 and %2) to be ambiguous despite there being a unique best viable function"}}, [b]={{nil,q,{"ISO C++20 considers use of overloaded operator \'A\' (with operand types B and C) to be ambiguous despite there being a unique best viable function",{" with non-reversed arguments",A}}},{t,t,"ISO C++20 considers use of overloaded operator \'A\' (with operand types B and C) to be ambiguous despite there being a unique best viable function"}}, [h]=m, [g]="ISO C\\+\\+20 considers use of overloaded operator \'(.*?)\' \\(with operand types (.*?) and (.*?)\\) to be ambiguous despite there being a unique best viable function(?: with non\\-reversed arguments|)", [f]=" \\[(?:\\-Werror,)?\\-Wambiguous\\-reversed\\-operator[^\\]]*\\]", [e]={{nil,t,n}}, [i]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, [a]={{Ac,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 // ...\n case OR_Success: {\n // ...\n if (FnDecl) {\n // ...\n if (AllowRewrittenCandidates && !IsReversed && CandidateSet.getRewriteInfo().isReversible()) {\n // ...\n if (!AmbiguousWith.empty()) {\n // ...\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();"}}, [l]={ ["clang/test/CXX/class/class.compare/class.eq/p2.cpp"]={"clang/test/CXX/class/class.compare/class.eq/p2.cpp:130:45: warning: ISO C++20 considers use of overloaded operator \'==\' (with operand types \'Y\' and \'Y\') to be ambiguous despite there being a unique best viable function [-Wambiguous-reversed-operator]"} } }, ["ext_ovl_rewrite_equalequal_not_bool"]={ [j]={"rewrite-not-bool"}, [k]="rewrite-not-bool", [c]={{nil,q,"ext_ovl_rewrite_equalequal_not_bool"}}, [d]={{nil,q,"ISO C++20 requires return type of selected \'operator==\' function for rewritten \'%1\' comparison to be \'bool\', not %0"}}, [b]={{nil,q,"ISO C++20 requires return type of selected \'operator==\' function for rewritten \'B\' comparison to be \'bool\', not A"}}, [h]=m, [g]="ISO C\\+\\+20 requires return type of selected \'operator\\=\\=\' function for rewritten \'(.*?)\' comparison to be \'bool\', not (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wrewrite\\-not\\-bool[^\\]]*\\]", [e]={{nil,q,n}}, [i]={vc,1576908663,xc,uc}, [a]={{Ac,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 // ...\n case OR_Success: {\n // ...\n if (FnDecl) {\n // ...\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 // ...\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();"}}, [l]={ ["clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp"]={"clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:24:14: warning: ISO C++20 requires return type of selected \'operator==\' function for rewritten \'==\' comparison to be \'bool\', not \'int\' [-Wrewrite-not-bool]","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:28:14: warning: ISO C++20 requires return type of selected \'operator==\' function for rewritten \'==\' comparison to be \'bool\', not \'E\' [-Wrewrite-not-bool]"} } }, ["ext_param_default_argument_redefinition"]={ [j]={z,"microsoft-default-arg-redefinition"}, [k]="microsoft-default-arg-redefinition", [c]="ext_param_default_argument_redefinition", [d]="redefinition of default argument", [b]="redefinition of default argument", [h]=m, [g]="redefinition of default argument", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-default\\-arg\\-redefinition[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{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 // ...\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 // ...\n if (OldParamHasDfl && NewParamHasDfl) {\n // ...\n if (getLangOpts().MicrosoftExt) {\n // ...\n if (MD && MD->getParent()->getDescribedClassTemplate()) {\n // ...\n DiagDefaultParamID = diag::ext_param_default_argument_redefinition;"}}, [l]={ ["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:202:19: warning: redefinition of default argument [-Wmicrosoft-default-arg-redefinition]"} } }, ["ext_param_not_declared"]={ [j]={bb,ib,Qb,"implicit-int",gb}, [k]="implicit-int", [c]="ext_param_not_declared", [d]={{nil,D,"parameter %0 was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int"},{fb,nil,"parameter %0 was not declared, defaulting to type \'int\'"}}, [b]={{nil,D,"parameter A was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int"},{fb,nil,"parameter A was not declared, defaulting to type \'int\'"}}, [h]=F, [g]="parameter (.*?) was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int", [f]=" \\[[^\\]]*\\-Wimplicit\\-int[^\\]]*\\]", [e]=n, [i]={v,1236199783,w,x}, [a]={{p,14993,"void Sema::ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D, SourceLocation LocAfterDecls) {\n // ...\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 // ...\n if (FTI.Params[i].Param == nullptr) {\n if (getLangOpts().C99) {\n // ...\n Diag(FTI.Params[i].IdentLoc, diag::ext_param_not_declared) << FTI.Params[i].Ident << FixItHint::CreateInsertion(LocAfterDecls, Code);"}}, [l]={ ["clang/test/Sema/redefinition.c"]={"clang/test/Sema/redefinition.c:7:9: error: parameter \'x\' was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int [-Wimplicit-int]"} } }, ["ext_param_promoted_not_compatible_with_prototype"]={ [j]={"knr-promoted-parameter"}, [k]="knr-promoted-parameter", [c]="ext_param_promoted_not_compatible_with_prototype", [d]="%diff{promoted type $ of K&R function parameter is not compatible with the parameter type $|promoted type of K&R function parameter is not compatible with parameter type}0,1 declared in a previous prototype", [b]={{nil,nil,{{"promoted type A of K&R function parameter is not compatible with the parameter type B","promoted type of K&R function parameter is not compatible with parameter type"}," declared in a previous prototype"}}}, [h]=m, [g]="(?:promoted type (.*?) of K&R function parameter is not compatible with the parameter type (.*?)|promoted type of K&R function parameter is not compatible with parameter type) declared in a previous prototype", [f]=" \\[(?:\\-Werror,)?\\-Wknr\\-promoted\\-parameter[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{p,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 // ...\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 // ...\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();"}}, [l]={ ["clang/test/Sema/knr-def-call.c"]={"clang/test/Sema/knr-def-call.c:15:18: warning: promoted type \'double\' of K&R function parameter is not compatible with the parameter type \'float\' declared in a previous prototype [-Wknr-promoted-parameter]","clang/test/Sema/knr-def-call.c:29:21: warning: promoted type \'char *\' of K&R function parameter is not compatible with the parameter type \'const char *\' declared in a previous prototype [-Wknr-promoted-parameter]","clang/test/Sema/knr-def-call.c:49:9: warning: promoted type \'int\' of K&R function parameter is not compatible with the parameter type \'short\' declared in a previous prototype [-Wknr-promoted-parameter]"} } }, ["ext_parameter_name_omitted_c2x"]={ [j]={"c2x-extensions"}, [k]="c2x-extensions", [c]={{nil,q,"ext_parameter_name_omitted_c2x"}}, [d]={{nil,q,"omitting the parameter name in a function definition is a C2x extension"}}, [b]={{nil,q,"omitting the parameter name in a function definition is a C2x extension"}}, [h]=m, [g]="omitting the parameter name in a function definition is a C2x extension", [f]=" \\[(?:\\-Werror,)?\\-Wc2x\\-extensions[^\\]]*\\]", [e]={{nil,q,n}}, [i]={vc,1576908663,xc,uc}, [a]={{"clang/lib/Sema/SemaChecking.cpp",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 // ...\n for (ParmVarDecl *Param : Parameters) {\n // ...\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);"},{r,16955,"void Sema::ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope) {\n // ...\n if (ExplicitSignature) {\n for (unsigned I = 0, E = ExplicitSignature.getNumParams(); I != E; ++I) {\n // ...\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);"}}, [l]={ ["clang/test/Sema/function.c"]={"clang/test/Sema/function.c:33:13: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]","clang/test/Sema/function.c:83:23: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]"} } }, ["ext_partial_spec_not_more_specialized_than_primary"]={ [j]={"invalid-partial-specialization"}, [k]="invalid-partial-specialization", [c]="ext_partial_spec_not_more_specialized_than_primary", [d]="%select{class|variable}0 template partial specialization is not more specialized than the primary template", [b]={{nil,nil,{{Xb,yc}," template partial specialization is not more specialized than the primary template"}}}, [h]=F, [g]="(?:class|variable) template partial specialization is not more specialized than the primary template", [f]=" \\[[^\\]]*\\-Winvalid\\-partial\\-specialization[^\\]]*\\]", [e]=n, [i]={"fa4a09d8afbf",1482868989,"Add warning flag for \"partial specialization is not more specialized than primary template\" error (s...","Add warning flag for \"partial specialization is not more specialized than primary template\" error (since Eigen hits it), and while I\'m here also add a warning flag for \"partial specialization is not usable because one or more of its parameters cannot be deduced\" warning.\n\nllvm-svn: 290625"}, [a]={{H,4412,"template <typename PartialSpecDecl> static void checkMoreSpecializedThanPrimary(Sema &S, PartialSpecDecl *Partial) {\n // ...\n S.Diag(Partial->getLocation(), diag::ext_partial_spec_not_more_specialized_than_primary) << isa<VarTemplateDecl>(Template);"}}, [l]={ ["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:9:6: error: variable template partial specialization is not more specialized than the primary template [-Winvalid-partial-specialization]"} } }, ["ext_partial_specs_not_deducible"]={ [j]={"unusable-partial-specialization"}, [k]="unusable-partial-specialization", [c]="ext_partial_specs_not_deducible", [d]="%select{class|variable}0 template partial specialization contains %select{a template parameter|template parameters}1 that cannot be deduced; this partial specialization will never be used", [b]={{nil,nil,{{Xb,yc}," template partial specialization contains ",{"a template parameter","template parameters"}," that cannot be deduced; this partial specialization will never be used"}}}, [h]=F, [g]="(?:class|variable) template partial specialization contains (?:a template parameter|template parameters) that cannot be deduced; this partial specialization will never be used", [f]=" \\[[^\\]]*\\-Wunusable\\-partial\\-specialization[^\\]]*\\]", [e]=n, [i]={"57aae07b4a31",1482892645,"DR1315: a non-type template argument in a partial specialization is permitted","DR1315: a non-type template argument in a partial specialization is permitted\nto make reference to template parameters. This is only a partial\nimplementation; we retain the restriction that the argument must not be\ntype-dependent, since it\'s unclear how that would work given the existence of\nother language rules requiring an exact type match in this context, even for\ntype-dependent cases (a question has been raised on the core reflector).\n\nllvm-svn: 290647"}, [a]={{H,4473,"template <typename PartialSpecDecl> static void checkTemplatePartialSpecialization(Sema &S, PartialSpecDecl *Partial) {\n // ...\n if (!DeducibleParams.all()) {\n // ...\n S.Diag(Partial->getLocation(), diag::ext_partial_specs_not_deducible) << isa<VarTemplatePartialSpecializationDecl>(Partial) << (NumNonDeducible > 1) << SourceRange(Partial->getLocation(), Partial->getTemplateArgsAsWritten()->RAngleLoc);"}}, [l]={ ["clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:39: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:31:65: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:39: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:39: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]"} } }, ["ext_paste_comma"]={ [j]={B,"gnu-zero-variadic-macro-arguments",o}, [k]="gnu-zero-variadic-macro-arguments", [c]="ext_paste_comma", [d]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", [b]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", [h]=m, [g]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-variadic\\-macro\\-arguments[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{"clang/lib/Lex/TokenLexer.cpp",168,"bool TokenLexer::MaybeRemoveCommaBeforeVaArgs(SmallVectorImpl<Token> &ResultToks, bool HasPasteOperator, MacroInfo *Macro, unsigned MacroArgNo, Preprocessor &PP) {\n // ...\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 // ...\n for (unsigned I = 0, E = NumTokens; I != E; ++I) {\n // ...\n if (NumToks) { // Not an empty argument?\n // ...\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 // ...\n PP.Diag(ResultToks.pop_back_val().getLocation(), diag::ext_paste_comma);"}}, [l]={ ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:52:32: warning: token pasting of \',\' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]"} } }, ["ext_plain_complex"]={ [c]="ext_plain_complex", [d]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", [b]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", [h]=m, [g]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", [f]=yb, [e]=n, [i]={v,1236199783,w,x}, [a]={{Cc,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 // ...\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\");"}}, [l]={ ["clang/test/FixIt/fixit-recompile.c"]={"clang/test/FixIt/fixit-recompile.c:4:1: error: plain \'_Complex\' requires a type specifier; assuming \'_Complex double\' [-Werror]"} } }, ["ext_pointer_to_const_ref_member_on_rvalue"]={ [j]={S,qb,o}, [k]=S, [c]={{nil,E,"ext_pointer_to_const_ref_member_on_rvalue"}}, [d]={{nil,t,"invoking a pointer to a \'const &\' member function on an rvalue is a C++20 extension"},{G,E,"invoking a pointer to a \'const &\' member function on an rvalue is a C++2a extension"}}, [b]={{nil,t,"invoking a pointer to a \'const &\' member function on an rvalue is a C++20 extension"},{G,E,"invoking a pointer to a \'const &\' member function on an rvalue is a C++2a extension"}}, [h]=m, [g]="invoking a pointer to a \'const &\' member function on an rvalue is a C\\+\\+20 extension", [f]=nb, [e]={{nil,E,n}}, [i]={"2592327dae05",1503625675,"[c++2a] P0704R1: Allow pointers to const& member functions to be called on rvalues.","[c++2a] P0704R1: Allow pointers to const& member functions to be called on rvalues.\n\nPatch by Blitz Rakete!\n\nllvm-svn: 311744"}, [a]={{Cb,6092,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n // ...\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 // ...\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);"}}, [l]={ ["clang/test/SemaCXX/cxx17-compat.cpp"]={"clang/test/SemaCXX/cxx17-compat.cpp:6:18: warning: invoking a pointer to a \'const &\' member function on an rvalue is a C++20 extension [-Wc++20-extensions]"} } }, ["ext_pp_bad_paste_ms"]={ [j]={"invalid-token-paste"}, [k]="invalid-token-paste", [c]="ext_pp_bad_paste_ms", [d]="pasting formed \'%0\', an invalid preprocessing token", [b]="pasting formed \'A\', an invalid preprocessing token", [h]=F, [g]="pasting formed \'(.*?)\', an invalid preprocessing token", [f]=" \\[[^\\]]*\\-Winvalid\\-token\\-paste[^\\]]*\\]", [e]=u, [i]={"7b1573451eac",1392684350,"Fix a non-error diagnostic that had an err_ name. Also move it from Warning to","Fix a non-error diagnostic that had an err_ name. Also move it from Warning to\nExtWarn, since it\'s an extension.\n\nllvm-svn: 201540"}, [a]={{"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 // ...\n do {\n // ...\n if (LHSTok.isAnyIdentifier() && RHS.isAnyIdentifier()) {\n // ...\n } else {\n // ...\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 // ...\n // Do not emit the error when preprocessing assembler code.\n if (!PP.getLangOpts().AsmPreprocessor) {\n // ...\n PP.Diag(Loc, PP.getLangOpts().MicrosoftExt ? diag::ext_pp_bad_paste_ms : diag::err_pp_bad_paste) << Buffer;"}}, [l]={ ["clang/test/Preprocessor/macro_paste_msextensions.c"]={"clang/test/Preprocessor/macro_paste_msextensions.c:35:1: error: pasting formed \'(baz\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'1a-\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'-b2\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'b2-\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'-3c\', an invalid preprocessing token [-Winvalid-token-paste]"} } }, ["ext_pp_bad_vaargs_use"]={ [j]={o}, [k]=o, [c]="ext_pp_bad_vaargs_use", [d]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", [b]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", [h]=m, [g]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", [f]=M, [e]=u, [i]={v,1236199783,w,x}, [a]={{"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 // ...\n SetPoisonReason(Ident__VA_ARGS__, diag::ext_pp_bad_vaargs_use);"}}, [l]={ ["clang/test/Preprocessor/macro_paste_bad.c"]={"clang/test/Preprocessor/macro_paste_bad.c:33:5: warning: __VA_ARGS__ can only appear in the expansion of a C99 variadic macro [-Wpedantic]"} } }, ["ext_pp_bad_vaopt_use"]={ [j]={dc}, [k]=dc, [c]={{nil,E,"ext_pp_bad_vaopt_use"}}, [d]={{nil,E,"__VA_OPT__ can only appear in the expansion of a variadic macro"}}, [b]={{nil,E,"__VA_OPT__ can only appear in the expansion of a variadic macro"}}, [h]=m, [g]="__VA_OPT__ can only appear in the expansion of a variadic macro", [f]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", [e]={{nil,E,u}}, [i]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)","[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)\n\nThis patch implements an extension to the preprocessor:\n\n__VA_OPT__(contents) --> which expands into its contents if variadic arguments are supplied to the parent macro, or behaves as an empty token if none.\n\n - Currently this feature is only enabled for C++2a (this could be enabled, with some careful tweaks, for other dialects with the appropriate extension or compatibility warnings)\n\n - The patch was reviewed here: https://reviews.llvm.org/D35782 and asides from the above (and moving some of the definition and expansion recognition logic into the corresponding state machines), I believe I incorporated all of Richard\'s suggestions.\n\nA few technicalities (most of which were clarified through private correspondence between rsmith, hubert and thomas) are worth mentioning. Given:\n\n #define F(a,...) a #__VA_OPT__(a ## a) a ## __VA_OPT__(__VA_ARGS__)\n\n - The call F(,) Does not supply any tokens for the variadic arguments and hence VA_OPT behaves as a placeholder.\n - When expanding VA_OPT (for e.g. F(,1) token pasting occurs eagerly within its contents if the contents need to be stringified.\n - A hash or a hashhash prior to VA_OPT does not inhibit expansion of arguments if they are the first token within VA_OPT.\n - When a variadic argument is supplied, argument substitution occurs within the contents as does stringification - and these resulting tokens are inserted back into the macro expansions token stream just prior to the entire stream being rescanned and concatenated.\n\nSee wg21.link/P0306 for further details on the feature.\n\n\nAcknowledgment: This patch would have been poorer if not for Richard Smith\'s usual thoughtful analysis and feedback.\nllvm-svn: 315840"}, [a]={{"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 // ...\n SetPoisonReason(Ident__VA_OPT__, diag::ext_pp_bad_vaopt_use);"}}, [l]={ ["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:13:14: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:68:5: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:72:8: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:73:10: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:76:13: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]"} } }, ["ext_pp_comma_expr"]={ [j]={o}, [k]=o, [c]="ext_pp_comma_expr", [d]="comma operator in operand of #if", [b]="comma operator in operand of #if", [h]=m, [g]="comma operator in operand of \\#if", [f]=M, [e]=u, [i]={v,1236199783,w,x}, [a]={{"clang/lib/Lex/PPExpressions.cpp",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 // ...\n while (true) {\n // ...\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"]={ [j]={"endif-labels","extra-tokens"}, [k]="extra-tokens", [c]="ext_pp_extra_tokens_at_eol", [d]="extra tokens at end of #%0 directive", [b]="extra tokens at end of #A directive", [h]=m, [g]="extra tokens at end of \\#(.*?) directive", [f]=" \\[(?:\\-Werror,)?\\-Wextra\\-tokens[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{"clang/examples/AnnotateFunctions/AnnotateFunctions.cpp",69,"class PragmaAnnotateHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PragmaTok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{T,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 // ...\n Diag(Tmp, diag::ext_pp_extra_tokens_at_eol) << DirType << Hint;"},{eb,818,"void Preprocessor::HandlePragmaModuleBuild(Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{eb,898,"void Preprocessor::HandlePragmaHdrstop(Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod))\n Diag(Tok.getLocation(), diag::ext_pp_extra_tokens_at_eol) << \"pragma hdrstop\";"},{eb,1220,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandleCaptured(Preprocessor &PP) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma clang __debug captured\";"},{eb,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 // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma warning\";"},{eb,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 // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma execution_character_set\";"},{eb,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 // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{eb,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 // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{eb,1796,"/// Handle the clang \\#pragma module end extension.\nstruct PragmaModuleEndHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{eb,1831,"/// Handle the clang \\#pragma module load extension.\nstruct PragmaModuleLoadHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{eb,1888,"/// PragmaARCCFCodeAuditedHandler -\n/// \\#pragma clang arc_cf_code_audited begin/end\nstruct PragmaARCCFCodeAuditedHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{eb,1943,"/// PragmaAssumeNonNullHandler -\n/// \\#pragma clang assume_nonnull begin/end\nstruct PragmaAssumeNonNullHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"}}, [l]={ ["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:28:7: warning: extra tokens at end of #else directive [-Wextra-tokens]"} } }, ["ext_pp_gnu_line_directive"]={ [j]={B,"gnu-line-marker",o}, [k]="gnu-line-marker", [c]={{nil,D,"ext_pp_gnu_line_directive"}}, [d]={{nil,D,"this style of line directive is a GNU extension"}}, [b]={{nil,D,"this style of line directive is a GNU extension"}}, [h]=m, [g]="this style of line directive is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-line\\-marker[^\\]]*\\]", [e]={{nil,D,u}}, [i]={Pb,1625925174,Ob,Nb}, [a]={{T,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 // ...\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);"},{T,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 // ...\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 // ...\n } else if (StrTok.isNot(tok::string_literal)) {\n // ...\n } else if (StrTok.hasUDSuffix()) {\n // ...\n } else {\n // ...\n if (!SourceMgr.isWrittenInBuiltinFile(DigitTok.getLocation()) && !SourceMgr.isWrittenInCommandLineFile(DigitTok.getLocation()))\n Diag(StrTok, diag::ext_pp_gnu_line_directive);"}}, [l]={ ["clang/test/Preprocessor/line-directive-system-headers.c"]={"clang/test/Preprocessor/line-directive-system-headers.c:6:11: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","clang/test/Preprocessor/line-directive-system-headers.c:44:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:47:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:44:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:47:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:48:7: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","glomp.h:195:7: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","blonk.h:43:51: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","blonk.h:100:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]"} } }, ["ext_pp_ident_directive"]={ [j]={o}, [k]=o, [c]="ext_pp_ident_directive", [d]="#ident is a language extension", [b]="#ident is a language extension", [h]=m, [g]="\\#ident is a language extension", [f]=M, [e]=u, [i]={v,1236199783,w,x}, [a]={{T,1665,"/// HandleIdentSCCSDirective - Handle a #ident/#sccs directive.\n///\nvoid Preprocessor::HandleIdentSCCSDirective(Token &Tok) {\n // ...\n Diag(Tok, diag::ext_pp_ident_directive);"}} }, ["ext_pp_import_directive"]={ [j]={"import-preprocessor-directive-pedantic",o}, [k]="import-preprocessor-directive-pedantic", [c]="ext_pp_import_directive", [d]="#import is a language extension", [b]="#import is a language extension", [h]=m, [g]="\\#import is a language extension", [f]=" \\[(?:\\-Werror,)?\\-Wimport\\-preprocessor\\-directive\\-pedantic[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{T,2623,"/// HandleImportDirective - Implements \\#import.\n///\nvoid Preprocessor::HandleImportDirective(SourceLocation HashLoc, Token &ImportTok) {\n if (!LangOpts.ObjC) { // #import is standard for ObjC.\n // ...\n Diag(ImportTok, diag::ext_pp_import_directive);"}} }, ["ext_pp_include_next_directive"]={ [j]={B,"gnu-include-next",o}, [k]="gnu-include-next", [c]="ext_pp_include_next_directive", [d]="#include_next is a language extension", [b]="#include_next is a language extension", [h]=m, [g]="\\#include_next is a language extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-include\\-next[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{T,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"]={ [j]={z,"microsoft-include","msvc-include"}, [k]="microsoft-include", [c]="ext_pp_include_search_ms", [d]="#include resolved using non-portable Microsoft search rules as: %0", [b]="#include resolved using non-portable Microsoft search rules as: A", [h]=m, [g]="\\#include resolved using non\\-portable Microsoft search rules as\\: (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-include[^\\]]*\\]", [e]=u, [i]={"0fafd34a6e7a",1388173576,"Implement MSVC header search algorithm in MicrosoftMode.","Implement MSVC header search algorithm in MicrosoftMode.\nFollows algorithm described here: http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx\n\nllvm-svn: 198082"}, [a]={{"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 // ...\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 // ...\n for (const auto &IncluderAndDir : Includers) {\n // ...\n if (OptionalFileEntryRef FE = getFileAndSuggestModule(TmpDir, IncludeLoc, IncluderAndDir.second, IncluderIsSystemHeader, RequestingModule, SuggestedModule)) {\n // ...\n if (Diags.isIgnored(diag::ext_pp_include_search_ms, IncludeLoc)) {"}}, [l]={ ["clang/test/Preprocessor/microsoft-header-search.c"]={"clang/test/Preprocessor/Inputs/microsoft-header-search/a/b/include3.h:3:10: warning: #include resolved using non-portable Microsoft search rules as: clang/test/Preprocessor/Inputs/microsoft-header-search/a/findme.h [-Wmicrosoft-include]"} } }, ["ext_pp_line_too_big"]={ [j]={o}, [k]=o, [c]="ext_pp_line_too_big", [d]="C requires #line number to be less than %0, allowed as extension", [b]="C requires #line number to be less than A, allowed as extension", [h]=m, [g]="C requires \\#line number to be less than (.*?), allowed as extension", [f]=M, [e]=u, [i]={v,1236199783,w,x}, [a]={{T,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 // ...\n if (LineNo >= LineLimit)\n Diag(DigitTok, diag::ext_pp_line_too_big) << LineLimit;"}}, [l]={ ["clang/test/Preprocessor/line-directive.c"]={"clang/test/Preprocessor/line-directive.c:0:7: warning: C requires #line number to be less than 2147483648, allowed as extension [-Wpedantic]"} } }, ["ext_pp_line_zero"]={ [j]={B,"gnu-zero-line-directive",o}, [k]="gnu-zero-line-directive", [c]="ext_pp_line_zero", [d]="#line directive with zero argument is a GNU extension", [b]="#line directive with zero argument is a GNU extension", [h]=m, [g]="\\#line directive with zero argument is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-line\\-directive[^\\]]*\\]", [e]=u, [i]={"0638c15a52d3",1340745560,"preprocessing: gcc supports #line 0. So, treat this","preprocessing: gcc supports #line 0. So, treat this\nas a gcc supported extension with usual treatment\nwith -pedantic (warn) and -pedantic-errors (error).\n// rdar://11550996\n\nllvm-svn: 159226"}, [a]={{T,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 // ...\n if (LineNo == 0)\n Diag(DigitTok, diag::ext_pp_line_zero);"}}, [l]={ ["clang/test/Lexer/gnu-flags.c"]={"clang/test/Lexer/gnu-flags.c:51:7: warning: #line directive with zero argument is a GNU extension [-Wgnu-zero-line-directive]"} } }, ["ext_pp_macro_redef"]={ [j]={"macro-redefined","pedantic-macros"}, [k]="macro-redefined", [c]="ext_pp_macro_redef", [d]="%0 macro redefined", [b]="A macro redefined", [h]=m, [g]="(.*?) macro redefined", [f]=" \\[(?:\\-Werror,)?\\-Wmacro\\-redefined[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{T,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 // ...\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 // ...\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 // ...\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 // ...\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();"}}, [l]={ ["clang/test/Preprocessor/pragma-pushpop-macro.c"]={"clang/test/Preprocessor/pragma-pushpop-macro.c:17:9: warning: \'Y\' macro redefined [-Wmacro-redefined]"} } }, ["ext_pp_opencl_variadic_macros"]={ [j]={o}, [k]=o, [c]={{nil,G,"ext_pp_opencl_variadic_macros"}}, [d]={{nil,G,"variadic macros are a Clang extension in OpenCL"}}, [b]={{nil,G,"variadic macros are a Clang extension in OpenCL"}}, [h]=m, [g]="variadic macros are a Clang extension in OpenCL", [f]=M, [e]={{nil,G,u}}, [i]={"545652b96485",1553599357,"[OpenCL] Allow variadic macros as Clang feature.","[OpenCL] Allow variadic macros as Clang feature.\n\nllvm-svn: 356987"}, [a]={{T,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 // ...\n while (true) {\n // ...\n case tok::ellipsis: // #define X(... -> C99 varargs\n // ...\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);"}}, [l]={ ["clang/test/Preprocessor/macro_variadic.cl"]={"clang/test/Preprocessor/macro_variadic.cl:7:21: warning: variadic macros are a Clang extension in OpenCL [-Wpedantic]","clang/test/Preprocessor/macro_variadic.cl:8:18: warning: variadic macros are a Clang extension in OpenCL [-Wpedantic]","clang/test/Preprocessor/macro_variadic.cl:9:25: warning: variadic macros are a Clang extension in OpenCL [-Wpedantic]"} } }, ["ext_pp_operator_used_as_macro_name"]={ [j]={z,"microsoft-cpp-macro",o}, [k]="microsoft-cpp-macro", [c]="ext_pp_operator_used_as_macro_name", [d]="C++ operator %0 (aka %1) used as a macro name", [b]="C++ operator A (aka B) used as a macro name", [h]=m, [g]="C\\+\\+ operator (.*?) \\(aka (.*?)\\) used as a macro name", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-cpp\\-macro[^\\]]*\\]", [e]=u, [i]={"e03e9e15f2a6",1401553942,"Preprocessor: make C++ operator names as macro identifiers a compatible extension","Preprocessor: make C++ operator names as macro identifiers a compatible extension\n\nWith recent changes, this is now a compatible language extension and can be\nsafely enabled with -ms-extensions instead of requiring the full\n-ms-compatibility MSVC drop-in mode. As such we can now also emit an extension\nwarning under -Wmicrosoft to help users port their code.\n\nllvm-svn: 209978"}, [a]={{T,335,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // ...\n if (II->isCPlusPlusOperatorKeyword()) {\n // ...\n Diag(MacroNameTok, getLangOpts().MicrosoftExt ? diag::ext_pp_operator_used_as_macro_name : diag::err_pp_operator_used_as_macro_name) << II << MacroNameTok.getKind();"}}, [l]={ ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:385:9: warning: C++ operator \'and\' (aka \'&&\') used as a macro name [-Wmicrosoft-cpp-macro]"} } }, ["ext_pp_redef_builtin_macro"]={ [j]={"builtin-macro-redefined","pedantic-macros"}, [k]="builtin-macro-redefined", [c]="ext_pp_redef_builtin_macro", [d]="redefining builtin macro", [b]="redefining builtin macro", [h]=m, [g]="redefining builtin macro", [f]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-macro\\-redefined[^\\]]*\\]", [e]=u, [i]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,","After issuing a diagnostic for undefining or redefining a builtin macro,\ncontinue parsing the directive rather than silently discarding it.\n\nAllowing undef or redef of __TIME__ and __DATE__ is important to folks\nwho want stable, reproducible builds.\n\nllvm-svn: 176540"}, [a]={{T,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 // ...\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 // ...\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 // ...\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);"}}, [l]={ ["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:9:9: warning: redefining builtin macro [-Wbuiltin-macro-redefined]"} } }, ["ext_pp_undef_builtin_macro"]={ [j]={"builtin-macro-redefined","pedantic-macros"}, [k]="builtin-macro-redefined", [c]="ext_pp_undef_builtin_macro", [d]="undefining builtin macro", [b]="undefining builtin macro", [h]=m, [g]="undefining builtin macro", [f]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-macro\\-redefined[^\\]]*\\]", [e]=u, [i]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,","After issuing a diagnostic for undefining or redefining a builtin macro,\ncontinue parsing the directive rather than silently discarding it.\n\nAllowing undef or redef of __TIME__ and __DATE__ is important to folks\nwho want stable, reproducible builds.\n\nllvm-svn: 176540"}, [a]={{T,3218,"/// HandleUndefDirective - Implements \\#undef.\n///\nvoid Preprocessor::HandleUndefDirective() {\n // ...\n // If the macro is not defined, this is a noop undef.\n if (const MacroInfo *MI = MD.getMacroInfo()) {\n // ...\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);"}}, [l]={ ["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:18:8: warning: undefining builtin macro [-Wbuiltin-macro-redefined]"} } }, ["ext_pp_warning_directive"]={ [j]={o}, [k]=o, [c]="ext_pp_warning_directive", [d]="#warning is a %select{C2x|C++23}0 extension", [b]={{nil,nil,{"#warning is a ",{"C2x","C++23"}," extension"}},{U,D,{"#warning is a ",{"C2x","C++2b"}," extension"}},{fb,nil,"#warning is a language extension"}}, [h]=m, [g]="\\#warning is a (?:C2x|C\\+\\+23) extension", [f]=M, [e]=u, [i]={v,1236199783,w,x}, [a]={{T,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 // ...\n default:\n // ...\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;"},{T,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 // ...\n default:\n // ...\n case tok::pp_warning:\n if (LangOpts.CPlusPlus)\n // ...\n else\n Diag(Result, LangOpts.C2x ? diag::warn_c2x_compat_warning_directive : diag::ext_pp_warning_directive) << /*C2x*/ 0;"}}, [l]={ ["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:61:2: warning: #warning is a C++23 extension [-Wpedantic]"} } }, ["ext_pragma_syntax_eod"]={ [j]={bb,ib,gb,"pragmas",bc}, [k]=bc, [c]="ext_pragma_syntax_eod", [d]="expected end of directive in pragma", [b]="expected end of directive in pragma", [h]=m, [g]="expected end of directive in pragma", [f]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", [e]=u, [i]={"2f1e36bfd0c1",1298860671,"Rename tok::eom to tok::eod.","Rename tok::eom to tok::eod.\n\nThe previous name was inaccurate as this token in fact appears at\nthe end of every preprocessing directive, not just macro definitions.\nNo functionality change, except for a diagnostic tweak.\n\nllvm-svn: 126631"}, [a]={{eb,992,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n // ...\n if (Tok.isNot(tok::eod))\n Diag(Tok, diag::ext_pragma_syntax_eod);"}}, [l]={ ["clang/test/Preprocessor/pragma_unknown.c"]={"clang/test/Preprocessor/pragma_unknown.c:29:34: warning: expected end of directive in pragma [-Wunknown-pragmas]"} } }, ["ext_predef_outside_function"]={ [j]={"predefined-identifier-outside-function"}, [k]="predefined-identifier-outside-function", [c]="ext_predef_outside_function", [d]="predefined identifier is only valid inside function", [b]="predefined identifier is only valid inside function", [h]=m, [g]="predefined identifier is only valid inside function", [f]=" \\[(?:\\-Werror,)?\\-Wpredefined\\-identifier\\-outside\\-function[^\\]]*\\]", [e]=n, [i]={v,1236199783,w,x}, [a]={{r,3641,"ExprResult Sema::BuildPredefinedExpr(SourceLocation Loc, PredefinedExpr::IdentKind IK) {\n // ...\n if (!currentDecl) {\n Diag(Loc, diag::ext_predef_outside_function);"}}, [l]={ ["clang/test/Sema/predef.c"]={"clang/test/Sema/predef.c:8:11: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]","clang/test/Sema/predef.c:16:17: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]","clang/test/Sema/predef.c:17:17: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]","clang/test/Sema/predef.c:18:17: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]"} } }, ["ext_pseudo_dtor_on_void"]={ [j]={z,"microsoft-void-pseudo-dtor"}, [k]="microsoft-void-pseudo-dtor", [c]="ext_pseudo_dtor_on_void", [d]="pseudo-destructors on type void are a Microsoft extension", [b]="pseudo-destructors on type void are a Microsoft extension", [h]=m, [g]="pseudo\\-destructors on type void are a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-void\\-pseudo\\-dtor[^\\]]*\\]", [e]=n, [i]={"5882927d7a1f",1327297857,"In microsoft mode, downgrade pseudo-destructors on void from error to warning.","In microsoft mode, downgrade pseudo-destructors on void from error to warning.\n\nThis matches cl.exe\'s behavior and fixes PR11791.\n\nllvm-svn: 148682"}, [a]={{Cb,7768,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n // ...\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();"}}, [l]={ ["clang/test/CodeGenCXX/microsoft-compatibility.cpp"]={"clang/test/CodeGenCXX/microsoft-compatibility.cpp:15:4: warning: pseudo-destructors on type void are a Microsoft extension [-Wmicrosoft-void-pseudo-dtor]"} } }, ["ext_pure_function_definition"]={ [j]={z,"microsoft-pure-definition"}, [k]="microsoft-pure-definition", [c]="ext_pure_function_definition", [d]="function definition with pure-specifier is a Microsoft extension", [b]="function definition with pure-specifier is a Microsoft extension", [h]=m, [g]="function definition with pure\\-specifier is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-pure\\-definition[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{p,15629,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\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);"}}, [l]={ ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:294:16: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]","clang/test/Parser/MicrosoftExtensions.cpp:304:11: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]","clang/test/Parser/MicrosoftExtensions.cpp:314:13: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]","clang/test/Parser/MicrosoftExtensions.cpp:314:13: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]"} } }, ["ext_qualified_dtor_named_in_lexical_scope"]={ [j]={mc}, [k]=mc, [c]={{nil,q,"ext_qualified_dtor_named_in_lexical_scope"}}, [d]={{nil,q,"qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup"}}, [b]={{nil,q,"qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup"}}, [h]=m, [g]="qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup", [f]=" \\[(?:\\-Werror,)?\\-Wdtor\\-name[^\\]]*\\]", [e]={{nil,q,n}}, [i]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, [a]={{Cb,400,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\n if (SS.isSet()) {\n // ...\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());"}}, [l]={ ["clang/test/CXX/drs/dr2xx.cpp"]={"clang/test/CXX/drs/dr2xx.cpp:556:11: error: qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup [-Werror,-Wdtor-name]"} } }, ["ext_redefinition_of_typedef"]={ [j]={"typedef-redefinition"}, [k]="typedef-redefinition", [c]="ext_redefinition_of_typedef", [d]="redefinition of typedef %0 is a C11 feature", [b]="redefinition of typedef A is a C11 feature", [h]=m, [g]="redefinition of typedef (.*?) is a C11 feature", [f]=" \\[(?:\\-Werror,)?\\-Wtypedef\\-redefinition[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{p,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 // ...\n Diag(New->getLocation(), diag::ext_redefinition_of_typedef) << New->getDeclName();"}}, [l]={ ["clang/test/Preprocessor/pragma_sysheader.c"]={"clang/test/Preprocessor/Inputs/pragma_sysheader.h:19:13: warning: redefinition of typedef \'x\' is a C11 feature [-Wtypedef-redefinition]"} } }, ["ext_ref_qualifier"]={ [j]={P,y}, [k]=y, [c]="ext_ref_qualifier", [d]="reference qualifiers on functions are a C++11 extension", [b]="reference qualifiers on functions are a C++11 extension", [h]=m, [g]="reference qualifiers on functions are a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"a52713096d31",1296074132,"Improve the extension warning for the use of ref-qualifiers, to","Improve the extension warning for the use of ref-qualifiers, to\ndistinguish them from rvalue references. Using the rvalue-references\nwarning was weird when the ref-qualifier was \'&\'.\n\nllvm-svn: 124316"}, [a]={{W,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);"}}, [l]={ ["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:6:22: warning: reference qualifiers on functions are a C++11 extension [-Wc++11-extensions]"} } }, ["ext_register_storage_class"]={ [j]={"register"}, [k]="register", [c]="ext_register_storage_class", [d]="ISO C++1z does not allow \'register\' storage class specifier", [b]="ISO C++1z does not allow \'register\' storage class specifier", [h]=F, [g]="ISO C\\+\\+17 does not allow \'register\' storage class specifier", [f]=" \\[[^\\]]*\\-Wregister[^\\]]*\\]", [e]=n, [i]={"291027692fe7",1448487261,"P0001R1: \'register\' storage class specifier is no longer permitted in C++1z.","P0001R1: \'register\' storage class specifier is no longer permitted in C++1z.\n\nWe will still allow it in system headers, in macros from system headers, when\ncombined with an \'asm\' label, and under the flag -Wno-register.\n\nllvm-svn: 254097"}, [a]={{p,7496,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (getLangOpts().CPlusPlus11 && SCSpec == DeclSpec::SCS_register && !D.getAsmLabel() && !getSourceManager().isInSystemMacro(D.getDeclSpec().getStorageClassSpecLoc())) {\n // ...\n Diag(D.getDeclSpec().getStorageClassSpecLoc(), getLangOpts().CPlusPlus17 ? diag::ext_register_storage_class : diag::warn_deprecated_register) << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"},{p,14738,"/// ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator()\n/// to introduce parameters into function prototype scope.\nDecl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {\n // ...\n if (DS.getStorageClassSpec() == DeclSpec::SCS_register) {\n // ...\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());"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp:18:1: error: ISO C++17 does not allow \'register\' storage class specifier [-Wregister]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp:41:23: error: ISO C++17 does not allow \'register\' storage class specifier [-Wregister]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp:58:3: error: ISO C++17 does not allow \'register\' storage class specifier [-Wregister]"} } }, ["ext_reserved_user_defined_literal"]={ [j]={"reserved-user-defined-literal"}, [k]="reserved-user-defined-literal", [c]="ext_reserved_user_defined_literal", [d]="invalid suffix on literal; C++11 requires a space between literal and identifier", [b]="invalid suffix on literal; C++11 requires a space between literal and identifier", [h]=F, [g]="invalid suffix on literal; C\\+\\+11 requires a space between literal and identifier", [f]=" \\[[^\\]]*\\-Wreserved\\-user\\-defined\\-literal[^\\]]*\\]", [e]=u, [i]={"0df56f4a9000",1331174361,"Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix not","Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix not\nstarting with an underscore is ill-formed.\n\nSince this rule rejects programs that were using <inttypes.h>\'s macros, recover\nfrom this error by treating the ud-suffix as a separate preprocessing-token,\nwith a DefaultError ExtWarn. The approach of treating such cases as two tokens\nis under discussion for standardization, but is in any case a conforming\nextension and allows existing codebases to keep building while the committee\nmakes up its mind.\n\nReword the warning on the definition of literal operators not starting with\nunderscores (which are, strangely, legal) to more explicitly state that such\noperators can\'t be called by literals. Remove the special-case diagnostic for\nhexfloats, since it was both triggering in the wrong cases and incorrect.\n\nllvm-svn: 152287"}, [a]={{db,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 // ...\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 // ...\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), \" \");"}}, [l]={ ["clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp"]={"clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:12:21: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]","clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:13:33: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]"} } }, ["ext_retained_language_linkage"]={ [j]={o,"retained-language-linkage"}, [k]="retained-language-linkage", [c]="ext_retained_language_linkage", [d]="friend function %0 retaining previous language linkage is an extension", [b]="friend function A retaining previous language linkage is an extension", [h]=m, [g]="friend function (.*?) retaining previous language linkage is an extension", [f]=" \\[(?:\\-Werror,)?\\-Wretained\\-language\\-linkage[^\\]]*\\]", [e]=n, [i]={"dd551fc3ae9d",1382482381,"Retain previous language linkage of friend function declarations","Retain previous language linkage of friend function declarations\n\nWith this extension, friend function declarations will retain the language\nlinkage specified for previous declarations instead of emitting an error\ndiagnostic.\n\nThe feature is known to be compatible with GCC and MSVC and permits a\nlanguage to be specified indirectly where it cannot otherwise be written\ndirectly in class scope.\n\nWork is ongoing to improve linkage spec diagnostics.\n\nFixes PR17337.\n\nReviewed by Richard Smith.\n\nllvm-svn: 193206"}, [a]={{p,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 // ...\n if (getLangOpts().CPlusPlus) {\n // ...\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;"}}, [l]={ ["clang/test/SemaCXX/linkage-spec.cpp"]={"clang/test/SemaCXX/linkage-spec.cpp:165:18: warning: friend function \'bar3\' retaining previous language linkage is an extension [-Wretained-language-linkage]"} } }, ["ext_return_has_expr"]={ [j]={bb,ib,gb,"return-type"}, [k]="return-type", [c]="ext_return_has_expr", [d]="%select{void function|void method|constructor|destructor}1 %0 should not return a value", [b]={{nil,nil,{{"void function","void method","constructor","destructor"}," A should not return a value"}}}, [h]=F, [g]="(?:void function|void method|constructor|destructor) (.*?) should not return a value", [f]=" \\[[^\\]]*\\-Wreturn\\-type[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{Wb,4074,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n // ...\n } else if (!RetValExp->isTypeDependent()) {\n // ...\n unsigned D = diag::ext_return_has_expr;"}}, [l]={ ["clang/test/SemaCXX/null_in_arithmetic_ops.cpp"]={"clang/test/SemaCXX/null_in_arithmetic_ops.cpp:94:3: error: void function \'f\' should not return a value [-Wreturn-type]"} } }, ["ext_return_has_void_expr"]={ [j]={o}, [k]=o, [c]="ext_return_has_void_expr", [d]="void %select{function|method|block}1 %0 should not return void expression", [b]={{nil,nil,{"void ",{jc,"method","block"}," A should not return void expression"}}}, [h]=m, [g]="void (?:function|method|block) (.*?) should not return void expression", [f]=M, [e]=n, [i]={I,1237025389,K,J}, [a]={{Wb,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 // ...\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 // ...\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;"},{Wb,4081,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n // ...\n } else if (!RetValExp->isTypeDependent()) {\n // ...\n if (RetValExp->getType()->isVoidType()) {\n // ...\n if (isa<CXXConstructorDecl>(CurDecl) || isa<CXXDestructorDecl>(CurDecl))\n // ...\n else\n D = diag::ext_return_has_void_expr;"},{Wb,4099,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n // ...\n } else if (!RetValExp->isTypeDependent()) {\n // ...\n else if (D != diag::ext_return_has_void_expr || !getLangOpts().CPlusPlus) {"}}, [l]={ ["clang/test/Sema/block-return.c"]={"clang/test/Sema/block-return.c:137:5: warning: void block literal should not return void expression [-Wpedantic]"} } }, ["ext_return_missing_expr"]={ [j]={bb,ib,gb,"return-type"}, [k]="return-type", [c]="ext_return_missing_expr", [d]="non-void %select{function|method}1 %0 should return a value", [b]={{nil,nil,{"non-void ",{jc,"method"}," A should return a value"}}}, [h]=F, [g]="non\\-void (?:function|method) (.*?) should return a value", [f]=" \\[[^\\]]*\\-Wreturn\\-type[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{Wb,4140,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n // ...\n } else if (!RetValExp && !HasDependentReturnType) {\n // ...\n if ((FD && FD->isInvalidDecl()) || FnRetType->containsErrors()) {\n // ...\n } else if (getLangOpts().CPlusPlus11 && FD && FD->isConstexpr()) {\n // ...\n } else {\n // ...\n unsigned DiagID = getLangOpts().C99 ? diag::ext_return_missing_expr : diag::warn_return_missing_expr;"}} }, ["ext_rvalue_reference"]={ [j]={P,y}, [k]=y, [c]="ext_rvalue_reference", [d]="rvalue references are a C++11 extension", [b]="rvalue references are a C++11 extension", [h]=m, [g]="rvalue references are a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"0098499f7d8d",1295921852,"Downgrade the error about rvalue references to an extension warning","Downgrade the error about rvalue references to an extension warning\nand turn on __has_feature(cxx_rvalue_references). The core rvalue\nreferences proposal seems to be fully implemented now, pending lots\nmore testing.\n\nllvm-svn: 124169"}, [a]={{W,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 // ...\n if (Kind == tok::star || Kind == tok::caret) {\n // ...\n } else {\n // ...\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);"}}, [l]={ ["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:6:15: warning: rvalue references are a C++11 extension [-Wc++11-extensions]"} } }, ["ext_rvalue_to_reference_access_ctor"]={ [j]={"bind-to-temporary-copy",o}, [k]="bind-to-temporary-copy", [c]="ext_rvalue_to_reference_access_ctor", [d]="C++98 requires an accessible copy constructor for class %2 when binding a reference to a temporary; was %select{private|protected}0", [b]={{nil,nil,{"C++98 requires an accessible copy constructor for class C when binding a reference to a temporary; was ",{"private","protected"}}}}, [h]=m, [g]="C\\+\\+98 requires an accessible copy constructor for class (.*?) when binding a reference to a temporary; was (?:private|protected)", [f]=" \\[(?:\\-Werror,)?\\-Wbind\\-to\\-temporary\\-copy[^\\]]*\\]", [e]=n, [i]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy","PR7245: Make binding a reference to a temporary without a usable copy\nconstructor into an extension warning into the error that C++98 requires.\n\nllvm-svn: 105529"}, [a]={{Mb,1654,"/// Checks access to a constructor.\nSema::AccessResult Sema::CheckConstructorAccess(SourceLocation UseLoc, CXXConstructorDecl *Constructor, DeclAccessPair Found, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp) {\n // ...\n default:\n PD = PDiag(IsCopyBindingRefToTemp ? diag::ext_rvalue_to_reference_access_ctor : diag::err_access_ctor);"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp:57:6: warning: C++98 requires an accessible copy constructor for class \'X2\' when binding a reference to a temporary; was private [-Wbind-to-temporary-copy]"} } }, ["ext_rvalue_to_reference_temp_copy_no_viable"]={ [j]={"bind-to-temporary-copy",o}, [k]="bind-to-temporary-copy", [c]="ext_rvalue_to_reference_temp_copy_no_viable", [d]={{nil,X,"no viable constructor %select{copying variable|copying parameter|initializing template parameter|returning object|initializing statement expression result|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1; C++98 requires a copy constructor when binding a reference to a temporary"},{Yb,tc,"no viable constructor %select{copying variable|copying parameter|returning object|initializing statement expression result|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1; C++98 requires a copy constructor when binding a reference to a temporary"},{E,nil,"no viable constructor %select{copying variable|copying parameter|returning object|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1; C++98 requires a copy constructor when binding a reference to a temporary"}}, [b]={{nil,X,{"no viable constructor ",{"copying variable","copying parameter","initializing template parameter","returning object","initializing statement expression result","throwing object","copying member subobject","copying array element","allocating object","copying temporary","initializing base subobject","initializing vector element","capturing value"}," of type B; C++98 requires a copy constructor when binding a reference to a temporary"}},{Yb,tc,{"no viable constructor ",{"copying variable","copying parameter","returning object","initializing statement expression result","throwing object","copying member subobject","copying array element","allocating object","copying temporary","initializing base subobject","initializing vector element","capturing value"}," of type B; C++98 requires a copy constructor when binding a reference to a temporary"}},{E,nil,{"no viable constructor ",{"copying variable","copying parameter","returning object","throwing object","copying member subobject","copying array element","allocating object","copying temporary","initializing base subobject","initializing vector element","capturing value"}," of type B; C++98 requires a copy constructor when binding a reference to a temporary"}}}, [h]=m, [g]="no viable constructor (?:copying variable|copying parameter|initializing template parameter|returning object|initializing statement expression result|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value) of type (.*?); C\\+\\+98 requires a copy constructor when binding a reference to a temporary", [f]=" \\[(?:\\-Werror,)?\\-Wbind\\-to\\-temporary\\-copy[^\\]]*\\]", [e]=n, [i]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy","PR7245: Make binding a reference to a temporary without a usable copy\nconstructor into an extension warning into the error that C++98 requires.\n\nllvm-svn: 105529"}, [a]={{V,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 // ...\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);"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp:58:6: warning: no viable constructor copying parameter of type \'X3\'; C++98 requires a copy constructor when binding a reference to a temporary [-Wbind-to-temporary-copy]"} } }, ["ext_scoped_enum"]={ [j]={P,y}, [k]=y, [c]="ext_scoped_enum", [d]="scoped enumerations are a C++11 extension", [b]="scoped enumerations are a C++11 extension", [h]=m, [g]="scoped enumerations are a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"d0d87b597259",1366685256,"Warn that scoped enumerations are a C++11 extenstion when compiling in","Warn that scoped enumerations are a C++11 extenstion when compiling in\nC++98 mode. This improves on the previous diagnostic message of:\n\nerror: expected identifier or \'{\'\nllvm-svn: 180076"}, [a]={{W,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 // ...\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);"}}, [l]={ ["clang/test/SemaCXX/warn-c++11-extensions.cpp"]={"clang/test/SemaCXX/warn-c++11-extensions.cpp:8:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/warn-c++11-extensions.cpp:9:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]"} } }, ["ext_sizeof_alignof_function_type"]={ [j]={o,Vb}, [k]=Vb, [c]="ext_sizeof_alignof_function_type", [d]={{nil,q,"invalid application of \'%0\' to a function type"},{t,O,"invalid application of \'%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align|__alignof}0\' to a function type"},{Sb,nil,"invalid application of \'%select{sizeof|alignof|vec_step}0\' to a function type"}}, [b]={{nil,q,"invalid application of \'A\' to a function type"},{t,O,{"invalid application of \'",{"sizeof","alignof","vec_step","__builtin_omp_required_simd_align","__alignof"},"\' to a function type"}},{Sb,nil,{"invalid application of \'",{"sizeof","alignof","vec_step"},"\' to a function type"}}}, [h]=m, [g]="invalid application of \'(.*?)\' to a function type", [f]=" \\[(?:\\-Werror,)?\\-Wpointer\\-arith[^\\]]*\\]", [e]=n, [i]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode.","Diagnose uses of \'alignof\' on functions in -pedantic mode.\n\nllvm-svn: 177354"}, [a]={{r,4310,"static bool CheckExtensionTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) {\n // ...\n // C99 6.5.3.4p1:\n if (T->isFunctionType() && (TraitKind == UETT_SizeOf || TraitKind == UETT_AlignOf || TraitKind == UETT_PreferredAlignOf)) {\n // ...\n S.Diag(Loc, diag::ext_sizeof_alignof_function_type) << getTraitSpelling(TraitKind) << ArgRange;"}} }, ["ext_sizeof_alignof_void_type"]={ [j]={o,Vb}, [k]=Vb, [c]="ext_sizeof_alignof_void_type", [d]={{nil,q,"invalid application of \'%0\' to a void type"},{t,O,"invalid application of \'%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align|__alignof}0\' to a void type"},{Sb,nil,"invalid application of \'%select{sizeof|alignof|vec_step}0\' to a void type"}}, [b]={{nil,q,"invalid application of \'A\' to a void type"},{t,O,{"invalid application of \'",{"sizeof","alignof","vec_step","__builtin_omp_required_simd_align","__alignof"},"\' to a void type"}},{Sb,nil,{"invalid application of \'",{"sizeof","alignof","vec_step"},"\' to a void type"}}}, [h]=m, [g]="invalid application of \'(.*?)\' to a void type", [f]=" \\[(?:\\-Werror,)?\\-Wpointer\\-arith[^\\]]*\\]", [e]=n, [i]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode.","Diagnose uses of \'alignof\' on functions in -pedantic mode.\n\nllvm-svn: 177354"}, [a]={{r,4326,"static bool CheckExtensionTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) {\n // ...\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"]={ [j]={oc}, [k]=oc, [c]="ext_standalone_specifier", [d]="\'%0\' is not permitted on a declaration of a type", [b]="\'A\' is not permitted on a declaration of a type", [h]=m, [g]="\'(.*?)\' is not permitted on a declaration of a type", [f]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", [e]=n, [i]={"b1402ae94eb7",1363647167,"Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some rel...","Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some related diagnostics from warning to extension in C++, since they\'re errors there. Add some missing checks for function specifiers on non-function declarations.\n\nllvm-svn: 177335"}, [a]={{p,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 // ...\n if (getLangOpts().CPlusPlus)\n DiagID = diag::ext_standalone_specifier;"}}, [l]={ ["clang/test/SemaCXX/storage-class.cpp"]={"clang/test/SemaCXX/storage-class.cpp:6:1: warning: \'extern\' is not permitted on a declaration of a type [-Wmissing-declarations]"} } }, ["ext_star_this_lambda_capture_cxx17"]={ [j]={N,jb}, [k]=N, [c]={{nil,E,"ext_star_this_lambda_capture_cxx17"}}, [d]={{nil,E,"capture of \'*this\' by copy is a C++17 extension"}}, [b]={{nil,E,"capture of \'*this\' by copy is a C++17 extension"}}, [h]=m, [g]="capture of \'\\*this\' by copy is a C\\+\\+17 extension", [f]=kb, [e]={{nil,E,"Lambda Issue"}}, [i]={"dc6b596ebbd3",1458552337,"[Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)","[Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)\n\nImplement lambda capture of *this by copy.\nFor e.g.:\nstruct A {\n\n int d = 10;\n auto foo() { return [*this] (auto a) mutable { d+=a; return d; }; }\n\n};\n\nauto L = A{}.foo(); // A{}\'s lifetime is gone.\n\n// Below is still ok, because *this was captured by value.\nassert(L(10) == 20);\nassert(L(100) == 120);\n\nIf the capture was implicit, or [this] (i.e. *this was captured by reference), this code would be otherwise undefined.\n\nImplementation Strategy:\n - amend the parser to accept *this in the lambda introducer\n - add a new king of capture LCK_StarThis\n - teach Sema::CheckCXXThisCapture to handle by copy captures of the\n enclosing object (i.e. *this)\n - when CheckCXXThisCapture does capture by copy, the corresponding \n initializer expression for the closure\'s data member \n direct-initializes it thus making a copy of \'*this\'.\n - in codegen, when assigning to CXXThisValue, if *this was captured by \n copy, make sure it points to the corresponding field member, and\n not, unlike when captured by reference, what the field member points\n to.\n - mark feature as implemented in svn\n\nMuch gratitude to Richard Smith for his carefully illuminating reviews! \n\nllvm-svn: 263921"}, [a]={{"clang/lib/Sema/SemaLambda.cpp",1022,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n // ...\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);"}}, [l]={ ["clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp"]={"clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp:6:24: warning: capture of \'*this\' by copy is a C++17 extension [-Wc++17-extensions]"} } }, ["ext_static_data_member_in_union"]={ [j]={P,y}, [k]=y, [c]="ext_static_data_member_in_union", [d]="static data member %0 in union is a C++11 extension", [b]="static data member A in union is a C++11 extension", [h]=m, [g]="static data member (.*?) in union is a C\\+\\+11 extension", [f]=R, [e]=n, [i]={"429737556135",1329424882,"C++11 allows unions to have static data members. Remove the corresponding","C++11 allows unions to have static data members. Remove the corresponding\nrestriction and add some tests.\n\nllvm-svn: 150721"}, [a]={{p,7607,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else {\n // ...\n if (SC == SC_Static && CurContext->isRecord()) {\n if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(DC)) {\n // ...\n if (FunctionOrMethod) {\n // ...\n } else if (AnonStruct) {\n // ...\n } else if (RD->isUnion()) {\n // ...\n Diag(D.getIdentifierLoc(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_static_data_member_in_union : diag::ext_static_data_member_in_union) << Name;"}}, [l]={ ["clang/test/CXX/class/class.union/p1.cpp"]={"clang/test/CXX/class/class.union/p1.cpp:100:14: warning: static data member \'i1\' in union is a C++11 extension [-Wc++11-extensions]"} } }, ["ext_static_non_static"]={ [j]={z,"microsoft-redeclare-static",o}, [k]="microsoft-redeclare-static", [c]="ext_static_non_static", [d]="redeclaring non-static %0 as static is a Microsoft extension", [b]="redeclaring non-static A as static is a Microsoft extension", [h]=m, [g]="redeclaring non\\-static (.*?) as static is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-redeclare\\-static[^\\]]*\\]", [e]=n, [i]={"5b63fa02b2fa",1403133985,"Sema: Static redeclaration after extern declarations is a Microsoft Extension","Sema: Static redeclaration after extern declarations is a Microsoft Extension\n\nCL permits static redeclarations to follow extern declarations. The\nstorage specifier on the latter declaration has no effect.\n\nThis fixes PR20034.\n\nDifferential Revision: http://reviews.llvm.org/D4149\n\nllvm-svn: 211238"}, [a]={{p,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 // ...\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;"},{p,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 // ...\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();"}}, [l]={ ["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:210:13: warning: redeclaring non-static \'static_func\' as static is a Microsoft extension [-Wmicrosoft-redeclare-static]","clang/test/SemaCXX/MicrosoftExtensions.cpp:216:18: warning: redeclaring non-static \'static_var\' as static is a Microsoft extension [-Wmicrosoft-redeclare-static]"} } }, ["ext_static_out_of_line"]={ [j]={z,Q}, [k]=Q, [c]={{nil,G,"ext_static_out_of_line"}}, [d]={{nil,G,"\'static\' can only be specified inside the class definition"}}, [b]={{nil,G,"\'static\' can only be specified inside the class definition"}}, [h]=m, [g]="\'static\' can only be specified inside the class definition", [f]=mb, [e]={{nil,G,n}}, [i]={"3e7fda229d3f",1548435702,"Allow \'static\' storage specifier on an out-of-line member function template","Allow \'static\' storage specifier on an out-of-line member function template\ndeclaration in MSVCCompat mode\n\nMicrosoft compiler permits the use of \'static\' storage specifier outside\nof a class definition if it\'s on an out-of-line member function template\ndeclaration.\n\nThis patch allows \'static\' storage specifier on an out-of-line member\nfunction template declaration with a warning in Clang (To be compatible\nwith Microsoft).\n\nIntel C/C++ compiler allows the \'static\' keyword with a warning in\nMicrosoft mode. GCC allows this with -fpermissive.\n\nPatch By: Manna\n\nDifferential Revision: https://reviews.llvm.org/D56473\n\nChange-Id: I97b2d9e9d57cecbcd545d17e2523142a85ca2702\nllvm-svn: 352219"}, [a]={{p,10052,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n if (SC == SC_Static && isa<CXXMethodDecl>(NewFD) && !CurContext->isRecord()) {\n // ...\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());"}}, [l]={ ["clang/test/SemaCXX/warn-static-outside-class-definition.cpp"]={"clang/test/SemaCXX/warn-static-outside-class-definition.cpp:8:23: warning: \'static\' can only be specified inside the class definition [-Wmicrosoft-template]","clang/test/SemaCXX/warn-static-outside-class-definition.cpp:17:20: warning: \'static\' can only be specified inside the class definition [-Wmicrosoft-template]"} } }, ["ext_stdc_pragma_ignored"]={ [j]={bb,ib,gb,"pragmas",bc}, [k]=bc, [c]="ext_stdc_pragma_ignored", [d]="unknown pragma in STDC namespace", [b]="unknown pragma in STDC namespace", [h]=m, [g]="unknown pragma in STDC namespace", [f]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", [e]={{nil,tc,s},{E,nil,u}}, [i]={"a0b1f76d1022",1240176337,"reject invalid stuff in the STDC namespace.","reject invalid stuff in the STDC namespace.\n\nllvm-svn: 69551"}, [a]={{"clang/lib/Parse/ParsePragma.cpp",160,"/// PragmaSTDC_UnknownHandler - \"\\#pragma STDC ...\".\nstruct PragmaSTDC_UnknownHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnknownTok) override {\n // ...\n PP.Diag(UnknownTok, diag::ext_stdc_pragma_ignored);"}}, [l]={ ["clang/test/Preprocessor/pragma_unknown.c"]={"clang/test/Preprocessor/pragma_unknown.c:33:14: warning: unknown pragma in STDC namespace [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_unknown.c:34:72: warning: unknown pragma in STDC namespace [-Wunknown-pragmas]"} } }, ["ext_string_literal_operator_template"]={ [j]={B,"gnu-string-literal-operator-template"}, [k]="gnu-string-literal-operator-template", [c]="ext_string_literal_operator_template", [d]="string literal operator templates are a GNU extension", [b]="string literal operator templates are a GNU extension", [h]=m, [g]="string literal operator templates are a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-string\\-literal\\-operator\\-template[^\\]]*\\]", [e]=n, [i]={"b8b41d3ea444",1381175878,"Add support for WG21 N3599 (literal operator template for strings) as a GNU","Add support for WG21 N3599 (literal operator template for strings) as a GNU\nextension. The GCC folks have decided to support this even though the standard\ncommittee have not yet approved this feature.\n\nPatch by Hristo Venev!\n\nllvm-svn: 192128"}, [a]={{Z,16330,"static bool checkLiteralOperatorTemplateParameterList(Sema &SemaRef, FunctionTemplateDecl *TpDecl) {\n // ...\n // Must have one or two template parameters.\n if (TemplateParams->size() == 1) {\n // ...\n } else if (TemplateParams->size() == 2) {\n // ...\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 // ...\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);"}}, [l]={ ["clang/test/CXX/lex/lex.literal/lex.ext/p11.cpp"]={"clang/test/CXX/lex/lex.literal/lex.ext/p11.cpp:9:5: warning: string literal operator templates are a GNU extension [-Wgnu-string-literal-operator-template]"} } }, ["ext_string_too_long"]={ [j]={"overlength-strings",o}, [k]="overlength-strings", [c]="ext_string_too_long", [d]="string literal of length %0 exceeds maximum length %1 that %select{C90|ISO C99|C++}2 compilers are required to support", [b]={{nil,nil,{"string literal of length A exceeds maximum length B that ",{"C90","ISO C99","C++"}," compilers are required to support"}}}, [h]=m, [g]="string literal of length (.*?) exceeds maximum length (.*?) that (?:C90|ISO C99|C\\+\\+) compilers are required to support", [f]=" \\[(?:\\-Werror,)?\\-Woverlength\\-strings[^\\]]*\\]", [e]=u, [i]={"b37b46e488a3",1279636400,"Complain when string literals are too long for the active language","Complain when string literals are too long for the active language\nstandard\'s minimum requirements.\n\nllvm-svn: 108837"}, [a]={{pb,2221,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n // ...\n if (Pascal) {\n // ...\n } else if (Diags) {\n // ...\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());"}}, [l]={ ["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:16:5: error: string literal of length 845 exceeds maximum length 509 that C90 compilers are required to support [-Werror,-Woverlength-strings]"} } }, ["ext_subscript_non_lvalue"]={ [j]={o}, [k]=o, [c]="ext_subscript_non_lvalue", [d]="ISO C90 does not allow subscripting non-lvalue array", [b]="ISO C90 does not allow subscripting non-lvalue array", [h]=m, [g]="ISO C90 does not allow subscripting non\\-lvalue array", [f]=M, [e]=n, [i]={"ab2784f2c16e",1240703214,"Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.","Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.\n\nI wasn\'t originally going to use this approach, but cases like \ntest/Sema/expr-comma.c make things difficult.\n\nllvm-svn: 70096"}, [a]={{r,5935,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n if (LHSTy->isDependentType() || RHSTy->isDependentType()) {\n // ...\n } else if (const PointerType *PTy = LHSTy->getAs<PointerType>()) {\n // ...\n } else if (const ObjCObjectPointerType *PTy = LHSTy->getAs<ObjCObjectPointerType>()) {\n // ...\n } else if (const PointerType *PTy = RHSTy->getAs<PointerType>()) {\n // ...\n } else if (const ObjCObjectPointerType *PTy = RHSTy->getAs<ObjCObjectPointerType>()) {\n // ...\n } else if (const VectorType *VTy = LHSTy->getAs<VectorType>()) {\n // ...\n } else if (LHSTy->isBuiltinType() && LHSTy->getAs<BuiltinType>()->isVLSTBuiltinType()) {\n // ...\n } else if (LHSTy->isArrayType()) {\n // ...\n Diag(LHSExp->getBeginLoc(), diag::ext_subscript_non_lvalue) << LHSExp->getSourceRange();"},{r,5945,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n if (LHSTy->isDependentType() || RHSTy->isDependentType()) {\n // ...\n } else if (const PointerType *PTy = LHSTy->getAs<PointerType>()) {\n // ...\n } else if (const ObjCObjectPointerType *PTy = LHSTy->getAs<ObjCObjectPointerType>()) {\n // ...\n } else if (const PointerType *PTy = RHSTy->getAs<PointerType>()) {\n // ...\n } else if (const ObjCObjectPointerType *PTy = RHSTy->getAs<ObjCObjectPointerType>()) {\n // ...\n } else if (const VectorType *VTy = LHSTy->getAs<VectorType>()) {\n // ...\n } else if (LHSTy->isBuiltinType() && LHSTy->getAs<BuiltinType>()->isVLSTBuiltinType()) {\n // ...\n } else if (LHSTy->isArrayType()) {\n // ...\n } else if (RHSTy->isArrayType()) {\n // ...\n Diag(RHSExp->getBeginLoc(), diag::ext_subscript_non_lvalue) << RHSExp->getSourceRange();"}}, [l]={ ["clang/test/Sema/c89.c"]={"clang/test/Sema/c89.c:73:11: warning: ISO C90 does not allow subscripting non-lvalue array [-Wpedantic]","clang/test/Sema/c89.c:74:13: warning: ISO C90 does not allow subscripting non-lvalue array [-Wpedantic]"} } }, ["ext_subscript_overload"]={ [j]={Dc,cc,Zb,Zb,"c++14-compat","c++14-compat-pedantic","c++14-compat-pedantic","c++17-compat","c++17-compat-pedantic","c++17-compat-pedantic","c++1z-compat","c++20-compat","c++20-compat-pedantic","c++20-compat-pedantic","c++2a-compat","c++2a-compat-pedantic","c++2a-compat-pedantic","c++98-compat","c++98-compat-pedantic","c++98-compat-pedantic","pre-c++23-compat","pre-c++23-compat-pedantic"}, [k]="pre-c++23-compat", [c]={{nil,D,"ext_subscript_overload"}}, [d]="overloaded %0 with %select{no|a defaulted|more than one}1 parameter is a C++23 extension", [b]={{nil,nil,{"overloaded A with ",{"no","a defaulted","more than one"}," parameter is a C++23 extension"}},{U,D,{"overloaded A with ",{"no","a defaulted","more than one"}," parameter is a C++2b extension"}}}, [h]=m, [g]="overloaded (.*?) with (?:no|a defaulted|more than one) parameter is a C\\+\\+23 extension", [f]=" \\[(?:\\-Werror,)?\\-Wpre\\-c\\+\\+23\\-compat[^\\]]*\\]", [e]={{nil,D,n}}, [i]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, [a]={{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 // ...\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 // ...\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 // ...\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);"}}, [l]={ ["clang/test/SemaCXX/cxx2b-overloaded-operator-pedantic.cpp"]={"clang/test/SemaCXX/cxx2b-overloaded-operator-pedantic.cpp:9:8: warning: overloaded \'operator[]\' with more than one parameter is a C++23 extension [-Wpre-c++23-compat]"} } }, ["ext_template_arg_extra_parens"]={ [c]="ext_template_arg_extra_parens", [d]="address non-type template argument cannot be surrounded by parentheses", [b]="address non-type template argument cannot be surrounded by parentheses", [h]=m, [g]="address non\\-type template argument cannot be surrounded by parentheses", [f]=yb, [e]=n, [i]={"6a0c4097f142",1284358018,"Parentheses around address non-type template argument is demoted to an extension warning.","Parentheses around address non-type template argument is demoted to an extension warning.\n\nllvm-svn: 113739"}, [a]={{H,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 // ...\n if (S.getLangOpts().MicrosoftExt) {\n // ...\n } else {\n // ...\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();"},{H,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 // ...\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();"}}, [l]={ ["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:93:5: warning: address non-type template argument cannot be surrounded by parentheses"} } }, ["ext_template_arg_local_type"]={ [j]={"local-type-template-args"}, [k]="local-type-template-args", [c]="ext_template_arg_local_type", [d]="template argument uses local type %0", [b]="template argument uses local type A", [h]=m, [g]="template argument uses local type (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wlocal\\-type\\-template\\-args[^\\]]*\\]", [e]=n, [i]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,","Allow anonymous and local types. The support was already in place for these,\nbut this makes them work even as an extension in C++98. This resolves PR8077.\n\nllvm-svn: 113011"}, [a]={{H,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;"}}, [l]={ ["clang/test/SemaTemplate/recovery-crash.cpp"]={"clang/test/SemaTemplate/recovery-crash.cpp:32:7: warning: template argument uses local type \'LocalStruct\' [-Wlocal-type-template-args]"} } }, ["ext_template_arg_object_internal"]={ [j]={P,y}, [k]=y, [c]="ext_template_arg_object_internal", [d]="non-type template argument referring to %select{function|object}0 %1 with internal linkage is a C++11 extension", [b]={{nil,nil,{"non-type template argument referring to ",{jc,"object"}," B with internal linkage is a C++11 extension"}}}, [h]=m, [g]="non\\-type template argument referring to (?:function|object) (.*?) with internal linkage is a C\\+\\+11 extension", [f]=R, [e]=n, [i]={"9380e0ea236a",1333573890,"Implement C++11 [temp.arg.nontype]\'s permission to use the address of an object","Implement C++11 [temp.arg.nontype]\'s permission to use the address of an object\nor function with internal linkage as a non-type template argument.\n\nllvm-svn: 154053"}, [a]={{H,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 // ...\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();"}}, [l]={ ["clang/test/CXX/drs/dr1xx.cpp"]={"clang/test/CXX/drs/dr1xx.cpp:114:5: error: non-type template argument referring to object \'a1\' with internal linkage is a C++11 extension [-Werror,-Wc++11-extensions]","clang/test/CXX/drs/dr1xx.cpp:116:5: error: non-type template argument referring to object \'a3\' with internal linkage is a C++11 extension [-Werror,-Wc++11-extensions]"} } }, ["ext_template_arg_unnamed_type"]={ [j]={"unnamed-type-template-args"}, [k]="unnamed-type-template-args", [c]="ext_template_arg_unnamed_type", [d]="template argument uses unnamed type", [b]="template argument uses unnamed type", [h]=m, [g]="template argument uses unnamed type", [f]=" \\[(?:\\-Werror,)?\\-Wunnamed\\-type\\-template\\-args[^\\]]*\\]", [e]=n, [i]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,","Allow anonymous and local types. The support was already in place for these,\nbut this makes them work even as an extension in C++98. This resolves PR8077.\n\nllvm-svn: 113011"}, [a]={{H,6468,"bool UnnamedLocalNoLinkageFinder::VisitTagDecl(const TagDecl *Tag) {\n // ...\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;"}}, [l]={ ["clang/test/CodeGenCXX/mangle-unnamed.cpp"]={"clang/test/CodeGenCXX/mangle-unnamed.cpp:84:16: warning: template argument uses unnamed type [-Wunnamed-type-template-args]","clang/test/CodeGenCXX/mangle-unnamed.cpp:83:53: warning: template argument uses unnamed type [-Wunnamed-type-template-args]"} } }, ["ext_template_outside_of_template"]={ [j]={P,y}, [k]=y, [c]="ext_template_outside_of_template", [d]="\'template\' keyword outside of a template", [b]="\'template\' keyword outside of a template", [h]=m, [g]="\'template\' keyword outside of a template", [f]=R, [e]=n, [i]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'","Fix the recently-added warning about \'typename\' and \'template\'\ndisambiguation keywords outside of templates in C++98/03. Previously,\nthe warning would fire when the associated nested-name-specifier was\nnot dependent, but that was a misreading of the C++98/03 standard:\nnow, we complain only when we\'re outside of any template.\n\nllvm-svn: 106161"}, [a]={{H,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);"}}, [l]={ ["clang/test/SemaTemplate/nested-name-spec-template.cpp"]={"clang/test/SemaTemplate/nested-name-spec-template.cpp:26:6: warning: \'template\' keyword outside of a template [-Wc++11-extensions]","clang/test/SemaTemplate/nested-name-spec-template.cpp:31:6: warning: \'template\' keyword outside of a template [-Wc++11-extensions]"} } }, ["ext_template_param_shadow"]={ [j]={z,Q,"microsoft-template-shadow"}, [k]="microsoft-template-shadow", [c]={{nil,t,"ext_template_param_shadow"}}, [d]={{nil,t,"declaration of %0 shadows template parameter"}}, [b]={{nil,t,"declaration of A shadows template parameter"}}, [h]=m, [g]="declaration of (.*?) shadows template parameter", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-template\\-shadow[^\\]]*\\]", [e]={{nil,t,n}}, [i]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, [a]={{H,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 // ...\n unsigned DiagId = getLangOpts().MSVCCompat ? diag::ext_template_param_shadow : diag::err_template_param_shadow;"}}, [l]={ ["clang/test/SemaCXX/microsoft-template-shadow.cpp"]={"clang/test/SemaCXX/microsoft-template-shadow.cpp:5:22: warning: declaration of \'T\' shadows template parameter [-Wmicrosoft-template-shadow]"} } }, ["ext_template_parameter_default_in_function_template"]={ [j]={P,y}, [k]=y, [c]="ext_template_parameter_default_in_function_template", [d]="default template arguments for a function template are a C++11 extension", [b]="default template arguments for a function template are a C++11 extension", [h]=m, [g]="default template arguments for a function template are a C\\+\\+11 extension", [f]=R, [e]=n, [i]={"8b481d8ac2af",1296791842,"When a function template\'s template parameter has a default argument,","When a function template\'s template parameter has a default argument,\nit\'s okay for the following template parameters to not have default\narguments (since those template parameters can still be\ndeduced). Also, downgrade the error about default template arguments\nin function templates to an extension warning, since this is a\nharmless C++0x extension.\n\nllvm-svn: 124855"}, [a]={{H,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 // ...\n case Sema::TPC_FunctionTemplate:\n case Sema::TPC_FriendFunctionTemplateDefinition:\n // ...\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;"}}, [l]={ ["clang/test/CXX/temp/temp.param/p9.cpp"]={"clang/test/CXX/temp/temp.param/p9.cpp:5:19: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]","clang/test/CXX/temp/temp.param/p9.cpp:7:19: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]"} } }, ["ext_template_template_param_typename"]={ [j]={N,jb}, [k]=N, [c]="ext_template_template_param_typename", [d]="template template parameter using \'typename\' is a C++1z extension", [b]="template template parameter using \'typename\' is a C++1z extension", [h]=m, [g]="template template parameter using \'typename\' is a C\\+\\+17 extension", [f]=kb, [e]=s, [i]={"78e1ca692bf0",1402933882,"[C++1z] Implement N4051: \'typename\' is permitted instead of \'class\' when declaring a template templa...","[C++1z] Implement N4051: \'typename\' is permitted instead of \'class\' when declaring a template template parameter.\n\nllvm-svn: 211031"}, [a]={{"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 // ...\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 // ...\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());"}}, [l]={ ["clang/test/Parser/cxx-template-decl.cpp"]={"clang/test/Parser/cxx-template-decl.cpp:31:31: warning: template template parameter using \'typename\' is a C++17 extension [-Wc++17-extensions]"} } }, ["ext_thread_before"]={ [j]={o}, [k]=o, [c]="ext_thread_before", [d]="\'__thread\' before \'%0\'", [b]="\'__thread\' before \'A\'", [h]=m, [g]="\'__thread\' before \'(.*?)\'", [f]=M, [e]=s, [i]={v,1236199783,w,x}, [a]={{W,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 // ...\n while (true) {\n // ...\n case tok::kw_extern:\n if (DS.getThreadStorageClassSpec() == DeclSpec::TSCS___thread)\n Diag(Tok, diag::ext_thread_before) << \"extern\";"},{W,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 // ...\n while (true) {\n // ...\n case tok::kw_static:\n if (DS.getThreadStorageClassSpec() == DeclSpec::TSCS___thread)\n Diag(Tok, diag::ext_thread_before) << \"static\";"}}, [l]={ ["clang/test/Sema/thread-specifier.c"]={"clang/test/Sema/thread-specifier.c:10:10: warning: \'__thread\' before \'extern\' [-Wpedantic]","clang/test/Sema/thread-specifier.c:11:10: warning: \'__thread\' before \'static\' [-Wpedantic]"} } }, ["ext_token_used"]={ [j]={"language-extension-token",o}, [k]="language-extension-token", [c]="ext_token_used", [d]="extension used", [b]="extension used", [h]=m, [g]="extension used", [f]=" \\[(?:\\-Werror,)?\\-Wlanguage\\-extension\\-token[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{"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 // ...\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);"}}, [l]={ ["clang/test/Preprocessor/extension-warning.c"]={"clang/test/Preprocessor/extension-warning.c:9:1: warning: extension used [-Wlanguage-extension-token]"} } }, ["ext_type_defined_in_offsetof"]={ [j]={B,"gnu-offsetof-extensions",o}, [k]="gnu-offsetof-extensions", [c]={{nil,U,"ext_type_defined_in_offsetof"}}, [d]={{nil,U,"defining a type within \'%select{__builtin_offsetof|offsetof}0\' is a Clang extension"}}, [b]={{nil,U,{"defining a type within \'",{"__builtin_offsetof","offsetof"},"\' is a Clang extension"}}}, [h]=m, [g]="defining a type within \'(?:__builtin_offsetof|offsetof)\' is a Clang extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-offsetof\\-extensions[^\\]]*\\]", [e]={{nil,U,n}}, [i]={Pb,1625925174,Ob,Nb}, [a]={{p,17549,"CreateNewDecl:\n // ...\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();"}}, [l]={ ["clang/test/C/drs/dr4xx.c"]={"clang/test/C/drs/dr4xx.c:353:36: warning: defining a type within \'__builtin_offsetof\' is a Clang extension [-Wgnu-offsetof-extensions]"} } }, ["ext_typecheck_addrof_temporary"]={ [j]={"address-of-temporary"}, [k]="address-of-temporary", [c]="ext_typecheck_addrof_temporary", [d]="taking the address of a temporary object of type %0", [b]="taking the address of a temporary object of type A", [h]=F, [g]="taking the address of a temporary object of type (.*?)", [f]=" \\[[^\\]]*\\-Waddress\\-of\\-temporary[^\\]]*\\]", [e]=n, [i]={"c084bd288815",1359771285,"PR15132: Replace \"address expression must be an lvalue or a function","PR15132: Replace \"address expression must be an lvalue or a function\ndesignator\" diagnostic with more correct and more human-friendly \"cannot take\naddress of rvalue of type \'T\'\".\n\nFor the case of & &T::f, provide a custom diagnostic, rather than unhelpfully\nsaying \"cannot take address of rvalue of type \'<overloaded function type>\'\".\n\nFor the case of &array_temporary, treat it just like a class temporary\n(including allowing it as an extension); the existing diagnostic wording\nfor the class temporary case works fine.\n\nllvm-svn: 174262"}, [a]={{r,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 // ...\n if (lval == Expr::LV_ClassTemporary || lval == Expr::LV_ArrayTemporary) {\n // ...\n Diag(OpLoc, isSFINAEContext() ? diag::err_typecheck_addrof_temporary : diag::ext_typecheck_addrof_temporary) << op->getType() << op->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/address-of-temporary.cpp"]={"clang/test/SemaCXX/address-of-temporary.cpp:8:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]","clang/test/SemaCXX/address-of-temporary.cpp:9:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]","clang/test/SemaCXX/address-of-temporary.cpp:10:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]","clang/test/SemaCXX/address-of-temporary.cpp:11:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]"} } }, ["ext_typecheck_addrof_void"]={ [j]={o}, [k]=o, [c]="ext_typecheck_addrof_void", [d]="ISO C forbids taking the address of an expression of type \'void\'", [b]="ISO C forbids taking the address of an expression of type \'void\'", [h]=m, [g]="ISO C forbids taking the address of an expression of type \'void\'", [f]=M, [e]=n, [i]={"b8c4fd8cfd27",1241390165,"PR2524: downgrade taking address of expression of type \'void\' to an ","PR2524: downgrade taking address of expression of type \'void\' to an \nextension warning.\n\nllvm-svn: 70805"}, [a]={{r,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 // ...\n if (lval == Expr::LV_IncompleteVoidType) {\n // ...\n Diag(OpLoc, diag::ext_typecheck_addrof_void) << op->getSourceRange();"}}, [l]={ ["clang/test/Sema/deref.c"]={"clang/test/Sema/deref.c:21:12: warning: ISO C forbids taking the address of an expression of type \'void\' [-Wpedantic]","clang/test/Sema/deref.c:35:10: warning: ISO C forbids taking the address of an expression of type \'void\' [-Wpedantic]"} } }, ["ext_typecheck_base_super"]={ [j]={"super-class-method-mismatch"}, [k]="super-class-method-mismatch", [c]="ext_typecheck_base_super", [d]="method parameter type %diff{$ does not match super class method parameter type $|does not match super class method parameter type}0,1", [b]={{nil,nil,{"method parameter type ",{"A does not match super class method parameter type B","does not match super class method parameter type"}}}}, [h]=m, [g]="method parameter type (?:(.*?) does not match super class method parameter type (.*?)|does not match super class method parameter type)", [f]=" \\[(?:\\-Werror,)?\\-Wsuper\\-class\\-method\\-mismatch[^\\]]*\\]", [e]=n, [i]={"10ff786e1eb8",1249348036,"Compare matching selectors in current and","Compare matching selectors in current and\nsuper class(s) and warn on any parameter\ntype mismatch if potentially unsafe. \n\nllvm-svn: 78029"}, [a]={{"clang/lib/Sema/SemaDeclObjC.cpp",4528,"void Sema::CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC) {\n // ...\n for (ObjCMethodDecl *overridden : overrides) {\n // ...\n if (CurrentClass && overridden->getDeclContext() != CurrentClass && isa<ObjCInterfaceDecl>(overridden->getDeclContext()) && !overridden->isImplicit() /* not meant for properties */) {\n // ...\n for (; ParamI != E && PrevI != PrevE; ++ParamI, ++PrevI) {\n // ...\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;"}}, [l]={ ["clang/test/SemaObjC/warn-superclass-method-mismatch.m"]={"clang/test/SemaObjC/warn-superclass-method-mismatch.m:24:29: warning: method parameter type \'struct A *\' does not match super class method parameter type \'int *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:25:25: warning: method parameter type \'Sub *\' does not match super class method parameter type \'Base *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:27:29: warning: method parameter type \'Sub *\' does not match super class method parameter type \'Base *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:29:50: warning: method parameter type \'Sub *\' does not match super class method parameter type \'int *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:30:30: warning: method parameter type \'float\' does not match super class method parameter type \'double\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:31:31: warning: method parameter type \'double\' does not match super class method parameter type \'float\' [-Wsuper-class-method-mismatch]"} } }, ["ext_typecheck_cast_nonscalar"]={ [j]={o}, [k]=o, [c]="ext_typecheck_cast_nonscalar", [d]="C99 forbids casting nonscalar type %0 to the same type", [b]="C99 forbids casting nonscalar type A to the same type", [h]=m, [g]="C99 forbids casting nonscalar type (.*?) to the same type", [f]=M, [e]=n, [i]={I,1237025389,K,J}, [a]={{"clang/lib/Sema/SemaCast.cpp",3007,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n if (!DestType->isScalarType() && !DestType->isVectorType() && !DestType->isMatrixType()) {\n // ...\n if (DestRecordTy && Self.Context.hasSameUnqualifiedType(DestType, SrcType)) {\n // ...\n Self.Diag(OpRange.getBegin(), diag::ext_typecheck_cast_nonscalar) << DestType << SrcExpr.get()->getSourceRange();"}} }, ["ext_typecheck_cast_to_union"]={ [j]={B,"gnu-union-cast",o}, [k]="gnu-union-cast", [c]="ext_typecheck_cast_to_union", [d]="cast to union type is a GNU extension", [b]="cast to union type is a GNU extension", [h]=m, [g]="cast to union type is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-union\\-cast[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{"clang/lib/Sema/SemaCast.cpp",3017,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n if (!DestType->isScalarType() && !DestType->isVectorType() && !DestType->isMatrixType()) {\n // ...\n // GCC\'s cast to union extension.\n if (DestRecordTy && DestRecordTy->getDecl()->isUnion()) {\n // ...\n if (CastExpr::getTargetFieldForToUnionCast(RD, SrcType)) {\n Self.Diag(OpRange.getBegin(), diag::ext_typecheck_cast_to_union) << SrcExpr.get()->getSourceRange();"}}, [l]={ ["clang/test/Sema/cast-to-union.c"]={"clang/test/Sema/cast-to-union.c:7:5: warning: cast to union type is a GNU extension [-Wgnu-union-cast]","clang/test/Sema/cast-to-union.c:12:13: warning: cast to union type is a GNU extension [-Wgnu-union-cast]","clang/test/Sema/cast-to-union.c:16:14: warning: cast to union type is a GNU extension [-Wgnu-union-cast]"} } }, ["ext_typecheck_compare_complete_incomplete_pointers"]={ [j]={"c11-extensions",o}, [k]="c11-extensions", [c]={{nil,q,"ext_typecheck_compare_complete_incomplete_pointers"}}, [d]={{nil,q,"pointer comparisons before C11 need to be between two complete or two incomplete types; %0 is %select{|in}2complete and %1 is %select{|in}3complete"}}, [b]={{nil,q,{"pointer comparisons before C11 need to be between two complete or two incomplete types; A is ",{A,"in"},"complete and B is ",{A,"in"},"complete"}}}, [h]=m, [g]="pointer comparisons before C11 need to be between two complete or two incomplete types; (.*?) is (?:|in)complete and (.*?) is (?:|in)complete", [f]=" \\[(?:\\-Werror,)?\\-Wc11\\-extensions[^\\]]*\\]", [e]={{nil,q,n}}, [i]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata","[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the new objc_direct attribute, this change adds a new\nattribute that remotes metadata from Protocols that the programmer knows\nisn\'t going to be used at runtime. We simply have the frontend skip\ngenerating any protocol metadata entries (e.g. OBJC_CLASS_NAME,\n_OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol\nmarked with `__attribute__((objc_non_runtime_protocol))`.\n\nThere are a few APIs used to retrieve a protocol at runtime.\n`@protocol(SomeProtocol)` will now error out of the requested protocol\nis marked with attribute. `objc_getProtocol` will return `NULL` which\nis consistent with the behavior of a non-existing protocol.\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D75574"}, [a]={{r,13131,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if ((LHSType->isIntegerType() && !LHSIsNull) || (RHSType->isIntegerType() && !RHSIsNull)) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else if (LHSType->isPointerType() && RHSType->isPointerType()) { // C99 6.5.8p2\n // ...\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();"}}, [l]={ ["clang/test/Sema/complete-incomplete-pointer-relational-c99.c"]={"clang/test/Sema/complete-incomplete-pointer-relational-c99.c:8:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]","clang/test/Sema/complete-incomplete-pointer-relational-c99.c:9:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]","clang/test/Sema/complete-incomplete-pointer-relational-c99.c:10:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]","clang/test/Sema/complete-incomplete-pointer-relational-c99.c:11:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]"} } }, ["ext_typecheck_comparison_of_distinct_pointers"]={ [j]={"compare-distinct-pointer-types"}, [k]="compare-distinct-pointer-types", [c]="ext_typecheck_comparison_of_distinct_pointers", [d]="comparison of distinct pointer types%diff{ ($ and $)|}0,1", [b]={{nil,nil,{"comparison of distinct pointer types",{" (A and B)",A}}}}, [h]=m, [g]="comparison of distinct pointer types(?: \\((.*?) and (.*?)\\)|)", [f]=" \\[(?:\\-Werror,)?\\-Wcompare\\-distinct\\-pointer\\-types[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{r,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(); }"}}, [l]={ ["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:74:12: warning: comparison of distinct pointer types (\'id<P1>\' and \'A *\') [-Wcompare-distinct-pointer-types]"} } }, ["ext_typecheck_comparison_of_fptr_to_void"]={ [j]={o}, [k]=o, [c]="ext_typecheck_comparison_of_fptr_to_void", [d]="equality comparison between function pointer and void pointer (%0 and %1)", [b]="equality comparison between function pointer and void pointer (A and B)", [h]=m, [g]="equality comparison between function pointer and void pointer \\((.*?) and (.*?)\\)", [f]=M, [e]=n, [i]={"16c209610c8b",1250987267,"Catch a few more cases of illegal comparisons.","Catch a few more cases of illegal comparisons.\n\nllvm-svn: 79793"}, [a]={{r,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(); }"}}, [l]={ ["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:225:12: warning: equality comparison between function pointer and void pointer (\'int (*)(int)\' and \'void *\') [-Wpedantic]"} } }, ["ext_typecheck_comparison_of_pointer_integer"]={ [j]={"pointer-integer-compare"}, [k]="pointer-integer-compare", [c]="ext_typecheck_comparison_of_pointer_integer", [d]="comparison between pointer and integer (%0 and %1)", [b]="comparison between pointer and integer (A and B)", [h]=m, [g]="comparison between pointer and integer \\((.*?) and (.*?)\\)", [f]=" \\[(?:\\-Werror,)?\\-Wpointer\\-integer\\-compare[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{r,13479,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n // ...\n if (LangOpts.DebuggerSupport) {\n // ...\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else if (IsOrdered)\n // ...\n else\n DiagID = diag::ext_typecheck_comparison_of_pointer_integer;"}}, [l]={ ["clang/test/SemaObjC/comptypes-7.m"]={"clang/test/SemaObjC/comptypes-7.m:49:11: warning: comparison between pointer and integer (\'id\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:50:9: warning: comparison between pointer and integer (\'int\' and \'id\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:54:13: warning: comparison between pointer and integer (\'MyClass *\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:55:9: warning: comparison between pointer and integer (\'int\' and \'MyClass *\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:59:13: warning: comparison between pointer and integer (\'id<MyProtocol>\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:60:9: warning: comparison between pointer and integer (\'int\' and \'id<MyProtocol>\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:64:13: warning: comparison between pointer and integer (\'Class\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:65:9: warning: comparison between pointer and integer (\'int\' and \'Class\') [-Wpointer-integer-compare]"} } }, ["ext_typecheck_cond_incompatible_operands"]={ [c]="ext_typecheck_cond_incompatible_operands", [d]="incompatible operand types (%0 and %1)", [b]="incompatible operand types (A and B)", [h]=m, [g]="incompatible operand types \\((.*?) and (.*?)\\)", [f]=yb, [e]=n, [i]={"1b821b4fc583",1241666054,"Improve semantic checking for blocks. Radar 6441502","Improve semantic checking for blocks. Radar 6441502\n\nllvm-svn: 71145"}, [a]={{r,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 // ...\n // Check constraints for Objective-C object pointers types.\n if (LHSTy->isObjCObjectPointerType() && RHSTy->isObjCObjectPointerType()) {\n // ...\n // FIXME: Consider unifying with \'areComparableObjCPointerTypes\'.\n // It could return the composite type.\n if (!(compositeType = Context.areCommonBaseCompatible(LHSOPT, RHSOPT)).isNull()) {\n // ...\n } else if (Context.canAssignObjCInterfaces(LHSOPT, RHSOPT)) {\n // ...\n } else if (Context.canAssignObjCInterfaces(RHSOPT, LHSOPT)) {\n // ...\n } else if ((LHSOPT->isObjCQualifiedIdType() || RHSOPT->isObjCQualifiedIdType()) && Context.ObjCQualifiedIdTypesAreCompatible(LHSOPT, RHSOPT, true)) {\n // ...\n } else if (LHSTy->isObjCIdType() || RHSTy->isObjCIdType()) {\n // ...\n } else {\n Diag(QuestionLoc, diag::ext_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, [l]={ ["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:78:16: warning: incompatible operand types (\'id<P1>\' and \'A *\')"} } }, ["ext_typecheck_cond_incompatible_pointers"]={ [j]={"pointer-type-mismatch"}, [k]="pointer-type-mismatch", [c]="ext_typecheck_cond_incompatible_pointers", [d]="pointer type mismatch%diff{ ($ and $)|}0,1", [b]={{nil,nil,{"pointer type mismatch",{" (A and B)",A}}}}, [h]=m, [g]="pointer type mismatch(?: \\((.*?) and (.*?)\\)|)", [f]=" \\[(?:\\-Werror,)?\\-Wpointer\\-type\\-mismatch[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{r,8784,"/// Checks compatibility between two pointers and return the resulting\n/// type.\nstatic QualType checkConditionalPointerCompatibility(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) {\n // ...\n if (CompositeTy.isNull()) {\n // ...\n S.Diag(Loc, diag::ext_typecheck_cond_incompatible_pointers) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, [l]={ ["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:9:7: warning: pointer type mismatch (\'double *\' and \'int *\') [-Wpointer-type-mismatch]","clang/test/Sema/conditional-expr.c:38:21: warning: pointer type mismatch (\'int *\' and \'enum (unnamed enum at clang/test/Sema/conditional-expr.c:36:3) *\') [-Wpointer-type-mismatch]"} } }, ["ext_typecheck_cond_one_void"]={ [j]={o}, [k]=o, [c]="ext_typecheck_cond_one_void", [d]="C99 forbids conditional expressions with only one void side", [b]="C99 forbids conditional expressions with only one void side", [h]=m, [g]="C99 forbids conditional expressions with only one void side", [f]=M, [e]=n, [i]={I,1237025389,K,J}, [a]={{r,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 // ...\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 // ...\n if (LHSTy->isVoidType() && RHSTy->isVoidType()) {\n // ...\n } else if (RHSTy->isVoidType()) {\n // ...\n Diag(RHS.get()->getBeginLoc(), diag::ext_typecheck_cond_one_void) << RHS.get()->getSourceRange();"},{r,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 // ...\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 // ...\n if (LHSTy->isVoidType() && RHSTy->isVoidType()) {\n // ...\n } else if (RHSTy->isVoidType()) {\n // ...\n } else {\n // ...\n Diag(LHS.get()->getBeginLoc(), diag::ext_typecheck_cond_one_void) << LHS.get()->getSourceRange();"}}, [l]={ ["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:89:60: warning: C99 forbids conditional expressions with only one void side [-Wpedantic]"} } }, ["ext_typecheck_cond_pointer_integer_mismatch"]={ [j]={"conditional-type-mismatch"}, [k]="conditional-type-mismatch", [c]="ext_typecheck_cond_pointer_integer_mismatch", [d]="pointer/integer type mismatch in conditional expression%diff{ ($ and $)|}0,1", [b]={{nil,nil,{"pointer/integer type mismatch in conditional expression",{" (A and B)",A}}}}, [h]=m, [g]="pointer\\/integer type mismatch in conditional expression(?: \\((.*?) and (.*?)\\)|)", [f]=" \\[(?:\\-Werror,)?\\-Wconditional\\-type\\-mismatch[^\\]]*\\]", [e]=n, [i]={ab,1405733957,cb,Y}, [a]={{r,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 // ...\n S.Diag(Loc, diag::ext_typecheck_cond_pointer_integer_mismatch) << Expr1->getType() << Expr2->getType() << Expr1->getSourceRange() << Expr2->getSourceRange();"}}, [l]={ ["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:99:12: warning: pointer/integer type mismatch in conditional expression (\'int\' and \'void *\') [-Wconditional-type-mismatch]"} } }, ["ext_typecheck_convert_discards_qualifiers"]={ [j]={Bc,"incompatible-pointer-types-discards-qualifiers"}, [k]="incompatible-pointer-types-discards-qualifiers", [c]="ext_typecheck_convert_discards_qualifiers", [d]="%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 discards qualifiers", [b]={{nil,nil,{{{{vb,Kb}},{{xb,wb}},{{tb,Ab}},{{Bb,Db}},{{Eb,Fb}},{{Gb,Hb}},{{Ib,Jb}}}," discards qualifiers"}}}, [h]=m, [g]="(?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types)) discards qualifiers", [f]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types\\-discards\\-qualifiers[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{"clang/lib/Sema/SemaChecking.cpp",3199,"bool Sema::CheckARMBuiltinExclusiveCall(unsigned BuiltinID, CallExpr *TheCall, unsigned MaxWidth) {\n // ...\n if (!AddrType.isAtLeastAsQualifiedAs(ValType)) {\n // ...\n Diag(DRE->getBeginLoc(), diag::ext_typecheck_convert_discards_qualifiers) << PointerArg->getType() << Context.getPointerType(AddrType) << AA_Passing << PointerArg->getSourceRange();"},{r,17638,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case CompatiblePointerDiscardsQualifiers:\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_discards_qualifiers;"}}, [l]={ ["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:29:9: warning: initializing \'void *\' with an expression of type \'const void *\' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]"} } }, ["ext_typecheck_convert_incompatible_function_pointer"]={ [j]={"incompatible-function-pointer-types",Bc}, [k]="incompatible-function-pointer-types", [c]="ext_typecheck_convert_incompatible_function_pointer", [d]="incompatible function pointer types %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", [b]={{nil,nil,{"incompatible function pointer types ",{{{vb,Kb}},{{xb,wb}},{{tb,Ab}},{{Bb,Db}},{{Eb,Fb}},{{Gb,Hb}},{{Ib,Jb}}},{A,"; dereference with *","; take the address with &","; remove *","; remove &"}}}}, [h]=F, [g]="incompatible function pointer types (?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)", [f]=" \\[[^\\]]*\\-Wincompatible\\-function\\-pointer\\-types[^\\]]*\\]", [e]=n, [i]={"d9b7dfe4a4df",1468874226,"[Sema] Create a separate group for incompatible function pointer warning","[Sema] Create a separate group for incompatible function pointer warning\n\nGive incompatible function pointer warning its own diagnostic group\nbut still leave it as a subgroup of incompatible-pointer-types. This is in\npreparation to promote -Wincompatible-function-pointer-types to error on\ndarwin.\n\nDifferential Revision: https://reviews.llvm.org/D22248\n\nrdar://problem/12907612\n\nllvm-svn: 275907"}, [a]={{r,17561,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatibleFunctionPointer:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_incompatible_function_pointer;"}}, [l]={ ["clang/test/C/C2x/n2975.c"]={"clang/test/C/C2x/n2975.c:65:6: error: incompatible function pointer types initializing \'fp\' (aka \'void (*)(...)\') with an expression of type \'void (int, int, ...)\' [-Wincompatible-function-pointer-types]"} } }, ["ext_typecheck_convert_incompatible_pointer"]={ [j]={Bc}, [k]=Bc, [c]="ext_typecheck_convert_incompatible_pointer", [d]="incompatible pointer types %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", [b]={{nil,nil,{"incompatible pointer types ",{{{vb,Kb}},{{xb,wb}},{{tb,Ab}},{{Bb,Db}},{{Eb,Fb}},{{Gb,Hb}},{{Ib,Jb}}},{A,"; dereference with *","; take the address with &","; remove *","; remove &"}}}}, [h]=m, [g]="incompatible pointer types (?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)", [f]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{r,17580,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatiblePointer:\n if (Action == AA_Passing_CFAudited) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_incompatible_pointer;"},{Cb,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 // ...\n case ICK_Writeback_Conversion:\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;"},{Cb,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 // ...\n case ICK_Writeback_Conversion:\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 // ...\n else\n Diag(From->getBeginLoc(), diag::ext_typecheck_convert_incompatible_pointer) << From->getType() << ToType << Action << From->getSourceRange() << 0;"}}, [l]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:60:10: warning: incompatible pointer types returning \'int *\' from a function with result type \'float *\' [-Wincompatible-pointer-types]"} } }, ["ext_typecheck_convert_incompatible_pointer_sign"]={ [j]={"pointer-sign"}, [k]="pointer-sign", [c]="ext_typecheck_convert_incompatible_pointer_sign", [d]={{nil,X,"%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 converts between pointers to integer types %select{with different sign|where one is of the unique plain \'char\' type and the other is not}3"},{Yb,nil,"%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 converts between pointers to integer types with different sign"}}, [b]={{nil,X,{{{{vb,Kb}},{{xb,wb}},{{tb,Ab}},{{Bb,Db}},{{Eb,Fb}},{{Gb,Hb}},{{Ib,Jb}}}," converts between pointers to integer types ",{"with different sign","where one is of the unique plain \'char\' type and the other is not"}}},{Yb,nil,{{{{vb,Kb}},{{xb,wb}},{{tb,Ab}},{{Bb,Db}},{{Eb,Fb}},{{Gb,Hb}},{{Ib,Jb}}}," converts between pointers to integer types with different sign"}}}, [h]=m, [g]="(?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types)) converts between pointers to integer types (?:with different sign|where one is of the unique plain \'char\' type and the other is not)", [f]=" \\[(?:\\-Werror,)?\\-Wpointer\\-sign[^\\]]*\\]", [e]=n, [i]={"80160bd483b3",1237766384,"Partial implementation of PR3342: break out pointer sign ","Partial implementation of PR3342: break out pointer sign \nincompatibilities in assignments from other pointer incompatibilities. \nBased off of the patch in PR3342. (This doesn\'t implement -Wno-pointer-sign,\nbut I don\'t know the driver code very well.)\n\nllvm-svn: 67494"}, [a]={{r,17588,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatiblePointerSign:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_incompatible_pointer_sign;"},{r,17743,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n if (DiagKind == diag::ext_typecheck_convert_incompatible_pointer_sign || DiagKind == diag::err_typecheck_convert_incompatible_pointer_sign) {"}}, [l]={ ["clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch-error.c:10:19: warning: passing \'volatile unsigned int *\' to parameter of type \'volatile int *\' converts between pointers to integer types with different sign [-Wpointer-sign]","clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch-error.c:17:21: warning: passing \'volatile unsigned long *\' to parameter of type \'volatile long *\' converts between pointers to integer types with different sign [-Wpointer-sign]"} } }, ["ext_typecheck_convert_int_pointer"]={ [j]={"conversion","int-conversion","int-conversions","non-gcc"}, [k]="int-conversion", [c]="ext_typecheck_convert_int_pointer", [d]="incompatible integer to pointer conversion %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", [b]={{nil,nil,{"incompatible integer to pointer conversion ",{{{vb,Kb}},{{xb,wb}},{{tb,Ab}},{{Bb,Db}},{{Eb,Fb}},{{Gb,Hb}},{{Ib,Jb}}},{A,"; dereference with *","; take the address with &","; remove *","; remove &"}}}}, [h]=F, [g]="incompatible integer to pointer conversion (?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)", [f]=" \\[[^\\]]*\\-Wint\\-conversion[^\\]]*\\]", [e]="Value Conversion Issue", [i]={I,1237025389,K,J}, [a]={{r,17545,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IntToPointer:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_int_pointer;"}}, [l]={ ["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:20:16: error: incompatible integer to pointer conversion passing \'int\' to parameter of type \'char *\' [-Wint-conversion]","clang/test/SemaObjC/argument-checking.m:23:21: error: incompatible integer to pointer conversion sending \'int\' to parameter of type \'char *\' [-Wint-conversion]"} } }, ["ext_typecheck_convert_pointer_int"]={ [j]={"conversion","int-conversion","int-conversions","non-gcc"}, [k]="int-conversion", [c]="ext_typecheck_convert_pointer_int", [d]="incompatible pointer to integer conversion %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", [b]={{nil,nil,{"incompatible pointer to integer conversion ",{{{vb,Kb}},{{xb,wb}},{{tb,Ab}},{{Bb,Db}},{{Eb,Fb}},{{Gb,Hb}},{{Ib,Jb}}},{A,"; dereference with *","; take the address with &","; remove *","; remove &"}}}}, [h]=F, [g]="incompatible pointer to integer conversion (?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)", [f]=" \\[[^\\]]*\\-Wint\\-conversion[^\\]]*\\]", [e]="Value Conversion Issue", [i]={I,1237025389,K,J}, [a]={{r,17535,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case PointerToInt:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_pointer_int;"}}, [l]={ ["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:21:12: error: incompatible pointer to integer conversion passing \'char[4]\' to parameter of type \'char\' [-Wint-conversion]"} } }, ["ext_typecheck_convert_pointer_void_func"]={ [j]={o}, [k]=o, [c]="ext_typecheck_convert_pointer_void_func", [d]="%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 converts between void pointer and function pointer", [b]={{nil,nil,{{{{vb,Kb}},{{xb,wb}},{{tb,Ab}},{{Bb,Db}},{{Eb,Fb}},{{Gb,Hb}},{{Ib,Jb}}}," converts between void pointer and function pointer"}}}, [h]=m, [g]="(?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types)) converts between void pointer and function pointer", [f]=M, [e]=n, [i]={I,1237025389,K,J}, [a]={{r,17603,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case FunctionVoidPointer:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_pointer_void_func;"}}, [l]={ ["clang/test/Sema/function-ptr.c"]={"clang/test/Sema/function-ptr.c:6:7: warning: assigning to \'unary_int_func *\' (aka \'int (*)(int)\') from \'void *\' converts between void pointer and function pointer [-Wpedantic]","clang/test/Sema/function-ptr.c:7:4: warning: assigning to \'void *\' from \'unary_int_func *\' (aka \'int (*)(int)\') converts between void pointer and function pointer [-Wpedantic]","clang/test/Sema/function-ptr.c:9:9: warning: returning \'void *\' from a function with result type \'unary_int_func *\' (aka \'int (*)(int)\') converts between void pointer and function pointer [-Wpedantic]"} } }, ["ext_typecheck_decl_incomplete_type"]={ [j]={"tentative-definition-incomplete-type"}, [k]="tentative-definition-incomplete-type", [c]="ext_typecheck_decl_incomplete_type", [d]="tentative definition of variable with internal linkage has incomplete non-array type %0", [b]="tentative definition of variable with internal linkage has incomplete non-array type A", [h]=m, [g]="tentative definition of variable with internal linkage has incomplete non\\-array type (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wtentative\\-definition\\-incomplete\\-type[^\\]]*\\]", [e]=n, [i]={"47d2859b3e27",1248115619,"Improve GCC compatibility by allowing static tentative definitions of","Improve GCC compatibility by allowing static tentative definitions of\nincomplete type (with a warning), from Enea Zaffanella!\n\nllvm-svn: 76451"}, [a]={{p,13816,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\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 // ...\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);"}}, [l]={ ["clang/test/Sema/tentative-decls.c"]={"clang/test/Sema/tentative-decls.c:5:17: warning: tentative definition of variable with internal linkage has incomplete non-array type \'struct a\' [-Wtentative-definition-incomplete-type]"} } }, ["ext_typecheck_indirection_through_void_pointer"]={ [j]={"void-ptr-dereference"}, [k]="void-ptr-dereference", [c]="ext_typecheck_indirection_through_void_pointer", [d]={{nil,U,"ISO C does not allow indirection on operand of type %0"},{D,nil,"ISO C++ does not allow indirection on operand of type %0"}}, [b]={{nil,U,"ISO C does not allow indirection on operand of type A"},{D,nil,"ISO C++ does not allow indirection on operand of type A"}}, [h]=m, [g]="ISO C does not allow indirection on operand of type (.*?)", [f]=" \\[(?:\\-Werror,)?\\-Wvoid\\-ptr\\-dereference[^\\]]*\\]", [e]=n, [i]={"80877c228d01",1399499607,"Add an Extension warning for applying unary * to an operand of type \'void*\' in","Add an Extension warning for applying unary * to an operand of type \'void*\' in\nC++. This seems like a pointless (and indeed harmful) restriction to me, so\nI\'ve suggested removing it to -core and disabled this diagnostic by default.\n\nllvm-svn: 208254"}, [a]={{r,15294,"/// CheckIndirectionOperand - Type check unary indirection (prefix \'*\').\nstatic QualType CheckIndirectionOperand(Sema &S, Expr *Op, ExprValueKind &VK, SourceLocation OpLoc, bool IsAfterAmp = false) {\n // ...\n if (Result->isVoidType()) {\n // ...\n if (LO.CPlusPlus)\n // ...\n else if (!(LO.C99 && IsAfterAmp) && !S.isUnevaluatedContext())\n S.Diag(OpLoc, diag::ext_typecheck_indirection_through_void_pointer) << OpTy << Op->getSourceRange();"}}, [l]={ ["clang/test/Sema/deref.c"]={"clang/test/Sema/deref.c:21:13: warning: ISO C does not allow indirection on operand of type \'void *\' [-Wvoid-ptr-dereference]"} } }, ["ext_typecheck_ordered_comparison_of_function_pointers"]={ [j]={"ordered-compare-function-pointers"}, [k]="ordered-compare-function-pointers", [c]="ext_typecheck_ordered_comparison_of_function_pointers", [d]="ordered comparison of function pointers (%0 and %1)", [b]="ordered comparison of function pointers (A and B)", [h]=m, [g]="ordered comparison of function pointers \\((.*?) and (.*?)\\)", [f]=" \\[(?:\\-Werror,)?\\-Wordered\\-compare\\-function\\-pointers[^\\]]*\\]", [e]=n, [i]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by","Implement PR4175, catching some questionable comparisons. Patch by\nDavid Majnemer!\n\nllvm-svn: 74513"}, [a]={{r,13109,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if (IsOrdered && LHSType->isFunctionPointerType() && RHSType->isFunctionPointerType()) {\n // ...\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"]={ [j]={o}, [k]=o, [c]="ext_typecheck_ordered_comparison_of_pointer_and_zero", [d]="ordered comparison between pointer and zero (%0 and %1) is an extension", [b]="ordered comparison between pointer and zero (A and B) is an extension", [h]=m, [g]="ordered comparison between pointer and zero \\((.*?) and (.*?)\\) is an extension", [f]=M, [e]=n, [i]={"d99bd52c7395",1250985824,"Eli points out that we really must diagnose \"void* > 0\" as an extension. ","Eli points out that we really must diagnose \"void* > 0\" as an extension. \nExplicitly add it as an EXTENSION instead of an EXTWARN so that it only\ncomes out with -pedantic. Thanks Eli!\n\nllvm-svn: 79791"}, [a]={{r,13352,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n // ...\n if (LangOpts.DebuggerSupport) {\n // ...\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n if (IsOrdered) {\n // ...\n DiagID = isError ? diag::err_typecheck_ordered_comparison_of_pointer_and_zero : diag::ext_typecheck_ordered_comparison_of_pointer_and_zero;"}}, [l]={ ["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:215:12: warning: ordered comparison between pointer and zero (\'int *\' and \'int\') is an extension [-Wpedantic]"} } }, ["ext_typecheck_ordered_comparison_of_pointer_integer"]={ [c]="ext_typecheck_ordered_comparison_of_pointer_integer", [d]="ordered comparison between pointer and integer (%0 and %1)", [b]="ordered comparison between pointer and integer (A and B)", [h]=m, [g]="ordered comparison between pointer and integer \\((.*?) and (.*?)\\)", [f]=yb, [e]=n, [i]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by","Implement PR4175, catching some questionable comparisons. Patch by\nDavid Majnemer!\n\nllvm-svn: 74513"}, [a]={{r,13357,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n // ...\n if (LangOpts.DebuggerSupport) {\n // ...\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else if (IsOrdered)\n DiagID = diag::ext_typecheck_ordered_comparison_of_pointer_integer;"}}, [l]={ ["clang/test/Parser/pointer_promotion.c"]={"clang/test/Parser/pointer_promotion.c:14:10: warning: ordered comparison between pointer and integer (\'int *\' and \'int\')","clang/test/Parser/pointer_promotion.c:15:12: warning: ordered comparison between pointer and integer (\'short\' and \'int *\')"} } }, ["ext_typecheck_zero_array_size"]={ [j]={B,o,"zero-length-array"}, [k]="zero-length-array", [c]="ext_typecheck_zero_array_size", [d]="zero size arrays are an extension", [b]="zero size arrays are an extension", [h]=m, [g]="zero size arrays are an extension", [f]=" \\[(?:\\-Werror,)?\\-Wzero\\-length\\-array[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{V,2075,"void InitListChecker::CheckArrayType(const InitializedEntity &Entity, InitListExpr *IList, QualType &DeclType, llvm::APSInt elementIndex, bool SubobjectIsDesignatorContext, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\n if (!hadError && DeclType->isIncompleteArrayType() && !VerifyOnly) {\n // ...\n if (maxElements == Zero && !Entity.isVariableLengthArrayNew()) {\n // ...\n SemaRef.Diag(IList->getBeginLoc(), diag::ext_typecheck_zero_array_size);"},{hb,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 // ...\n if (!ArraySize) {\n // ...\n } else if (ArraySize->isTypeDependent() || ArraySize->isValueDependent()) {\n // ...\n } else {\n // ...\n if (!R.isUsable()) {\n // ...\n } else if (!T->isDependentType() && !T->isIncompleteType() && !T->isConstantSizeType()) {\n // ...\n } else {\n // ...\n if (ConstVal == 0 && !T.isWebAssemblyReferenceType()) {\n // ...\n Diag(ArraySize->getBeginLoc(), isSFINAEContext() ? diag::err_typecheck_zero_array_size : diag::ext_typecheck_zero_array_size) << 0 << ArraySize->getSourceRange();"}}, [l]={ ["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:3:24: warning: zero size arrays are an extension [-Wzero-length-array]"} } }, ["ext_typedef_without_a_name"]={ [j]={oc}, [k]=oc, [c]="ext_typedef_without_a_name", [d]="typedef requires a name", [b]="typedef requires a name", [h]=m, [g]="typedef requires a name", [f]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", [e]=n, [i]={v,1236199783,w,x}, [a]={{p,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 // ...\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();"}}, [l]={ ["clang/test/Sema/decl-invalid.c"]={"clang/test/Sema/decl-invalid.c:4:1: warning: typedef requires a name [-Wmissing-declarations]","clang/test/Sema/decl-invalid.c:17:1: warning: typedef requires a name [-Wmissing-declarations]"} } }, ["ext_typename_missing"]={ [j]={"typename-missing"}, [k]="typename-missing", [c]="ext_typename_missing", [d]="missing \'typename\' prior to dependent type name \'%0%1\'", [b]="missing \'typename\' prior to dependent type name \'AB\'", [h]=m, [g]="missing \'typename\' prior to dependent type name \'(.*?)(.*?)\'", [f]=" \\[(?:\\-Werror,)?\\-Wtypename\\-missing[^\\]]*\\]", [e]=n, [i]={"32506ed8be37",1402614228,"Recover from missing \'typename\' in sizeof(T::InnerType)","Recover from missing \'typename\' in sizeof(T::InnerType)\n\nSummary:\n\'sizeof\' is a UnaryExprOrTypeTrait, and it can contain either a type or\nan expression. This change threads a RecoveryTSI parameter through the\nlayers between TransformUnaryExprOrTypeTrait the point at which we look\nup the type. If lookup finds a single type result after instantiation,\nwe now build TypeSourceInfo for it just like a normal transformation\nwould.\n\nThis fixes the last error in the hello world ATL app that I\'ve been\nworking with, and it now links and runs with clang. Please try it and\nfile bugs!\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D4108\n\nllvm-svn: 210855"}, [a]={{p,821,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n // ...\n if (!SS || (!SS->isSet() && !SS->isInvalid()))\n // ...\n else if (DeclContext *DC = computeDeclContext(*SS, false))\n // ...\n else if (SS->isValid() && SS->getScopeRep()->containsErrors()) {\n // ...\n } else if (isDependentScopeSpecifier(*SS)) {\n // ...\n if (getLangOpts().MSVCCompat && isMicrosoftMissingTypename(SS, S))\n DiagID = diag::ext_typename_missing;"},{r,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 // ...\n if (const TypeDecl *TD = R.getAsSingle<TypeDecl>()) {\n // ...\n if (RecoveryTSI && getLangOpts().MSVCCompat)\n DiagID = diag::ext_typename_missing;"}}, [l]={ ["clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp"]={"clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:34:76: warning: missing \'typename\' prior to dependent type name \'Bar::InnerType\' [-Wtypename-missing]","clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:36:72: warning: missing \'typename\' prior to dependent type name \'Bar::InnerType\' [-Wtypename-missing]","clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:8:52: warning: missing \'typename\' prior to dependent type name \'X::type\' [-Wtypename-missing]"} } }, ["ext_typename_outside_of_template"]={ [j]={P,y}, [k]=y, [c]="ext_typename_outside_of_template", [d]="\'typename\' occurs outside of a template", [b]="\'typename\' occurs outside of a template", [h]=m, [g]="\'typename\' occurs outside of a template", [f]=R, [e]=n, [i]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'","Fix the recently-added warning about \'typename\' and \'template\'\ndisambiguation keywords outside of templates in C++98/03. Previously,\nthe warning would fire when the associated nested-name-specifier was\nnot dependent, but that was a misreading of the C++98/03 standard:\nnow, we complain only when we\'re outside of any template.\n\nllvm-svn: 106161"}, [a]={{H,10811,"TypeResult Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc, ImplicitTypenameContext IsImplicitTypename) {\n // ...\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);"},{H,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);"}}, [l]={ ["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:61:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:62:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:63:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:64:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]"} } }, ["ext_undeclared_unqual_id_with_dependent_base"]={ [j]={z,Q}, [k]=Q, [c]="ext_undeclared_unqual_id_with_dependent_base", [d]="use of undeclared identifier %0; unqualified lookup into dependent bases of class template %1 is a Microsoft extension", [b]="use of undeclared identifier A; unqualified lookup into dependent bases of class template B is a Microsoft extension", [h]=m, [g]="use of undeclared identifier (.*?); unqualified lookup into dependent bases of class template (.*?) is a Microsoft extension", [f]=mb, [e]=n, [i]={"10ca24c63162",1402444888,"Allow lookup into dependent bases in more places under -fms-compatibility","Allow lookup into dependent bases in more places under -fms-compatibility\n\nWe currently allow unqualified lookup for instance methods but not\nstatic methods because we can\'t recover with a semantic \'this->\'\ninsertion.\n\nATL headers have static methods that do unqualified lookup into\ndependent base classes. The pattern looks like:\n\n template <typename T> struct Foo : T {\n static int *getBarFromT() { return Bar; }\n };\n\nNow we recover as if the user had written:\n\n template <typename T> struct Foo : T {\n static int *getBarFromT() { return Foo::Bar; }\n };\n\n... which will eventually look up Bar in T at instantiation time.\n\nNow we emit a diagnostic in both cases, and delay lookup in other\ncontexts where \'this\' is available and refers to a class with dependent\nbases.\n\nReviewed by: rsmith\n\nDifferential Revision: http://reviews.llvm.org/D4079\n\nllvm-svn: 210611"}, [a]={{"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 // ...\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 // ...\n if (DC->isDependentContext() && DC->isFunctionOrMethod()) {\n // ...\n if (ContainingClass && ContainingClass->hasAnyDependentBases()) {\n Diag(IdInfo.IdentifierLoc, diag::ext_undeclared_unqual_id_with_dependent_base) << IdInfo.Identifier << ContainingClass;"},{p,645,"ParsedType Sema::ActOnMSVCUnknownTypeName(const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg) {\n // ...\n if (IsTemplateTypeArg && getCurScope()->isTemplateParamScope()) {\n // ...\n } else if (const CXXRecordDecl *RD = findRecordWithDependentBasesOfEnclosingMethod(CurContext)) {\n // ...\n Diag(NameLoc, diag::ext_undeclared_unqual_id_with_dependent_base) << &II << RD;"},{r,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 // ...\n auto DB = S.Diag(Loc, diag::ext_undeclared_unqual_id_with_dependent_base);"}}, [l]={ ["clang/test/SemaTemplate/lookup-dependent-bases.cpp"]={"clang/test/SemaTemplate/lookup-dependent-bases.cpp:15:5: warning: use of undeclared identifier \'D\'; unqualified lookup into dependent bases of class template \'B\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/lookup-dependent-bases.cpp:49:7: warning: use of undeclared identifier \'D\'; unqualified lookup into dependent bases of class template \'C\' is a Microsoft extension [-Wmicrosoft-template]"} } }, ["ext_undefined_internal_type"]={ [j]={o,"undefined-internal-type"}, [k]="undefined-internal-type", [c]={{nil,E,"ext_undefined_internal_type"}}, [d]={{nil,E,"ISO C++ requires a definition in this translation unit for %select{function|variable}0 %q1 because its type does not have linkage"}}, [b]={{nil,E,{"ISO C++ requires a definition in this translation unit for ",{jc,yc}," B because its type does not have linkage"}}}, [h]=m, [g]="ISO C\\+\\+ requires a definition in this translation unit for (?:function|variable) (.*?) because its type does not have linkage", [f]=" \\[(?:\\-Werror,)?\\-Wundefined\\-internal\\-type[^\\]]*\\]", [e]={{nil,E,n}}, [i]={"405e2dbf3767",1505892120,"Implement C++ [basic.link]p8.","Implement C++ [basic.link]p8.\n\nIf a function or variable has a type with no linkage (and is not extern \"C\"),\nany use of it requires a definition within the same translation unit; the idea\nis that it is not possible to define the entity elsewhere, so any such use is\nnecessarily an error.\n\nThere is an exception, though: some types formally have no linkage but\nnonetheless can be referenced from other translation units (for example, this\nhappens to anonymous structures defined within inline functions). For entities\nwith those types, we suppress the diagnostic except under -pedantic.\n\nllvm-svn: 313729"}, [a]={{"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 // ...\n for (const auto &Undef : Undefined) {\n // ...\n if (S.isExternalWithNoLinkageType(VD)) {\n // ...\n S.Diag(VD->getLocation(), isExternallyVisible(VD->getType()->getLinkage()) ? diag::ext_undefined_internal_type : diag::err_undefined_internal_type) << isa<VarDecl>(VD) << VD;"}}, [l]={ ["clang/test/CXX/basic/basic.link/p8.cpp"]={"clang/test/CXX/basic/basic.link/p8.cpp:45:26: warning: ISO C++ requires a definition in this translation unit for function \'visible_no_linkage1\' because its type does not have linkage [-Wundefined-internal-type]","clang/test/CXX/basic/basic.link/p8.cpp:46:26: warning: ISO C++ requires a definition in this translation unit for function \'visible_no_linkage2\' because its type does not have linkage [-Wundefined-internal-type]","clang/test/CXX/basic/basic.link/p8.cpp:47:26: warning: ISO C++ requires a definition in this translation unit for function \'visible_no_linkage3\' because its type does not have linkage [-Wundefined-internal-type]"} } }, ["ext_unelaborated_friend_type"]={ [j]={P,y}, [k]=y, [c]="ext_unelaborated_friend_type", [d]="unelaborated friend declaration is a C++11 extension; specify \'%select{struct|interface|union|class|enum}0\' to befriend %1", [b]={{nil,nil,{"unelaborated friend declaration is a C++11 extension; specify \'",{Ub,"interface",kc,Xb,"enum"},"\' to befriend B"}}}, [h]=m, [g]="unelaborated friend declaration is a C\\+\\+11 extension; specify \'(?:struct|interface|union|class|enum)\' to befriend (.*?)", [f]=R, [e]=n, [i]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:","Improve handling of friend types in several ways:\n - When instantiating a friend type template, perform semantic\n analysis on the resulting type.\n - Downgrade the errors concerning friend type declarations that do\n not refer to classes to ExtWarns in C++98/03. C++0x allows\n practically any type to be befriended, and ignores the friend\n declaration if the type is not a class.\n\nllvm-svn: 100635"}, [a]={{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 // ...\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 // ...\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 // ...\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);"}}, [l]={ ["clang/test/CXX/class/class.friend/p2.cpp"]={"clang/test/CXX/class/class.friend/p2.cpp:13:10: warning: unelaborated friend declaration is a C++11 extension; specify \'struct\' to befriend \'B0\' [-Wc++11-extensions]"} } }, ["ext_unicode_whitespace"]={ [j]={"unicode-whitespace"}, [k]="unicode-whitespace", [c]="ext_unicode_whitespace", [d]="treating Unicode character as whitespace", [b]="treating Unicode character as whitespace", [h]=m, [g]="treating Unicode character as whitespace", [f]=" \\[(?:\\-Werror,)?\\-Wunicode\\-whitespace[^\\]]*\\]", [e]=u, [i]={"7f43dddae066",1359060646,"Handle universal character names and Unicode characters outside of literals.","Handle universal character names and Unicode characters outside of literals.\n\nThis is a missing piece for C99 conformance.\n\nThis patch handles UCNs by adding a \'\\\\\' case to LexTokenInternal and\nLexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.\nIf the UCN is not syntactically well-formed, we fall back to the old\ntreatment: a backslash followed by an identifier beginning with \'u\' (or \'U\').\n\nBecause the spelling of an identifier with UCNs still has the UCN in it, we\nneed to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.\n\nOf course, valid code that does *not* use UCNs will see only a very minimal\nperformance hit (checks after each identifier for non-ASCII characters,\nchecks when converting raw_identifiers to identifiers that they do not\ncontain UCNs, and checks when getting the spelling of an identifier that it\ndoes not contain a UCN).\n\nThis patch also adds basic support for actual UTF-8 in the source. This is\ntreated almost exactly the same as UCNs except that we consider stray\nUnicode characters to be mistakes and offer a fixit to remove them.\n\nllvm-svn: 173369"}, [a]={{db,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);"}}, [l]={ ["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:9:11: warning: treating Unicode character as whitespace [-Wunicode-whitespace]","clang/test/Lexer/unicode.c:10:11: warning: treating Unicode character as whitespace [-Wunicode-whitespace]"} } }, ["ext_union_member_of_reference_type"]={ [j]={z,"microsoft-union-member-reference"}, [k]="microsoft-union-member-reference", [c]="ext_union_member_of_reference_type", [d]="union member %0 has reference type %1, which is a Microsoft extension", [b]="union member A has reference type B, which is a Microsoft extension", [h]=m, [g]="union member (.*?) has reference type (.*?), which is a Microsoft extension", [f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-union\\-member\\-reference[^\\]]*\\]", [e]=n, [i]={"ed0ae1d70bf8",1369930800,"Microsoft has a language extension which allows union members to be","Microsoft has a language extension which allows union members to be\nreferences. What\'s more, they use this language extension in their\nATL header files (which come as part of MFC and the Win32 SDK). This patch implements support for the Microsoft extension, and addresses PR13737.\n\nllvm-svn: 182936"}, [a]={{p,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 // ...\n if (!InvalidDecl && getLangOpts().CPlusPlus) {\n if (Record->isUnion()) {\n // ...\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;"}}, [l]={ ["clang/test/CodeGenCXX/ms-union-member-ref.cpp"]={"clang/test/CodeGenCXX/ms-union-member-ref.cpp:4:9: warning: union member \'ref\' has reference type \'int *&\', which is a Microsoft extension [-Wmicrosoft-union-member-reference]"} } }, ["ext_unknown_escape"]={ [j]={"unknown-escape-sequence"}, [k]="unknown-escape-sequence", [c]="ext_unknown_escape", [d]="unknown escape sequence \'\\%0\'", [b]="unknown escape sequence \'\\A\'", [h]=m, [g]="unknown escape sequence \'\\\\(.*?)\'", [f]=" \\[(?:\\-Werror,)?\\-Wunknown\\-escape\\-sequence[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{pb,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 // ...\n default:\n // ...\n if (isPrintable(ResultChar))\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_unknown_escape) << std::string(1, ResultChar);"},{pb,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 // ...\n default:\n // ...\n if (isPrintable(ResultChar))\n // ...\n else\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_unknown_escape) << \"x\" + llvm::utohexstr(ResultChar);"}}, [l]={ ["clang/test/Lexer/null-character-in-literal.c"]={"clang/test/Lexer/null-character-in-literal.c:7:11: warning: unknown escape sequence \'\\x0\' [-Wunknown-escape-sequence]","clang/test/Lexer/null-character-in-literal.c:11:16: warning: unknown escape sequence \'\\x0\' [-Wunknown-escape-sequence]"} } }, ["ext_unqualified_base_class"]={ [j]={z,Q}, [k]=Q, [c]={{nil,D,"ext_unqualified_base_class"}}, [d]={{nil,D,"unqualified base initializer of class templates is a Microsoft extension"}}, [b]={{nil,D,"unqualified base initializer of class templates is a Microsoft extension"}}, [h]=m, [g]="unqualified base initializer of class templates is a Microsoft extension", [f]=mb, [e]={{nil,D,n}}, [i]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, [a]={{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 // ...\n if (TemplateTypeTy) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype_auto) {\n // ...\n } else {\n // ...\n if (!TyD) {\n // ...\n if (getLangOpts().MSVCCompat && !getLangOpts().CPlusPlus20) {\n if (auto UnqualifiedBase = R.getAsSingle<ClassTemplateDecl>()) {\n // ...\n for (auto const &Base : ClassDecl->bases()) {\n // ...\n if (BaseTemplate && Context.hasSameTemplateName(BaseTemplate->getTemplateName(), TN)) {\n Diag(IdLoc, diag::ext_unqualified_base_class) << SourceRange(IdLoc, Init->getSourceRange().getEnd());"}}, [l]={ ["clang/test/SemaTemplate/ms-unqualified-base-class.cpp"]={"clang/test/SemaTemplate/ms-unqualified-base-class.cpp:17:15: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:31:27: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:43:25: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:52:22: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:91:13: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:98:13: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]"} } }, ["ext_unterminated_char_or_string"]={ [j]={"invalid-pp-token"}, [k]="invalid-pp-token", [c]="ext_unterminated_char_or_string", [d]="missing terminating %select{\'|\'\"\'}0 character", [b]={{nil,nil,{"missing terminating ",{"\'","\'\"\'"}," character"}}}, [h]=m, [g]="missing terminating (?:\'|\'\"\') character", [f]=" \\[(?:\\-Werror,)?\\-Winvalid\\-pp\\-token[^\\]]*\\]", [e]=u, [i]={"7f5ff2175f68",1447466995,"Use %select to merge similar diagnostics. NFC","Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119"}, [a]={{db,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 // ...\n while (C != \'\"\') {\n // ...\n if (C == \'\\n\' || C == \'\\r\' || // Newline.\n // ...\n if (!isLexingRawMode() && !LangOpts.AsmPreprocessor)\n Diag(BufferPtr, diag::ext_unterminated_char_or_string) << 1;"},{db,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 // ...\n while (C != \'\\\'\') {\n // ...\n if (C == \'\\n\' || C == \'\\r\' || // Newline.\n // ...\n if (!isLexingRawMode() && !LangOpts.AsmPreprocessor)\n Diag(BufferPtr, diag::ext_unterminated_char_or_string) << 0;"}}, [l]={ ["clang/test/SemaHLSL/cb_error.hlsl"]={"clang/test/SemaHLSL/cb_error.hlsl:40:11: warning: missing terminating \' character [-Winvalid-pp-token]"} } }, ["ext_use_out_of_scope_declaration"]={ [j]={"out-of-scope-function"}, [k]="out-of-scope-function", [c]={{nil,E,"ext_use_out_of_scope_declaration"}}, [d]={{nil,E,"use of out-of-scope declaration of %0%select{| whose type is not compatible with that of an implicit declaration}1"}}, [b]={{nil,E,{"use of out-of-scope declaration of A",{A," whose type is not compatible with that of an implicit declaration"}}}}, [h]=m, [g]="use of out\\-of\\-scope declaration of (.*?)(?:| whose type is not compatible with that of an implicit declaration)", [f]=" \\[(?:\\-Werror,)?\\-Wout\\-of\\-scope\\-function[^\\]]*\\]", [e]={{nil,E,n}}, [i]={"9bfa970a4009",1507081762,"PR34822: Fix a collection of related bugs with our handling of C89 implicit function declarations.","PR34822: Fix a collection of related bugs with our handling of C89 implicit function declarations.\n\nWe were injecting the function into the wrong semantic context, resulting in it\nfailing to be registered as a global for redeclaration lookup. As a\nconsequence, we accepted invalid code since r310616.\n\nFixing that resulted in the \"out-of-scope declaration\" diagnostic firing a lot\nmore often. It turned out that warning codepath was non-conforming, because it\ndid not cause us to inject the implicitly-declared function into the enclosing\nblock scope. We now only warn if the type of the out-of-scope declaration\ndoesn\'t match the type of an implicitly-declared function; in all other cases,\nwe produce the normal warning for an implicitly-declared function.\n\nllvm-svn: 314871"}, [a]={{p,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 // ...\n if (ExternCPrev) {\n // ...\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;"}}, [l]={ ["clang/test/Sema/function-redecl.c"]={"clang/test/Sema/function-redecl.c:87:13: warning: use of out-of-scope declaration of \'outer6\' [-Wout-of-scope-function]"} } }, ["ext_using_attribute_ns"]={ [j]={N,jb}, [k]=N, [c]="ext_using_attribute_ns", [d]="default scope specifier for attributes is a C++1z extension", [b]="default scope specifier for attributes is a C++1z extension", [h]=m, [g]="default scope specifier for attributes is a C\\+\\+17 extension", [f]=kb, [e]=s, [i]={"b7d7a046d8e0",1466770512,"Using for attributes voted into C++17.","Using for attributes voted into C++17.\n\nllvm-svn: 273666"}, [a]={{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 // ...\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"]={ [j]={S,qb}, [k]=S, [c]={{nil,C,"ext_using_decl_scoped_enumerator"}}, [d]={{nil,C,"using declaration naming a scoped enumerator is a C++20 extension"}}, [b]={{nil,C,"using declaration naming a scoped enumerator is a C++20 extension"}}, [h]=m, [g]="using declaration naming a scoped enumerator is a C\\+\\+20 extension", [f]=nb, [e]={{nil,C,n}}, [i]={"3dbcea8b957a",1615397021,"Reland [clang] Check unsupported types in expressions","Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"}, [a]={{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 // ...\n if (NamedContext) {\n // ...\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();"}}, [l]={ ["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:18:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:43:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:88:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:114:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:141:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:129:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:135:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:129:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:135:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:170:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:203:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:225:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:231:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:239:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:252:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:259:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]"} } }, ["ext_using_declaration_pack"]={ [j]={N,jb}, [k]=N, [c]="ext_using_declaration_pack", [d]="pack expansion of using declaration is a C++1z extension", [b]="pack expansion of using declaration is a C++1z extension", [h]=m, [g]="pack expansion of using declaration is a C\\+\\+17 extension", [f]=kb, [e]=s, [i]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations.","[c++1z] P0195R2: Support pack-expansion of using-declarations.\n\nThis change introduces UsingPackDecl as a marker for the set of UsingDecls\nproduced by pack expansion of a single (unresolved) using declaration. This is\nnot strictly necessary (we just need to be able to map from the original using\ndeclaration to its expansions somehow), but it\'s useful to maintain the\ninvariant that each declaration reference instantiates to refer to one\ndeclaration.\n\nllvm-svn: 290080"}, [a]={{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 // ...\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"]={ [j]={S,qb}, [k]=S, [c]={{nil,C,"ext_using_enum_declaration"}}, [d]={{nil,C,"using enum declaration is a C++20 extension"}}, [b]={{nil,C,"using enum declaration is a C++20 extension"}}, [h]=m, [g]="using enum declaration is a C\\+\\+20 extension", [f]=nb, [e]={{nil,C,s}}, [i]={Fc,1612659633,wc,Gc}, [a]={{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 // ...\n if (TryConsumeToken(tok::kw_enum, UELoc) && !InInitStatement) {\n // ...\n Diag(UELoc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_using_enum_declaration : diag::ext_using_enum_declaration);"}}, [l]={ ["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:19:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:23:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:27:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:37:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:44:9: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:60:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]"} } }, ["ext_using_undefined_std"]={ [c]="ext_using_undefined_std", [d]="using directive refers to implicitly-defined namespace \'std\'", [b]="using directive refers to implicitly-defined namespace \'std\'", [h]=m, [g]="using directive refers to implicitly\\-defined namespace \'std\'", [f]=yb, [e]=n, [i]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace","Allow a using directive to refer to the implicitly-defined namespace\n\"std\", with a warning, to improve GCC compatibility. Fixes PR7517.\n\nAs a drive-by, add typo correction for using directives.\n\nllvm-svn: 107172"}, [a]={{Z,11948,"Decl *Sema::ActOnUsingDirective(Scope *S, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList) {\n // ...\n if (R.empty()) {\n // ...\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);"}}, [l]={ ["clang/test/SemaCXX/using-directive.cpp"]={"clang/test/SemaCXX/using-directive.cpp:126:17: warning: using directive refers to implicitly-defined namespace \'std\'","clang/test/SemaCXX/using-directive.cpp:127:19: warning: using directive refers to implicitly-defined namespace \'std\'"} } }, ["ext_variable_sized_type_in_struct"]={ [j]={B,"gnu-variable-sized-type-not-at-end"}, [k]="gnu-variable-sized-type-not-at-end", [c]="ext_variable_sized_type_in_struct", [d]="field %0 with variable sized type %1 not at the end of a struct or class is a GNU extension", [b]="field A with variable sized type B not at the end of a struct or class is a GNU extension", [h]=m, [g]="field (.*?) with variable sized type (.*?) not at the end of a struct or class is a GNU extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-variable\\-sized\\-type\\-not\\-at\\-end[^\\]]*\\]", [e]=n, [i]={I,1237025389,K,J}, [a]={{p,18864,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n // ...\n } else if (!FDTy->isDependentType() && RequireCompleteSizedType(FD->getLocation(), FD->getType(), diag::err_field_incomplete_or_sizeless)) {\n // ...\n } else if (const RecordType *FDTTy = FDTy->getAs<RecordType>()) {\n if (Record && FDTTy->getDecl()->hasFlexibleArrayMember()) {\n // ...\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();"}}, [l]={ ["clang/test/SemaCXX/flexible-array-test.cpp"]={"clang/test/SemaCXX/flexible-array-test.cpp:18:3: warning: field \'\' with variable sized type \'Rec::(anonymous union at clang/test/SemaCXX/flexible-array-test.cpp:18:3)\' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]"} } }, ["ext_variable_template"]={ [j]={"c++14-extensions","c++1y-extensions"}, [k]="c++14-extensions", [c]="ext_variable_template", [d]="variable templates are a C++14 extension", [b]="variable templates are a C++14 extension", [h]=m, [g]="variable templates are a C\\+\\+14 extension", [f]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+14\\-extensions[^\\]]*\\]", [e]=n, [i]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som...","Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...\n\nllvm-svn: 187762"}, [a]={{p,7653,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else {\n // ...\n if (TemplateParams) {\n if (!TemplateParams->size() && D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {\n // ...\n } else {\n // ...\n if (D.getName().getKind() == UnqualifiedIdKind::IK_TemplateId) {\n // ...\n } else { // if (TemplateParams->size() > 0)\n // ...\n Diag(D.getIdentifierLoc(), getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_variable_template : diag::ext_variable_template);"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:41:39: warning: variable templates are a C++14 extension [-Wc++14-extensions]","clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:42:39: warning: variable templates are a C++14 extension [-Wc++14-extensions]"} } }, ["ext_variadic_macro"]={ [j]={o,dc}, [k]=dc, [c]="ext_variadic_macro", [d]="variadic macros are a C99 feature", [b]="variadic macros are a C99 feature", [h]=m, [g]="variadic macros are a C99 feature", [f]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", [e]=u, [i]={v,1236199783,w,x}, [a]={{T,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 // ...\n while (true) {\n // ...\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);"}}, [l]={ ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:7:18: warning: variadic macros are a C99 feature [-Wvariadic-macros]","clang/test/Preprocessor/macro_fn.c:8:20: warning: variadic macros are a C99 feature [-Wvariadic-macros]","clang/test/Preprocessor/macro_fn.c:35:11: warning: variadic macros are a C99 feature [-Wvariadic-macros]","clang/test/Preprocessor/macro_fn.c:51:35: warning: variadic macros are a C99 feature [-Wvariadic-macros]"} } }, ["ext_variadic_main"]={ [j]={fc}, [k]=fc, [c]="ext_variadic_main", [d]="\'main\' is not allowed to be declared variadic", [b]="\'main\' is not allowed to be declared variadic", [h]=m, [g]="\'main\' is not allowed to be declared variadic", [f]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", [e]=n, [i]={"1710cc994ecd",1429805562,"Diagnose variadic main() as an extension; addresses PR17905.","Diagnose variadic main() as an extension; addresses PR17905.\n\nllvm-svn: 235605"}, [a]={{p,12162,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (FTP->isVariadic()) {\n Diag(FD->getLocation(), diag::ext_variadic_main);"}}, [l]={ ["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:33:5: warning: \'main\' is not allowed to be declared variadic [-Wmain]"} } }, ["ext_variadic_templates"]={ [j]={P,y}, [k]=y, [c]="ext_variadic_templates", [d]="variadic templates are a C++11 extension", [b]="variadic templates are a C++11 extension", [h]=m, [g]="variadic templates are a C\\+\\+11 extension", [f]=R, [e]=s, [i]={"b25d8c3af4a9",1295474355,"Downgrade the \"variadic templates are a C++0x feature\" error to an","Downgrade the \"variadic templates are a C++0x feature\" error to an\nExtWarn. We want variadic templates to be usable in libc++/libstdc++\nheaders even when we\'re in C++98/03 mode, since it\'s the only clean\nway to implement TR1 <functional>.\n\nllvm-svn: 123852"}, [a]={{"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 // ...\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 // ...\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc))\n Diag(EllipsisLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_variadic_templates : diag::ext_variadic_templates);"},{hb,5946,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\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 // ...\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 // ...\n else\n S.Diag(D.getEllipsisLoc(), LangOpts.CPlusPlus11 ? diag::warn_cxx98_compat_variadic_templates : diag::ext_variadic_templates);"}}, [l]={ ["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:5:21: warning: variadic templates are a C++11 extension [-Wc++11-extensions]"} } }, ["ext_vla"]={ [j]={B,o,"vla","vla-extension"}, [k]="vla-extension", [c]="ext_vla", [d]="variable length arrays are a C99 feature", [b]="variable length arrays are a C99 feature", [h]=m, [g]="variable length arrays are a C99 feature", [f]=" \\[(?:\\-Werror,)?\\-Wvla\\-extension[^\\]]*\\]", [e]=n, [i]={v,1236199783,w,x}, [a]={{hb,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 // ...\n if (getLangOpts().OpenCL) {\n // ...\n } else if (getLangOpts().C99) {\n // ...\n } else if (isSFINAEContext()) {\n // ...\n } else if (getLangOpts().OpenMP && isInOpenMPTaskUntiedContext()) {\n // ...\n } else {\n VLADiag = diag::ext_vla;"}}, [l]={ ["clang/test/SemaCXX/warn-vla.cpp"]={"clang/test/SemaCXX/warn-vla.cpp:4:9: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:7:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:10:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:14:9: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:18:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:22:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:25:23: warning: variable length arrays are a C99 feature [-Wvla-extension]"} } }, ["ext_vla_folded_to_constant"]={ [j]={B,hc}, [k]=hc, [c]="ext_vla_folded_to_constant", [d]="variable length array folded to constant array as an extension", [b]="variable length array folded to constant array as an extension", [h]=m, [g]="variable length array folded to constant array as an extension", [f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-folding\\-constant[^\\]]*\\]", [e]=n, [i]={"f35de48c9058",1308033490,"when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant","when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant\nas constant size arrays. This has slightly different semantics in some insane cases, but allows\nus to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other\nmodes. This addressed rdar://8733881 - error \"variable-sized object may not be initialized\"; g++ accepts same code\n\nllvm-svn: 132983"}, [a]={{p,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 // ...\n if (FixedTInfo) {\n Diag(Loc, diag::ext_vla_folded_to_constant);"},{p,6722,"void Sema::CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *NewTD) {\n // ...\n if (T->isVariablyModifiedType()) {\n // ...\n if (S->getFnParent() == nullptr) {\n // ...\n if (FixedTInfo) {\n Diag(NewTD->getLocation(), diag::ext_vla_folded_to_constant);"},{p,8725,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n // ...\n Diag(NewVD->getLocation(), diag::ext_vla_folded_to_constant);"},{hb,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 // ...\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 // ...\n Sema::SemaDiagnosticBuilder diagnoseFold(Sema &S, SourceLocation Loc) override { return S.Diag(Loc, diag::ext_vla_folded_to_constant); }"}}, [l]={ ["clang/test/Sema/offsetof-64.c"]={"clang/test/Sema/offsetof-64.c:8:8: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]","clang/test/Sema/offsetof-64.c:9:8: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]"} } }, ["ext_warn_duplicate_declspec"]={ [j]={"duplicate-decl-specifier"}, [k]="duplicate-decl-specifier", [c]={{nil,O,"ext_warn_duplicate_declspec"}}, [d]={{nil,O,"duplicate \'%0\' declaration specifier"}}, [b]={{nil,O,"duplicate \'A\' declaration specifier"}}, [h]=m, [g]="duplicate \'(.*?)\' declaration specifier", [f]=" \\[(?:\\-Werror,)?\\-Wduplicate\\-decl\\-specifier[^\\]]*\\]", [e]={{nil,O,Rb}}, [i]={"150ca5309e7c",1538608169,"[SEMA] split ExtWarn dupl-decl-spec\'s into Extension and ExtWarn","[SEMA] split ExtWarn dupl-decl-spec\'s into Extension and ExtWarn\n\nSummary:\nFor types deduced from typedef\'s and typeof\'s, don\'t warn for duplicate\ndeclaration specifiers in C90 unless -pedantic.\n\nCreate a third diagnostic type for duplicate declaration specifiers.\nPreviously, we had an ExtWarn and a Warning. This change adds a third,\nExtension, which only warns when -pedantic is set, staying silent\notherwise.\n\nFixes PR32985.\n\nReviewers: rsmith\n\nReviewed By: rsmith\n\nSubscribers: srhines, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D52849\n\nllvm-svn: 343740"}, [a]={{W,4488,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n // If the specifier wasn\'t legal, issue a diagnostic.\n if (isInvalid) {\n // ...\n if (DiagID == diag::ext_duplicate_declspec || DiagID == diag::ext_warn_duplicate_declspec || DiagID == diag::err_duplicate_declspec)"},{Cc,482,"template <class T> static bool BadSpecifier(T TNew, T TPrev, const char *&PrevSpec, unsigned &DiagID, bool IsExtension = true) {\n // ...\n if (TNew != TPrev)\n // ...\n else\n DiagID = IsExtension ? diag::ext_warn_duplicate_declspec : diag::warn_duplicate_declspec;"},{Cc,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;"},{Cc,1093,"bool DeclSpec::setModulePrivateSpec(SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID) {\n if (isModulePrivateSpecified()) {\n // ...\n DiagID = diag::ext_warn_duplicate_declspec;"}} }, ["ext_warn_gnu_final"]={ [j]={"gcc-compat"}, [k]="gcc-compat", [c]="ext_warn_gnu_final", [d]="__final is a GNU extension, consider using C++11 final", [b]="__final is a GNU extension, consider using C++11 final", [h]=m, [g]="__final is a GNU extension, consider using C\\+\\+11 final", [f]=" \\[(?:\\-Werror,)?\\-Wgcc\\-compat[^\\]]*\\]", [e]={{nil,O,s},{Sb,nil,Rb}}, [i]={"276055bb2f4a",1469788968,"[GCC] Support for __final specifier","[GCC] Support for __final specifier\n\nAs reported in bug 28473, GCC supports \"final\" functionality in pre-C++11 code using the __final keyword. Clang currently supports the \"final\" keyword in accordance with the C++11 specification, however it ALSO supports it in pre-C++11 mode, with a warning.\n\nThis patch adds the \"__final\" keyword for compatibility with GCC in GCC Keywords mode (so it is enabled with existing flags), and issues a warning on its usage (suggesting switching to the C++11 keyword). This patch also adds a regression test for the functionality described. I believe this patch has minimal impact, as it simply adds a new keyword for existing behavior.\n\nThis has been validated with check-clang to avoid regressions. Patch is created in reference to revisions 276665.\n\nPatch by Erich Keane.\n\nDifferential Revision: https://reviews.llvm.org/D22919\n\nllvm-svn: 277134"}, [a]={{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 // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Abstract) {\n // ...\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 // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Final)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Sealed)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Abstract)\n // ...\n else if (Specifier == VirtSpecifiers::VS_GNU_Final)\n Diag(FinalLoc, diag::ext_warn_gnu_final);"}}, [l]={ ["clang/test/Parser/gcc-__final-compatibility.cpp"]={"clang/test/Parser/gcc-__final-compatibility.cpp:7:10: warning: __final is a GNU extension, consider using C++11 final [-Wgcc-compat]","clang/test/Parser/gcc-__final-compatibility.cpp:8:20: warning: __final is a GNU extension, consider using C++11 final [-Wgcc-compat]"} } }, ["ext_wchar_t_sign_spec"]={ [j]={"signed-unsigned-wchar"}, [k]="signed-unsigned-wchar", [c]={{nil,t,"ext_wchar_t_sign_spec"}}, [d]={{nil,t,"\'%0\' cannot be signed or unsigned"}}, [b]={{nil,t,"\'A\' cannot be signed or unsigned"}}, [h]=F, [g]="\'(.*?)\' cannot be signed or unsigned", [f]=" \\[[^\\]]*\\-Wsigned\\-unsigned\\-wchar[^\\]]*\\]", [e]={{nil,t,n}}, [i]={"e8b659fc1ff0",1564430446,"Give the \'signed/unsigned wchar_t\' extension a warning flag, and follow","Give the \'signed/unsigned wchar_t\' extension a warning flag, and follow\nGCC 9 in promoting it to an error by default.\n\nllvm-svn: 367255"}, [a]={{hb,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 // ...\n case DeclSpec::TST_wchar:\n if (DS.getTypeSpecSign() == TypeSpecifierSign::Unspecified)\n // ...\n else if (DS.getTypeSpecSign() == TypeSpecifierSign::Signed) {\n S.Diag(DS.getTypeSpecSignLoc(), diag::ext_wchar_t_sign_spec) << DS.getSpecifierName(DS.getTypeSpecType(), Context.getPrintingPolicy());"},{hb,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 // ...\n case DeclSpec::TST_wchar:\n if (DS.getTypeSpecSign() == TypeSpecifierSign::Unspecified)\n // ...\n else if (DS.getTypeSpecSign() == TypeSpecifierSign::Signed) {\n // ...\n } else {\n // ...\n S.Diag(DS.getTypeSpecSignLoc(), diag::ext_wchar_t_sign_spec) << DS.getSpecifierName(DS.getTypeSpecType(), Context.getPrintingPolicy());"}}, [l]={ ["clang/test/SemaCXX/wchar_t.cpp"]={"clang/test/SemaCXX/wchar_t.cpp:8:3: error: \'wchar_t\' cannot be signed or unsigned [-Wsigned-unsigned-wchar]","clang/test/SemaCXX/wchar_t.cpp:9:3: error: \'wchar_t\' cannot be signed or unsigned [-Wsigned-unsigned-wchar]"} } }, ["fatal_too_many_errors"]={ [c]="fatal_too_many_errors", [d]="too many errors emitted, stopping now [-ferror-limit=]", [b]="too many errors emitted, stopping now [-ferror-limit=]", [h]="fatal error\\: ", [g]="too many errors emitted, stopping now \\[\\-ferror\\-limit\\=\\]", [f]=A, [e]=Rb, [i]={"75a0393eb580",1270671718,"add capabilities to stop emitting errors after some limit.","add capabilities to stop emitting errors after some limit.\nRight now the limit is 0 (aka disabled)\n\nllvm-svn: 100684"}, [a]={{"clang/lib/Basic/DiagnosticIDs.cpp",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 // ...\n if (Result == diag::Severity::Fatal && Diag.CurDiagID != diag::fatal_too_many_errors && Diag.FatalsAsError)"},{"clang/lib/Basic/DiagnosticIDs.cpp",806,"/// ProcessDiag - This is the method used to report a diagnostic that is\n/// finally fully formed.\nbool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const {\n // ...\n if (DiagLevel >= DiagnosticIDs::Error) {\n // ...\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);"},{"clang/lib/Basic/DiagnosticIDs.cpp",813,"/// ProcessDiag - This is the method used to report a diagnostic that is\n/// finally fully formed.\nbool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const {\n // ...\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 // ...\n if (DiagOpts.ShowOptionNames) {\n // ...\n if (Info.getID() == diag::fatal_too_many_errors) {"},{"clang/tools/libclang/CXStoredDiagnostic.cpp",62,"CXString CXStoredDiagnostic::getDiagnosticOption(CXString *Disable) const {\n // ...\n if (ID == diag::fatal_too_many_errors) {"}}, [l]={ ["clang/test/SemaCXX/concept-fatal-error.cpp"]={"fatal error: too many errors emitted, stopping now [-ferror-limit=]"} } }, ["note_access_constrained_by_path"]={ [c]="note_access_constrained_by_path", [d]="constrained by %select{|implicitly }1%select{private|protected}0 inheritance here", [b]={{nil,nil,{"constrained by ",{A,"implicitly "},{"private","protected"}," inheritance here"}}}, [h]=ub, [g]="constrained by (?:|implicitly )(?:private|protected) inheritance here", [f]=A, [e]=n, [i]={"553c0796eedc",1264207592,"Implement elementary access control.","Implement elementary access control.\n\nllvm-svn: 94268"}, [a]={{Mb,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 // ...\n if (entity.isMemberAccess() || constrainingBase + 1 != path.end()) {\n diagnostic = diag::note_access_constrained_by_path;"}}, [l]={ ["clang/test/SemaCXX/microsoft-super.cpp"]={"clang/test/SemaCXX/microsoft-super.cpp:23:14: note: constrained by private inheritance here"} } }, ["note_access_natural"]={ [c]="note_access_natural", [d]="%select{|implicitly }1declared %select{private|protected}0 here", [b]={{nil,nil,{{A,"implicitly "},"declared ",{"private","protected"}," here"}}}, [h]=ub, [g]="(?:|implicitly )declared (?:private|protected) here", [f]=A, [e]=n, [i]={"553c0796eedc",1264207592,"Implement elementary access control.","Implement elementary access control.\n\nllvm-svn: 94268"}, [a]={{Mb,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 // ...\n S.Diag(D->getLocation(), diag::note_access_natural) << (unsigned)(D->getAccess() == AS_protected) << isImplicit;"},{Mb,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 // ...\n if (entity.isMemberAccess() || constrainingBase + 1 != path.end()) {\n // ...\n } else {\n diagnostic = diag::note_access_natural;"}}, [l]={ ["clang/test/SemaCXX/access-control-check.cpp"]={"clang/test/SemaCXX/access-control-check.cpp:8:7: note: implicitly declared private here","clang/test/SemaCXX/access-control-check.cpp:9:7: note: implicitly declared private here"} } }, ["note_access_protected_restricted_ctordtor"]={ [c]="note_access_protected_restricted_ctordtor", [d]="protected %select{constructor|destructor}0 can only be used to %select{construct|destroy}0 a base class subobject", [b]={{nil,nil,{"protected ",{"constructor","destructor"}," can only be used to ",{"construct","destroy"}," a base class subobject"}}}, [h]=ub, [g]="protected (?:constructor|destructor) can only be used to (?:construct|destroy) a base class subobject", [f]=A, [e]=n, [i]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, [a]={{Mb,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 // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\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());"}}, [l]={ ["clang/test/CXX/class.access/class.protected/p1.cpp"]={"clang/test/CXX/class.access/class.protected/p1.cpp:463:5: note: protected constructor can only be used to construct a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:465:5: note: protected destructor can only be used to destroy a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:463:5: note: protected constructor can only be used to construct a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:465:5: note: protected destructor can only be used to destroy a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:464:5: note: protected constructor can only be used to construct a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:465:5: note: protected destructor can only be used to destroy a base class subobject"} } }, ["note_access_protected_restricted_noobject"]={ [c]="note_access_protected_restricted_noobject", [d]="must name member using the type of the current context %0", [b]="must name member using the type of the current context A", [h]=ub, [g]="must name member using the type of the current context (.*?)", [f]=A, [e]=n, [i]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, [a]={{Mb,1079,"/// 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 // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\n // If we don\'t have an instance context, [class.protected] says the\n // naming class has to equal the context class.\n if (!Target.hasInstanceContext()) {\n // ...\n S.Diag(D->getLocation(), diag::note_access_protected_restricted_noobject) << S.Context.getTypeDeclType(ECRecord);"}}, [l]={ ["clang/test/CXX/class.access/class.protected/p1.cpp"]={"clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::C\'","clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::D\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::C\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::D\'","clang/test/CXX/class.access/class.protected/p1.cpp:434:29: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:436:10: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:438:29: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:441:10: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:445:10: note: must name member using the type of the current context \'test14::B\'"} } }, ["note_access_protected_restricted_object"]={ [c]="note_access_protected_restricted_object", [d]="can only access this member on an object of type %0", [b]="can only access this member on an object of type A", [h]=ub, [g]="can only access this member on an object of type (.*?)", [f]=A, [e]=n, [i]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, [a]={{Mb,1108,"/// 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 // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\n return S.Diag(D->getLocation(), diag::note_access_protected_restricted_object) << S.Context.getTypeDeclType(ECRecord);"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp"]={"clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp:223:9: note: can only access this member on an object of type \'p0969r0::D\'"} } }, ["note_add_deprecation_attr"]={ [c]="note_add_deprecation_attr", [d]="add a deprecation attribute to the declaration to silence this warning", [b]="add a deprecation attribute to the declaration to silence this warning", [h]=ub, [g]="add a deprecation attribute to the declaration to silence this warning", [f]=A, [e]="Documentation Issue", [i]={"1da888691587",1348350470,"Comment sema: warn when comment has \\deprecated but declaration does not have a","Comment sema: warn when comment has \\deprecated but declaration does not have a\ndeprecation attribute (\'deprecated\', \'availability\' or \'unavailable\').\n\nThis warning is under a separate flag, -Wdocumentation-deprecated-sync, so it\ncan be turned off easily while leaving other -Wdocumentation warnings on.\n\nllvm-svn: 164467"}, [a]={{"clang/lib/AST/CommentSema.cpp",700,"void Sema::checkDeprecatedCommand(const BlockCommandComment *Command) {\n // ...\n // Try to emit a fixit with a deprecation attribute.\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n Diag(Loc, diag::note_add_deprecation_attr) << FixItHint::CreateInsertion(Loc, TextToInsert);"}}, [l]={ ["clang/test/Sema/warn-documentation-fixits.c"]={"clang/test/Sema/warn-documentation-fixits.c:7:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:11:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:17:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:24:1: note: add a deprecation attribute to the declaration to silence this warning"} } }, ["note_add_synthesize_directive"]={ [c]={{nil,sb,"note_add_synthesize_directive"}}, [d]={{nil,sb,"add a \'@synthesize\' directive"}}, [b]={{nil,sb,"add a \'@synthesize\' directive"}}, [h]=ub, [g]="add a \'@synthesize\' directive", [f]=A, [e]={{nil,sb,n}}, [i]={"6c9af50cc815",1499076744,"Add a fixit for -Wobjc-protocol-property-synthesis","Add a fixit for -Wobjc-protocol-property-synthesis\n\nrdar://32132756\n\nDifferential Revision: https://reviews.llvm.org/D34886\n\nllvm-svn: 307014"}, [a]={{"clang/lib/Sema/SemaObjCProperty.cpp",1940,"/// Default synthesizes all properties which must be synthesized\n/// in class\'s \\@implementation.\nvoid Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd) {\n // ...\n for (const auto &PropEntry : PropMap) {\n // ...\n if (ObjCProtocolDecl *Proto = dyn_cast<ObjCProtocolDecl>(Prop->getDeclContext())) {\n // We won\'t auto-synthesize properties declared in protocols.\n // Suppress the warning if class\'s superclass implements property\'s\n // getter and implements property\'s setter (if readwrite property).\n // Or, if property is going to be implemented in its super class.\n if (!SuperClassImplementsProperty(IDecl, Prop) && !PropInSuperClass) {\n // ...\n Diag(AtEnd, diag::note_add_synthesize_directive) << FixItHint::CreateInsertion(AtEnd, FixIt);"}}, [l]={ ["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:140:1: note: add a \'@synthesize\' directive"} } }, ["note_additional_parens_for_variable_declaration"]={ [c]="note_additional_parens_for_variable_declaration", [d]="add a pair of parentheses to declare a variable", [b]="add a pair of parentheses to declare a variable", [h]=ub, [g]="add a pair of parentheses to declare a variable", [f]=A, [e]=n, [i]={"943c44045551",1343683852,"Improvements to vexing-parse warnings. Make the no-parameters case more","Improvements to vexing-parse warnings. Make the no-parameters case more\naccurate by asking the parser whether there was an ambiguity rather than trying\nto reverse-engineer it from the DeclSpec. Make the with-parameters case have\nbetter diagnostics by using semantic information to drive the warning,\nimproving the diagnostics and adding a fixit.\n\nPatch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for\ndeclarations of the form \'T (*x)(...)\', which seem to have a very high false\npositive rate, and to reduce indentation in \'warnAboutAmbiguousFunction\'.\n\nllvm-svn: 160998"}, [a]={{hb,3893,"/// Produce an appropriate diagnostic for an ambiguity between a function\n/// declarator and a C++ direct-initializer.\nstatic void warnAboutAmbiguousFunction(Sema &S, Declarator &D, DeclaratorChunk &DeclType, QualType RT) {\n // ...\n if (FTI.NumParams > 0) {\n // ...\n S.Diag(B, diag::note_additional_parens_for_variable_declaration) << FixItHint::CreateInsertion(B, \"(\") << FixItHint::CreateInsertion(E, \")\");"}}, [l]={ ["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:16:7: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:18:8: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:73:9: note: add a pair of parentheses to declare a variable"} } }, ["note_addrof_ovl_candidate_disabled_by_enable_if_attr"]={ [c]="note_addrof_ovl_candidate_disabled_by_enable_if_attr", [d]="candidate function made ineligible by enable_if", [b]="candidate function made ineligible by enable_if", [h]=ub, [g]="candidate function made ineligible by enable_if", [f]=A, [e]=n, [i]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang.","Add the `pass_object_size` attribute to clang.\n\n`pass_object_size` is our way of enabling `__builtin_object_size` to\nproduce high quality results without requiring inlining to happen\neverywhere.\n\nA link to the design doc for this attribute is available at the\nDifferential review link below.\n\nDifferential Revision: http://reviews.llvm.org/D13263\n\nllvm-svn: 254554"}, [a]={{Ac,10561,"/// Returns true if we can take the address of the function.\n///\n/// \\param Complain - If true, we\'ll emit a diagnostic\n/// \\param InOverloadResolution - For the purposes of emitting a diagnostic, are\n/// we in overload resolution?\n/// \\param Loc - The location of the statement we\'re complaining about. Ignored\n/// if we\'re not complaining, or if we\'re in overload resolution.\nstatic bool checkAddressOfFunctionIsAvailable(Sema &S, const FunctionDecl *FD, bool Complain, bool InOverloadResolution, SourceLocation Loc) {\n if (!isFunctionAlwaysEnabled(S.Context, FD)) {\n if (Complain) {\n if (InOverloadResolution)\n S.Diag(FD->getBeginLoc(), diag::note_addrof_ovl_candidate_disabled_by_enable_if_attr);"}}, [l]={ ["clang/test/Sema/overloadable.c"]={"clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if"} } } };