Bots, Bureaucrats, Interface administrators, smwadministrator, smwcurator, smweditor, Administrators
2,557
edits
Timo.stripf (talk | contribs) No edit summary |
Timo.stripf (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
local a=" | local a="message"; | ||
local b=" | local b="regex1"; | ||
local c=" | local c="regex2"; | ||
local d=" | local d="regex3"; | ||
local e=" | local e="category"; | ||
local f=" | local f="commit"; | ||
local g=" | local g="source"; | ||
local h=" | local h="tests2"; | ||
local i=" | local i="maingroup"; | ||
local j=" | local j="groups"; | ||
local k=" | local k="Semantic Issue"; | ||
local l=" | local l="(?:warning|error|fatal error)\\: "; | ||
local m=""; | |||
local | local n="(?:error|fatal error)\\: "; | ||
local | local o="pedantic"; | ||
local p="clang/lib/Sema/SemaDecl.cpp"; | |||
local | local q="Parse Issue"; | ||
local | local r="clang/lib/Sema/SemaExpr.cpp"; | ||
local | local s="Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"; | ||
local | local t="clang/lib/Sema/SemaDeclCXX.cpp"; | ||
local | local u="Lexical or Preprocessor Issue"; | ||
local | local v="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; | ||
local w="b1c4d5507fad"; | |||
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 | local y="c++11-extensions"; | ||
local | local z="clang/lib/Sema/SemaTemplate.cpp"; | ||
local | local A="microsoft"; | ||
local | local B="clang/lib/Parse/ParseDecl.cpp"; | ||
local | local C="5a8987ca5113"; | ||
local | local D="c++20-extensions"; | ||
local | local E="gnu"; | ||
local | local F="clang/lib/Parse/ParseDeclCXX.cpp"; | ||
local G=" | local G="c++17-extensions"; | ||
local H=" | local H="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 I="95f50964fbf5"; | |||
local J="Implement P2361 Unevaluated string literals\n\nThis patch proposes to handle in an uniform fashion\nthe..."; | |||
local K="(?:error|warning|fatal error)\\: "; | |||
local L="c++0x-extensions"; | |||
local | local M="clang/lib/Sema/SemaType.cpp"; | ||
local | local N="clang/lib/Sema/SemaInit.cpp"; | ||
local | local O="clang/lib/Sema/SemaExprCXX.cpp"; | ||
local | local P="clang/lib/Lex/PPDirectives.cpp"; | ||
local Q="c99-extensions"; | |||
local | local R=" \\[(?:\\-Werror,)?\\-Wpedantic[^\\]]*\\]"; | ||
local S=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-extensions[^\\]]*\\]"; | |||
local | local T="clang/lib/Lex/Lexer.cpp"; | ||
local | local U="clang/lib/Sema/SemaChecking.cpp"; | ||
local | local V="c++2a-extensions"; | ||
local W="microsoft-template"; | |||
local | local X="clang/lib/Lex/LiteralSupport.cpp"; | ||
local | local Y=" \\[(?:\\-Werror,)?\\-Wc\\+\\+20\\-extensions[^\\]]*\\]"; | ||
local | local Z="c++23-extensions"; | ||
local | local ab="c++1z-extensions"; | ||
local | local bb=" \\[(?:\\-Werror,)?\\-Wc\\+\\+17\\-extensions[^\\]]*\\]"; | ||
local | local cb="CL4"; | ||
local db="c++14-extensions"; | |||
local | local eb="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 fb="1b98ccc4e957"; | |||
local | local gb="PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus\nExtWarn/Warnings. Mostly the name o..."; | ||
local hb="clang/lib/Sema/SemaDeclObjC.cpp"; | |||
local | local ib="clang/lib/Frontend/VerifyDiagnosticConsumer.cpp"; | ||
local | local jb="clang/lib/Lex/Pragma.cpp"; | ||
local | local kb="most"; | ||
local | local lb="c2x-extensions"; | ||
local | local mb="all"; | ||
local | local nb="clang/lib/Parse/ParseExpr.cpp"; | ||
local | local ob="[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recog..."; | ||
local | local pb="[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"; | ||
local | local qb="69350e569dc4"; | ||
local | local rb="clang/lib/Parse/ParseExprCXX.cpp"; | ||
local sb="clang/lib/Parse/ParseStmt.cpp"; | |||
local | local tb="c99-designator"; | ||
local | local ub="clang/lib/Parse/Parser.cpp"; | ||
local | local vb="c++2b-extensions"; | ||
local wb="clang/lib/Sema/SemaCast.cpp"; | |||
local | local xb="clang/lib/Sema/SemaExceptionSpec.cpp"; | ||
local yb="clang/test/Sema/wasm-refs-and-tables.c"; | |||
local | local zb=" \\[(?:\\-Werror,)?\\-Wc99\\-extensions[^\\]]*\\]"; | ||
local Ab=" \\[(?:\\-Werror,)?\\-Wc\\+\\+23\\-extensions[^\\]]*\\]"; | |||
local | local Bb=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-template[^\\]]*\\]"; | ||
local | local Cb="microsoft-exception-spec"; | ||
local | local Db="clang/lib/Sema/SemaOverload.cpp"; | ||
local | local Eb="c++1y-extensions"; | ||
local | local Fb="(?: \\[(?:\\-Werror)?[^\\]]*\\])?"; | ||
local | local Gb="clang/lib/Sema/SemaStmt.cpp"; | ||
local | local Hb="More __unknown_anytype work.\n\nllvm-svn: 129269"; | ||
local | local Ib="excess-initializers"; | ||
local Jb="#error"; | |||
local | local Kb="c++11-narrowing"; | ||
local Lb="c11-extensions"; | |||
local | local Mb="clang/test/Parser/declarators.c"; | ||
local Nb="clang/lib/Sema/SemaDeclAttr.cpp"; | |||
local | local Ob=" \\[(?:\\-Werror,)?\\-Wc\\+\\+14\\-extensions[^\\]]*\\]"; | ||
local | local Pb="clang/test/Sema/vla.c"; | ||
local | local Qb="c++11-compat"; | ||
local | local Rb="[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a na..."; | ||
local | local Sb="[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"; | ||
local | local Tb="clang/lib/Parse/ParseObjc.cpp"; | ||
local | local Ub=" \\[(?:\\-Werror,)?\\-Wc2x\\-extensions[^\\]]*\\]"; | ||
local | local Vb="7c11da0cfd33"; | ||
local | local Wb="pointer-arith"; | ||
local | local Xb="c++11-compat-pedantic"; | ||
local Yb="5030928d60a1"; | |||
local Zb="[c++20] Implement semantic restrictions for C++20 designated\ninitializers.\n\nThis has some interestin..."; | |||
local | local ac="comment"; | ||
local bc="clang/test/SemaCXX/unknown-anytype.cpp"; | |||
local | local cc="[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 | local dc="gnu-folding-constant"; | ||
local | local ec="Parsing and AST support for using declarations, from John Thompson!\n\nllvm-svn: 73812"; | ||
local fc="clang/lib/Lex/PPExpressions.cpp"; | |||
local gc="clang/test/Parser/MicrosoftExtensions.cpp"; | |||
local hc="clang/lib/Sema/DeclSpec.cpp"; | |||
local ic="dtor-name"; | |||
local jc="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"; | |||
local kc="Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then ..."; | |||
local lc="3dbcea8b957a"; | |||
local mc="c++0x-compat"; | |||
local nc="clang/test/Sema/c89.c"; | |||
local | local oc="clang/lib/Sema/SemaExprObjC.cpp"; | ||
local | local pc="clang/lib/AST/ASTImporter.cpp"; | ||
local qc="gcc-compat"; | |||
local rc="implicit-function-declaration"; | local rc="implicit-function-declaration"; | ||
local sc=" | local sc="unknown-pragmas"; | ||
local tc=" | local tc="main"; | ||
local uc=" | local uc="Switch parsing of using declarations over to ParseUnqualifiedId.\n\nllvm-svn: 86027"; | ||
local vc=" | local vc="missing-declarations"; | ||
local wc=" | local wc="gnu-designator"; | ||
local xc=" | local xc="gnu-pointer-arith"; | ||
local yc=" | local yc="clang/lib/Sema/SemaAccess.cpp"; | ||
local zc=" | local zc="variadic-macros"; | ||
local Ac=" | local Ac="gnu-empty-struct"; | ||
local Bc=" | local Bc="clang/lib/Sema/SemaOpenMP.cpp"; | ||
local Cc=" | local Cc="[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comment..."; | ||
local Dc="[ | local Dc="[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 Ec=" | local Ec=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-exception\\-spec[^\\]]*\\]"; | ||
local Fc=" | local Fc="incompatible-pointer-types"; | ||
local Gc="clang/lib/Sema/ | local Gc="clang/lib/Sema/SemaTemplateInstantiateDecl.cpp"; | ||
local Hc=" | local Hc="clang/lib/Sema/SemaObjCProperty.cpp"; | ||
local Ic=" | local Ic="implicit"; | ||
local Jc=" | local Jc="931fcd3ba011"; | ||
local Kc=" | local Kc=" \\[(?:\\-Werror,)?\\-Wc99\\-designator[^\\]]*\\]"; | ||
local Lc=" | local Lc="[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"; | ||
local Mc="clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp"; | |||
local Nc="clang/test/SemaCXX/MicrosoftExtensions.cpp"; | |||
local Oc="1228d42ddab8"; | |||
local Pc="clang/lib/Basic/DiagnosticIDs.cpp"; | |||
local Qc="Modules Issue"; | |||
local Rc="[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost comple..."; | |||
local Sc="clang/lib/Parse/ParseInit.cpp"; | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
return { | return { | ||
["err_typename_missing_template"]={ | ["err_typename_missing_template"]={ | ||
[a | [a]="missing \'typename\' prior to dependent type template name \'%0%1\'", | ||
[b]=n, | |||
[c]="missing \'typename\' prior to dependent type template name \'(.*?)(.*?)\'", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"62559bd7ce0c",1485984998,"Fix hole in our enforcement of rule requiring \'typename\' prior to a dependent\nname. If the dependent...","Fix hole in our enforcement of rule requiring \'typename\' prior to a dependent\nname. If the dependent name happened to end in a template-id (X<T>::Y<U>), we\nwould fail to notice that the \'typename\' keyword is missing when resolving it\nto a type.\n\nIt turns out that GCC has a similar bug. If this shows up in much real code, we\ncan easily downgrade this to an ExtWarn.\n\nllvm-svn: 293815"}, | ||
[ | [g]={{z,4153,"TypeResult Sema::ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, bool IsCtorOrDtorName, bool IsClassName, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\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 // ...\n } else\n Diag(SS.getBeginLoc(), diag::err_typename_missing_template) << SS.getScopeRep() << TemplateII->getName();"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_typename_nested_not_found"]={ | ["err_typename_nested_not_found"]={ | ||
[a | [a]="no type named %0 in %1", | ||
[b]=n, | |||
[c]="no type named (.*?) in (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"333489bba35d",1238195448,"Initial implementation of parsing, semantic analysis, and template\ninstantiation for C++ typename-sp...","Initial implementation of parsing, semantic analysis, and template\ninstantiation for C++ typename-specifiers such as\n\n typename T::type\n\nThe parsing of typename-specifiers is relatively easy thanks to\nannotation tokens. When we see the \"typename\", we parse the\ntypename-specifier and produce a typename annotation token. There are\nonly a few places where we need to handle this. We currently parse the\ntypename-specifier form that terminates in an identifier, but not the\nsimple-template-id form, e.g.,\n\n typename T::template apply<U, V>\n\nParsing of nested-name-specifiers has a similar problem, since at this\npoint we don\'t have any representation of a class template\nspecialization whose template-name is unknown.\n\nSemantic analysis is only partially complete, with some support for\ntemplate instantiation that works for simple examples. \n\nllvm-svn: 67875"}, | ||
[ | [g]={{p,813,"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 Diag(IILoc, IsTemplateName ? diag::err_no_member_template : diag::err_typename_nested_not_found) << II << DC << SS->getRange();"},{z,11058,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::NotFound: {\n // ...\n DiagID = Ctx ? diag::err_typename_nested_not_found : diag::err_unknown_typename;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/libstdcxx_atomic_ns_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_atomic_ns_hack.cpp:32:6: error: no type named \'foobar\' in namespace \'std\'"} | ["clang/test/SemaCXX/libstdcxx_atomic_ns_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_atomic_ns_hack.cpp:32:6: error: no type named \'foobar\' in namespace \'std\'"} | ||
} | } | ||
}, | }, | ||
["err_typename_nested_not_found_enable_if"]={ | ["err_typename_nested_not_found_enable_if"]={ | ||
[a | [a]="no type named \'type\' in %0; \'enable_if\' cannot be used to disable this declaration", | ||
[b]=n, | |||
[c]="no type named \'type\' in (.*?); \'enable_if\' cannot be used to disable this declaration", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"6f8d2c6c9c34",1336540620,"A little tweak to the SFINAE condition reporting. Don\'t say:\n\n candidate template ignored: substitu...","A little tweak to the SFINAE condition reporting. Don\'t say:\n\n candidate template ignored: substitution failed [with T = int]: no type named \'type\' in \'std::enable_if<false, void>\'\n\nInstead, just say:\n\n candidate template ignored: disabled by \'enable_if\' [with T = int]\n\n... and point at the enable_if condition which (we assume) failed.\n\nThis is applied to all cases where the user writes \'typename enable_if<...>::type\' (optionally prefixed with a nested name specifier), and \'enable_if<...>\' names a complete class type which does not have a member named \'type\', and this results in a candidate function being ignored in a SFINAE context. Thus it catches \'std::enable_if\', \'std::__1::enable_if\', \'boost::enable_if\' and \'llvm::enable_if\'.\n\nllvm-svn: 156463"}, | ||
[ | [g]={{Db,11263,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_SubstitutionFailure: {\n // ...\n if (PDiag && PDiag->second.getDiagID() == diag::err_typename_nested_not_found_enable_if) {"},{z,3941,"QualType Sema::CheckTemplateIdType(TemplateName Name, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs) {\n // ...\n if (TypeAliasTemplateDecl *AliasTemplate = dyn_cast<TypeAliasTemplateDecl>(Template)) {\n // ...\n if (CanonType.isNull()) {\n // If this was enable_if and we failed to find the nested type\n // within enable_if in a SFINAE context, dig out the specific\n // enable_if condition that failed and present that instead.\n if (isEnableIfAliasTemplate(AliasTemplate)) {\n if (auto DeductionInfo = isSFINAEContext()) {\n if (*DeductionInfo && (*DeductionInfo)->hasSFINAEDiagnostic() && (*DeductionInfo)->peekSFINAEDiagnostic().second.getDiagID() == diag::err_typename_nested_not_found_enable_if && TemplateArgs[0].getArgument().getKind() == TemplateArgument::Expression) {"},{z,11053,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::NotFound: {\n // ...\n if (Ctx && isEnableIf(QualifierLoc, II, CondRange, Cond)) {\n // ...\n Diag(CondRange.getBegin(), diag::err_typename_nested_not_found_enable_if) << Ctx << CondRange;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_typename_nested_not_found_requirement"]={ | ["err_typename_nested_not_found_requirement"]={ | ||
[a | [a]="failed requirement \'%0\'; \'enable_if\' cannot be used to disable this declaration", | ||
[b]=n, | |||
[c]="failed requirement \'(.*?)\'; \'enable_if\' cannot be used to disable this declaration", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"00fa10b43f25",1499286014,"Customize the SFINAE diagnostics for enable_if to provide the failed condition.\n\nWhen enable_if disa...","Customize the SFINAE diagnostics for enable_if to provide the failed condition.\n\nWhen enable_if disables a particular overload resolution candidate,\nrummage through the enable_if condition to find the specific condition\nthat caused the failure. For example, if we have something like:\n\n template<\n typename Iter,\n typename = std::enable_if_t<Random_access_iterator<Iter> &&\n Comparable<Iterator_value_type<Iter>>>>\n void mysort(Iter first, Iter last) {}\n\nand we call \"mysort\" with \"std::list<int>\" iterators, we\'ll get a\ndiagnostic saying that the \"Random_access_iterator<Iter>\" requirement\nfailed. If we call \"mysort\" with\n\"std::vector<something_not_comparable>\", we\'ll get a diagnostic saying\nthat the \"Comparable<...>\" requirement failed.\n\nllvm-svn: 307196"}, | ||
[ | [g]={{Db,11273,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_SubstitutionFailure: {\n // ...\n if (PDiag && PDiag->second.getDiagID() == diag::err_typename_nested_not_found_requirement) {"},{z,3958,"QualType Sema::CheckTemplateIdType(TemplateName Name, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs) {\n // ...\n if (TypeAliasTemplateDecl *AliasTemplate = dyn_cast<TypeAliasTemplateDecl>(Template)) {\n // ...\n if (CanonType.isNull()) {\n // If this was enable_if and we failed to find the nested type\n // within enable_if in a SFINAE context, dig out the specific\n // enable_if condition that failed and present that instead.\n if (isEnableIfAliasTemplate(AliasTemplate)) {\n if (auto DeductionInfo = isSFINAEContext()) {\n if (*DeductionInfo && (*DeductionInfo)->hasSFINAEDiagnostic() && (*DeductionInfo)->peekSFINAEDiagnostic().second.getDiagID() == diag::err_typename_nested_not_found_enable_if && TemplateArgs[0].getArgument().getKind() == TemplateArgument::Expression) {\n // ...\n (*DeductionInfo)->addSFINAEDiagnostic(OldDiag.first, PDiag(diag::err_typename_nested_not_found_requirement) << FailedDescription << FailedCond->getSourceRange());"},{z,11046,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::NotFound: {\n // ...\n if (Ctx && isEnableIf(QualifierLoc, II, CondRange, Cond)) {\n // If we have a condition, narrow it down to the specific failed\n // condition.\n if (Cond) {\n // ...\n Diag(FailedCond->getExprLoc(), diag::err_typename_nested_not_found_requirement) << FailedDescription << FailedCond->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/attr-annotate.cpp"]={"clang/test/SemaCXX/attr-annotate.cpp:34:51: error: failed requirement \'!is_same<long, long>::value\'; \'enable_if\' cannot be used to disable this declaration"} | ["clang/test/SemaCXX/attr-annotate.cpp"]={"clang/test/SemaCXX/attr-annotate.cpp:34:51: error: failed requirement \'!is_same<long, long>::value\'; \'enable_if\' cannot be used to disable this declaration"} | ||
} | } | ||
}, | }, | ||
["err_typename_nested_not_type"]={ | ["err_typename_nested_not_type"]={ | ||
[a | [a]="typename specifier refers to non-type member %0 in %1", | ||
[b]=n, | |||
[c]="typename specifier refers to non\\-type member (.*?) in (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"333489bba35d",1238195448,"Initial implementation of parsing, semantic analysis, and template\ninstantiation for C++ typename-sp...","Initial implementation of parsing, semantic analysis, and template\ninstantiation for C++ typename-specifiers such as\n\n typename T::type\n\nThe parsing of typename-specifiers is relatively easy thanks to\nannotation tokens. When we see the \"typename\", we parse the\ntypename-specifier and produce a typename annotation token. There are\nonly a few places where we need to handle this. We currently parse the\ntypename-specifier form that terminates in an identifier, but not the\nsimple-template-id form, e.g.,\n\n typename T::template apply<U, V>\n\nParsing of nested-name-specifiers has a similar problem, since at this\npoint we don\'t have any representation of a class template\nspecialization whose template-name is unknown.\n\nSemantic analysis is only partially complete, with some support for\ntemplate instantiation that works for simple examples. \n\nllvm-svn: 67875"}, | ||
[ | [g]={{z,11145,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::Found:\n // ...\n DiagID = Ctx ? diag::err_typename_nested_not_type : diag::err_typename_not_type;"},{z,11151,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::FoundOverloaded:\n DiagID = Ctx ? diag::err_typename_nested_not_type : diag::err_typename_not_type;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:62:51: error: typename specifier refers to non-type member \'type\' in \'D\'"} | ["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:62:51: error: typename specifier refers to non-type member \'type\' in \'D\'"} | ||
} | } | ||
}, | }, | ||
["err_typename_not_type"]={ | ["err_typename_not_type"]={ | ||
[a | [a]="typename specifier refers to non-type %0", | ||
[b]=n, | |||
[c]="typename specifier refers to non\\-type (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of ...","Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of the minimal required size for a buffer\nbased on the format string, and couple that with the fortified version to emit a\nwarning when the buffer size is lower than the lower bound computed from the\nformat string.\n\nDifferential Revision: https://reviews.llvm.org/D71566"}, | ||
[ | [g]={{z,11146,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::Found:\n // ...\n DiagID = Ctx ? diag::err_typename_nested_not_type : diag::err_typename_not_type;"},{z,11152,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::FoundOverloaded:\n DiagID = Ctx ? diag::err_typename_nested_not_type : diag::err_typename_not_type;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:37:37: error: typename specifier refers to non-type \'C\'"} | ["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:37:37: error: typename specifier refers to non-type \'C\'"} | ||
} | } | ||
Line 252: | Line 218: | ||
["err_typename_refers_to_non_type_template"]={ | ["err_typename_refers_to_non_type_template"]={ | ||
[a]="typename specifier refers to a non-type template", | [a]="typename specifier refers to a non-type template", | ||
[ | [b]=n, | ||
[ | [c]="typename specifier refers to a non\\-type template", | ||
[d]=m, | |||
[e]=q, | |||
[f]={"dce2b62b7006",1238545739,"Parsing, semantic analysis, and template instantiation for typename\nspecifiers that terminate in a s...","Parsing, semantic analysis, and template instantiation for typename\nspecifiers that terminate in a simple-template-id, e.g.,\n\n typename MetaFun::template apply<T1, T2>\n\nAlso, implement template instantiation for dependent\nnested-name-specifiers that involve unresolved identifiers, e.g.,\n\n typename T::type::type\n\nllvm-svn: 68166"}, | |||
[ | [g]={{ub,2017,"/// TryAnnotateTypeOrScopeToken - If the current token position is on a\n/// typename (possibly qualified in C++) or a C++ scope specifier not followed\n/// by a typename, TryAnnotateTypeOrScopeToken will replace one or more tokens\n/// with a single annotation token representing the typename or C++ scope\n/// respectively.\n/// This simplifies handling of C++ scope specifiers and allows efficient\n/// backtracking without the need to re-parse and resolve nested-names and\n/// typenames.\n/// It will mainly be called when we expect to treat identifiers as typenames\n/// (if they are typenames). For example, in C we do not expect identifiers\n/// inside expressions to be treated as typenames so it will not be called\n/// for expressions in C.\n/// The benefit for C/ObjC is that a typename will be annotated and\n/// Actions.getTypeName will not be needed to be called again (e.g. getTypeName\n/// will not be called twice, once to check whether we have a declaration\n/// specifier, and another one to get the actual type inside\n/// ParseDeclarationSpecifiers).\n///\n/// This returns true if an error occurred.\n///\n/// Note that this routine emits an error if you call it with ::new or ::delete\n/// as the current tokens, so only call it in contexts where these are invalid.\nbool Parser::TryAnnotateTypeOrScopeToken(ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n if (Tok.is(tok::kw_typename)) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.is(tok::annot_template_id)) {\n // ...\n if (!TemplateId->mightBeType()) {\n Diag(Tok, diag::err_typename_refers_to_non_type_template) << Tok.getAnnotationRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/drs/dr3xx.cpp"]={"clang/test/CXX/drs/dr3xx.cpp:30:17: error: typename specifier refers to a non-type template"} | ["clang/test/CXX/drs/dr3xx.cpp"]={"clang/test/CXX/drs/dr3xx.cpp:30:17: error: typename specifier refers to a non-type template"} | ||
} | } | ||
}, | }, | ||
["err_typename_refers_to_using_value_decl"]={ | ["err_typename_refers_to_using_value_decl"]={ | ||
[a | [a]="typename specifier refers to a dependent using declaration for a value %0 in %1", | ||
[b]=n, | |||
[c]="typename specifier refers to a dependent using declaration for a value (.*?) in (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"aed2efbbb54f",1291853187,"A typename specifier can end up referring to a unresolved using\ndeclaration that is a value in ill-f...","A typename specifier can end up referring to a unresolved using\ndeclaration that is a value in ill-formed code. Instead of crashing,\ntreat this as a dependent typename specifier and suggest that the\nusing add \"typename\" into the using declaration. Fixes <rdar://problem/8740998>.\n\nllvm-svn: 121322"}, | ||
[ | [g]={{z,11068,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::FoundUnresolvedValue: {\n // ...\n Diag(IILoc, diag::err_typename_refers_to_using_value_decl) << Name << Ctx << FullRange;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaTemplate/typename-specifier-4.cpp"]={"clang/test/SemaTemplate/typename-specifier-4.cpp:150:22: error: typename specifier refers to a dependent using declaration for a value \'iterator\' in \'X<T>\'"} | ["clang/test/SemaTemplate/typename-specifier-4.cpp"]={"clang/test/SemaTemplate/typename-specifier-4.cpp:150:22: error: typename specifier refers to a dependent using declaration for a value \'iterator\' in \'X<T>\'"} | ||
} | } | ||
Line 282: | Line 242: | ||
["err_typename_requires_specqual"]={ | ["err_typename_requires_specqual"]={ | ||
[a]="type name requires a specifier or qualifier", | [a]="type name requires a specifier or qualifier", | ||
[ | [b]=n, | ||
[ | [c]="type name requires a specifier or qualifier", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[g]={{B,2658,"/// ParseSpecifierQualifierList\n/// specifier-qualifier-list:\n/// type-specifier specifier-qualifier-list[opt]\n/// type-qualifier specifier-qualifier-list[opt]\n/// [GNU] attributes specifier-qualifier-list[opt]\n///\nvoid Parser::ParseSpecifierQualifierList(DeclSpec &DS, ImplicitTypenameContext AllowImplicitTypename, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n if (isTypeSpecifier(DSC) && !DS.hasTypeSpecifier()) {\n // ...\n } else if (Specs == DeclSpec::PQ_None && !DS.hasAttributes()) {\n Diag(Tok, diag::err_typename_requires_specqual);"}}, | |||
[ | [h]={ | ||
[ | |||
[ | |||
["clang/test/Sema/block-misc.c"]={"clang/test/Sema/block-misc.c:117:14: error: type name requires a specifier or qualifier"} | ["clang/test/Sema/block-misc.c"]={"clang/test/Sema/block-misc.c:117:14: error: type name requires a specifier or qualifier"} | ||
} | } | ||
Line 297: | Line 254: | ||
["err_ucn_control_character"]={ | ["err_ucn_control_character"]={ | ||
[a]="universal character name refers to a control character", | [a]="universal character name refers to a control character", | ||
[ | [b]=n, | ||
[ | [c]="universal character name refers to a control character", | ||
[d]=m, | |||
[ | [e]=u, | ||
[ | [f]={"2a70e65436c7",1331332071,"Improve diagnostics for UCNs referring to control characters and members of the\nbasic source charact...","Improve diagnostics for UCNs referring to control characters and members of the\nbasic source character set in C++98. Add -Wc++98-compat diagnostics for same in\nliterals in C++11. Extend such support to cover string literals as well as\ncharacter literals, and mark N2170 as done.\n\nThis seems too minor to warrant a release note to me. Let me know if you disagree.\n\nllvm-svn: 152444"}, | ||
[ | [g]={{T,3509,"uint32_t Lexer::tryReadUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n // C++11 [lex.charset]p2: If the hexadecimal value for a\n // universal-character-name corresponds to a surrogate code point (in the\n // range 0xD800-0xDFFF, inclusive), the program is ill-formed. Additionally,\n // if the hexadecimal value for a universal-character-name outside the\n // c-char-sequence, s-char-sequence, or r-char-sequence of a character or\n // string literal corresponds to a control character (in either of the\n // ranges 0x00-0x1F or 0x7F-0x9F, both inclusive) or to a character in the\n // basic source character set, the program is ill-formed.\n if (CodePoint < 0xA0) {\n // We don\'t use isLexingRawMode() here because we need to warn about bad\n // UCNs even when skipping preprocessing tokens in a #if block.\n if (Result && PP) {\n if (CodePoint < 0x20 || CodePoint >= 0x7F)\n Diag(BufferPtr, diag::err_ucn_control_character);"},{X,684,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // ...\n // C2x and C++11 allow UCNs that refer to control characters\n // and basic source characters inside character and string literals\n if (UcnVal < 0xa0 &&\n // ...\n if (Diags) {\n // ...\n if (UcnVal >= 0x20 && UcnVal < 0x7f)\n // ...\n else\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, IsError ? diag::err_ucn_control_character : Features.CPlusPlus ? diag::warn_cxx98_compat_literal_ucn_control_character : diag::warn_c2x_compat_literal_ucn_control_character);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Sema/ucn-cstring.c"]={"clang/test/Sema/ucn-cstring.c:14:19: error: universal character name refers to a control character"} | ["clang/test/Sema/ucn-cstring.c"]={"clang/test/Sema/ucn-cstring.c:14:19: error: universal character name refers to a control character"} | ||
} | } | ||
}, | }, | ||
["err_ucn_escape_basic_scs"]={ | ["err_ucn_escape_basic_scs"]={ | ||
[a | [a]="character \'%0\' cannot be specified by a universal character name", | ||
[b]=n, | |||
[c]="character \'(.*?)\' cannot be specified by a universal character name", | |||
[d]=m, | |||
[ | [e]=u, | ||
[ | [f]={"2a70e65436c7",1331332071,"Improve diagnostics for UCNs referring to control characters and members of the\nbasic source charact...","Improve diagnostics for UCNs referring to control characters and members of the\nbasic source character set in C++98. Add -Wc++98-compat diagnostics for same in\nliterals in C++11. Extend such support to cover string literals as well as\ncharacter literals, and mark N2170 as done.\n\nThis seems too minor to warrant a release note to me. Let me know if you disagree.\n\nllvm-svn: 152444"}, | ||
[ | [g]={{T,3512,"uint32_t Lexer::tryReadUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n // C++11 [lex.charset]p2: If the hexadecimal value for a\n // universal-character-name corresponds to a surrogate code point (in the\n // range 0xD800-0xDFFF, inclusive), the program is ill-formed. Additionally,\n // if the hexadecimal value for a universal-character-name outside the\n // c-char-sequence, s-char-sequence, or r-char-sequence of a character or\n // string literal corresponds to a control character (in either of the\n // ranges 0x00-0x1F or 0x7F-0x9F, both inclusive) or to a character in the\n // basic source character set, the program is ill-formed.\n if (CodePoint < 0xA0) {\n // We don\'t use isLexingRawMode() here because we need to warn about bad\n // UCNs even when skipping preprocessing tokens in a #if block.\n if (Result && PP) {\n if (CodePoint < 0x20 || CodePoint >= 0x7F)\n // ...\n else {\n // ...\n Diag(BufferPtr, diag::err_ucn_escape_basic_scs) << StringRef(&C, 1);"},{X,677,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // ...\n // C2x and C++11 allow UCNs that refer to control characters\n // and basic source characters inside character and string literals\n if (UcnVal < 0xa0 &&\n // ...\n if (Diags) {\n // ...\n if (UcnVal >= 0x20 && UcnVal < 0x7f)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, IsError ? diag::err_ucn_escape_basic_scs : Features.CPlusPlus ? diag::warn_cxx98_compat_literal_ucn_escape_basic_scs : diag::warn_c2x_compat_literal_ucn_escape_basic_scs) << StringRef(&BasicSCSChar, 1);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/lex/lex.charset/p2-cxx98.cpp"]={"clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:6:13: error: character \' \' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:7:13: error: character \'\"\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:8:13: error: character \'#\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:10:13: error: character \'%\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:11:13: error: character \'\'\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:12:13: error: character \'?\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:14:13: error: character \'A\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:15:13: error: character \'_\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:17:13: error: character \'~\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:33:20: error: character \' \' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:34:20: error: character \'\"\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:35:20: error: character \'#\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:37:20: error: character \'%\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:38:20: error: character \'\'\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:39:20: error: character \'?\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:41:20: error: character \'A\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:42:20: error: character \'_\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:44:20: error: character \'~\' cannot be specified by a universal character name"} | ["clang/test/CXX/lex/lex.charset/p2-cxx98.cpp"]={"clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:6:13: error: character \' \' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:7:13: error: character \'\"\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:8:13: error: character \'#\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:10:13: error: character \'%\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:11:13: error: character \'\'\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:12:13: error: character \'?\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:14:13: error: character \'A\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:15:13: error: character \'_\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:17:13: error: character \'~\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:33:20: error: character \' \' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:34:20: error: character \'\"\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:35:20: error: character \'#\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:37:20: error: character \'%\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:38:20: error: character \'\'\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:39:20: error: character \'?\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:41:20: error: character \'A\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:42:20: error: character \'_\' cannot be specified by a universal character name","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:44:20: error: character \'~\' cannot be specified by a universal character name"} | ||
} | } | ||
Line 327: | Line 278: | ||
["err_ucn_escape_incomplete"]={ | ["err_ucn_escape_incomplete"]={ | ||
[a]="incomplete universal character name", | [a]="incomplete universal character name", | ||
[ | [b]=n, | ||
[ | [c]="incomplete universal character name", | ||
[d]=m, | |||
[ | [e]=u, | ||
[ | [f]={"7b753d21b54d",1238456763,"Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller ...","Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller has graciously offered to write some test to help validate UCN support.\n\nFrom a front-end perspective, I believe this code should work for ObjC @-strings. At the moment, I believe we need to tweak the code generation for @-strings (which doesn\'t appear to handle them). Will be investigating.\n\nllvm-svn: 68076"}, | ||
[ | [g]={{X,523,"static bool ProcessNumericUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, bool &Delimited, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // ...\n // If we didn\'t consume the proper number of digits, there is a problem.\n if (Count == 0 || (!Delimited && Count != UcnLen)) {\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, Delimited ? diag::err_delimited_escape_empty : diag::err_ucn_escape_incomplete);"},{X,610,"static bool ProcessNamedUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features) {\n // ...\n if (Incomplete || Empty) {\n if (Diags) {\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, Incomplete ? diag::err_ucn_escape_incomplete : diag::err_delimited_escape_empty) << StringRef(&UcnBegin[1], 1);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Sema/ucn-cstring.c"]={"clang/test/Sema/ucn-cstring.c:12:19: error: incomplete universal character name","clang/test/Sema/ucn-cstring.c:13:19: error: incomplete universal character name"} | ["clang/test/Sema/ucn-cstring.c"]={"clang/test/Sema/ucn-cstring.c:12:19: error: incomplete universal character name","clang/test/Sema/ucn-cstring.c:13:19: error: incomplete universal character name"} | ||
} | } | ||
Line 342: | Line 290: | ||
["err_ucn_escape_invalid"]={ | ["err_ucn_escape_invalid"]={ | ||
[a]="invalid universal character", | [a]="invalid universal character", | ||
[ | [b]=n, | ||
[ | [c]="invalid universal character", | ||
[d]=m, | |||
[ | [e]=u, | ||
[ | [f]={"7b753d21b54d",1238456763,"Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller ...","Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller has graciously offered to write some test to help validate UCN support.\n\nFrom a front-end perspective, I believe this code should work for ObjC @-strings. At the moment, I believe we need to tweak the code generation for @-strings (which doesn\'t appear to handle them). Will be investigating.\n\nllvm-svn: 68076"}, | ||
[ | [g]={{T,3525,"uint32_t Lexer::tryReadUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n // C++11 [lex.charset]p2: If the hexadecimal value for a\n // universal-character-name corresponds to a surrogate code point (in the\n // range 0xD800-0xDFFF, inclusive), the program is ill-formed. Additionally,\n // if the hexadecimal value for a universal-character-name outside the\n // c-char-sequence, s-char-sequence, or r-char-sequence of a character or\n // string literal corresponds to a control character (in either of the\n // ranges 0x00-0x1F or 0x7F-0x9F, both inclusive) or to a character in the\n // basic source character set, the program is ill-formed.\n if (CodePoint < 0xA0) {\n // ...\n } else if (CodePoint >= 0xD800 && CodePoint <= 0xDFFF) {\n // C++03 allows UCNs representing surrogate characters. C99 and C++11 don\'t.\n // We don\'t use isLexingRawMode() here because we need to diagnose bad\n // UCNs even when skipping preprocessing tokens in a #if block.\n if (Result && PP) {\n if (LangOpts.CPlusPlus && !LangOpts.CPlusPlus11)\n // ...\n else\n Diag(BufferPtr, diag::err_ucn_escape_invalid);"},{X,662,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // ...\n // Check UCN constraints (C99 6.4.3p2) [C++11 lex.charset p2]\n if ((0xD800 <= UcnVal && UcnVal <= 0xDFFF) || // surrogate codepoints\n // ...\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, diag::err_ucn_escape_invalid);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/lex/lex.charset/p2-cxx98.cpp"]={"clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:26:19: error: invalid universal character","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:27:19: error: invalid universal character","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:53:27: error: invalid universal character","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:54:27: error: invalid universal character"} | ["clang/test/CXX/lex/lex.charset/p2-cxx98.cpp"]={"clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:26:19: error: invalid universal character","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:27:19: error: invalid universal character","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:53:27: error: invalid universal character","clang/test/CXX/lex/lex.charset/p2-cxx98.cpp:54:27: error: invalid universal character"} | ||
} | } | ||
}, | }, | ||
["err_unable_to_make_temp"]={ | ["err_unable_to_make_temp"]={ | ||
[a | [a]="unable to make temporary file: %0", | ||
[b]=n, | |||
[c]="unable to make temporary file\\: (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"3ef9c44747fb",1337201758,"Pulls diagnostics for temp file handling into the common diagnostic kinds.\n\nllvm-svn: 156947","Pulls diagnostics for temp file handling into the common diagnostic kinds.\n\nllvm-svn: 156947"}, | ||
[ | [g]={{"clang/lib/Driver/Driver.cpp",5715,"const char *Driver::CreateTempFile(Compilation &C, StringRef Prefix, StringRef Suffix, bool MultipleArchs, StringRef BoundArch, bool NeedUniqueDirectory) const {\n // ...\n if (CrashDirectory) {\n // ...\n if (std::error_code EC = llvm::sys::fs::createUniqueFile(Path + Middle + Suffix, TmpName)) {\n Diag(clang::diag::err_unable_to_make_temp) << EC.message();"},{"clang/lib/Driver/Driver.cpp",6119,"std::string Driver::GetTemporaryPath(StringRef Prefix, StringRef Suffix) const {\n // ...\n if (EC) {\n Diag(clang::diag::err_unable_to_make_temp) << EC.message();"},{"clang/lib/Driver/Driver.cpp",6130,"std::string Driver::GetTemporaryDirectory(StringRef Prefix) const {\n // ...\n if (EC) {\n Diag(clang::diag::err_unable_to_make_temp) << EC.message();"},{"clang/lib/Driver/ToolChains/HIPUtility.cpp",160,"/// Add Generated HIP Object File which has device images embedded into the\n/// host to the argument list for linking. Using MC directives, embed the\n/// device code and also define symbols required by the code generation so that\n/// the image can be retrieved at runtime.\nvoid HIP::constructGenerateObjFileFromHIPFatBinary(Compilation &C, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const JobAction &JA, const Tool &T) {\n // ...\n if (EC) {\n C.getDriver().Diag(clang::diag::err_unable_to_make_temp) << EC.message();"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unable_to_rename_temp"]={ | ["err_unable_to_rename_temp"]={ | ||
[a | [a]="unable to rename temporary \'%0\' to output file \'%1\': \'%2\'", | ||
[b]=n, | |||
[c]="unable to rename temporary \'(.*?)\' to output file \'(.*?)\'\\: \'(.*?)\'", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"3ef9c44747fb",1337201758,"Pulls diagnostics for temp file handling into the common diagnostic kinds.\n\nllvm-svn: 156947","Pulls diagnostics for temp file handling into the common diagnostic kinds.\n\nllvm-svn: 156947"}, | ||
[ | [g]={{"clang/lib/Frontend/CompilerInstance.cpp",793,"void CompilerInstance::clearOutputFiles(bool EraseFiles) {\n // ...\n // Ignore errors that occur when trying to discard the temp file.\n for (OutputFile &OF : OutputFiles) {\n // ...\n getDiagnostics().Report(diag::err_unable_to_rename_temp) << OF.File->TmpName << OF.Filename << std::move(E);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unavailable"]={ | ["err_unavailable"]={ | ||
[a | [a]="%0 is unavailable", | ||
[b]=n, | |||
[c]="(.*?) is unavailable", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"1ddd6d2b6b80",1279744991,"Upgrade \"\'X\' is unavailable\" from a warning to an error. This matches GCC\'s behavior. Note that\nGC...","Upgrade \"\'X\' is unavailable\" from a warning to an error. This matches GCC\'s behavior. Note that\nGCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now\nClang\'s behavior is more strict in this case, but more consistent. We will need to see how much\nthis fires on real code and determine whether this case should be downgraded to a warning.\n\nFixes <rdar://problem/8213093>.\n\nllvm-svn: 109033"}, | ||
[ | [g]={{"clang/lib/ARCMigrate/TransAPIUses.cpp",90,"class APIChecker : public RecursiveASTVisitor<APIChecker> {\n // ...\n bool VisitObjCMessageExpr(ObjCMessageExpr *E) {\n // ...\n if (E->isInstanceMessage() && E->getInstanceReceiver() && E->getSelector() == zoneSel && Pass.TA.hasDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0))) {"},{"clang/lib/ARCMigrate/TransAPIUses.cpp",95,"class APIChecker : public RecursiveASTVisitor<APIChecker> {\n // ...\n bool VisitObjCMessageExpr(ObjCMessageExpr *E) {\n // ...\n // -zone.\n if (E->isInstanceMessage() && E->getInstanceReceiver() && E->getSelector() == zoneSel && Pass.TA.hasDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0))) {\n // ...\n Pass.TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0));"},{"clang/lib/ARCMigrate/TransAutoreleasePool.cpp",220,"class AutoreleasePoolRewriter : public RecursiveASTVisitor<AutoreleasePoolRewriter> {\n // ...\n void clearUnavailableDiags(Stmt *S) {\n if (S)\n Pass.TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message, S->getSourceRange());"},{"clang/lib/ARCMigrate/TransGCCalls.cpp",54,"class GCCollectableCallsChecker : public RecursiveASTVisitor<GCCollectableCallsChecker> {\n // ...\n bool VisitCallExpr(CallExpr *E) {\n // ...\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) {\n if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(DRE->getDecl())) {\n // ...\n if (FD->getIdentifier() == NSMakeCollectableII) {\n // ...\n TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message,"},{"clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp",391,"class RetainReleaseDeallocRemover : public RecursiveASTVisitor<RetainReleaseDeallocRemover> {\n // ...\n void clearDiagnostics(SourceLocation loc) const { Pass.TA.clearDiagnostic(diag::err_arc_illegal_explicit_message, diag::err_unavailable, diag::err_unavailable_message, loc); }"},{Pc,844,"bool DiagnosticIDs::isUnrecoverable(unsigned DiagID) const {\n // ...\n if (DiagID == diag::err_unavailable || DiagID == diag::err_unavailable_message)"},{"clang/lib/Sema/SemaAvailability.cpp",447,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n diag = !ObjCPropertyAccess ? diag::err_unavailable : diag::err_property_method_unavailable;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/protocol-attribute.m"]={"clang/test/SemaObjC/protocol-attribute.m:6:8: error: \'FwProto\' is unavailable","clang/test/SemaObjC/protocol-attribute.m:38:22: error: \'FwProto\' is unavailable","clang/test/SemaObjC/protocol-attribute.m:43:5: error: \'XProto\' is unavailable"} | ["clang/test/SemaObjC/protocol-attribute.m"]={"clang/test/SemaObjC/protocol-attribute.m:6:8: error: \'FwProto\' is unavailable","clang/test/SemaObjC/protocol-attribute.m:38:22: error: \'FwProto\' is unavailable","clang/test/SemaObjC/protocol-attribute.m:43:5: error: \'XProto\' is unavailable"} | ||
} | } | ||
}, | }, | ||
["err_unavailable_in_arc"]={ | ["err_unavailable_in_arc"]={ | ||
[a | [a]="%0 is unavailable in ARC", | ||
[b]=n, | |||
[c]="(.*?) is unavailable in ARC", | |||
[d]=m, | |||
[ | [e]="ARC Restrictions", | ||
[ | [f]={"c6af8c606dae",1446008599,"Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes ...","Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes things implicitly unavailable.\n\nllvm-svn: 251496"}, | ||
[ | [g]={{"clang/lib/Sema/SemaAvailability.cpp",462,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // Most of these failures are due to extra restrictions in ARC;\n // reflect that in the primary diagnostic when applicable.\n auto flagARCError = [&] {\n if (S.getLangOpts().ObjCAutoRefCount && S.getSourceManager().isInSystemHeader(OffendingDecl->getLocation()))\n diag = diag::err_unavailable_in_arc;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/arc-unavailable-system-function.m"]={"arc-unavailable-system-function.m:2:3: error: \'foo\' is unavailable in ARC"} | ["clang/test/SemaObjC/arc-unavailable-system-function.m"]={"arc-unavailable-system-function.m:2:3: error: \'foo\' is unavailable in ARC"} | ||
} | } | ||
}, | }, | ||
["err_unavailable_message"]={ | ["err_unavailable_message"]={ | ||
[a | [a]="%0 is unavailable: %1", | ||
[b]=n, | |||
[c]="(.*?) is unavailable\\: (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"c74073cd2045",1286406752,"Patch for adding message to unavailable attribute.\nAnd its documentation.\nFinishes off // rdar: // 6...","Patch for adding message to unavailable attribute.\nAnd its documentation.\nFinishes off // rdar: // 6734520.\n\nllvm-svn: 115862"}, | ||
[ | [g]={{"clang/lib/ARCMigrate/TransAPIUses.cpp",91,"class APIChecker : public RecursiveASTVisitor<APIChecker> {\n // ...\n bool VisitObjCMessageExpr(ObjCMessageExpr *E) {\n // ...\n if (E->isInstanceMessage() && E->getInstanceReceiver() && E->getSelector() == zoneSel && Pass.TA.hasDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0))) {"},{"clang/lib/ARCMigrate/TransAPIUses.cpp",96,"class APIChecker : public RecursiveASTVisitor<APIChecker> {\n // ...\n bool VisitObjCMessageExpr(ObjCMessageExpr *E) {\n // ...\n // -zone.\n if (E->isInstanceMessage() && E->getInstanceReceiver() && E->getSelector() == zoneSel && Pass.TA.hasDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0))) {\n // ...\n Pass.TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message, E->getSelectorLoc(0));"},{"clang/lib/ARCMigrate/TransAutoreleasePool.cpp",221,"class AutoreleasePoolRewriter : public RecursiveASTVisitor<AutoreleasePoolRewriter> {\n // ...\n void clearUnavailableDiags(Stmt *S) {\n if (S)\n Pass.TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message, S->getSourceRange());"},{"clang/lib/ARCMigrate/TransGCCalls.cpp",55,"class GCCollectableCallsChecker : public RecursiveASTVisitor<GCCollectableCallsChecker> {\n // ...\n bool VisitCallExpr(CallExpr *E) {\n // ...\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) {\n if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(DRE->getDecl())) {\n // ...\n if (FD->getIdentifier() == NSMakeCollectableII) {\n // ...\n TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message,"},{"clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp",392,"class RetainReleaseDeallocRemover : public RecursiveASTVisitor<RetainReleaseDeallocRemover> {\n // ...\n void clearDiagnostics(SourceLocation loc) const { Pass.TA.clearDiagnostic(diag::err_arc_illegal_explicit_message, diag::err_unavailable, diag::err_unavailable_message, loc); }"},{Pc,845,"bool DiagnosticIDs::isUnrecoverable(unsigned DiagID) const {\n // ...\n if (DiagID == diag::err_unavailable || DiagID == diag::err_unavailable_message)"},{"clang/lib/Sema/SemaAvailability.cpp",449,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n diag_message = diag::err_unavailable_message;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/attr-c2x.c"]={"clang/test/Sema/attr-c2x.c:27:3: error: \'foo2\' is unavailable: not available - replaced"} | ["clang/test/Sema/attr-c2x.c"]={"clang/test/Sema/attr-c2x.c:27:3: error: \'foo2\' is unavailable: not available - replaced"} | ||
} | } | ||
}, | }, | ||
["err_uncasted_call_of_unknown_any"]={ | ["err_uncasted_call_of_unknown_any"]={ | ||
[a | [a]="%0 has unknown return type; cast the call to its declared return type", | ||
[b]=n, | |||
[c]="(.*?) has unknown return type; cast the call to its declared return type", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2d2e870745c2",1302505370,Hb,Hb}, | ||
[ | [g]={{r,21484,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n // ...\n while (true) {\n // ...\n if (CallExpr *call = dyn_cast<CallExpr>(E)) {\n // ...\n diagID = diag::err_uncasted_call_of_unknown_any;"},{r,21488,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n // ...\n if (DeclRefExpr *ref = dyn_cast<DeclRefExpr>(E)) {\n // ...\n } else if (MemberExpr *mem = dyn_cast<MemberExpr>(E)) {\n // ...\n } else if (ObjCMessageExpr *msg = dyn_cast<ObjCMessageExpr>(E)) {\n diagID = diag::err_uncasted_call_of_unknown_any;"}}, | ||
[ | [h]={ | ||
[ | [bc]={"clang/test/SemaCXX/unknown-anytype.cpp:26:5: error: \'foo\' has unknown return type; cast the call to its declared return type"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_uncasted_send_to_unknown_any_method"]={ | ["err_uncasted_send_to_unknown_any_method"]={ | ||
[a | [a]="no known method %select{%objcinstance1|%objcclass1}0; cast the message send to the method\'s return type", | ||
[b]=n, | |||
[c]="no known method (?:(.*?)|(.*?)); cast the message send to the method\'s return type", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"fa6f5d6ab8c3",1314824256,"Don\'t assert when diagnosing a missing cast of an unknown-anytype\nmessage send to an unknown method....","Don\'t assert when diagnosing a missing cast of an unknown-anytype\nmessage send to an unknown method.\n\nrdar://problem/9416370, redux.\n\nllvm-svn: 138893"}, | ||
[ | [g]={{r,21494,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n // ...\n if (DeclRefExpr *ref = dyn_cast<DeclRefExpr>(E)) {\n // ...\n } else if (MemberExpr *mem = dyn_cast<MemberExpr>(E)) {\n // ...\n } else if (ObjCMessageExpr *msg = dyn_cast<ObjCMessageExpr>(E)) {\n // ...\n if (!d) {\n S.Diag(loc, diag::err_uncasted_send_to_unknown_any_method) << static_cast<unsigned>(msg->isClassMessage()) << msg->getSelector() << orig->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjCXX/unknown-anytype.mm"]={"clang/test/SemaObjCXX/unknown-anytype.mm:6:12: error: no known method \'-foo\'; cast the message send to the method\'s return type","clang/test/SemaObjCXX/unknown-anytype.mm:7:8: error: no known method \'-foo\'; cast the message send to the method\'s return type"} | ["clang/test/SemaObjCXX/unknown-anytype.mm"]={"clang/test/SemaObjCXX/unknown-anytype.mm:6:12: error: no known method \'-foo\'; cast the message send to the method\'s return type","clang/test/SemaObjCXX/unknown-anytype.mm:7:8: error: no known method \'-foo\'; cast the message send to the method\'s return type"} | ||
} | } | ||
}, | }, | ||
["err_uncasted_use_of_unknown_any"]={ | ["err_uncasted_use_of_unknown_any"]={ | ||
[a | [a]="%0 has unknown type; cast it to its declared type to use it", | ||
[b]=n, | |||
[c]="(.*?) has unknown type; cast it to its declared type to use it", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2d2e870745c2",1302505370,Hb,Hb}, | ||
[ | [g]={{r,21469,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n // ...\n unsigned diagID = diag::err_uncasted_use_of_unknown_any;"}}, | ||
[ | [h]={ | ||
[ | [bc]={"clang/test/SemaCXX/unknown-anytype.cpp:17:13: error: \'foo\' has unknown type; cast it to its declared type to use it","clang/test/SemaCXX/unknown-anytype.cpp:18:17: error: \'foo\' has unknown type; cast it to its declared type to use it","clang/test/SemaCXX/unknown-anytype.cpp:19:12: error: \'foo\' has unknown type; cast it to its declared type to use it"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_undeclared_boxing_method"]={ | ["err_undeclared_boxing_method"]={ | ||
[a | [a]="declaration of %0 is missing in %1 class", | ||
[b]=n, | |||
[c]="declaration of (.*?) is missing in (.*?) class", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"890f4577b11a",1336838021,"Don\'t crash on boxed strings when +stringWithUTF8String: is missing.\n\nAlso, unify some diagnostics f...","Don\'t crash on boxed strings when +stringWithUTF8String: is missing.\n\nAlso, unify some diagnostics for boxed expressions that have the same form.\n\nFixes PR12804.\n\nllvm-svn: 156713"}, | ||
[ | [g]={{oc,154,"/// Emits an error if the given method does not exist, or if the return\n/// type is not an Objective-C object.\nstatic bool validateBoxingMethod(Sema &S, SourceLocation Loc, const ObjCInterfaceDecl *Class, Selector Sel, const ObjCMethodDecl *Method) {\n if (!Method) {\n // ...\n S.Diag(Loc, diag::err_undeclared_boxing_method) << Sel << Class->getName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/objc-literal-nsnumber.m"]={"clang/test/SemaObjC/objc-literal-nsnumber.m:54:18: error: declaration of \'numberWithDouble:\' is missing in NSNumber class","clang/test/SemaObjC/objc-literal-nsnumber.m:55:24: error: declaration of \'numberWithBool:\' is missing in NSNumber class","clang/test/SemaObjC/objc-literal-nsnumber.m:124:10: error: declaration of \'stringWithUTF8String:\' is missing in NSString class"} | ["clang/test/SemaObjC/objc-literal-nsnumber.m"]={"clang/test/SemaObjC/objc-literal-nsnumber.m:54:18: error: declaration of \'numberWithDouble:\' is missing in NSNumber class","clang/test/SemaObjC/objc-literal-nsnumber.m:55:24: error: declaration of \'numberWithBool:\' is missing in NSNumber class","clang/test/SemaObjC/objc-literal-nsnumber.m:124:10: error: declaration of \'stringWithUTF8String:\' is missing in NSString class"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_destructor_name"]={ | ["err_undeclared_destructor_name"]={ | ||
[a | [a]="undeclared identifier %0 in destructor name", | ||
[b]=n, | |||
[c]="undeclared identifier (.*?) in destructor name", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={Oc,1576809732,Rc,Lc}, | ||
[ | [g]={{O,438,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\n if (FoundDecls.empty()) {\n // ...\n Diag(NameLoc, diag::err_undeclared_destructor_name) << &II << MakeFixItHint();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:26:7: error: undeclared identifier \'foo\' in destructor name","clang/test/SemaCXX/pseudo-destructors.cpp:86:9: error: undeclared identifier \'oops\' in destructor name","clang/test/SemaCXX/pseudo-destructors.cpp:139:45: error: undeclared identifier \'G\' in destructor name"} | ["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:26:7: error: undeclared identifier \'foo\' in destructor name","clang/test/SemaCXX/pseudo-destructors.cpp:86:9: error: undeclared identifier \'oops\' in destructor name","clang/test/SemaCXX/pseudo-destructors.cpp:139:45: error: undeclared identifier \'G\' in destructor name"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_label_use"]={ | ["err_undeclared_label_use"]={ | ||
[a | [a]="use of undeclared label %0", | ||
[b]=n, | |||
[c]="use of undeclared label (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{p,2222,"static void CheckPoppedLabel(LabelDecl *L, Sema &S, Sema::DiagReceiverTy DiagReceiver) {\n // ...\n if (Diagnose)\n DiagReceiver(L->getLocation(), S.PDiag(diag::err_undeclared_label_use) << L);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Misc/explicit.cpp"]={"clang/test/Misc/explicit.cpp:5:16: error: use of undeclared label \'b\'"} | ["clang/test/Misc/explicit.cpp"]={"clang/test/Misc/explicit.cpp:5:16: error: use of undeclared label \'b\'"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_objc_literal_class"]={ | ["err_undeclared_objc_literal_class"]={ | ||
[a | [a]="definition of class %0 must be available to use Objective-C %select{array literals|dictionary literals|numeric literals|boxed expressions|string literals}1", | ||
[b]=n, | |||
[c]="definition of class (.*?) must be available to use Objective\\-C (?:array literals|dictionary literals|numeric literals|boxed expressions|string literals)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"b7d8563973fe",1437714580,"Cleanup ObjCInterfaceDecl lookup for ObjC literals\n\nllvm-svn: 243092","Cleanup ObjCInterfaceDecl lookup for ObjC literals\n\nllvm-svn: 243092"}, | ||
[ | [g]={{oc,204,"/// Validates ObjCInterfaceDecl availability.\n/// ObjCInterfaceDecl, used to create ObjC literals, should be defined\n/// if clang not in a debugger mode.\nstatic bool ValidateObjCLiteralInterfaceDecl(Sema &S, ObjCInterfaceDecl *Decl, SourceLocation Loc, Sema::ObjCLiteralKind LiteralKind) {\n if (!Decl) {\n // ...\n S.Diag(Loc, diag::err_undeclared_objc_literal_class) << II->getName() << LiteralKind;"},{oc,208,"/// Validates ObjCInterfaceDecl availability.\n/// ObjCInterfaceDecl, used to create ObjC literals, should be defined\n/// if clang not in a debugger mode.\nstatic bool ValidateObjCLiteralInterfaceDecl(Sema &S, ObjCInterfaceDecl *Decl, SourceLocation Loc, Sema::ObjCLiteralKind LiteralKind) {\n if (!Decl) {\n // ...\n } else if (!Decl->hasDefinition() && !S.getLangOpts().DebuggerObjCLiteral) {\n S.Diag(Loc, diag::err_undeclared_objc_literal_class) << Decl->getName() << LiteralKind;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/objc-literal-nsnumber.m"]={"clang/test/SemaObjC/objc-literal-nsnumber.m:13:12: error: definition of class NSNumber must be available to use Objective-C numeric literals","clang/test/SemaObjC/objc-literal-nsnumber.m:16:13: error: definition of class NSNumber must be available to use Objective-C numeric literals","clang/test/SemaObjC/objc-literal-nsnumber.m:23:12: error: definition of class NSNumber must be available to use Objective-C numeric literals","clang/test/SemaObjC/objc-literal-nsnumber.m:26:13: error: definition of class NSNumber must be available to use Objective-C numeric literals","clang/test/SemaObjC/objc-literal-nsnumber.m:77:10: error: definition of class NSDictionary must be available to use Objective-C dictionary literals"} | ["clang/test/SemaObjC/objc-literal-nsnumber.m"]={"clang/test/SemaObjC/objc-literal-nsnumber.m:13:12: error: definition of class NSNumber must be available to use Objective-C numeric literals","clang/test/SemaObjC/objc-literal-nsnumber.m:16:13: error: definition of class NSNumber must be available to use Objective-C numeric literals","clang/test/SemaObjC/objc-literal-nsnumber.m:23:12: error: definition of class NSNumber must be available to use Objective-C numeric literals","clang/test/SemaObjC/objc-literal-nsnumber.m:26:13: error: definition of class NSNumber must be available to use Objective-C numeric literals","clang/test/SemaObjC/objc-literal-nsnumber.m:77:10: error: definition of class NSDictionary must be available to use Objective-C dictionary literals"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_protocol"]={ | ["err_undeclared_protocol"]={ | ||
[a | [a]="cannot find protocol declaration for %0", | ||
[b]=n, | |||
[c]="cannot find protocol declaration for (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{hb,1331,"/// FindProtocolDeclaration - This routine looks up protocols and\n/// issues an error if they are not declared. It returns list of\n/// protocol declarations in its \'Protocols\' argument.\nvoid Sema::FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef<IdentifierLocPair> ProtocolId, SmallVectorImpl<Decl *> &Protocols) {\n for (const IdentifierLocPair &Pair : ProtocolId) {\n // ...\n if (!PDecl) {\n Diag(Pair.second, diag::err_undeclared_protocol) << Pair.first;"},{hb,1745,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n // ...\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n // ...\n Diag(identifierLocs[i], (lookupKind == LookupAnyName ? diag::err_objc_type_arg_missing : lookupKind == LookupObjCProtocolName ? diag::err_undeclared_protocol : diag::err_unknown_typename)) << identifiers[i];"},{oc,1393,"ExprResult Sema::ParseObjCProtocolExpression(IdentifierInfo *ProtocolId, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc) {\n // ...\n if (!PDecl) {\n Diag(ProtoLoc, diag::err_undeclared_protocol) << ProtocolId;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/undefined-protocol-type-1.m"]={"clang/test/SemaObjC/undefined-protocol-type-1.m:7:10: error: cannot find protocol declaration for \'p3\'","clang/test/SemaObjC/undefined-protocol-type-1.m:8:10: error: cannot find protocol declaration for \'p3\'"} | ["clang/test/SemaObjC/undefined-protocol-type-1.m"]={"clang/test/SemaObjC/undefined-protocol-type-1.m:7:10: error: cannot find protocol declaration for \'p3\'","clang/test/SemaObjC/undefined-protocol-type-1.m:8:10: error: cannot find protocol declaration for \'p3\'"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_protocol_suggest"]={ | ["err_undeclared_protocol_suggest"]={ | ||
[a | [a]="cannot find protocol declaration for %0; did you mean %1?", | ||
[b]=n, | |||
[c]="cannot find protocol declaration for (.*?); did you mean (.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific\nconstructs:\n\n - Instance variable l...","Implement typo correction for a variety of Objective-C-specific\nconstructs:\n\n - Instance variable lookup (\"foo->ivar\" and, in instance methods, \"ivar\")\n - Property name lookup (\"foo.prop\")\n - Superclasses\n - Various places where a class name is required\n - Protocol names (e.g., id<proto>)\n\nThis seems to cover many of the common places where typos could occur.\n\nllvm-svn: 92449"}, | ||
[ | [g]={{hb,1326,"/// FindProtocolDeclaration - This routine looks up protocols and\n/// issues an error if they are not declared. It returns list of\n/// protocol declarations in its \'Protocols\' argument.\nvoid Sema::FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef<IdentifierLocPair> ProtocolId, SmallVectorImpl<Decl *> &Protocols) {\n for (const IdentifierLocPair &Pair : ProtocolId) {\n // ...\n if (!PDecl) {\n // ...\n if ((PDecl = Corrected.getCorrectionDeclAs<ObjCProtocolDecl>()))\n diagnoseTypo(Corrected, PDiag(diag::err_undeclared_protocol_suggest) << Pair.first);"},{hb,1711,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n // ...\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n // ...\n if (corrected) {\n // Did we find a protocol?\n if (auto proto = corrected.getCorrectionDeclAs<ObjCProtocolDecl>()) {\n diagnoseTypo(corrected, PDiag(diag::err_undeclared_protocol_suggest) << identifiers[i]);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/parameterized_classes.m"]={"clang/test/SemaObjC/parameterized_classes.m:227:24: error: cannot find protocol declaration for \'NSObjec\'; did you mean \'NSObject\'?","clang/test/SemaObjC/parameterized_classes.m:234:33: error: cannot find protocol declaration for \'NSCopyin\'; did you mean \'NSCopying\'?"} | ["clang/test/SemaObjC/parameterized_classes.m"]={"clang/test/SemaObjC/parameterized_classes.m:227:24: error: cannot find protocol declaration for \'NSObjec\'; did you mean \'NSObject\'?","clang/test/SemaObjC/parameterized_classes.m:234:33: error: cannot find protocol declaration for \'NSCopyin\'; did you mean \'NSCopying\'?"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_use"]={ | ["err_undeclared_use"]={ | ||
[a | [a]="use of undeclared %0", | ||
[b]=n, | |||
[c]="use of undeclared (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{"clang/lib/Sema/SemaAttr.cpp",805,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n // ...\n for (auto &Function : Functions) {\n // ...\n if (!ND) {\n Diag(Loc, diag::err_undeclared_use) << II->getName();"},{r,2381,"/// Diagnose an empty lookup.\n///\n/// \\return false if new lookup candidates were found\nbool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, TypoExpr **Out) {\n // ...\n if (Name.getNameKind() == DeclarationName::CXXOperatorName || Name.getNameKind() == DeclarationName::CXXLiteralOperatorName || Name.getNameKind() == DeclarationName::CXXConversionFunctionName) {\n diagnostic = diag::err_undeclared_use;"},{z,5162,"/// Form a template name from a name that is syntactically required to name a\n/// template, either due to use of the \'template\' keyword or because a name in\n/// this syntactic context is assumed to name a template (C++ [temp.names]p2-4).\n///\n/// This action forms a template name given the name of the template and its\n/// optional scope specifier. This is used when the \'template\' keyword is used\n/// or when the parsing context unambiguously treats a following \'<\' as\n/// introducing a template argument list. Note that this may produce a\n/// non-dependent template name if we can perform the lookup now and identify\n/// the named template.\n///\n/// For example, given \"x.MetaFun::template apply\", the scope specifier\n/// \\p SS will be \"MetaFun::\", \\p TemplateKWLoc contains the location\n/// of the \"template\" keyword, and \"apply\" is the \\p Name.\nTemplateNameKind Sema::ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Result, bool AllowInjectedClassName) {\n // ...\n if (!MemberOfUnknownSpecialization) {\n // ...\n if (!LookupTemplateName(R, S, SS, ObjectType.get(), EnteringContext, MOUS, RTK, nullptr, /*AllowTypoCorrection=*/false) && !R.isAmbiguous()) {\n if (LookupCtx)\n // ...\n else\n Diag(Name.getBeginLoc(), diag::err_undeclared_use) << DNI.getName() << SS.getRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:6:23: error: use of undeclared a"} | ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:6:23: error: use of undeclared a"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_use_of_module"]={ | ["err_undeclared_use_of_module"]={ | ||
[a | [a]="module %0 does not depend on a module exporting \'%1\'", | ||
[b]=n, | |||
[c]="module (.*?) does not depend on a module exporting \'(.*?)\'", | |||
[d]=m, | |||
[ | [e]=u, | ||
[ | [f]={"11152dd55f7a",1424304628,"Allow errors on use of a private module header to be disabled, to better support incremental transit...","Allow errors on use of a private module header to be disabled, to better support incremental transition to modules.\n\nllvm-svn: 229788"}, | ||
[ | [g]={{"clang/lib/Lex/ModuleMap.cpp",540,"void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, StringRef Filename, FileEntryRef File) {\n // ...\n if (RequestingModule && LangOpts.ModulesStrictDeclUse) {\n Diags.Report(FilenameLoc, diag::err_undeclared_use_of_module) << RequestingModule->getTopLevelModule()->Name << Filename;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Modules/strict-decluse.cpp"]={"clang/test/Modules/strict-decluse.cpp:7:10: error: module XG does not depend on a module exporting \'i.h\'"} | ["clang/test/Modules/strict-decluse.cpp"]={"clang/test/Modules/strict-decluse.cpp:7:10: error: module XG does not depend on a module exporting \'i.h\'"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_use_of_module_indirect"]={ | ["err_undeclared_use_of_module_indirect"]={ | ||
[a | [a]="module %0 does not directly depend on a module exporting \'%1\', which is part of indirectly-used module %2", | ||
[b]=n, | |||
[c]="module (.*?) does not directly depend on a module exporting \'(.*?)\', which is part of indirectly\\-used module (.*?)", | |||
[d]=m, | |||
[ | [e]=u, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{"clang/lib/Lex/ModuleMap.cpp",528,"void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, StringRef Filename, FileEntryRef File) {\n // ...\n // We have found a module, but we don\'t use it.\n if (NotUsed) {\n Diags.Report(FilenameLoc, diag::err_undeclared_use_of_module_indirect) << RequestingModule->getTopLevelModule()->Name << Filename << NotUsed->Name;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Modules/declare-use2.cpp"]={"clang/test/Modules/Inputs/declare-use/h.h:4:10: error: module XH does not directly depend on a module exporting \'d.h\', which is part of indirectly-used module XD","clang/test/Modules/declare-use2.cpp:6:10: error: module XH does not directly depend on a module exporting \'f.h\', which is part of indirectly-used module XF"} | ["clang/test/Modules/declare-use2.cpp"]={"clang/test/Modules/Inputs/declare-use/h.h:4:10: error: module XH does not directly depend on a module exporting \'d.h\', which is part of indirectly-used module XD","clang/test/Modules/declare-use2.cpp:6:10: error: module XH does not directly depend on a module exporting \'f.h\', which is part of indirectly-used module XF"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_use_suggest"]={ | ["err_undeclared_use_suggest"]={ | ||
[a | [a]="use of undeclared %0; did you mean %1?", | ||
[b]=n, | |||
[c]="use of undeclared (.*?); did you mean (.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"598b08f8182e",1262236813,"Implement typo correction for id-expressions, e.g.,\n\ntypo.cpp:22:10: error: use of undeclared identi...","Implement typo correction for id-expressions, e.g.,\n\ntypo.cpp:22:10: error: use of undeclared identifier \'radious\'; did\n you mean \'radius\'?\n return radious * pi;\n ^~~~~~~\n radius\n\nThis was super-easy, since we already had decent recovery by looking\nfor names in dependent base classes.\n\nllvm-svn: 92341"}, | ||
[ | [g]={{r,2382,"/// Diagnose an empty lookup.\n///\n/// \\return false if new lookup candidates were found\nbool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, TypoExpr **Out) {\n // ...\n if (Name.getNameKind() == DeclarationName::CXXOperatorName || Name.getNameKind() == DeclarationName::CXXLiteralOperatorName || Name.getNameKind() == DeclarationName::CXXConversionFunctionName) {\n // ...\n diagnostic_suggest = diag::err_undeclared_use_suggest;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_undeclared_var_use"]={ | ["err_undeclared_var_use"]={ | ||
[a | [a]="use of undeclared identifier %0", | ||
[b]=n, | |||
[c]="use of undeclared identifier (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{"clang/lib/Sema/SemaCUDA.cpp",56,"ExprResult Sema::ActOnCUDAExecConfigExpr(Scope *S, SourceLocation LLLLoc, MultiExprArg ExecConfig, SourceLocation GGGLoc) {\n // ...\n if (!ConfigDecl)\n return ExprError(Diag(LLLLoc, diag::err_undeclared_var_use) << getCudaConfigureFuncName());"},{"clang/lib/Sema/SemaCXXScopeSpec.cpp",826,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (!Found.empty()) {\n // ...\n } else if (SS.isSet())\n // ...\n else\n Diag(IdInfo.IdentifierLoc, diag::err_undeclared_var_use) << IdInfo.Identifier;"},{r,2376,"/// Diagnose an empty lookup.\n///\n/// \\return false if new lookup candidates were found\nbool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, TypoExpr **Out) {\n // ...\n unsigned diagnostic = diag::err_undeclared_var_use;"},{Hc,1591,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (IC) {\n // ...\n if (getLangOpts().ObjCDefaultSynthProperties && getLangOpts().ObjCRuntime.isNonFragile() && !IDecl->isObjCRequiresPropertyDefs()) {\n // ...\n // Issue diagnostics only if Ivar belongs to current class.\n if (Ivar && Ivar->getSynthesize() && declaresSameEntity(IC->getClassInterface(), ClassDeclared)) {\n Diag(Ivar->getLocation(), diag::err_undeclared_var_use) << PropertyId;"},{Bc,3053,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n if (!Lookup.isSingleResult()) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(Id, LookupOrdinaryName, CurScope, nullptr, CCC, CTK_ErrorRecovery)) {\n // ...\n } else {\n Diag(Id.getLoc(), Lookup.empty() ? diag::err_undeclared_var_use : diag::err_omp_expected_var_arg) << Id.getName();"},{Bc,23037,"NamedDecl *Sema::lookupOpenMPDeclareTargetName(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id) {\n // ...\n if (!Lookup.isSingleResult()) {\n // ...\n Diag(Id.getLoc(), diag::err_undeclared_var_use) << Id.getName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaTemplate/nss-recovery.cpp"]={"clang/test/SemaTemplate/nss-recovery.cpp:5:12: error: use of undeclared identifier \'undef\'"} | ["clang/test/SemaTemplate/nss-recovery.cpp"]={"clang/test/SemaTemplate/nss-recovery.cpp:5:12: error: use of undeclared identifier \'undef\'"} | ||
} | } | ||
}, | }, | ||
["err_undeclared_var_use_suggest"]={ | ["err_undeclared_var_use_suggest"]={ | ||
[a | [a]="use of undeclared identifier %0; did you mean %1?", | ||
[b]=n, | |||
[c]="use of undeclared identifier (.*?); did you mean (.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"598b08f8182e",1262236813,"Implement typo correction for id-expressions, e.g.,\n\ntypo.cpp:22:10: error: use of undeclared identi...","Implement typo correction for id-expressions, e.g.,\n\ntypo.cpp:22:10: error: use of undeclared identifier \'radious\'; did\n you mean \'radius\'?\n return radious * pi;\n ^~~~~~~\n radius\n\nThis was super-easy, since we already had decent recovery by looking\nfor names in dependent base classes.\n\nllvm-svn: 92341"}, | ||
[ | [g]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",627,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (Found.empty() && !ErrorRecoveryLookup && !getLangOpts().MSVCCompat) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(Found.getLookupNameInfo(), Found.getLookupKind(), S, &SS, CCC, CTK_ErrorRecovery, LookupCtx, EnteringContext)) {\n if (LookupCtx) {\n // ...\n } else\n diagnoseTypo(Corrected, PDiag(diag::err_undeclared_var_use_suggest) << Name);"},{p,1009,"Corrected:\n // ...\n case LookupResult::NotFound:\n // ...\n // Perform typo correction to determine if there is another name that is\n // close to this name.\n if (!SecondTry && CCC) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, &SS, *CCC, CTK_ErrorRecovery)) {\n unsigned UnqualifiedDiag = diag::err_undeclared_var_use_suggest;"},{r,2377,"/// Diagnose an empty lookup.\n///\n/// \\return false if new lookup candidates were found\nbool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, TypoExpr **Out) {\n // ...\n unsigned diagnostic_suggest = diag::err_undeclared_var_use_suggest;"},{Bc,3048,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n if (!Lookup.isSingleResult()) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(Id, LookupOrdinaryName, CurScope, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(Corrected, PDiag(Lookup.empty() ? diag::err_undeclared_var_use_suggest : diag::err_omp_expected_var_arg_suggest) << Id.getName());"},{Bc,23031,"NamedDecl *Sema::lookupOpenMPDeclareTargetName(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id) {\n // ...\n if (!Lookup.isSingleResult()) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(Id, LookupOrdinaryName, CurScope, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(Corrected, PDiag(diag::err_undeclared_var_use_suggest) << Id.getName());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/PR28181.c"]={"clang/test/Sema/PR28181.c:8:22: error: use of undeclared identifier \'lock\'; did you mean \'long\'?","clang/test/Sema/PR28181.c:12:22: error: use of undeclared identifier \'lock\'; did you mean \'long\'?"} | ["clang/test/Sema/PR28181.c"]={"clang/test/Sema/PR28181.c:8:22: error: use of undeclared identifier \'lock\'; did you mean \'long\'?","clang/test/Sema/PR28181.c:12:22: error: use of undeclared identifier \'lock\'; did you mean \'long\'?"} | ||
} | } | ||
}, | }, | ||
["err_undef_interface"]={ | ["err_undef_interface"]={ | ||
[a | [a]="cannot find interface declaration for %0", | ||
[b]=n, | |||
[c]="cannot find interface declaration for (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{hb,1845,"ObjCCategoryDecl *Sema::ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList) {\n // ...\n if (!IDecl || RequireCompleteType(ClassLoc, Context.getObjCInterfaceType(IDecl), diag::err_category_forward_interface, CategoryName == nullptr)) {\n // ...\n if (!IDecl)\n Diag(ClassLoc, diag::err_undef_interface) << ClassName;"},{hb,1941,"/// ActOnStartCategoryImplementation - Perform semantic checks on the\n/// category implementation declaration and build an ObjCCategoryImplDecl\n/// object.\nObjCCategoryImplDecl *Sema::ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &Attrs) {\n // ...\n /// Check that class of this category is already completely declared.\n if (!IDecl) {\n Diag(ClassLoc, diag::err_undef_interface) << ClassName;"},{hb,1944,"/// ActOnStartCategoryImplementation - Perform semantic checks on the\n/// category implementation declaration and build an ObjCCategoryImplDecl\n/// object.\nObjCCategoryImplDecl *Sema::ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &Attrs) {\n // ...\n } else if (RequireCompleteType(ClassLoc, Context.getObjCInterfaceType(IDecl), diag::err_undef_interface)) {"},{hb,5106,"/// Called whenever \\@defs(ClassName) is encountered in the source. Inserts the\n/// instance variables of ClassName into Decls.\nvoid Sema::ActOnDefs(Scope *S, Decl *TagD, SourceLocation DeclStart, IdentifierInfo *ClassName, SmallVectorImpl<Decl *> &Decls) {\n // ...\n if (!Class) {\n Diag(DeclStart, diag::err_undef_interface) << ClassName;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_undef_interface_suggest"]={ | ["err_undef_interface_suggest"]={ | ||
[a | [a]="cannot find interface declaration for %0; did you mean %1?", | ||
[b]=n, | |||
[c]="cannot find interface declaration for (.*?); did you mean (.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific\nconstructs:\n\n - Instance variable l...","Implement typo correction for a variety of Objective-C-specific\nconstructs:\n\n - Instance variable lookup (\"foo->ivar\" and, in instance methods, \"ivar\")\n - Property name lookup (\"foo.prop\")\n - Superclasses\n - Various places where a class name is required\n - Protocol names (e.g., id<proto>)\n\nThis seems to cover many of the common places where typos could occur.\n\nllvm-svn: 92449"}, | ||
[ | [g]={{p,2330,"/// Look for an Objective-C class in the translation unit.\n///\n/// \\param Id The name of the Objective-C class we\'re looking for. If\n/// typo-correction fixes this name, the Id will be updated\n/// to the fixed name.\n///\n/// \\param IdLoc The location of the name in the translation unit.\n///\n/// \\param DoTypoCorrection If true, this routine will attempt typo correction\n/// if there is no class with the given name.\n///\n/// \\returns The declaration of the named Objective-C class, or NULL if the\n/// class could not be found.\nObjCInterfaceDecl *Sema::getObjCInterfaceDecl(IdentifierInfo *&Id, SourceLocation IdLoc, bool DoTypoCorrection) {\n // ...\n if (!IDecl && DoTypoCorrection) {\n // ...\n if (TypoCorrection C = CorrectTypo(DeclarationNameInfo(Id, IdLoc), LookupOrdinaryName, TUScope, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(C, PDiag(diag::err_undef_interface_suggest) << Id);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/undef-class-messagin-error.m"]={"clang/test/SemaObjC/undef-class-messagin-error.m:7:12: error: cannot find interface declaration for \'Child\'; did you mean \'_Child\'?"} | ["clang/test/SemaObjC/undef-class-messagin-error.m"]={"clang/test/SemaObjC/undef-class-messagin-error.m:7:12: error: cannot find interface declaration for \'Child\'; did you mean \'_Child\'?"} | ||
} | } | ||
}, | }, | ||
["err_undef_superclass"]={ | ["err_undef_superclass"]={ | ||
[a | [a]="cannot find interface declaration for %0, superclass of %1", | ||
[b]=n, | |||
[c]="cannot find interface declaration for (.*?), superclass of (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{hb,617,"void Sema::ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange) {\n // ...\n if (declaresSameEntity(PrevDecl, IDecl)) {\n // ...\n } else {\n // ...\n if (!isa_and_nonnull<TypedefNameDecl>(PrevDecl)) {\n if (!SuperClassDecl)\n Diag(SuperLoc, diag::err_undef_superclass) << SuperName << ClassName << SourceRange(AtInterfaceLoc, ClassLoc);"},{hb,2034,"ObjCImplementationDecl *Sema::ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &Attrs) {\n // ...\n if (SuperClassname) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n // ...\n } else {\n // ...\n if (!SDecl)\n Diag(SuperClassLoc, diag::err_undef_superclass) << SuperClassname << ClassName;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/class-def-test-1.m"]={"clang/test/SemaObjC/class-def-test-1.m:26:20: error: cannot find interface declaration for \'PROTO\', superclass of \'INTF3\'","clang/test/SemaObjC/class-def-test-1.m:35:27: error: cannot find interface declaration for \'SomeClassSup\', superclass of \'SomeClassSub\'"} | ["clang/test/SemaObjC/class-def-test-1.m"]={"clang/test/SemaObjC/class-def-test-1.m:26:20: error: cannot find interface declaration for \'PROTO\', superclass of \'INTF3\'","clang/test/SemaObjC/class-def-test-1.m:35:27: error: cannot find interface declaration for \'SomeClassSup\', superclass of \'SomeClassSub\'"} | ||
} | } | ||
}, | }, | ||
["err_undef_superclass_suggest"]={ | ["err_undef_superclass_suggest"]={ | ||
[a | [a]="cannot find interface declaration for %0, superclass of %1; did you mean %2?", | ||
[b]=n, | |||
[c]="cannot find interface declaration for (.*?), superclass of (.*?); did you mean (.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific\nconstructs:\n\n - Instance variable l...","Implement typo correction for a variety of Objective-C-specific\nconstructs:\n\n - Instance variable lookup (\"foo->ivar\" and, in instance methods, \"ivar\")\n - Property name lookup (\"foo.prop\")\n - Superclasses\n - Various places where a class name is required\n - Protocol names (e.g., id<proto>)\n\nThis seems to cover many of the common places where typos could occur.\n\nllvm-svn: 92449"}, | ||
[ | [g]={{hb,563,"void Sema::ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange) {\n // ...\n if (!PrevDecl) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(SuperName, SuperLoc), LookupOrdinaryName, TUScope, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(Corrected, PDiag(diag::err_undef_superclass_suggest) << SuperName << ClassName);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/FixIt/typo.m"]={"clang/test/FixIt/typo.m:86:22: error: cannot find interface declaration for \'Collid\', superclass of \'Derived\'; did you mean \'Collide\'?"} | ["clang/test/FixIt/typo.m"]={"clang/test/FixIt/typo.m:86:22: error: cannot find interface declaration for \'Collid\', superclass of \'Derived\'; did you mean \'Collide\'?"} | ||
} | } | ||
}, | }, | ||
["err_undefined_inline_var"]={ | ["err_undefined_inline_var"]={ | ||
[a | [a]="inline variable %q0 is not defined", | ||
[b]=n, | |||
[c]="inline variable (.*?) is not defined", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"62f19e700d31",1466813756,"Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a\nvariable weak discardable...","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"}, | ||
[ | [g]={{"clang/lib/Sema/Sema.cpp",915,"/// checkUndefinedButUsed - Check for undefined objects with internal linkage\n/// or that are inline.\nstatic void checkUndefinedButUsed(Sema &S) {\n // ...\n for (const auto &Undef : Undefined) {\n // ...\n if (S.isExternalWithNoLinkageType(VD)) {\n // ...\n } else if (!VD->isExternallyVisible()) {\n // ...\n } else if (auto *FD = dyn_cast<FunctionDecl>(VD)) {\n // ...\n } else {\n // ...\n S.Diag(VD->getLocation(), diag::err_undefined_inline_var) << VD;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/basic/basic.def/p4.cpp"]={"clang/test/CXX/basic/basic.def/p4.cpp:4:19: error: inline variable \'n\' is not defined"} | ["clang/test/CXX/basic/basic.def/p4.cpp"]={"clang/test/CXX/basic/basic.def/p4.cpp:4:19: error: inline variable \'n\' is not defined"} | ||
} | } | ||
}, | }, | ||
["err_undefined_internal_type"]={ | ["err_undefined_internal_type"]={ | ||
[a | [a]="%select{function|variable}0 %q1 is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage", | ||
[b]=n, | |||
[c]="(?:function|variable) (.*?) is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"405e2dbf3767",1505892120,"Implement C++ [basic.link]p8.\n\nIf a function or variable has a type with no linkage (and is not exte...","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"}, | ||
[ | [g]={{"clang/lib/Sema/Sema.cpp",885,"/// checkUndefinedButUsed - Check for undefined objects with internal linkage\n/// or that are inline.\nstatic void checkUndefinedButUsed(Sema &S) {\n // ...\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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/basic/basic.link/p8.cpp"]={"clang/test/CXX/basic/basic.link/p8.cpp:35:19: error: function \'no_linkage1\' is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage","clang/test/CXX/basic/basic.link/p8.cpp:36:19: error: function \'no_linkage2\' is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage","clang/test/CXX/basic/basic.link/p8.cpp:37:19: error: function \'no_linkage3\' is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage","clang/test/CXX/basic/basic.link/p8.cpp:58:17: error: function \'internal_linkage\' is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage"} | ["clang/test/CXX/basic/basic.link/p8.cpp"]={"clang/test/CXX/basic/basic.link/p8.cpp:35:19: error: function \'no_linkage1\' is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage","clang/test/CXX/basic/basic.link/p8.cpp:36:19: error: function \'no_linkage2\' is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage","clang/test/CXX/basic/basic.link/p8.cpp:37:19: error: function \'no_linkage3\' is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage","clang/test/CXX/basic/basic.link/p8.cpp:58:17: error: function \'internal_linkage\' is used but not defined in this translation unit, and cannot be defined in any other translation unit because its type does not have linkage"} | ||
} | } | ||
}, | }, | ||
["err_underlying_type_of_incomplete_enum"]={ | ["err_underlying_type_of_incomplete_enum"]={ | ||
[a | [a]="cannot determine underlying type of incomplete enumeration type %0", | ||
[b]=n, | |||
[c]="cannot determine underlying type of incomplete enumeration type (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"29d0e6b60116",1402531305,"PR19966: don\'t crash/assert when __underlying_type is applied to an incomplete\nenumeration type. I\'v...","PR19966: don\'t crash/assert when __underlying_type is applied to an incomplete\nenumeration type. I\'ve also filed a LWG issue pointing out that this should be\nill-formed.\n\nllvm-svn: 210723"}, | ||
[ | [g]={{M,9530,"QualType Sema::BuiltinEnumUnderlyingType(QualType BaseType, SourceLocation Loc) {\n // ...\n if (BaseType->isIncompleteType(&FwdDecl)) {\n Diag(Loc, diag::err_underlying_type_of_incomplete_enum) << BaseType;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/underlying_type.cpp"]={"clang/test/SemaCXX/underlying_type.cpp:49:5: error: cannot determine underlying type of incomplete enumeration type \'Invalid\'","clang/test/SemaCXX/underlying_type.cpp:53:10: error: cannot determine underlying type of incomplete enumeration type \'E\'"} | ["clang/test/SemaCXX/underlying_type.cpp"]={"clang/test/SemaCXX/underlying_type.cpp:49:5: error: cannot determine underlying type of incomplete enumeration type \'Invalid\'","clang/test/SemaCXX/underlying_type.cpp:53:10: error: cannot determine underlying type of incomplete enumeration type \'E\'"} | ||
} | } | ||
}, | }, | ||
["err_unevaluated_string_invalid_escape_sequence"]={ | ["err_unevaluated_string_invalid_escape_sequence"]={ | ||
[a | [a]="invalid escape sequence \'%0\' in an unevaluated string literal", | ||
[b]=n, | |||
[c]="invalid escape sequence \'(.*?)\' in an unevaluated string literal", | |||
[d]=m, | |||
[ | [e]=u, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{X,365,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n if (EvalMethod == StringLiteralEvalMethod::Unevaluated && !IsEscapeValidInUnevaluatedStringLiteral(Escape)) {\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::err_unevaluated_string_invalid_escape_sequence) << StringRef(EscapeBegin, ThisTokBuf - EscapeBegin);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/p4-0x.cpp"]={"clang/test/CXX/dcl.dcl/p4-0x.cpp:21:24: error: invalid escape sequence \'\\x14\' in an unevaluated string literal"} | ["clang/test/CXX/dcl.dcl/p4-0x.cpp"]={"clang/test/CXX/dcl.dcl/p4-0x.cpp:21:24: error: invalid escape sequence \'\\x14\' in an unevaluated string literal"} | ||
} | } | ||
Line 765: | Line 626: | ||
["err_unevaluated_string_prefix"]={ | ["err_unevaluated_string_prefix"]={ | ||
[a]="an unevaluated string literal cannot have an encoding prefix", | [a]="an unevaluated string literal cannot have an encoding prefix", | ||
[ | [b]=n, | ||
[ | [c]="an unevaluated string literal cannot have an encoding prefix", | ||
[d]=m, | |||
[ | [e]=u, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{X,1953,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n // ...\n /// (C99 5.1.1.2p1). The common case is only one string fragment.\n for (const Token &Tok : StringToks) {\n // ...\n // Remember if we see any wide or utf-8/16/32 strings.\n // Also check for illegal concatenations.\n if (isUnevaluated() && Tok.getKind() != tok::string_literal) {\n if (Diags) {\n // ...\n Diags->Report(Tok.getLocation(), Features.CPlusPlus26 ? diag::err_unevaluated_string_prefix : diag::warn_unevaluated_string_prefix) << Prefix << Features.CPlusPlus << FixItHint::CreateRemoval(Range);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/FixIt/unevaluated-strings.cpp"]={"clang/test/FixIt/unevaluated-strings.cpp:7:21: error: an unevaluated string literal cannot have an encoding prefix","clang/test/FixIt/unevaluated-strings.cpp:10:21: error: an unevaluated string literal cannot have an encoding prefix","clang/test/FixIt/unevaluated-strings.cpp:13:21: error: an unevaluated string literal cannot have an encoding prefix","clang/test/FixIt/unevaluated-strings.cpp:16:21: error: an unevaluated string literal cannot have an encoding prefix"} | ["clang/test/FixIt/unevaluated-strings.cpp"]={"clang/test/FixIt/unevaluated-strings.cpp:7:21: error: an unevaluated string literal cannot have an encoding prefix","clang/test/FixIt/unevaluated-strings.cpp:10:21: error: an unevaluated string literal cannot have an encoding prefix","clang/test/FixIt/unevaluated-strings.cpp:13:21: error: an unevaluated string literal cannot have an encoding prefix","clang/test/FixIt/unevaluated-strings.cpp:16:21: error: an unevaluated string literal cannot have an encoding prefix"} | ||
} | } | ||
Line 780: | Line 638: | ||
["err_unevaluated_string_udl"]={ | ["err_unevaluated_string_udl"]={ | ||
[a]="an unevaluated string literal cannot be a user-defined literal", | [a]="an unevaluated string literal cannot be a user-defined literal", | ||
[ | [b]=n, | ||
[ | [c]="an unevaluated string literal cannot be a user\\-defined literal", | ||
[d]=m, | |||
[e]=u, | |||
[f]={I,1625925174,J,H}, | |||
[ | [g]={{X,2047,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n // ...\n for (unsigned i = 0, e = StringToks.size(); i != e; ++i) {\n // ...\n // Remove an optional ud-suffix.\n if (ThisTokEnd[-1] != \'\"\') {\n // ...\n if (UDSuffixBuf.empty()) {\n // ...\n } else {\n // ...\n if (UDSuffixBuf != UDSuffix || UnevaluatedStringHasUDL) {\n if (Diags) {\n // ...\n if (UnevaluatedStringHasUDL) {\n Diags->Report(TokLoc, diag::err_unevaluated_string_udl) << SourceRange(TokLoc, TokLoc);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unexpanded_parameter_pack"]={ | ["err_unexpanded_parameter_pack"]={ | ||
[a | [a]="%select{expression|base type|declaration type|data member type|bit-field size|static assertion|fixed underlying type|enumerator value|using declaration|friend declaration|qualifier|initializer|default argument|non-type template parameter type|exception type|partial specialization|__if_exists name|__if_not_exists name|lambda|block|type constraint|requirement|requires clause}0 contains%plural{0: an|:}1 unexpanded parameter pack%plural{0:|1: %2|2:s %2 and %3|:s %2, %3, ...}1", | ||
[b]=n, | |||
[c]="(?:expression|base type|declaration type|data member type|bit\\-field size|static assertion|fixed underlying type|enumerator value|using declaration|friend declaration|qualifier|initializer|default argument|non\\-type template parameter type|exception type|partial specialization|__if_exists name|__if_not_exists name|lambda|block|type constraint|requirement|requires clause) contains(?: an|) unexpanded parameter pack(?:| (.*?)|s (.*?) and (.*?)|s (.*?), (.*?), \\.\\.\\.)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"506bd56484a5",1292280562,"Variadic templates: extend Type, NestedNameSpecifier, TemplateName,\nand TemplateArgument with an ope...","Variadic templates: extend Type, NestedNameSpecifier, TemplateName,\nand TemplateArgument with an operation that determines whether there\nare any unexpanded parameter packs within that construct. Use this\ninformation to diagnose the appearance of the names of parameter packs\nthat have not been expanded (C++ [temp.variadic]p5). Since this\nproperty is checked often (every declaration, ever expression\nstatement, etc.), we extend Type and Expr with a bit storing the\nresult of this computation, rather than walking the AST each time to\ndetermine whether any unexpanded parameter packs occur.\n\nThis commit is deficient in several ways, which will be remedied with\nfuture commits:\n - Expr has a bit to store the presence of an unexpanded parameter\n pack, but it is never set.\n - The error messages don\'t point out where the unexpanded parameter\n packs were named in the type/expression, but they should. \n - We don\'t check for unexpanded parameter packs in all of the places\n where we should.\n - Testing is sparse, pending the resolution of the above three\n issues.\n\nllvm-svn: 121724"}, | ||
[ | [g]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",372,"/// Diagnose all of the unexpanded parameter packs in the given\n/// vector.\nbool Sema::DiagnoseUnexpandedParameterPacks(SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef<UnexpandedParameterPack> Unexpanded) {\n // ...\n auto DB = Diag(Loc, diag::err_unexpanded_parameter_pack) << (int)UPPC << (int)Names.size();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/temp/temp.decls/temp.variadic/p5.mm"]={"clang/test/CXX/temp/temp.decls/temp.variadic/p5.mm:5:16: error: expression contains unexpanded parameter pack \'values\'","clang/test/CXX/temp/temp.decls/temp.variadic/p5.mm:6:17: error: expression contains unexpanded parameter pack \'values\'","clang/test/CXX/temp/temp.decls/temp.variadic/p5.mm:7:12: error: expression contains unexpanded parameter pack \'values\'"} | ["clang/test/CXX/temp/temp.decls/temp.variadic/p5.mm"]={"clang/test/CXX/temp/temp.decls/temp.variadic/p5.mm:5:16: error: expression contains unexpanded parameter pack \'values\'","clang/test/CXX/temp/temp.decls/temp.variadic/p5.mm:6:17: error: expression contains unexpanded parameter pack \'values\'","clang/test/CXX/temp/temp.decls/temp.variadic/p5.mm:7:12: error: expression contains unexpanded parameter pack \'values\'"} | ||
} | } | ||
Line 807: | Line 659: | ||
["err_unexpected_at"]={ | ["err_unexpected_at"]={ | ||
[a]="unexpected \'@\' in program", | [a]="unexpected \'@\' in program", | ||
[ | [b]=n, | ||
[ | [c]="unexpected \'@\' in program", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{B,4694,"/// ParseStructUnionBody\n/// struct-contents:\n/// struct-declaration-list\n/// [EXT] empty\n/// [GNU] \"struct-declaration-list\" without terminating \';\'\n/// struct-declaration-list:\n/// struct-declaration\n/// struct-declaration-list struct-declaration\n/// [OBC] \'@\' \'defs\' \'(\' class-name \')\'\n///\nvoid Parser::ParseStructUnionBody(SourceLocation RecordLoc, DeclSpec::TST TagType, RecordDecl *TagDecl) {\n // ...\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::at)) {\n // ...\n } else { // Handle @defs\n // ...\n if (!Tok.isObjCAtKeyword(tok::objc_defs)) {\n Diag(Tok, diag::err_unexpected_at);"},{Tb,107,"/// ParseObjCAtDirectives - Handle parts of the external-declaration production:\n/// external-declaration: [C99 6.9]\n/// [OBJC] objc-class-definition\n/// [OBJC] objc-class-declaration\n/// [OBJC] objc-alias-declaration\n/// [OBJC] objc-protocol-definition\n/// [OBJC] objc-method-definition\n/// [OBJC] \'@\' \'end\'\nParser::DeclGroupPtrTy Parser::ParseObjCAtDirectives(ParsedAttributes &DeclAttrs, ParsedAttributes &DeclSpecAttrs) {\n // ...\n default:\n Diag(AtLoc, diag::err_unexpected_at);"},{Tb,2902,"ExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) {\n // ...\n default:\n if (Tok.getIdentifierInfo() == nullptr)\n return ExprError(Diag(AtLoc, diag::err_unexpected_at));"},{Tb,2928,"ExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) {\n // ...\n default:\n // ...\n default: {\n // ...\n if (str) {\n // ...\n return ExprError(Diag(AtLoc, diag::err_unexpected_at) << FixItHint::CreateReplacement(kwLoc, str));"},{Tb,2932,"ExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) {\n // ...\n default:\n // ...\n default: {\n // ...\n if (str) {\n // ...\n } else\n return ExprError(Diag(AtLoc, diag::err_unexpected_at));"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/invalid-code.m"]={"clang/test/SemaObjC/invalid-code.m:6:13: error: unexpected \'@\' in program"} | ["clang/test/SemaObjC/invalid-code.m"]={"clang/test/SemaObjC/invalid-code.m:6:13: error: unexpected \'@\' in program"} | ||
} | } | ||
Line 822: | Line 671: | ||
["err_unexpected_colon_in_nested_name_spec"]={ | ["err_unexpected_colon_in_nested_name_spec"]={ | ||
[a]="unexpected \':\' in nested name specifier; did you mean \'::\'?", | [a]="unexpected \':\' in nested name specifier; did you mean \'::\'?", | ||
[ | [b]=n, | ||
[ | [c]="unexpected \'\\:\' in nested name specifier; did you mean \'\\:\\:\'\\?", | ||
[d]=m, | |||
[e]=q, | |||
[f]={"6a7ffbed8ab4",1397407923,"Improve error recovery around colon.\n\nParse of nested name spacifier is modified so that it properly...","Improve error recovery around colon.\n\nParse of nested name spacifier is modified so that it properly recovers\nif colon is mistyped as double colon in case statement.\nThis patch fixes PR15133.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2870\n\nllvm-svn: 206135"}, | |||
[ | [g]={{rb,406,"/// Parse global scope or nested-name-specifier if present.\n///\n/// Parses a C++ global scope specifier (\'::\') or nested-name-specifier (which\n/// may be preceded by \'::\'). Note that this routine will not parse ::new or\n/// ::delete; it will just leave them in the token stream.\n///\n/// \'::\'[opt] nested-name-specifier\n/// \'::\'\n///\n/// nested-name-specifier:\n/// type-name \'::\'\n/// namespace-name \'::\'\n/// nested-name-specifier identifier \'::\'\n/// nested-name-specifier \'template\'[opt] simple-template-id \'::\'\n///\n///\n/// \\param SS the scope specifier that will be set to the parsed\n/// nested-name-specifier (or empty)\n///\n/// \\param ObjectType if this nested-name-specifier is being parsed following\n/// the \".\" or \"->\" of a member access expression, this parameter provides the\n/// type of the object whose members are being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we will be entering into the context of\n/// the nested-name-specifier after parsing it.\n///\n/// \\param MayBePseudoDestructor When non-NULL, points to a flag that\n/// indicates whether this nested-name-specifier may be part of a\n/// pseudo-destructor name. In this case, the flag will be set false\n/// if we don\'t actually end up parsing a destructor name. Moreover,\n/// if we do end up determining that we are parsing a destructor name,\n/// the last component of the nested-name-specifier is not parsed as\n/// part of the scope specifier.\n///\n/// \\param IsTypename If \\c true, this nested-name-specifier is known to be\n/// part of a type name. This is used to improve error recovery.\n///\n/// \\param LastII When non-NULL, points to an IdentifierInfo* that will be\n/// filled in with the leading identifier in the last component of the\n/// nested-name-specifier, if any.\n///\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n///\n/// \\returns true if there was an error parsing a scope specifier\nbool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool *MayBePseudoDestructor, bool IsTypename, IdentifierInfo **LastII, bool OnlyNamespace, bool InUsingDeclaration) {\n // ...\n while (true) {\n // ...\n // If we get foo:bar, this is almost certainly a typo for foo::bar. Recover\n // and emit a fixit hint for it.\n if (Next.is(tok::colon) && !ColonIsSacred) {\n if (Actions.IsInvalidUnlessNestedName(getCurScope(), SS, IdInfo, EnteringContext) &&\n // ...\n Diag(Next, diag::err_unexpected_colon_in_nested_name_spec) << FixItHint::CreateReplacement(Next.getLocation(), \"::\");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Misc/diag-inline-namespace.cpp"]={"clang/test/Misc/diag-inline-namespace.cpp:57:5: error: unexpected \':\' in nested name specifier; did you mean \'::\'?"} | ["clang/test/Misc/diag-inline-namespace.cpp"]={"clang/test/Misc/diag-inline-namespace.cpp:57:5: error: unexpected \':\' in nested name specifier; did you mean \'::\'?"} | ||
} | } | ||
Line 837: | Line 683: | ||
["err_unexpected_friend"]={ | ["err_unexpected_friend"]={ | ||
[a]="friends can only be classes or functions", | [a]="friends can only be classes or functions", | ||
[ | [b]=n, | ||
[ | [c]="friends can only be classes or functions", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"07e91c04ba33",1249524943,"First pass at friend semantics.\n\nllvm-svn: 78274","First pass at friend semantics.\n\nllvm-svn: 78274"}, | ||
[ | [g]={{t,17499,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n // C++ [class.friend]p1\n // A friend of a class is a function or class....\n // Note that this sees through typedefs, which is intended.\n // It *doesn\'t* see through dependent types, which is correct\n // according to [temp.arg.type]p3:\n // If a declaration acquires a function type through a\n // type dependent on a template-parameter and this causes\n // a declaration that does not use the syntactic form of a\n // function declarator to have a function type, the program\n // is ill-formed.\n if (!TInfo->getType()->isFunctionType()) {\n Diag(Loc, diag::err_unexpected_friend);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/class/class.friend/p1.cpp"]={"clang/test/CXX/class/class.friend/p1.cpp:34:28: error: friends can only be classes or functions","clang/test/CXX/class/class.friend/p1.cpp:35:28: error: friends can only be classes or functions","clang/test/CXX/class/class.friend/p1.cpp:37:14: error: friends can only be classes or functions"} | ["clang/test/CXX/class/class.friend/p1.cpp"]={"clang/test/CXX/class/class.friend/p1.cpp:34:28: error: friends can only be classes or functions","clang/test/CXX/class/class.friend/p1.cpp:35:28: error: friends can only be classes or functions","clang/test/CXX/class/class.friend/p1.cpp:37:14: error: friends can only be classes or functions"} | ||
} | } | ||
}, | }, | ||
["err_unexpected_interface"]={ | ["err_unexpected_interface"]={ | ||
[a | [a]="unexpected interface name %0: expected expression", | ||
[b]=n, | |||
[c]="unexpected interface name (.*?)\\: expected expression", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{r,3301,"/// Diagnoses obvious problems with the use of the given declaration\n/// as an expression. This is only actually called for lookups that\n/// were not overloaded, and it doesn\'t promise that the declaration\n/// will in fact be used.\nstatic bool CheckDeclInExpr(Sema &S, SourceLocation Loc, NamedDecl *D, bool AcceptInvalid) {\n // ...\n if (isa<ObjCInterfaceDecl>(D)) {\n S.Diag(Loc, diag::err_unexpected_interface) << D->getDeclName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/crash-on-type-args-protocols.m"]={"clang/test/SemaObjC/crash-on-type-args-protocols.m:23:15: error: unexpected interface name \'X\': expected expression"} | ["clang/test/SemaObjC/crash-on-type-args-protocols.m"]={"clang/test/SemaObjC/crash-on-type-args-protocols.m:23:15: error: unexpected interface name \'X\': expected expression"} | ||
} | } | ||
Line 867: | Line 707: | ||
["err_unexpected_module_decl"]={ | ["err_unexpected_module_decl"]={ | ||
[a]="module declaration can only appear at the top level", | [a]="module declaration can only appear at the top level", | ||
[ | [b]=n, | ||
[ | [c]="module declaration can only appear at the top level", | ||
[d]=m, | |||
[ | [e]=Qc, | ||
[ | [f]={"bbcc9f0462c1",1472170478,"C++ Modules TS: add frontend support for building pcm files from module\ninterface files. At the mome...","C++ Modules TS: add frontend support for building pcm files from module\ninterface files. At the moment, all declarations (and no macros) are exported,\nand \'export\' declarations are not supported yet.\n\nllvm-svn: 279794"}, | ||
[g]={{ub,1025,"/// ParseExternalDeclaration:\n///\n/// The `Attrs` that are passed in are C++11 attributes and appertain to the\n/// declaration.\n///\n/// external-declaration: [C99 6.9], declaration: [C++ dcl.dcl]\n/// function-definition\n/// declaration\n/// [GNU] asm-definition\n/// [GNU] __extension__ external-declaration\n/// [OBJC] objc-class-definition\n/// [OBJC] objc-class-declaration\n/// [OBJC] objc-alias-declaration\n/// [OBJC] objc-protocol-definition\n/// [OBJC] objc-method-definition\n/// [OBJC] @end\n/// [C++] linkage-specification\n/// [GNU] asm-definition:\n/// simple-asm-expr \';\'\n/// [C++11] empty-declaration\n/// [C++11] attribute-declaration\n///\n/// [C++11] empty-declaration:\n/// \';\'\n///\n/// [C++0x/GNU] \'extern\' \'template\' declaration\n///\n/// [C++20] module-import-declaration\n///\nParser::DeclGroupPtrTy Parser::ParseExternalDeclaration(ParsedAttributes &Attrs, ParsedAttributes &DeclSpecAttrs, ParsingDeclSpec *DS) {\n // ...\n case tok::kw_module:\n Diag(Tok, diag::err_unexpected_module_decl);"}} | |||
[ | |||
[ | |||
}, | }, | ||
["err_unexpected_namespace"]={ | ["err_unexpected_namespace"]={ | ||
[a | [a]="unexpected namespace name %0: expected expression", | ||
[b]=n, | |||
[c]="unexpected namespace name (.*?)\\: expected expression", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{r,3306,"/// Diagnoses obvious problems with the use of the given declaration\n/// as an expression. This is only actually called for lookups that\n/// were not overloaded, and it doesn\'t promise that the declaration\n/// will in fact be used.\nstatic bool CheckDeclInExpr(Sema &S, SourceLocation Loc, NamedDecl *D, bool AcceptInvalid) {\n // ...\n if (isa<NamespaceDecl>(D)) {\n S.Diag(Loc, diag::err_unexpected_namespace) << D->getDeclName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:268:30: error: unexpected namespace name \'ns\': expected expression"} | ["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:268:30: error: unexpected namespace name \'ns\': expected expression"} | ||
} | } | ||
Line 894: | Line 728: | ||
["err_unexpected_namespace_attributes_alias"]={ | ["err_unexpected_namespace_attributes_alias"]={ | ||
[a]="attributes cannot be specified on namespace alias", | [a]="attributes cannot be specified on namespace alias", | ||
[ | [b]=n, | ||
[ | [c]="attributes cannot be specified on namespace alias", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"6b6bba4a2087",1245268140,"Diagnose the use of attributes on namespace aliases, from Anis Ahmad\n\nllvm-svn: 73626","Diagnose the use of attributes on namespace aliases, from Anis Ahmad\n\nllvm-svn: 73626"}, | ||
[ | [g]={{F,144,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n if (Tok.is(tok::equal)) {\n // ...\n if (attrLoc.isValid())\n Diag(attrLoc, diag::err_unexpected_namespace_attributes_alias);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx1z-attributes.cpp"]={"clang/test/Parser/cxx1z-attributes.cpp:5:11: error: attributes cannot be specified on namespace alias"} | ["clang/test/Parser/cxx1z-attributes.cpp"]={"clang/test/Parser/cxx1z-attributes.cpp:5:11: error: attributes cannot be specified on namespace alias"} | ||
} | } | ||
Line 909: | Line 740: | ||
["err_unexpected_nested_namespace_attribute"]={ | ["err_unexpected_nested_namespace_attribute"]={ | ||
[a]="attributes cannot be specified on a nested namespace definition", | [a]="attributes cannot be specified on a nested namespace definition", | ||
[ | [b]=n, | ||
[ | [c]="attributes cannot be specified on a nested namespace definition", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"c0ae7dfe75e5",1415466435,"Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensur...","Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensure that nested namespace definitions are diagnosed properly. Both changes are motivated by post-commit feedback from r221580.\n\nllvm-svn: 221581"}, | ||
[ | [g]={{F,134,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n // A nested namespace definition cannot have attributes.\n if (!ExtraNSs.empty() && attrLoc.isValid())\n Diag(attrLoc, diag::err_unexpected_nested_namespace_attribute);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx1z-attributes.cpp"]={"clang/test/Parser/cxx1z-attributes.cpp:7:11: error: attributes cannot be specified on a nested namespace definition"} | ["clang/test/Parser/cxx1z-attributes.cpp"]={"clang/test/Parser/cxx1z-attributes.cpp:7:11: error: attributes cannot be specified on a nested namespace definition"} | ||
} | } | ||
Line 924: | Line 752: | ||
["err_unexpected_protocol_qualifier"]={ | ["err_unexpected_protocol_qualifier"]={ | ||
[a]="@implementation declaration cannot be protocol qualified", | [a]="@implementation declaration cannot be protocol qualified", | ||
[ | [b]=n, | ||
[ | [c]="@implementation declaration cannot be protocol qualified", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"46ed4d978e1c",1366845827,"Objective-C parsing [qoi]: Recover gracefully with good diagnostic\nwhen class implementation declara...","Objective-C parsing [qoi]: Recover gracefully with good diagnostic\nwhen class implementation declaration adds protocol qualifier\nlist. // rdar://12233858\n\nllvm-svn: 180228"}, | ||
[ | [g]={{Tb,2195,"/// objc-implementation:\n/// objc-class-implementation-prologue\n/// objc-category-implementation-prologue\n///\n/// objc-class-implementation-prologue:\n/// @implementation identifier objc-superclass[opt]\n/// objc-class-instance-variables[opt]\n///\n/// objc-category-implementation-prologue:\n/// @implementation identifier ( identifier )\nParser::DeclGroupPtrTy Parser::ParseObjCAtImplementationDeclaration(SourceLocation AtLoc, ParsedAttributes &Attrs) {\n // ...\n // Neither a type parameter list nor a list of protocol references is\n // permitted here. Parse and diagnose them.\n if (Tok.is(tok::less)) {\n // ...\n if (parseObjCTypeParamListOrProtocolRefs(typeParamScope, lAngleLoc, protocolIdents, rAngleLoc)) {\n // ...\n } else if (lAngleLoc.isValid()) {\n Diag(lAngleLoc, diag::err_unexpected_protocol_qualifier) << FixItHint::CreateRemoval(SourceRange(lAngleLoc, rAngleLoc));"},{Tb,2227,"/// objc-implementation:\n/// objc-class-implementation-prologue\n/// objc-category-implementation-prologue\n///\n/// objc-class-implementation-prologue:\n/// @implementation identifier objc-superclass[opt]\n/// objc-class-instance-variables[opt]\n///\n/// objc-category-implementation-prologue:\n/// @implementation identifier ( identifier )\nParser::DeclGroupPtrTy Parser::ParseObjCAtImplementationDeclaration(SourceLocation AtLoc, ParsedAttributes &Attrs) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n if (Tok.is(tok::less)) { // we have illegal \'<\' try to recover\n Diag(Tok, diag::err_unexpected_protocol_qualifier);"},{Tb,2257,"/// objc-implementation:\n/// objc-class-implementation-prologue\n/// objc-category-implementation-prologue\n///\n/// objc-class-implementation-prologue:\n/// @implementation identifier objc-superclass[opt]\n/// objc-class-instance-variables[opt]\n///\n/// objc-category-implementation-prologue:\n/// @implementation identifier ( identifier )\nParser::DeclGroupPtrTy Parser::ParseObjCAtImplementationDeclaration(SourceLocation AtLoc, ParsedAttributes &Attrs) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::l_brace)) // we have ivars\n // ...\n else if (Tok.is(tok::less)) { // we have illegal \'<\' try to recover\n Diag(Tok, diag::err_unexpected_protocol_qualifier);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/parameterized_classes.m"]={"clang/test/SemaObjC/parameterized_classes.m:168:20: error: @implementation declaration cannot be protocol qualified"} | ["clang/test/SemaObjC/parameterized_classes.m"]={"clang/test/SemaObjC/parameterized_classes.m:168:20: error: @implementation declaration cannot be protocol qualified"} | ||
} | } | ||
Line 939: | Line 764: | ||
["err_unexpected_scope_on_base_decltype"]={ | ["err_unexpected_scope_on_base_decltype"]={ | ||
[a]="unexpected namespace scope prior to decltype", | [a]="unexpected namespace scope prior to decltype", | ||
[ | [b]=n, | ||
[ | [c]="unexpected namespace scope prior to decltype", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"afa155fb8879",1319566678,"Fix erroneous name-specifiers prior to decltypes better/correctly as per Doug\'s feedback.\n\nllvm-svn:...","Fix erroneous name-specifiers prior to decltypes better/correctly as per Doug\'s feedback.\n\nllvm-svn: 142935"}, | ||
[ | [g]={{F,1284,"/// ParseBaseTypeSpecifier - Parse a C++ base-type-specifier which is either a\n/// class name or decltype-specifier. Note that we only check that the result\n/// names a type; semantic analysis will need to verify that the type names a\n/// class. The result is either a type or null, depending on whether a type\n/// name was found.\n///\n/// base-type-specifier: [C++11 class.derived]\n/// class-or-decltype\n/// class-or-decltype: [C++11 class.derived]\n/// nested-name-specifier[opt] class-name\n/// decltype-specifier\n/// class-name: [C++ class.name]\n/// identifier\n/// simple-template-id\n///\n/// In C++98, instead of base-type-specifier, we have:\n///\n/// ::[opt] nested-name-specifier[opt] class-name\nTypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc, SourceLocation &EndLocation) {\n // ...\n // Parse decltype-specifier\n // tok == kw_decltype is just error recovery, it can only happen when SS\n // isn\'t empty\n if (Tok.isOneOf(tok::kw_decltype, tok::annot_decltype)) {\n if (SS.isNotEmpty())\n Diag(SS.getBeginLoc(), diag::err_unexpected_scope_on_base_decltype) << FixItHint::CreateRemoval(SS.getRange());"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/class.derived/p1.cpp"]={"clang/test/CXX/class.derived/p1.cpp:34:21: error: unexpected namespace scope prior to decltype","clang/test/CXX/class.derived/p1.cpp:36:21: error: unexpected namespace scope prior to decltype"} | ["clang/test/CXX/class.derived/p1.cpp"]={"clang/test/CXX/class.derived/p1.cpp:34:21: error: unexpected namespace scope prior to decltype","clang/test/CXX/class.derived/p1.cpp:36:21: error: unexpected namespace scope prior to decltype"} | ||
} | } | ||
}, | }, | ||
["err_unexpected_semi"]={ | ["err_unexpected_semi"]={ | ||
[a | [a]="unexpected \';\' before %0", | ||
[b]=n, | |||
[c]="unexpected \';\' before (.*?)", | |||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"1d3b58e31796",1431466595,"Add a new error for unexpected semi-colon before closing delimiter.\n\nPreviously, if a semi-colon is ...","Add a new error for unexpected semi-colon before closing delimiter.\n\nPreviously, if a semi-colon is unexpectedly added before a closing \')\', \']\' or\n\'}\', two errors and one note would emitted, and the parsing would get confused\nto which scope it was in. This change consumes the semi-colon, recovers\nparsing better, and emits only one error with a fix-it.\n\nllvm-svn: 237192"}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/extra-semi.cpp"]={"clang/test/Parser/extra-semi.cpp:6:17: error: unexpected \';\' before \')\'","clang/test/Parser/extra-semi.cpp:7:15: error: unexpected \';\' before \')\'","clang/test/Parser/extra-semi.cpp:8:31: error: unexpected \';\' before \')\'","clang/test/Parser/extra-semi.cpp:9:20: error: unexpected \';\' before \')\'","clang/test/Parser/extra-semi.cpp:10:10: error: unexpected \';\' before \']\'","clang/test/Parser/extra-semi.cpp:11:8: error: unexpected \';\' before \']\'","clang/test/Parser/extra-semi.cpp:12:19: error: unexpected \';\' before \'}\'"} | ["clang/test/Parser/extra-semi.cpp"]={"clang/test/Parser/extra-semi.cpp:6:17: error: unexpected \';\' before \')\'","clang/test/Parser/extra-semi.cpp:7:15: error: unexpected \';\' before \')\'","clang/test/Parser/extra-semi.cpp:8:31: error: unexpected \';\' before \')\'","clang/test/Parser/extra-semi.cpp:9:20: error: unexpected \';\' before \')\'","clang/test/Parser/extra-semi.cpp:10:10: error: unexpected \';\' before \']\'","clang/test/Parser/extra-semi.cpp:11:8: error: unexpected \';\' before \']\'","clang/test/Parser/extra-semi.cpp:12:19: error: unexpected \';\' before \'}\'"} | ||
} | } | ||
Line 968: | Line 787: | ||
["err_unexpected_template_after_using"]={ | ["err_unexpected_template_after_using"]={ | ||
[a]="\'template\' keyword not permitted after \'using\' keyword", | [a]="\'template\' keyword not permitted after \'using\' keyword", | ||
[ | [b]=n, | ||
[ | [c]="\'template\' keyword not permitted after \'using\' keyword", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"2efd30571bcc",1556753629,"Consume unexpected \"template\" keywords after \"using\"\n\nThe parser was dealing with unexpected \"templa...","Consume unexpected \"template\" keywords after \"using\"\n\nThe parser was dealing with unexpected \"template\" keywords after \"using\"\nkeywords too late and putting the parser into the wrong state, which could\nlead to a crash down the line. This change allows the parser to consume the\nbad \"template\" keywords earlier, and continue parsing as if \"template\" was\nnever there to begin with for better error recovery.\n\nllvm-svn: 359740"}, | ||
[ | [g]={{F,494,"/// ParseUsingDirectiveOrDeclaration - Parse C++ using using-declaration or\n/// using-directive. Assumes that current token is \'using\'.\nParser::DeclGroupPtrTy Parser::ParseUsingDirectiveOrDeclaration(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, SourceLocation &DeclEnd, ParsedAttributes &Attrs) {\n // ...\n // Consume unexpected \'template\' keywords.\n while (Tok.is(tok::kw_template)) {\n // ...\n Diag(TemplateLoc, diag::err_unexpected_template_after_using) << FixItHint::CreateRemoval(TemplateLoc);"},{F,2797,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n // ...\n if (Tok.is(tok::kw_using)) {\n // ...\n // Consume unexpected \'template\' keywords.\n while (Tok.is(tok::kw_template)) {\n // ...\n Diag(TemplateLoc, diag::err_unexpected_template_after_using) << FixItHint::CreateRemoval(TemplateLoc);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Parser/using-template.cpp"]={"clang/test/Parser/using-template.cpp:14:9: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:23:7: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:25:7: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:25:16: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:34:7: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:47:7: error: \'template\' keyword not permitted after \'using\' keyword"} | ["clang/test/Parser/using-template.cpp"]={"clang/test/Parser/using-template.cpp:14:9: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:23:7: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:25:7: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:25:16: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:34:7: error: \'template\' keyword not permitted after \'using\' keyword","clang/test/Parser/using-template.cpp:47:7: error: \'template\' keyword not permitted after \'using\' keyword"} | ||
} | } | ||
Line 983: | Line 799: | ||
["err_unexpected_template_in_destructor_name"]={ | ["err_unexpected_template_in_destructor_name"]={ | ||
[a]="\'template\' keyword not permitted in destructor name", | [a]="\'template\' keyword not permitted in destructor name", | ||
[ | [b]=n, | ||
[ | [c]="\'template\' keyword not permitted in destructor name", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"f08df464ae89",1582039343,"[OPENMP50]Add initial support for OpenMP 5.0 iterator.\n\nAdded basic parsing/semantic analysis/(de)se...","[OPENMP50]Add initial support for OpenMP 5.0 iterator.\n\nAdded basic parsing/semantic analysis/(de)serialization support for\niterator expression introduced in OpenMP 5.0."}, | ||
[g]={{rb,3050,"/// Parse a C++ unqualified-id (or a C identifier), which describes the\n/// name of an entity.\n///\n/// \\code\n/// unqualified-id: [C++ expr.prim.general]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// [C++0x] literal-operator-id [TODO]\n/// ~ class-name\n/// template-id\n///\n/// \\endcode\n///\n/// \\param SS The nested-name-specifier that preceded this unqualified-id. If\n/// non-empty, then we are parsing the unqualified-id of a qualified-id.\n///\n/// \\param ObjectType if this unqualified-id occurs within a member access\n/// expression, the type of the base object whose member is being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we are entering the scope of the\n/// nested-name-specifier.\n///\n/// \\param AllowDestructorName whether we allow parsing of a destructor name.\n///\n/// \\param AllowConstructorName whether we allow parsing a constructor name.\n///\n/// \\param AllowDeductionGuide whether we allow parsing a deduction guide name.\n///\n/// \\param Result on a successful parse, contains the parsed unqualified-id.\n///\n/// \\returns true if parsing fails, false otherwise.\nbool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool AllowDestructorName, bool AllowConstructorName, bool AllowDeductionGuide, SourceLocation *TemplateKWLoc, UnqualifiedId &Result) {\n // ...\n if (getLangOpts().CPlusPlus && (AllowDestructorName || SS.isSet()) && Tok.is(tok::tilde)) {\n // ...\n if (TemplateSpecified) {\n // ...\n Diag(*TemplateKWLoc, diag::err_unexpected_template_in_destructor_name) << Tok.getLocation();"}}, | |||
[ | [h]={ | ||
[ | |||
[ | |||
["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:95:6: error: \'template\' keyword not permitted in destructor name","clang/test/SemaCXX/pseudo-destructors.cpp:97:7: error: \'template\' keyword not permitted in destructor name"} | ["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:95:6: error: \'template\' keyword not permitted in destructor name","clang/test/SemaCXX/pseudo-destructors.cpp:97:7: error: \'template\' keyword not permitted in destructor name"} | ||
} | } | ||
Line 998: | Line 811: | ||
["err_unexpected_template_in_unqualified_id"]={ | ["err_unexpected_template_in_unqualified_id"]={ | ||
[a]="\'template\' keyword not permitted here", | [a]="\'template\' keyword not permitted here", | ||
[ | [b]=n, | ||
[ | [c]="\'template\' keyword not permitted here", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"c08b693e309b",1524794413,"Parse A::template B as an identifier rather than as a template-id with no\ntemplate arguments.\n\nThis ...","Parse A::template B as an identifier rather than as a template-id with no\ntemplate arguments.\n\nThis fixes some cases where we\'d incorrectly accept \"A::template B\" when B is a\nkind of template that requires template arguments (in particular, a variable\ntemplate or a concept).\n\nllvm-svn: 331013"}, | ||
[g]={{rb,2885,"/// Parse a C++ unqualified-id (or a C identifier), which describes the\n/// name of an entity.\n///\n/// \\code\n/// unqualified-id: [C++ expr.prim.general]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// [C++0x] literal-operator-id [TODO]\n/// ~ class-name\n/// template-id\n///\n/// \\endcode\n///\n/// \\param SS The nested-name-specifier that preceded this unqualified-id. If\n/// non-empty, then we are parsing the unqualified-id of a qualified-id.\n///\n/// \\param ObjectType if this unqualified-id occurs within a member access\n/// expression, the type of the base object whose member is being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we are entering the scope of the\n/// nested-name-specifier.\n///\n/// \\param AllowDestructorName whether we allow parsing of a destructor name.\n///\n/// \\param AllowConstructorName whether we allow parsing a constructor name.\n///\n/// \\param AllowDeductionGuide whether we allow parsing a deduction guide name.\n///\n/// \\param Result on a successful parse, contains the parsed unqualified-id.\n///\n/// \\returns true if parsing fails, false otherwise.\nbool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool AllowDestructorName, bool AllowConstructorName, bool AllowDeductionGuide, SourceLocation *TemplateKWLoc, UnqualifiedId &Result) {\n // ...\n if (Tok.is(tok::kw_template)) {\n if (TemplateKWLoc && (ObjectType || SS.isSet())) {\n // ...\n } else {\n // ...\n Diag(TemplateLoc, diag::err_unexpected_template_in_unqualified_id) << FixItHint::CreateRemoval(TemplateLoc);"},{rb,2992,"/// Parse a C++ unqualified-id (or a C identifier), which describes the\n/// name of an entity.\n///\n/// \\code\n/// unqualified-id: [C++ expr.prim.general]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// [C++0x] literal-operator-id [TODO]\n/// ~ class-name\n/// template-id\n///\n/// \\endcode\n///\n/// \\param SS The nested-name-specifier that preceded this unqualified-id. If\n/// non-empty, then we are parsing the unqualified-id of a qualified-id.\n///\n/// \\param ObjectType if this unqualified-id occurs within a member access\n/// expression, the type of the base object whose member is being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we are entering the scope of the\n/// nested-name-specifier.\n///\n/// \\param AllowDestructorName whether we allow parsing of a destructor name.\n///\n/// \\param AllowConstructorName whether we allow parsing a constructor name.\n///\n/// \\param AllowDeductionGuide whether we allow parsing a deduction guide name.\n///\n/// \\param Result on a successful parse, contains the parsed unqualified-id.\n///\n/// \\returns true if parsing fails, false otherwise.\nbool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool AllowDestructorName, bool AllowConstructorName, bool AllowDeductionGuide, SourceLocation *TemplateKWLoc, UnqualifiedId &Result) {\n // ...\n // unqualified-id:\n // template-id (already parsed and annotated)\n if (Tok.is(tok::annot_template_id)) {\n // ...\n if (TemplateLoc.isValid()) {\n if (TemplateKWLoc && (ObjectType || SS.isSet()))\n // ...\n else\n Diag(TemplateLoc, diag::err_unexpected_template_in_unqualified_id) << FixItHint::CreateRemoval(TemplateLoc);"}}, | |||
[ | [h]={ | ||
[ | |||
[ | |||
["clang/test/CXX/drs/dr1xx.cpp"]={"clang/test/CXX/drs/dr1xx.cpp:90:14: error: \'template\' keyword not permitted here","clang/test/CXX/drs/dr1xx.cpp:91:14: error: \'template\' keyword not permitted here"} | ["clang/test/CXX/drs/dr1xx.cpp"]={"clang/test/CXX/drs/dr1xx.cpp:90:14: error: \'template\' keyword not permitted here","clang/test/CXX/drs/dr1xx.cpp:91:14: error: \'template\' keyword not permitted here"} | ||
} | } | ||
}, | }, | ||
["err_unexpected_token_in_nested_name_spec"]={ | ["err_unexpected_token_in_nested_name_spec"]={ | ||
[a | [a]="\'%0\' cannot be a part of nested name specifier; did you mean \':\'?", | ||
[b]=n, | |||
[c]="\'(.*?)\' cannot be a part of nested name specifier; did you mean \'\\:\'\\?", | |||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"6a7ffbed8ab4",1397407923,"Improve error recovery around colon.\n\nParse of nested name spacifier is modified so that it properly...","Improve error recovery around colon.\n\nParse of nested name spacifier is modified so that it properly recovers\nif colon is mistyped as double colon in case statement.\nThis patch fixes PR15133.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2870\n\nllvm-svn: 206135"}, | ||
[ | [g]={{rb,434,"/// Parse global scope or nested-name-specifier if present.\n///\n/// Parses a C++ global scope specifier (\'::\') or nested-name-specifier (which\n/// may be preceded by \'::\'). Note that this routine will not parse ::new or\n/// ::delete; it will just leave them in the token stream.\n///\n/// \'::\'[opt] nested-name-specifier\n/// \'::\'\n///\n/// nested-name-specifier:\n/// type-name \'::\'\n/// namespace-name \'::\'\n/// nested-name-specifier identifier \'::\'\n/// nested-name-specifier \'template\'[opt] simple-template-id \'::\'\n///\n///\n/// \\param SS the scope specifier that will be set to the parsed\n/// nested-name-specifier (or empty)\n///\n/// \\param ObjectType if this nested-name-specifier is being parsed following\n/// the \".\" or \"->\" of a member access expression, this parameter provides the\n/// type of the object whose members are being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we will be entering into the context of\n/// the nested-name-specifier after parsing it.\n///\n/// \\param MayBePseudoDestructor When non-NULL, points to a flag that\n/// indicates whether this nested-name-specifier may be part of a\n/// pseudo-destructor name. In this case, the flag will be set false\n/// if we don\'t actually end up parsing a destructor name. Moreover,\n/// if we do end up determining that we are parsing a destructor name,\n/// the last component of the nested-name-specifier is not parsed as\n/// part of the scope specifier.\n///\n/// \\param IsTypename If \\c true, this nested-name-specifier is known to be\n/// part of a type name. This is used to improve error recovery.\n///\n/// \\param LastII When non-NULL, points to an IdentifierInfo* that will be\n/// filled in with the leading identifier in the last component of the\n/// nested-name-specifier, if any.\n///\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n///\n/// \\returns true if there was an error parsing a scope specifier\nbool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool *MayBePseudoDestructor, bool IsTypename, IdentifierInfo **LastII, bool OnlyNamespace, bool InUsingDeclaration) {\n // ...\n while (true) {\n // ...\n if (Next.is(tok::coloncolon)) {\n // ...\n if (ColonIsSacred) {\n // ...\n if (Next2.is(tok::kw_private) || Next2.is(tok::kw_protected) || Next2.is(tok::kw_public) || Next2.is(tok::kw_virtual)) {\n Diag(Next2, diag::err_unexpected_token_in_nested_name_spec) << Next2.getName() << FixItHint::CreateReplacement(Next.getLocation(), \":\");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/recovery.cpp"]={"clang/test/Parser/recovery.cpp:205:22: error: \'public\' cannot be a part of nested name specifier; did you mean \':\'?"} | ["clang/test/Parser/recovery.cpp"]={"clang/test/Parser/recovery.cpp:205:22: error: \'public\' cannot be a part of nested name specifier; did you mean \':\'?"} | ||
} | } | ||
}, | }, | ||
["err_unexpected_typedef"]={ | ["err_unexpected_typedef"]={ | ||
[a | [a]="unexpected type name %0: expected expression", | ||
[b]=n, | |||
[c]="unexpected type name (.*?)\\: expected expression", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{r,3296,"/// Diagnoses obvious problems with the use of the given declaration\n/// as an expression. This is only actually called for lookups that\n/// were not overloaded, and it doesn\'t promise that the declaration\n/// will in fact be used.\nstatic bool CheckDeclInExpr(Sema &S, SourceLocation Loc, NamedDecl *D, bool AcceptInvalid) {\n // ...\n if (isa<TypedefNameDecl>(D)) {\n S.Diag(Loc, diag::err_unexpected_typedef) << D->getDeclName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx0x-condition.cpp"]={"clang/test/Parser/cxx0x-condition.cpp:20:9: error: unexpected type name \'n\': expected expression","clang/test/Parser/cxx0x-condition.cpp:22:9: error: unexpected type name \'n\': expected expression"} | ["clang/test/Parser/cxx0x-condition.cpp"]={"clang/test/Parser/cxx0x-condition.cpp:20:9: error: unexpected type name \'n\': expected expression","clang/test/Parser/cxx0x-condition.cpp:22:9: error: unexpected type name \'n\': expected expression"} | ||
} | } | ||
}, | }, | ||
["err_unexpected_typedef_ident"]={ | ["err_unexpected_typedef_ident"]={ | ||
[a | [a]="unexpected type name %0: expected identifier", | ||
[b]=n, | |||
[c]="unexpected type name (.*?)\\: expected identifier", | |||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{B,7237,"/// ParseFunctionDeclaratorIdentifierList - While parsing a function declarator\n/// we found a K&R-style identifier list instead of a typed parameter list.\n///\n/// After returning, ParamInfo will hold the parsed parameters.\n///\n/// identifier-list: [C99 6.7.5]\n/// identifier\n/// identifier-list \',\' identifier\n///\nvoid Parser::ParseFunctionDeclaratorIdentifierList(Declarator &D, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo) {\n // ...\n do {\n // ...\n // Reject \'typedef int y; int test(x, y)\', but continue parsing.\n if (Actions.getTypeName(*ParmII, Tok.getLocation(), getCurScope()))\n Diag(Tok, diag::err_unexpected_typedef_ident) << ParmII;"}}, | ||
[ | [h]={ | ||
[ | [Mb]={"clang/test/Parser/declarators.c:31:12: error: unexpected type name \'atype\': expected identifier"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_unexpected_unqualified_id"]={ | ["err_unexpected_unqualified_id"]={ | ||
[a]="type-id cannot have a name", | [a]="type-id cannot have a name", | ||
[ | [b]=n, | ||
[ | [c]="type\\-id cannot have a name", | ||
[d]=m, | |||
[e]=q, | |||
[f]={"9ce302ed9c29",1373519421,"PR5066: If a declarator cannot have an identifier, and cannot possibly be\nfollowed by an identifier,...","PR5066: If a declarator cannot have an identifier, and cannot possibly be\nfollowed by an identifier, then diagnose an identifier as being a bogus part of\nthe declarator instead of tripping over it. Improves diagnostics for cases like\n\n std::vector<const int *p> my_vec;\n\nllvm-svn: 186061"}, | |||
[ | [g]={{B,6541,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n // ...\n if (getLangOpts().CPlusPlus && D.mayHaveIdentifier()) {\n // ...\n } else if (Tok.is(tok::identifier) && D.mayHaveIdentifier()) {\n // ...\n } else if (Tok.is(tok::identifier) && !D.mayHaveIdentifier()) {\n // ...\n if (DiagnoseIdentifier) {\n Diag(Tok.getLocation(), diag::err_unexpected_unqualified_id) << FixItHint::CreateRemoval(Tok.getLocation());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/block-args.c"]={"clang/test/Sema/block-args.c:40:23: error: type-id cannot have a name"} | ["clang/test/Sema/block-args.c"]={"clang/test/Sema/block-args.c:40:23: error: type-id cannot have a name"} | ||
} | } | ||
}, | }, | ||
["err_unimplemented_conversion_with_fixed_point_type"]={ | ["err_unimplemented_conversion_with_fixed_point_type"]={ | ||
[a | [a]="conversion between fixed point and %0 is not yet supported", | ||
[b]=n, | |||
[c]="conversion between fixed point and (.*?) is not yet supported", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"99bda375a14e",1539619622,"[Fixed Point Arithmetic] FixedPointCast\n\nThis patch is a part of https://reviews.llvm.org/D48456 in ...","[Fixed Point Arithmetic] FixedPointCast\n\nThis patch is a part of https://reviews.llvm.org/D48456 in an attempt to\nsplit them up. This contains the code for casting between fixed point types\nand other fixed point types.\n\nThe method for converting between fixed point types is based off the convert()\nmethod in APFixedPoint.\n\nDifferential Revision: https://reviews.llvm.org/D50616\n\nllvm-svn: 344530"}, | ||
[ | [g]={{r,8060,"/// Prepares for a scalar cast, performing all the necessary stages\n/// except the final cast and returning the kind required.\nCastKind Sema::PrepareScalarCast(ExprResult &Src, QualType DestTy) {\n // ...\n case Type::STK_FixedPoint:\n // ...\n case Type::STK_IntegralComplex:\n case Type::STK_FloatingComplex:\n Diag(Src.get()->getExprLoc(), diag::err_unimplemented_conversion_with_fixed_point_type) << DestTy;"},{r,8094,"/// Prepares for a scalar cast, performing all the necessary stages\n/// except the final cast and returning the kind required.\nCastKind Sema::PrepareScalarCast(ExprResult &Src, QualType DestTy) {\n // ...\n case Type::STK_FloatingComplex:\n // ...\n case Type::STK_FixedPoint:\n Diag(Src.get()->getExprLoc(), diag::err_unimplemented_conversion_with_fixed_point_type) << SrcTy;"},{r,8278,"/// Prepares for a scalar cast, performing all the necessary stages\n/// except the final cast and returning the kind required.\nCastKind Sema::PrepareScalarCast(ExprResult &Src, QualType DestTy) {\n // ...\n case Type::STK_IntegralComplex:\n // ...\n case Type::STK_FixedPoint:\n Diag(Src.get()->getExprLoc(), diag::err_unimplemented_conversion_with_fixed_point_type) << SrcTy;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Frontend/fixed_point_unknown_conversions.c"]={"clang/test/Frontend/fixed_point_unknown_conversions.c:25:11: error: conversion between fixed point and \'_Complex double\' is not yet supported","clang/test/Frontend/fixed_point_unknown_conversions.c:26:11: error: conversion between fixed point and \'_Complex int\' is not yet supported","clang/test/Frontend/fixed_point_unknown_conversions.c:31:8: error: conversion between fixed point and \'_Complex double\' is not yet supported","clang/test/Frontend/fixed_point_unknown_conversions.c:32:8: error: conversion between fixed point and \'_Complex int\' is not yet supported"} | ["clang/test/Frontend/fixed_point_unknown_conversions.c"]={"clang/test/Frontend/fixed_point_unknown_conversions.c:25:11: error: conversion between fixed point and \'_Complex double\' is not yet supported","clang/test/Frontend/fixed_point_unknown_conversions.c:26:11: error: conversion between fixed point and \'_Complex int\' is not yet supported","clang/test/Frontend/fixed_point_unknown_conversions.c:31:8: error: conversion between fixed point and \'_Complex double\' is not yet supported","clang/test/Frontend/fixed_point_unknown_conversions.c:32:8: error: conversion between fixed point and \'_Complex int\' is not yet supported"} | ||
} | } | ||
}, | }, | ||
["err_uninitialized_member_for_assign"]={ | ["err_uninitialized_member_for_assign"]={ | ||
[a | [a]="cannot define the implicit copy assignment operator for %0, because non-static %select{reference|const}1 member %2 cannot use copy assignment operator", | ||
[b]=n, | |||
[c]="cannot define the implicit copy assignment operator for (.*?), because non\\-static (?:reference|const) member (.*?) cannot use copy assignment operator", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"24a175b37c87",1246060156,"Patch to mark destructors when they are used.\n\nllvm-svn: 74359","Patch to mark destructors when they are used.\n\nllvm-svn: 74359"}, | ||
[ | [g]={{t,14859,"void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *CopyAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n // Check for members of reference type; we can\'t copy those.\n if (Field->getType()->isReferenceType()) {\n Diag(ClassDecl->getLocation(), diag::err_uninitialized_member_for_assign) << Context.getTagDeclType(ClassDecl) << 0 << Field->getDeclName();"},{t,14869,"void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *CopyAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n if (!BaseType->getAs<RecordType>() && BaseType.isConstQualified()) {\n Diag(ClassDecl->getLocation(), diag::err_uninitialized_member_for_assign) << Context.getTagDeclType(ClassDecl) << 1 << Field->getDeclName();"},{t,15234,"void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MoveAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n // Check for members of reference type; we can\'t move those.\n if (Field->getType()->isReferenceType()) {\n Diag(ClassDecl->getLocation(), diag::err_uninitialized_member_for_assign) << Context.getTagDeclType(ClassDecl) << 0 << Field->getDeclName();"},{t,15244,"void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MoveAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n if (!BaseType->getAs<RecordType>() && BaseType.isConstQualified()) {\n Diag(ClassDecl->getLocation(), diag::err_uninitialized_member_for_assign) << Context.getTagDeclType(ClassDecl) << 1 << Field->getDeclName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/default-assignment-operator.cpp"]={"clang/test/SemaCXX/default-assignment-operator.cpp:5:7: error: cannot define the implicit copy assignment operator for \'Base\', because non-static reference member \'ref\' cannot use copy assignment operator","clang/test/SemaCXX/default-assignment-operator.cpp:18:7: error: cannot define the implicit copy assignment operator for \'X\', because non-static const member \'cint\' cannot use copy assignment operator","clang/test/SemaCXX/default-assignment-operator.cpp:103:7: error: cannot define the implicit copy assignment operator for \'E1\', because non-static const member \'a\' cannot use copy assignment operator"} | ["clang/test/SemaCXX/default-assignment-operator.cpp"]={"clang/test/SemaCXX/default-assignment-operator.cpp:5:7: error: cannot define the implicit copy assignment operator for \'Base\', because non-static reference member \'ref\' cannot use copy assignment operator","clang/test/SemaCXX/default-assignment-operator.cpp:18:7: error: cannot define the implicit copy assignment operator for \'X\', because non-static const member \'cint\' cannot use copy assignment operator","clang/test/SemaCXX/default-assignment-operator.cpp:103:7: error: cannot define the implicit copy assignment operator for \'E1\', because non-static const member \'a\' cannot use copy assignment operator"} | ||
} | } | ||
}, | }, | ||
["err_uninitialized_member_in_ctor"]={ | ["err_uninitialized_member_in_ctor"]={ | ||
[a | [a]="%select{constructor for %1|implicit default constructor for %1|cannot use constructor inherited from %1:}0 must explicitly initialize the %select{reference|const}2 member %3", | ||
[b]=n, | |||
[c]="(?:constructor for (.*?)|implicit default constructor for (.*?)|cannot use constructor inherited from (.*?)\\:) must explicitly initialize the (?:reference|const) member (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"7ae2d7758f3f",1264929171,"Rework base and member initialization in constructors, with several\n(necessarily simultaneous) chang...","Rework base and member initialization in constructors, with several\n(necessarily simultaneous) changes:\n\n - CXXBaseOrMemberInitializer now contains only a single initializer\n rather than a set of initialiation arguments + a constructor. The\n single initializer covers all aspects of initialization, including\n constructor calls as necessary but also cleanup of temporaries\n created by the initializer (which we never handled\n before!).\n\n - Rework + simplify code generation for CXXBaseOrMemberInitializers,\n since we can now just emit the initializer as an initializer.\n\n - Switched base and member initialization over to the new\n initialization code (InitializationSequence), so that it\n\n - Improved diagnostics for the new initialization code when\n initializing bases and members, to match the diagnostics produced\n by the previous (special-purpose) code.\n\n - Simplify the representation of type-checked constructor initializers in\n templates; instead of keeping the fully-type-checked AST, which is\n rather hard to undo at template instantiation time, throw away the\n type-checked AST and store the raw expressions in the AST. This\n simplifies instantiation, but loses a little but of information in\n the AST.\n\n - When type-checking implicit base or member initializers within a\n dependent context, don\'t add the generated initializers into the\n AST, because they\'ll look like they were explicit.\n\n - Record in CXXConstructExpr when the constructor call is to\n initialize a base class, so that CodeGen does not have to infer it\n from context. This ensures that we call the right kind of\n constructor.\n\nThere are also a few \"opportunity\" fixes here that were needed to not\nregress, for example:\n\n - Diagnose default-initialization of a const-qualified class that\n does not have a user-declared default constructor. We had this\n diagnostic specifically for bases and members, but missed it for\n variables. That\'s fixed now.\n\n - When defining the implicit constructors, destructor, and\n copy-assignment operator, set the CurContext to that constructor\n when we\'re defining the body.\n\nllvm-svn: 94952"}, | ||
[ | [g]={{t,5048,"static bool BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor, ImplicitInitializerKind ImplicitInitKind, FieldDecl *Field, IndirectFieldDecl *Indirect, CXXCtorInitializer *&CXXMemberInit) {\n // ...\n if (!Field->getParent()->isUnion()) {\n if (FieldBaseElementType->isReferenceType()) {\n SemaRef.Diag(Constructor->getLocation(), diag::err_uninitialized_member_in_ctor) << (int)Constructor->isImplicit() << SemaRef.Context.getTagDeclType(Constructor->getParent()) << 0 << Field->getDeclName();"},{t,5058,"static bool BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor, ImplicitInitializerKind ImplicitInitKind, FieldDecl *Field, IndirectFieldDecl *Indirect, CXXCtorInitializer *&CXXMemberInit) {\n // ...\n if (!Field->getParent()->isUnion()) {\n // ...\n if (FieldBaseElementType.isConstQualified()) {\n SemaRef.Diag(Constructor->getLocation(), diag::err_uninitialized_member_in_ctor) << (int)Constructor->isImplicit() << SemaRef.Context.getTagDeclType(Constructor->getParent()) << 1 << Field->getDeclName();"},{N,9956,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_DefaultInitOfConst:\n if (Entity.getKind() == InitializedEntity::EK_Member && isa<CXXConstructorDecl>(S.CurContext)) {\n // ...\n S.Diag(Kind.getLocation(), diag::err_uninitialized_member_in_ctor) << (Constructor->getInheritedConstructor() ? 2 : Constructor->isImplicit() ? 1 : 0) << S.Context.getTypeDeclType(Constructor->getParent()) << /*const=*/1 << Entity.getName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp"]={"clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp:12:3: error: constructor for \'S\' must explicitly initialize the reference member \'a\'","clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp:14:3: error: constructor for \'S\' must explicitly initialize the reference member \'a\'"} | ["clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp"]={"clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp:12:3: error: constructor for \'S\' must explicitly initialize the reference member \'a\'","clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp:14:3: error: constructor for \'S\' must explicitly initialize the reference member \'a\'"} | ||
} | } | ||
Line 1,118: | Line 907: | ||
["err_union_as_base_class"]={ | ["err_union_as_base_class"]={ | ||
[a]="unions cannot be base classes", | [a]="unions cannot be base classes", | ||
[ | [b]=n, | ||
[ | [c]="unions cannot be base classes", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{t,2718,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // ...\n // C++ [class.union]p1:\n // A union shall not be used as a base class.\n if (BaseType->isUnionType()) {\n Diag(BaseLoc, diag::err_union_as_base_class) << SpecifierRange;"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/inherit.cpp"]={"clang/test/SemaCXX/inherit.cpp:25:18: error: unions cannot be base classes"} | ["clang/test/SemaCXX/inherit.cpp"]={"clang/test/SemaCXX/inherit.cpp:25:18: error: unions cannot be base classes"} | ||
} | } | ||
}, | }, | ||
["err_union_member_of_reference_type"]={ | ["err_union_member_of_reference_type"]={ | ||
[a | [a]="union member %0 has reference type %1", | ||
[b]=n, | |||
[c]="union member (.*?) has reference type (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2ceb347e8bce",1289157235,"A union cannot contain static data members or data members of reference type.\n\nllvm-svn: 118381","A union cannot contain static data members or data members of reference type.\n\nllvm-svn: 118381"}, | ||
[ | [g]={{p,18241,"/// Build a new FieldDecl and check its well-formedness.\n///\n/// This routine builds a new FieldDecl given the fields name, type,\n/// record, etc. \\p PrevDecl should refer to any previous declaration\n/// with the same name and in the same scope as the field to be\n/// created.\n///\n/// \\returns a new FieldDecl.\n///\n/// \\todo The Declarator argument is a hack. It will be removed once\nFieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D) {\n // ...\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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/class/class.union/p1.cpp"]={"clang/test/CXX/class/class.union/p1.cpp:105:8: error: union member \'i1\' has reference type \'int &\'"} | ["clang/test/CXX/class/class.union/p1.cpp"]={"clang/test/CXX/class/class.union/p1.cpp:105:8: error: union member \'i1\' has reference type \'int &\'"} | ||
} | } | ||
}, | }, | ||
["err_unknown_analyzer_checker_or_package"]={ | ["err_unknown_analyzer_checker_or_package"]={ | ||
[a | [a]="no analyzer checkers or packages are associated with \'%0\'", | ||
[b]=n, | |||
[c]="no analyzer checkers or packages are associated with \'(.*?)\'", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"a079a4270851",1565920394,"[analyzer] Analysis: Silence checkers\n\nSummary:\nThis patch introduces a new `analyzer-config` config...","[analyzer] Analysis: Silence checkers\n\nSummary:\nThis patch introduces a new `analyzer-config` configuration:\n`-analyzer-config silence-checkers`\nwhich could be used to silence the given checkers.\n\nIt accepts a semicolon separated list, packed into quotation marks, e.g:\n`-analyzer-config silence-checkers=\"core.DivideZero;core.NullDereference\"`\n\nIt could be used to \"disable\" core checkers, so they model the analysis as\nbefore, just if some of them are too noisy it prevents to emit reports.\n\nThis patch also adds support for that new option to the scan-build.\nPassing the option `-disable-checker core.DivideZero` to the scan-build\nwill be transferred to `-analyzer-config silence-checkers=core.DivideZero`.\n\nReviewed By: NoQ, Szelethus\n\nDifferential Revision: https://reviews.llvm.org/D66042\n\nllvm-svn: 369078"}, | ||
[ | [g]={{"clang/lib/Frontend/CompilerInvocation.cpp",1169,"#include \"clang/StaticAnalyzer/Core/AnalyzerOptions.def\"\n // ...\n // FIXME: Here we try to validate the silenced checkers or packages are valid.\n // The current approach only validates the registered checkers which does not\n // contain the runtime enabled checkers and optimally we would validate both.\n if (!AnOpts.RawSilencedCheckersAndPackages.empty()) {\n // ...\n for (const StringRef &CheckerOrPackage : CheckersAndPackages) {\n if (Diags) {\n // ...\n if (!IsValidName)\n Diags->Report(diag::err_unknown_analyzer_checker_or_package) << CheckerOrPackage;"},{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",178,"#endif\n // ...\n // Parse \'-analyzer-checker\' and \'-analyzer-disable-checker\' options from the\n // command line.\n for (const std::pair<std::string, bool> &Opt : AnOpts.CheckersAndPackages) {\n // ...\n if (CheckerForCmdLineArg.begin() == CheckerForCmdLineArg.end()) {\n Diags.Report(diag::err_unknown_analyzer_checker_or_package) << Opt.first;"},{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",525,"void CheckerRegistry::validateCheckerOptions() const {\n for (const auto &Config : AnOpts.Config) {\n // ...\n Diags.Report(diag::err_unknown_analyzer_checker_or_package) << SuppliedCheckerOrPackage;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unknown_any_addrof"]={ | ["err_unknown_any_addrof"]={ | ||
[a]="the address of a declaration with unknown type can only be cast to a pointer type", | [a]="the address of a declaration with unknown type can only be cast to a pointer type", | ||
[ | [b]=n, | ||
[ | [c]="the address of a declaration with unknown type can only be cast to a pointer type", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2979fe01da2c",1302568968,"After some discussion with Doug, we decided that it made a lot more sense\nfor __unknown_anytype reso...","After some discussion with Doug, we decided that it made a lot more sense\nfor __unknown_anytype resolution to destructively modify the AST. So that\'s\nwhat it does now, which significantly simplifies some of the implementation.\nNormal member calls work pretty cleanly now, and I added support for\npropagating unknown-ness through &.\n\nllvm-svn: 129331"}, | ||
[ | [g]={{r,21132,"/// A visitor for rebuilding an expression of type __unknown_anytype\n/// into one which resolves the type directly on the referring\n/// expression. Strict preservation of the original source\n/// structure is not a goal.\nstruct RebuildUnknownAnyExpr : StmtVisitor<RebuildUnknownAnyExpr, ExprResult> {\n // ...\n ExprResult VisitUnaryAddrOf(UnaryOperator *E) {\n // ...\n if (!Ptr) {\n S.Diag(E->getOperatorLoc(), diag::err_unknown_any_addrof) << E->getSourceRange();"}} | ||
[ | |||
}, | }, | ||
["err_unknown_any_addrof_call"]={ | ["err_unknown_any_addrof_call"]={ | ||
[a]="address-of operator cannot be applied to a call to a function with unknown return type", | [a]="address-of operator cannot be applied to a call to a function with unknown return type", | ||
[ | [b]=n, | ||
[ | [c]="address\\-of operator cannot be applied to a call to a function with unknown return type", | ||
[d]=m, | |||
[e]=k, | |||
[f]={"f7d563c76c40",1479514383,"[Sema] Don\'t allow applying address-of operator to a call to a function\nwith __unknown_anytype retur...","[Sema] Don\'t allow applying address-of operator to a call to a function\nwith __unknown_anytype return type.\n\nWhen the following code is compiled, Sema infers that the type of\n__unknown_anytype is double:\n\nextern __unknown_anytype func();\ndouble *d = (double*)&func();\n\nThis triggers an assert in CodeGenFunction::EmitCallExprLValue because\nit doesn\'t expect to see a call to a function with a non-reference\nscalar return type.\n\nThis commit prevents the assert by making VisitUnaryAddrOf error out if\nthe address-of operator is applied to a call to a function with\n__unknown_anytype return type.\n\nrdar://problem/20287610\n\nDifferential revision: https://reviews.llvm.org/D26808\n\nllvm-svn: 287410"}, | |||
[ | [g]={{r,21190,"/// A visitor for rebuilding an expression of type __unknown_anytype\n/// into one which resolves the type directly on the referring\n/// expression. Strict preservation of the original source\n/// structure is not a goal.\nstruct RebuildUnknownAnyExpr : StmtVisitor<RebuildUnknownAnyExpr, ExprResult> {\n // ...\n ExprResult VisitUnaryAddrOf(UnaryOperator *E) {\n // ...\n if (isa<CallExpr>(E->getSubExpr())) {\n S.Diag(E->getOperatorLoc(), diag::err_unknown_any_addrof_call) << E->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | [bc]={"clang/test/SemaCXX/unknown-anytype.cpp:66:18: error: address-of operator cannot be applied to a call to a function with unknown return type"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_unknown_any_function"]={ | ["err_unknown_any_function"]={ | ||
[a | [a]="function %0 with unknown type must be given a function type", | ||
[b]=n, | |||
[c]="function (.*?) with unknown type must be given a function type", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"9a877fef910f",1312949543,"Change an assert into a check. I\'m pretty sure there was a point\nin time when this assert was valid...","Change an assert into a check. I\'m pretty sure there was a point\nin time when this assert was valid, but it\'s not valid now.\nAlso teach this code to correctly introduce function-to-pointer\ndecay.\n\nllvm-svn: 137201"}, | ||
[ | [g]={{r,21393,"ExprResult RebuildUnknownAnyExpr::resolveDecl(Expr *E, ValueDecl *VD) {\n // ...\n // - functions\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(VD)) {\n // ...\n if (!Type->isFunctionType()) {\n S.Diag(E->getExprLoc(), diag::err_unknown_any_function) << VD << E->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | [bc]={"clang/test/SemaCXX/unknown-anytype.cpp:45:19: error: function \'test1\' with unknown type must be given a function type"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_unknown_any_var_function_type"]={ | ["err_unknown_any_var_function_type"]={ | ||
[a | [a]="variable %0 with unknown type cannot be given a function type", | ||
[b]=n, | |||
[c]="variable (.*?) with unknown type cannot be given a function type", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2979fe01da2c",1302568968,"After some discussion with Doug, we decided that it made a lot more sense\nfor __unknown_anytype reso...","After some discussion with Doug, we decided that it made a lot more sense\nfor __unknown_anytype resolution to destructively modify the AST. So that\'s\nwhat it does now, which significantly simplifies some of the implementation.\nNormal member calls work pretty cleanly now, and I added support for\npropagating unknown-ness through &.\n\nllvm-svn: 129331"}, | ||
[ | [g]={{r,21400,"ExprResult RebuildUnknownAnyExpr::resolveDecl(Expr *E, ValueDecl *VD) {\n // ...\n // - functions\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(VD)) {\n // ...\n } else if (isa<VarDecl>(VD)) {\n if (const ReferenceType *RefTy = Type->getAs<ReferenceType>()) {\n // ...\n } else if (Type->isFunctionType()) {\n S.Diag(E->getExprLoc(), diag::err_unknown_any_var_function_type) << VD << E->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | [bc]={"clang/test/SemaCXX/unknown-anytype.cpp:34:19: error: variable \'foo\' with unknown type cannot be given a function type"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_unknown_hlsl_semantic"]={ | ["err_unknown_hlsl_semantic"]={ | ||
[a | [a]="unknown HLSL semantic %0", | ||
[b]=n, | |||
[c]="unknown HLSL semantic (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"1fdf952deeb9",1648668015,"[HLSL] Add Semantic syntax, and SV_GroupIndex\n\nHLSL has a language feature called Semantics which ge...","[HLSL] Add Semantic syntax, and SV_GroupIndex\n\nHLSL has a language feature called Semantics which get attached to\ndeclarations like attributes and are used in a variety of ways.\n\nOne example of semantic use is here with the `SV_GroupIndex` semantic\nwhich, when applied to an input for a compute shader is pre-populated\nby the driver with a flattened thread index.\n\nDifferential Revision: https://reviews.llvm.org/D122699\n\n# Conflicts:\n# clang/include/clang/Basic/Attr.td\n# clang/include/clang/Basic/AttrDocs.td"}, | ||
[ | [g]={{"clang/lib/Parse/ParseHLSL.cpp",189,"void Parser::ParseHLSLSemantics(ParsedAttributes &Attrs, SourceLocation *EndLoc) {\n // ...\n case ParsedAttr::UnknownAttribute:\n Diag(Loc, diag::err_unknown_hlsl_semantic) << II;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/ParserHLSL/semantic_parsing.hlsl"]={"clang/test/ParserHLSL/semantic_parsing.hlsl:7:20: error: unknown HLSL semantic \'SV_IWantAPony\'"} | ["clang/test/ParserHLSL/semantic_parsing.hlsl"]={"clang/test/ParserHLSL/semantic_parsing.hlsl:7:20: error: unknown HLSL semantic \'SV_IWantAPony\'"} | ||
} | } | ||
}, | }, | ||
["err_unknown_nested_typename_suggest"]={ | ["err_unknown_nested_typename_suggest"]={ | ||
[a | [a]="no type named %0 in %1; did you mean %select{|simply }2%3?", | ||
[b]=n, | |||
[c]="no type named (.*?) in (.*?); did you mean (?:|simply )(.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2d435306e524",1262192684,"Typo correction for type names when they appear in declarations, e.g., given\n\n tring str2;\n\nwe prod...","Typo correction for type names when they appear in declarations, e.g., given\n\n tring str2;\n\nwe produce the following diagnostic + fix-it:\n\ntypo.cpp:15:1: error: unknown type name \'tring\'; did you mean \'string\'?\n tring str2;\n ^~~~~\n string\n\n\nTo make this really useful, we\'ll need to introduce typo correction in\nmany more places (wherever we do name lookup), and implement\ndeclaration-vs-expression heuristics that cope with typos\nbetter. However, for now this will handle the simple cases where we\nalready get good \"unknown type name\" diagnostics.\n\nThe LookupVisibleDecls functions are intended to be used by code\ncompletion as well as typo correction; that refactoring will happen\nlater.\n\nllvm-svn: 92308"}, | ||
[ | [g]={{p,765,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(II, IILoc), LookupOrdinaryName, S, SS, CCC, CTK_ErrorRecovery)) {\n // ...\n if (Corrected.isKeyword()) {\n // ...\n } else {\n // We found a similarly-named type or interface; suggest that.\n if (!SS || !SS->isSet()) {\n // ...\n } else if (DeclContext *DC = computeDeclContext(*SS, false)) {\n // ...\n diagnoseTypo(Corrected, PDiag(IsTemplateName ? diag::err_no_member_template_suggest : diag::err_unknown_nested_typename_suggest) << II << DC << DroppedSpecifier << SS->getRange(), CanRecover);"},{p,1023,"Corrected:\n // ...\n case LookupResult::NotFound:\n // ...\n // Perform typo correction to determine if there is another name that is\n // close to this name.\n if (!SecondTry && CCC) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, &SS, *CCC, CTK_ErrorRecovery)) {\n // ...\n if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && UnderlyingFirstDecl && isa<TemplateDecl>(UnderlyingFirstDecl)) {\n // ...\n } else if (UnderlyingFirstDecl && (isa<TypeDecl>(UnderlyingFirstDecl) || isa<ObjCInterfaceDecl>(UnderlyingFirstDecl) || isa<ObjCCompatibleAliasDecl>(UnderlyingFirstDecl))) {\n // ...\n QualifiedDiag = diag::err_unknown_nested_typename_suggest;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp:23:17: error: no type named \'D\' in \'X\'; did you mean simply \'D\'?","clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp:25:17: error: no type named \'E\' in \'X\'; did you mean simply \'E\'?","clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp:40:21: error: no type named \'H\' in \'X\'; did you mean simply \'H\'?","clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp:42:21: error: no type named \'I\' in \'X\'; did you mean simply \'I\'?"} | ["clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp:23:17: error: no type named \'D\' in \'X\'; did you mean simply \'D\'?","clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp:25:17: error: no type named \'E\' in \'X\'; did you mean simply \'E\'?","clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp:40:21: error: no type named \'H\' in \'X\'; did you mean simply \'H\'?","clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p7.cpp:42:21: error: no type named \'I\' in \'X\'; did you mean simply \'I\'?"} | ||
} | } | ||
}, | }, | ||
["err_unknown_receiver_suggest"]={ | ["err_unknown_receiver_suggest"]={ | ||
[a | [a]="unknown receiver %0; did you mean %1?", | ||
[b]=n, | |||
[c]="unknown receiver (.*?); did you mean (.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"8aa4ebf0bcf7",1271213197,"Implement typo correction for Objective-C message sends when the\nreceiver is a mis-typed class name....","Implement typo correction for Objective-C message sends when the\nreceiver is a mis-typed class name. Previously, we would give a non-specific\ntypo-correction diagnostic from the expression-parsing code, but there\nwas no fix-it because it was too late to recover. Now, we give a nice\ndiagnostic\n\nhonk.m:6:4: error: unknown receiver \'Hnk\'; did you mean \'Honk\'?\n [Hnk method];\n ^~~\n Honk\nhonk.m:1:1: note: \'Honk\' declared here\n@interface Honk\n^\n\nwhich includes a fix-it.\n\nWe still need to recover better from mis-typing \"super\".\n\nllvm-svn: 101211"}, | ||
[ | [g]={{oc,2362,"Sema::ObjCMessageKind Sema::getObjCMessageKind(Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, nullptr, CCC, CTK_ErrorRecovery, nullptr, false, nullptr, false)) {\n if (Corrected.isKeyword()) {\n // ...\n diagnoseTypo(Corrected, PDiag(diag::err_unknown_receiver_suggest) << Name);"},{oc,2369,"Sema::ObjCMessageKind Sema::getObjCMessageKind(Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, nullptr, CCC, CTK_ErrorRecovery, nullptr, false, nullptr, false)) {\n if (Corrected.isKeyword()) {\n // ...\n } else if (ObjCInterfaceDecl *Class = Corrected.getCorrectionDeclAs<ObjCInterfaceDecl>()) {\n // ...\n diagnoseTypo(Corrected, PDiag(diag::err_unknown_receiver_suggest) << Name);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/FixIt/typo.m"]={"clang/test/FixIt/typo.m:64:4: error: unknown receiver \'NSstring\'; did you mean \'NSString\'?","clang/test/FixIt/typo.m:111:11: error: unknown receiver \'supper\'; did you mean \'super\'?","clang/test/FixIt/typo.m:122:11: error: unknown receiver \'supper\'; did you mean \'super\'?"} | ["clang/test/FixIt/typo.m"]={"clang/test/FixIt/typo.m:64:4: error: unknown receiver \'NSstring\'; did you mean \'NSString\'?","clang/test/FixIt/typo.m:111:11: error: unknown receiver \'supper\'; did you mean \'super\'?","clang/test/FixIt/typo.m:122:11: error: unknown receiver \'supper\'; did you mean \'super\'?"} | ||
} | } | ||
}, | }, | ||
["err_unknown_template_name"]={ | ["err_unknown_template_name"]={ | ||
[a | [a]="unknown template name %0", | ||
[b]=n, | |||
[c]="unknown template name (.*?)", | |||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"18473f329dbd",1263331724,"Improve recovery for template-ids whose template-name doesn\'t actually\nname a template, when they oc...","Improve recovery for template-ids whose template-name doesn\'t actually\nname a template, when they occur in a base-specifier. This is one of\nthe (few) places where we know for sure that an identifier followed by\na \'<\' must be a template name, so we can diagnose and recover well:\n\ntest/SemaTemplate/dependent-base-classes.cpp:9:16: error: missing\n\'template\'\n keyword prior to dependent template name \'T::apply\'\nstruct X1 : T::apply<U> { }; // expected-error{{missing \'template\' ...\n ^\n template \ntest/SemaTemplate/dependent-base-classes.cpp:12:13: error: unknown\ntemplate name\n \'vector\'\nstruct X2 : vector<T> { }; // expected-error{{unknown template name\n\'vector\'}}\n ^\n2 diagnostics generated.\n\nllvm-svn: 93257"}, | ||
[ | [g]={{F,1330,"/// ParseBaseTypeSpecifier - Parse a C++ base-type-specifier which is either a\n/// class name or decltype-specifier. Note that we only check that the result\n/// names a type; semantic analysis will need to verify that the type names a\n/// class. The result is either a type or null, depending on whether a type\n/// name was found.\n///\n/// base-type-specifier: [C++11 class.derived]\n/// class-or-decltype\n/// class-or-decltype: [C++11 class.derived]\n/// nested-name-specifier[opt] class-name\n/// decltype-specifier\n/// class-name: [C++ class.name]\n/// identifier\n/// simple-template-id\n///\n/// In C++98, instead of base-type-specifier, we have:\n///\n/// ::[opt] nested-name-specifier[opt] class-name\nTypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc, SourceLocation &EndLocation) {\n // ...\n if (Tok.is(tok::less)) {\n // ...\n if (!Actions.DiagnoseUnknownTemplateName(*Id, IdLoc, getCurScope(), &SS, Template, TNK)) {\n Diag(IdLoc, diag::err_unknown_template_name) << Id;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/injected-class-name-crash.cpp"]={"clang/test/SemaCXX/injected-class-name-crash.cpp:4:19: error: unknown template name \'Foo\'"} | ["clang/test/SemaCXX/injected-class-name-crash.cpp"]={"clang/test/SemaCXX/injected-class-name-crash.cpp:4:19: error: unknown template name \'Foo\'"} | ||
} | } | ||
}, | }, | ||
["err_unknown_type_or_class_name_suggest"]={ | ["err_unknown_type_or_class_name_suggest"]={ | ||
[a | [a]="unknown %select{type|class}1 name %0; did you mean %2?", | ||
[b]=n, | |||
[c]="unknown (?:type|class) name (.*?); did you mean (.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"9cb8e9fc89d3",1340408225,"Perform typo correction for base class specifiers.\n\nllvm-svn: 159046","Perform typo correction for base class specifiers.\n\nllvm-svn: 159046"}, | ||
[ | [g]={{p,470,"/// If the identifier refers to a type name within this scope,\n/// return the declaration of that type.\n///\n/// This routine performs ordinary name lookup of the identifier II\n/// within the given scope, with optional C++ scope specifier SS, to\n/// determine whether the name refers to a type. If so, returns an\n/// opaque pointer (actually a QualType) corresponding to that\n/// type. Otherwise, returns NULL.\nParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS, bool isClassName, bool HasTrailingDot, ParsedType ObjectTypePtr, bool IsCtorOrDtorName, bool WantNontrivialTypeSourceInfo, bool IsClassTemplateDeductionContext, ImplicitTypenameContext AllowImplicitTypename, IdentifierInfo **CorrectedII) {\n // ...\n case LookupResult::NotFound:\n case LookupResult::NotFoundInCurrentInstantiation:\n if (CorrectedII) {\n // ...\n if (Correction && (NNS || NewII != &II) &&\n // ...\n if (Ty) {\n diagnoseTypo(Correction, PDiag(diag::err_unknown_type_or_class_name_suggest) << Result.getLookupName() << isClassName);"},{hb,1733,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n // ...\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n // ...\n if (corrected) {\n // ...\n // Did we find an Objective-C class?\n if (auto objcClass = corrected.getCorrectionDeclAs<ObjCInterfaceDecl>()) {\n diagnoseTypo(corrected, PDiag(diag::err_unknown_type_or_class_name_suggest) << identifiers[i] << true);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/recovery.c"]={"clang/test/Parser/recovery.c:86:10: error: unknown type name \'intptr\'; did you mean \'intptr_t\'?"} | ["clang/test/Parser/recovery.c"]={"clang/test/Parser/recovery.c:86:10: error: unknown type name \'intptr\'; did you mean \'intptr_t\'?"} | ||
} | } | ||
}, | }, | ||
["err_unknown_typename"]={ | ["err_unknown_typename"]={ | ||
[a | [a]="unknown type name %0", | ||
[b]=n, | |||
[c]="unknown type name (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"6cc055af1df1",1239568951,"Implement the first set of changes for PR3963 and rdar://6759604,\nwhich tries to do better error rec...","Implement the first set of changes for PR3963 and rdar://6759604,\nwhich tries to do better error recovery when it is \"obvious\" that an\nidentifier is a mis-typed typename. In this case, we try to parse\nit as a typename instead of as the identifier in a declarator, which\ngives us several options for better error recovery and immediately\nmakes diagnostics more useful. For example, we now produce:\n\nt.c:4:8: error: unknown type name \'foo_t\'\nstatic foo_t a = 4;\n ^\n\ninstead of:\n\nt.c:4:14: error: invalid token after top level declarator\nstatic foo_t a = 4;\n ^\n\nAlso, since we now parse \"a\" correctly, we make a decl for it,\npreventing later uses of \'a\' from emitting things like:\n\nt.c:12:20: error: use of undeclared identifier \'a\'\nint bar() { return a + b; }\n ^\n\nI\'d really appreciate any scrutiny possible on this, it \nis a tricky area.\n\nllvm-svn: 68911"}, | ||
[ | [g]={{p,809,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n // ...\n if (!SS || (!SS->isSet() && !SS->isInvalid()))\n Diag(IILoc, IsTemplateName ? diag::err_no_template : diag::err_unknown_typename) << II;"},{t,12113,"Decl *Sema::ActOnUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation IdentLoc, IdentifierInfo &II, CXXScopeSpec *SS) {\n // ...\n if (EnumTy.isNull()) {\n Diag(IdentLoc, SS && isDependentScopeSpecifier(*SS) ? diag::err_using_enum_is_dependent : diag::err_unknown_typename) << II.getName() << SourceRange(SS ? SS->getBeginLoc() : IdentLoc, IdentLoc);"},{hb,1746,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n // ...\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n // ...\n Diag(identifierLocs[i], (lookupKind == LookupAnyName ? diag::err_objc_type_arg_missing : lookupKind == LookupObjCProtocolName ? diag::err_undeclared_protocol : diag::err_unknown_typename)) << identifiers[i];"},{z,11059,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::NotFound: {\n // ...\n DiagID = Ctx ? diag::err_typename_nested_not_found : diag::err_unknown_typename;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/pragma_poison.c"]={"clang/test/Preprocessor/pragma_poison.c:7:3: error: unknown type name \'XYZW\'"} | ["clang/test/Preprocessor/pragma_poison.c"]={"clang/test/Preprocessor/pragma_poison.c:7:3: error: unknown type name \'XYZW\'"} | ||
} | } | ||
}, | }, | ||
["err_unknown_typename_suggest"]={ | ["err_unknown_typename_suggest"]={ | ||
[a | [a]="unknown type name %0; did you mean %1?", | ||
[b]=n, | |||
[c]="unknown type name (.*?); did you mean (.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2d435306e524",1262192684,"Typo correction for type names when they appear in declarations, e.g., given\n\n tring str2;\n\nwe prod...","Typo correction for type names when they appear in declarations, e.g., given\n\n tring str2;\n\nwe produce the following diagnostic + fix-it:\n\ntypo.cpp:15:1: error: unknown type name \'tring\'; did you mean \'string\'?\n tring str2;\n ^~~~~\n string\n\n\nTo make this really useful, we\'ll need to introduce typo correction in\nmany more places (wherever we do name lookup), and implement\ndeclaration-vs-expression heuristics that cope with typos\nbetter. However, for now this will handle the simple cases where we\nalready get good \"unknown type name\" diagnostics.\n\nThe LookupVisibleDecls functions are intended to be used by code\ncompletion as well as typo correction; that refactoring will happen\nlater.\n\nllvm-svn: 92308"}, | ||
[ | [g]={{p,748,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(II, IILoc), LookupOrdinaryName, S, SS, CCC, CTK_ErrorRecovery)) {\n // ...\n if (Corrected.isKeyword()) {\n // ...\n diagnoseTypo(Corrected, PDiag(IsTemplateName ? diag::err_no_template_suggest : diag::err_unknown_typename_suggest) << II);"},{p,756,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(II, IILoc), LookupOrdinaryName, S, SS, CCC, CTK_ErrorRecovery)) {\n // ...\n if (Corrected.isKeyword()) {\n // ...\n } else {\n // We found a similarly-named type or interface; suggest that.\n if (!SS || !SS->isSet()) {\n diagnoseTypo(Corrected, PDiag(IsTemplateName ? diag::err_no_template_suggest : diag::err_unknown_typename_suggest) << II, CanRecover);"},{p,1022,"Corrected:\n // ...\n case LookupResult::NotFound:\n // ...\n // Perform typo correction to determine if there is another name that is\n // close to this name.\n if (!SecondTry && CCC) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(Result.getLookupNameInfo(), Result.getLookupKind(), S, &SS, *CCC, CTK_ErrorRecovery)) {\n // ...\n if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && UnderlyingFirstDecl && isa<TemplateDecl>(UnderlyingFirstDecl)) {\n // ...\n } else if (UnderlyingFirstDecl && (isa<TypeDecl>(UnderlyingFirstDecl) || isa<ObjCInterfaceDecl>(UnderlyingFirstDecl) || isa<ObjCCompatibleAliasDecl>(UnderlyingFirstDecl))) {\n UnqualifiedDiag = diag::err_unknown_typename_suggest;"},{hb,1722,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n // ...\n for (unsigned i = 0, n = identifiers.size(); i != n; ++i) {\n // ...\n if (corrected) {\n // ...\n // Did we find a type?\n if (auto typeDecl = corrected.getCorrectionDeclAs<TypeDecl>()) {\n diagnoseTypo(corrected, PDiag(diag::err_unknown_typename_suggest) << identifiers[i]);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unofficial_altivec_support_not_enabled"]={ | ["err_unofficial_altivec_support_not_enabled"]={ | ||
[a]="\"AltiVec support not enabled\"", | [a]="\"AltiVec support not enabled\"", | ||
[ | [b]=n, | ||
[ | [c]="\"AltiVec support not enabled\"", | ||
[d]=m, | |||
[ | [e]=Jb | ||
[ | |||
}, | }, | ||
["err_unofficial_asm_invalid_register_name"]={ | ["err_unofficial_asm_invalid_register_name"]={ | ||
[a]="invalid register name", | [a]="invalid register name", | ||
[ | [b]=n, | ||
[ | [c]="invalid register name", | ||
[d]=m, | |||
[ | [e]=k | ||
[ | |||
}, | }, | ||
["err_unofficial_cannot_compile_this_yet"]={ | ["err_unofficial_cannot_compile_this_yet"]={ | ||
[a | [a]="cannot compile this %0 yet", | ||
[b]=n, | |||
[c]="cannot compile this (.*?) yet", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGenHIP/printf-aggregate.cpp"]={"clang/test/CodeGenHIP/printf-aggregate.cpp:19:3: error: cannot compile this non-scalar arg to printf yet"} | ["clang/test/CodeGenHIP/printf-aggregate.cpp"]={"clang/test/CodeGenHIP/printf-aggregate.cpp:19:3: error: cannot compile this non-scalar arg to printf yet"} | ||
} | } | ||
Line 1,352: | Line 1,090: | ||
["err_unofficial_coroutine_requires_fcoroutines"]={ | ["err_unofficial_coroutine_requires_fcoroutines"]={ | ||
[a]="\"the <coroutine> header requires -fcoroutines\"", | [a]="\"the <coroutine> header requires -fcoroutines\"", | ||
[ | [b]=n, | ||
[ | [c]="\"the \\<coroutine\\> header requires \\-fcoroutines\"", | ||
[d]=m, | |||
[e]=Jb | |||
[ | |||
[ | |||
}, | }, | ||
["err_unofficial_cuda_unsupported_unified_addressing"]={ | ["err_unofficial_cuda_unsupported_unified_addressing"]={ | ||
[a | [a]="Target architecture %0 does not support unified addressing", | ||
[b]=n, | |||
[c]="Target architecture (.*?) does not support unified addressing", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/OpenMP/requires_codegen.cpp"]={"clang/test/OpenMP/requires_codegen.cpp:24:22: error: Target architecture sm_53 does not support unified addressing"} | ["clang/test/OpenMP/requires_codegen.cpp"]={"clang/test/OpenMP/requires_codegen.cpp:24:22: error: Target architecture sm_53 does not support unified addressing"} | ||
} | } | ||
}, | }, | ||
["err_unofficial_gcov_failed_to_open_coverage_notes_file_for_writing"]={ | ["err_unofficial_gcov_failed_to_open_coverage_notes_file_for_writing"]={ | ||
[a | [a]="failed to open coverage notes file for writing: %0", | ||
[b]=n, | |||
[c]="failed to open coverage notes file for writing\\: (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGen/code-coverage-filter.c"]={"error: failed to open coverage notes file for writing: Permission denied"} | ["clang/test/CodeGen/code-coverage-filter.c"]={"error: failed to open coverage notes file for writing: Permission denied"} | ||
} | } | ||
Line 1,388: | Line 1,117: | ||
["err_unofficial_header_arm_mve_support_not_enabled"]={ | ["err_unofficial_header_arm_mve_support_not_enabled"]={ | ||
[a]="\"MVE support not enabled\"", | [a]="\"MVE support not enabled\"", | ||
[ | [b]=n, | ||
[ | [c]="\"MVE support not enabled\"", | ||
[d]=m, | |||
[ | [e]=Jb | ||
[ | |||
}, | }, | ||
["err_unofficial_header_arm_neon_intrinsics_not_available"]={ | ["err_unofficial_header_arm_neon_intrinsics_not_available"]={ | ||
[a]="\"NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard\"", | [a]="\"NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard\"", | ||
[ | [b]=n, | ||
[ | [c]="\"NEON intrinsics not available with the soft\\-float ABI\\. Please use \\-mfloat\\-abi\\=softfp or \\-mfloat\\-abi\\=hard\"", | ||
[d]=m, | |||
[e]=Jb | |||
[ | |||
[ | |||
}, | }, | ||
["err_unofficial_header_arm_neon_support_not_enabled"]={ | ["err_unofficial_header_arm_neon_support_not_enabled"]={ | ||
[a]="\"NEON support not enabled\"", | [a]="\"NEON support not enabled\"", | ||
[ | [b]=n, | ||
[ | [c]="\"NEON support not enabled\"", | ||
[d]=m, | |||
[ | [e]=Jb | ||
[ | |||
}, | }, | ||
["err_unofficial_header_arm_sve_big_endian_not_supported"]={ | ["err_unofficial_header_arm_sve_big_endian_not_supported"]={ | ||
[a | [a]="\"Big endian is currently not supported for %0\"", | ||
[b]=n, | |||
[c]="\"Big endian is currently not supported for (.*?)\"", | |||
[d]=m, | |||
[ | [e]=Jb, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/aarch64-sve-intrinsics/big_endian.cpp"]={"build/lib/clang/17/include/arm_sve.h:15:2: error: \"Big endian is currently not supported for arm_sve.h\""} | ["clang/test/Sema/aarch64-sve-intrinsics/big_endian.cpp"]={"build/lib/clang/17/include/arm_sve.h:15:2: error: \"Big endian is currently not supported for arm_sve.h\""} | ||
} | } | ||
Line 1,431: | Line 1,148: | ||
["err_unofficial_header_cxx11_required"]={ | ["err_unofficial_header_cxx11_required"]={ | ||
[a]="This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.", | [a]="This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.", | ||
[ | [b]=n, | ||
[ | [c]="This file requires compiler and library support for the ISO C\\+\\+ 2011 standard\\. This support must be enabled with the \\-std\\=c\\+\\+11 or \\-std\\=gnu\\+\\+11 compiler options\\.", | ||
[d]=m, | |||
[e]=Jb | |||
[ | |||
[ | |||
}, | }, | ||
["err_unofficial_reading_profile"]={ | ["err_unofficial_reading_profile"]={ | ||
[a | [a]="Error in reading profile %0: %1", | ||
[b]=n, | |||
[c]="Error in reading profile (.*?)\\: (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Profile/gcc-flag-compatibility.c"]={"error: Error in reading profile build/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/default.profdata: No such file or directory"} | ["clang/test/Profile/gcc-flag-compatibility.c"]={"error: Error in reading profile build/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/default.profdata: No such file or directory"} | ||
} | } | ||
Line 1,454: | Line 1,165: | ||
["err_unofficial_requires_hosted"]={ | ["err_unofficial_requires_hosted"]={ | ||
[a]="\"This header is not available in freestanding mode.\"", | [a]="\"This header is not available in freestanding mode.\"", | ||
[ | [b]=n, | ||
[ | [c]="\"This header is not available in freestanding mode\\.\"", | ||
[d]=m, | |||
[e]=Jb | |||
[ | |||
[ | |||
}, | }, | ||
["err_unparenthesized_non_primary_expr_in_requires_clause"]={ | ["err_unparenthesized_non_primary_expr_in_requires_clause"]={ | ||
[a]="parentheses are required around this expression in a requires clause", | [a]="parentheses are required around this expression in a requires clause", | ||
[ | [b]=n, | ||
[ | [c]="parentheses are required around this expression in a requires clause", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\n...","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"}, | ||
[ | [g]={{nb,281,"/// \\brief Parse a constraint-logical-and-expression.\n///\n/// \\verbatim\n/// C++2a[temp.constr.decl]p1\n/// constraint-logical-and-expression:\n/// primary-expression\n/// constraint-logical-and-expression \'&&\' primary-expression\n///\n/// \\endverbatim\nExprResult Parser::ParseConstraintLogicalAndExpression(bool IsTrailingRequiresClause) {\n // ...\n auto ParsePrimary = [&]() {\n // ...\n auto RecoverFromNonPrimary = [&](ExprResult E, bool Note) {\n // ...\n if (!E.isInvalid())\n Diag(E.get()->getExprLoc(), Note ? diag::note_unparenthesized_non_primary_expr_in_requires_clause : diag::err_unparenthesized_non_primary_expr_in_requires_clause) << FixItHint::CreateInsertion(E.get()->getBeginLoc(), \"(\") << FixItHint::CreateInsertion(PP.getLocForEndOfToken(E.get()->getEndLoc()), \")\") << E.get()->getSourceRange();"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx-concepts-requires-clause.cpp"]={"clang/test/Parser/cxx-concepts-requires-clause.cpp:90:31: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:104:31: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:108:41: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:112:43: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:125:21: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:137:21: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:141:31: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:145:33: error: parentheses are required around this expression in a requires clause"} | ["clang/test/Parser/cxx-concepts-requires-clause.cpp"]={"clang/test/Parser/cxx-concepts-requires-clause.cpp:90:31: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:104:31: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:108:41: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:112:43: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:125:21: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:137:21: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:141:31: error: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:145:33: error: parentheses are required around this expression in a requires clause"} | ||
} | } | ||
Line 1,479: | Line 1,184: | ||
["err_unqualified_pointer_member_function"]={ | ["err_unqualified_pointer_member_function"]={ | ||
[a]="must explicitly qualify name of member function when taking its address", | [a]="must explicitly qualify name of member function when taking its address", | ||
[ | [b]=n, | ||
[ | [c]="must explicitly qualify name of member function when taking its address", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"9a8dd0db89f7",1263225416,"Make Clang complain about taking the address of an unqualified member function. Fixes PR5985.\n\nllvm-...","Make Clang complain about taking the address of an unqualified member function. Fixes PR5985.\n\nllvm-svn: 93150"}, | ||
[ | [g]={{r,14970,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n // ...\n if (lval == Expr::LV_ClassTemporary || lval == Expr::LV_ArrayTemporary) {\n // ...\n } else if (isa<ObjCSelectorExpr>(op)) {\n // ...\n } else if (lval == Expr::LV_MemberFunction) {\n // ...\n // The id-expression was parenthesized.\n if (OrigOp.get() != DRE) {\n // ...\n } else if (!DRE->getQualifier()) {\n if (MD->getParent()->getName().empty())\n Diag(OpLoc, diag::err_unqualified_pointer_member_function) << op->getSourceRange();"},{r,14978,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n // ...\n if (lval == Expr::LV_ClassTemporary || lval == Expr::LV_ArrayTemporary) {\n // ...\n } else if (isa<ObjCSelectorExpr>(op)) {\n // ...\n } else if (lval == Expr::LV_MemberFunction) {\n // ...\n // The id-expression was parenthesized.\n if (OrigOp.get() != DRE) {\n // ...\n } else if (!DRE->getQualifier()) {\n if (MD->getParent()->getName().empty())\n // ...\n else {\n // ...\n Diag(OpLoc, diag::err_unqualified_pointer_member_function) << op->getSourceRange() << FixItHint::CreateInsertion(op->getSourceRange().getBegin(), Qual);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/member-pointer.cpp"]={"clang/test/SemaCXX/member-pointer.cpp:157:11: error: must explicitly qualify name of member function when taking its address"} | ["clang/test/SemaCXX/member-pointer.cpp"]={"clang/test/SemaCXX/member-pointer.cpp:157:11: error: must explicitly qualify name of member function when taking its address"} | ||
} | } | ||
Line 1,494: | Line 1,196: | ||
["err_unspecified_size_with_static"]={ | ["err_unspecified_size_with_static"]={ | ||
[a]="\'static\' may not be used without an array size", | [a]="\'static\' may not be used without an array size", | ||
[ | [b]=n, | ||
[ | [c]="\'static\' may not be used without an array size", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"f9834d5fa094",1407482478,"Parser: Array decls with static but without array size are illformed\n\nArray declarators involving th...","Parser: Array decls with static but without array size are illformed\n\nArray declarators involving the static keyword take on two forms:\n D[ static type-qualifier-listopt assignment-expression ]\n D[ type-qualifier-list static assignment-expression ]\n\nRaise a diagnostic if the assignment-expression is missing.\n\nThis fixes PR20584.\n\nllvm-svn: 215187"}, | ||
[g]={{B,7627,"/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\nvoid Parser::ParseBracketDeclarator(Declarator &D) {\n // ...\n // Handle the case where we have \'[*]\' as the array size. However, a leading\n // star could be the start of an expression, for example \'X[*p + 4]\'. Verify\n // the token after the star is a \']\'. Since stars in arrays are\n // infrequent, use of lookahead is not costly here.\n if (Tok.is(tok::star) && GetLookAheadToken(1).is(tok::r_square)) {\n // ...\n } else if (Tok.isNot(tok::r_square)) {\n // ...\n } else {\n if (StaticLoc.isValid()) {\n Diag(StaticLoc, diag::err_unspecified_size_with_static);"}}, | |||
[ | [h]={ | ||
[Mb]={"clang/test/Parser/declarators.c:10:13: error: \'static\' may not be used without an array size"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_unspecified_vla_size_with_static"]={ | ["err_unspecified_vla_size_with_static"]={ | ||
[a]="\'static\' may not be used with an unspecified variable length array size", | [a]="\'static\' may not be used with an unspecified variable length array size", | ||
[ | [b]=n, | ||
[ | [c]="\'static\' may not be used with an unspecified variable length array size", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[g]={{B,7605,"/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\nvoid Parser::ParseBracketDeclarator(Declarator &D) {\n // ...\n // Handle the case where we have \'[*]\' as the array size. However, a leading\n // star could be the start of an expression, for example \'X[*p + 4]\'. Verify\n // the token after the star is a \']\'. Since stars in arrays are\n // infrequent, use of lookahead is not costly here.\n if (Tok.is(tok::star) && GetLookAheadToken(1).is(tok::r_square)) {\n // ...\n if (StaticLoc.isValid()) {\n Diag(StaticLoc, diag::err_unspecified_vla_size_with_static);"}} | |||
[ | |||
[ | |||
}, | }, | ||
["err_unsupported_abi_for_opt"]={ | ["err_unsupported_abi_for_opt"]={ | ||
[a | [a]="\'%0\' can only be used with the \'%1\' ABI", | ||
[b]=n, | |||
[c]="\'(.*?)\' can only be used with the \'(.*?)\' ABI", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"eb63256095dd",1534929985,"[clang][mips] Set __mips_fpr correctly for -mfpxx\n\nSet __mips_fpr to 0 if o32 ABI is used with eithe...","[clang][mips] Set __mips_fpr correctly for -mfpxx\n\nSet __mips_fpr to 0 if o32 ABI is used with either -mfpxx\nor none of -mfp32, -mfpxx, -mfp64 being specified.\n\nIntroduce additional checks:\n-mfpxx is only to be used in conjunction with the o32 ABI.\nreport an error when incompatible options are provided.\n\nFormerly no errors were raised when combining n32/n64 ABIs\nwith -mfp32 and -mfpxx.\n\nThere are other cases when __mips_fpr should be set to 0\nthat are not covered, ex. using o32 on a mips64 cpu\nwhich is valid but not supported in the backend as of yet.\n\nDifferential Revision: https://reviews.llvm.org/D50557\n\nllvm-svn: 340391"}, | ||
[ | [g]={{"clang/lib/Basic/Targets/Mips.cpp",251,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // ...\n // -fpxx is valid only for the o32 ABI\n if (FPMode == FPXX && (ABI == \"n32\" || ABI == \"n64\")) {\n Diags.Report(diag::err_unsupported_abi_for_opt) << \"-mfpxx\""}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unsupported_ast_node"]={ | ["err_unsupported_ast_node"]={ | ||
[a | [a]="cannot import unsupported AST node %0", | ||
[b]=n, | |||
[c]="cannot import unsupported AST node (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"e4c83e4e2e09",1265755713,"Complain about types and declarations that we don\'t know how to import.\n\nllvm-svn: 95706","Complain about types and declarations that we don\'t know how to import.\n\nllvm-svn: 95706"}, | ||
[ | [g]={{pc,1069,"ExpectedType ASTNodeImporter::VisitType(const Type *T) {\n Importer.FromDiag(SourceLocation(), diag::err_unsupported_ast_node) << T->getTypeClassName();"},{pc,1718,"//----------------------------------------------------------------------------\n// Import Declarations\n//----------------------------------------------------------------------------\nError ASTNodeImporter::ImportDeclParts(NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC, DeclarationName &Name, NamedDecl *&ToD, SourceLocation &Loc) {\n // ...\n if (isa<RecordDecl>(D) && (FunDecl = dyn_cast<FunctionDecl>(OrigDC)) && FunDecl->hasBody()) {\n // ...\n for (const ParmVarDecl *P : FunDecl->parameters()) {\n // ...\n if (RT && RT->getDecl() == D) {\n Importer.FromDiag(D->getLocation(), diag::err_unsupported_ast_node) << D->getDeclKindName();"},{pc,2263,"ExpectedDecl ASTNodeImporter::VisitDecl(Decl *D) {\n Importer.FromDiag(D->getLocation(), diag::err_unsupported_ast_node) << D->getDeclKindName();"},{pc,2269,"ExpectedDecl ASTNodeImporter::VisitImportDecl(ImportDecl *D) {\n Importer.FromDiag(D->getLocation(), diag::err_unsupported_ast_node) << D->getDeclKindName();"},{pc,6447,"ExpectedStmt ASTNodeImporter::VisitStmt(Stmt *S) {\n Importer.FromDiag(S->getBeginLoc(), diag::err_unsupported_ast_node) << S->getStmtClassName();"},{pc,6961,"//----------------------------------------------------------------------------\n// Import Expressions\n//----------------------------------------------------------------------------\nExpectedStmt ASTNodeImporter::VisitExpr(Expr *E) {\n Importer.FromDiag(E->getBeginLoc(), diag::err_unsupported_ast_node) << E->getStmtClassName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/ASTMerge/macro/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/macro/Inputs/macro1.h:5:33: error: cannot import unsupported AST node Import","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/macro/Inputs/macro1.m:1:1: error: cannot import unsupported AST node Import"} | ["clang/test/ASTMerge/macro/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/macro/Inputs/macro1.h:5:33: error: cannot import unsupported AST node Import","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/macro/Inputs/macro1.m:1:1: error: cannot import unsupported AST node Import"} | ||
} | } | ||
}, | }, | ||
["err_unsupported_bom"]={ | ["err_unsupported_bom"]={ | ||
[a | [a]="%0 byte order mark detected in \'%1\', but encoding is not supported", | ||
[b]="fatal error\\: ", | |||
[c]="(.*?) byte order mark detected in \'(.*?)\', but encoding is not supported", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"8fbe98b3b6e4",1271787243,"enhance sourcemgr to detect various UTF BOM\'s and emit a fatal error\nabout it instead of producing t...","enhance sourcemgr to detect various UTF BOM\'s and emit a fatal error\nabout it instead of producing tons of garbage from the lexer.\n\nIt would be even better for sourcemgr to dynamically transcode (e.g.\nfrom UTF16 -> UTF8).\n\nllvm-svn: 101924"}, | ||
[ | [g]={{"clang/lib/Basic/SourceManager.cpp",181,"std::optional<llvm::MemoryBufferRef> ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, SourceLocation Loc) const {\n // ...\n if (InvalidBOM) {\n Diag.Report(Loc, diag::err_unsupported_bom) << InvalidBOM << ContentsEntry->getName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Lexer/utf-16.c"]={"clang/test/Lexer/utf-16.c:6:10: fatal error: UTF-16 (LE) byte order mark detected in \'clang/test/Lexer/utf-16.c.txt\', but encoding is not supported"} | ["clang/test/Lexer/utf-16.c"]={"clang/test/Lexer/utf-16.c:6:10: fatal error: UTF-16 (LE) byte order mark detected in \'clang/test/Lexer/utf-16.c.txt\', but encoding is not supported"} | ||
} | } | ||
}, | }, | ||
["err_unsupported_cxx_abi"]={ | ["err_unsupported_cxx_abi"]={ | ||
[a | [a]="C++ ABI \'%0\' is not supported on target triple \'%1\'", | ||
[b]=n, | |||
[c]="C\\+\\+ ABI \'(.*?)\' is not supported on target triple \'(.*?)\'", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.\n\nThis is sup...","[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.\n\nThis is support for the user-facing options to create importable header units\nfrom headers in the user or system search paths (or to be given an absolute path).\n\nThis means that an incomplete header path will be passed by the driver and the\nlookup carried out using the search paths present when the front end is run.\n\nTo support this, we introduce file fypes for c++-{user,system,header-unit}-header.\nThese terms are the same as the ones used by GCC, to minimise the differences for\ntooling (and users).\n\nThe preprocessor checks for headers before issuing a warning for\n\"#pragma once\" in a header build. We ensure that the importable header units\nare recognised as headers in order to avoid such warnings.\n\nDifferential Revision: https://reviews.llvm.org/D121096"}, | ||
[ | [g]={{"clang/lib/Frontend/CompilerInvocation.cpp",4026,"#include \"clang/Driver/Options.inc\"\n // ...\n if (!CXXABI.empty()) {\n if (!TargetCXXABI::isABI(CXXABI)) {\n // ...\n } else {\n // ...\n if (!TargetCXXABI::isSupportedCXXABI(T, Kind))\n Diags.Report(diag::err_unsupported_cxx_abi) << CXXABI << T.str();"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unsupported_module_partition"]={ | ["err_unsupported_module_partition"]={ | ||
[a]="module partitions are only supported for C++20 onwards", | [a]="module partitions are only supported for C++20 onwards", | ||
[ | [b]=n, | ||
[ | [c]="module partitions are only supported for C\\+\\+20 onwards", | ||
[d]=m, | |||
[e]=Qc, | |||
[f]={"d652bdd05f1c",1555229219,"[c++20] Parsing support for module-declarations, import-declarations,\nand the global and private mod...","[c++20] Parsing support for module-declarations, import-declarations,\nand the global and private module fragment.\n\nFor now, the private module fragment introducer is ignored, but use of\nthe global module fragment introducer should be properly enforced.\n\nllvm-svn: 358353"}, | |||
[ | [g]={{ub,2454,"/// Parse a declaration beginning with the \'module\' keyword or C++20\n/// context-sensitive keyword (optionally preceded by \'export\').\n///\n/// module-declaration: [C++20]\n/// \'export\'[opt] \'module\' module-name attribute-specifier-seq[opt] \';\'\n///\n/// global-module-fragment: [C++2a]\n/// \'module\' \';\' top-level-declaration-seq[opt]\n/// module-declaration: [C++2a]\n/// \'export\'[opt] \'module\' module-name module-partition[opt]\n/// attribute-specifier-seq[opt] \';\'\n/// private-module-fragment: [C++2a]\n/// \'module\' \':\' \'private\' \';\' top-level-declaration-seq[opt]\nParser::DeclGroupPtrTy Parser::ParseModuleDecl(Sema::ModuleImportState &ImportState) {\n // ...\n if (Tok.is(tok::colon)) {\n // ...\n if (!getLangOpts().CPlusPlusModules)\n Diag(ColonLoc, diag::err_unsupported_module_partition) << SourceRange(ColonLoc, Partition.back().second);"},{ub,2519,"/// Parse a module import declaration. This is essentially the same for\n/// Objective-C and C++20 except for the leading \'@\' (in ObjC) and the\n/// trailing optional attributes (in C++).\n///\n/// [ObjC] @import declaration:\n/// \'@\' \'import\' module-name \';\'\n/// [ModTS] module-import-declaration:\n/// \'import\' module-name attribute-specifier-seq[opt] \';\'\n/// [C++20] module-import-declaration:\n/// \'export\'[opt] \'import\' module-name\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' module-partition\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' header-name\n/// attribute-specifier-seq[opt] \';\'\nDecl *Parser::ParseModuleImport(SourceLocation AtLoc, Sema::ModuleImportState &ImportState) {\n // ...\n if (Tok.is(tok::header_name)) {\n // ...\n } else if (Tok.is(tok::annot_header_unit)) {\n // ...\n } else if (Tok.is(tok::colon)) {\n // ...\n if (!getLangOpts().CPlusPlusModules)\n Diag(ColonLoc, diag::err_unsupported_module_partition) << SourceRange(ColonLoc, Path.back().second);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unsupported_placeholder_constraint"]={ | ["err_unsupported_placeholder_constraint"]={ | ||
[a]="constrained placeholder types other than simple \'auto\' on non-type template parameters not supported yet", | [a]="constrained placeholder types other than simple \'auto\' on non-type template parameters not supported yet", | ||
[ | [b]=n, | ||
[ | [c]="constrained placeholder types other than simple \'auto\' on non\\-type template parameters not supported yet", | ||
[d]=m, | |||
[e]=k, | |||
[f]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of ...","Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of the minimal required size for a buffer\nbased on the format string, and couple that with the fortified version to emit a\nwarning when the buffer size is lower than the lower bound computed from the\nformat string.\n\nDifferential Revision: https://reviews.llvm.org/D71566"}, | |||
[ | [g]={{z,1274,"bool Sema::AttachTypeConstraint(AutoTypeLoc TL, NonTypeTemplateParmDecl *NewConstrainedParm, NonTypeTemplateParmDecl *OrigConstrainedParm, SourceLocation EllipsisLoc) {\n if (NewConstrainedParm->getType() != TL.getType() || TL.getAutoKeyword() != AutoTypeKeyword::Auto) {\n Diag(NewConstrainedParm->getTypeSourceInfo()->getTypeLoc().getBeginLoc(), diag::err_unsupported_placeholder_constraint) << NewConstrainedParm->getTypeSourceInfo()->getTypeLoc().getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/temp/temp.param/p10-2a.cpp"]={"clang/test/CXX/temp/temp.param/p10-2a.cpp:138:10: error: constrained placeholder types other than simple \'auto\' on non-type template parameters not supported yet"} | ["clang/test/CXX/temp/temp.param/p10-2a.cpp"]={"clang/test/CXX/temp/temp.param/p10-2a.cpp:138:10: error: constrained placeholder types other than simple \'auto\' on non-type template parameters not supported yet"} | ||
} | } | ||
Line 1,602: | Line 1,280: | ||
["err_unsupported_string_concat"]={ | ["err_unsupported_string_concat"]={ | ||
[a]="unsupported non-standard concatenation of string literals", | [a]="unsupported non-standard concatenation of string literals", | ||
[ | [b]=n, | ||
[ | [c]="unsupported non\\-standard concatenation of string literals", | ||
[d]=m, | |||
[e]=u, | |||
[f]={"fb65e592e05a",1311745230,"Add support for C++0x unicode string and character literals, from Craig Topper!\n\nllvm-svn: 136210","Add support for C++0x unicode string and character literals, from Craig Topper!\n\nllvm-svn: 136210"}, | |||
[ | [g]={{X,1964,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n // ...\n /// (C99 5.1.1.2p1). The common case is only one string fragment.\n for (const Token &Tok : StringToks) {\n // ...\n // Remember if we see any wide or utf-8/16/32 strings.\n // Also check for illegal concatenations.\n if (isUnevaluated() && Tok.getKind() != tok::string_literal) {\n // ...\n } else if (Tok.isNot(Kind) && Tok.isNot(tok::string_literal)) {\n if (isOrdinary()) {\n // ...\n } else {\n if (Diags)\n Diags->Report(Tok.getLocation(), diag::err_unsupported_string_concat);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Lexer/string_concat.cpp"]={"clang/test/Lexer/string_concat.cpp:12:27: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:13:27: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:14:27: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:21:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:22:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:23:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:30:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:31:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:32:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:39:29: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:40:29: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:41:29: error: unsupported non-standard concatenation of string literals"} | ["clang/test/Lexer/string_concat.cpp"]={"clang/test/Lexer/string_concat.cpp:12:27: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:13:27: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:14:27: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:21:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:22:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:23:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:30:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:31:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:32:30: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:39:29: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:40:29: error: unsupported non-standard concatenation of string literals","clang/test/Lexer/string_concat.cpp:41:29: error: unsupported non-standard concatenation of string literals"} | ||
} | } | ||
Line 1,617: | Line 1,292: | ||
["err_unsupported_unknown_any_call"]={ | ["err_unsupported_unknown_any_call"]={ | ||
[a]="call to unsupported expression with unknown type", | [a]="call to unsupported expression with unknown type", | ||
[ | [b]=n, | ||
[ | [c]="call to unsupported expression with unknown type", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2979fe01da2c",1302568968,"After some discussion with Doug, we decided that it made a lot more sense\nfor __unknown_anytype reso...","After some discussion with Doug, we decided that it made a lot more sense\nfor __unknown_anytype resolution to destructively modify the AST. So that\'s\nwhat it does now, which significantly simplifies some of the implementation.\nNormal member calls work pretty cleanly now, and I added support for\npropagating unknown-ness through &.\n\nllvm-svn: 129331"}, | ||
[ | [g]={{r,21094,"/// A visitor for rebuilding a call to an __unknown_any expression\n/// to have an appropriate type.\nstruct RebuildUnknownAnyFunction : StmtVisitor<RebuildUnknownAnyFunction, ExprResult> {\n // ...\n ExprResult VisitExpr(Expr *E) {\n S.Diag(E->getExprLoc(), diag::err_unsupported_unknown_any_call) << E->getSourceRange();"}}, | ||
[h]={ | |||
[bc]={"clang/test/SemaCXX/unknown-anytype.cpp:33:5: error: call to unsupported expression with unknown type"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_unsupported_unknown_any_decl"]={ | ["err_unsupported_unknown_any_decl"]={ | ||
[a | [a]="%0 has unknown type, which is not supported for this kind of declaration", | ||
[b]=n, | |||
[c]="(.*?) has unknown type, which is not supported for this kind of declaration", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2d2e870745c2",1302505370,Hb,Hb}, | ||
[ | [g]={{r,21421,"ExprResult RebuildUnknownAnyExpr::resolveDecl(Expr *E, ValueDecl *VD) {\n // ...\n // - functions\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(VD)) {\n // ...\n } else if (isa<VarDecl>(VD)) {\n // ...\n } else {\n S.Diag(E->getExprLoc(), diag::err_unsupported_unknown_any_decl) << VD << E->getSourceRange();"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unsupported_unknown_any_expr"]={ | ["err_unsupported_unknown_any_expr"]={ | ||
[a]="unsupported expression with unknown type", | [a]="unsupported expression with unknown type", | ||
[ | [b]=n, | ||
[ | [c]="unsupported expression with unknown type", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"2d2e870745c2",1302505370,Hb,Hb}, | ||
[g]={{r,21126,"/// A visitor for rebuilding an expression of type __unknown_anytype\n/// into one which resolves the type directly on the referring\n/// expression. Strict preservation of the original source\n/// structure is not a goal.\nstruct RebuildUnknownAnyExpr : StmtVisitor<RebuildUnknownAnyExpr, ExprResult> {\n // ...\n ExprResult VisitExpr(Expr *E) {\n S.Diag(E->getExprLoc(), diag::err_unsupported_unknown_any_expr) << E->getSourceRange();"},{r,21537,"static ExprResult diagnoseUnknownAnyExpr(Sema &S, Expr *E) {\n // ...\n if (DeclRefExpr *ref = dyn_cast<DeclRefExpr>(E)) {\n // ...\n } else if (MemberExpr *mem = dyn_cast<MemberExpr>(E)) {\n // ...\n } else if (ObjCMessageExpr *msg = dyn_cast<ObjCMessageExpr>(E)) {\n // ...\n } else {\n S.Diag(E->getExprLoc(), diag::err_unsupported_unknown_any_expr) << E->getSourceRange();"}} | |||
[ | |||
[ | |||
}, | }, | ||
["err_unterm_macro_invoc"]={ | ["err_unterm_macro_invoc"]={ | ||
[a]="unterminated function-like macro invocation", | [a]="unterminated function-like macro invocation", | ||
[ | [b]=n, | ||
[ | [c]="unterminated function\\-like macro invocation", | ||
[d]=m, | |||
[e]=u, | |||
[f]={w,1236199783,v,x}, | |||
[ | [g]={{"clang/lib/Lex/PPMacroExpansion.cpp",815,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n // ...\n while (Tok.isNot(tok::r_paren)) {\n // ...\n while (true) {\n // ...\n if (Tok.isOneOf(tok::eof, tok::eod)) { // \"#if f(<eof>\" & \"#if f(\\n\"\n if (!ContainsCodeCompletionTok) {\n Diag(MacroName, diag::err_unterm_macro_invoc);"},{"clang/lib/Lex/PPMacroExpansion.cpp",1322,"/// Process single-argument builtin feature-like macros that return\n/// integer values.\nstatic void EvaluateFeatureLikeBuiltinMacro(llvm::raw_svector_ostream &OS, Token &Tok, IdentifierInfo *II, Preprocessor &PP, bool ExpandArgs, llvm::function_ref<int(Token &Tok, bool &HasLexedNextTok)> Op) {\n // ...\n already_lexed:\n // ...\n case tok::eof:\n case tok::eod:\n // ...\n PP.Diag(Tok.getLocation(), diag::err_unterm_macro_invoc);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/invalid-__has_warning1.c"]={"clang/test/Preprocessor/invalid-__has_warning1.c:5:23: error: unterminated function-like macro invocation"} | ["clang/test/Preprocessor/invalid-__has_warning1.c"]={"clang/test/Preprocessor/invalid-__has_warning1.c:5:23: error: unterminated function-like macro invocation"} | ||
} | } | ||
Line 1,671: | Line 1,334: | ||
["err_unterminated___pragma"]={ | ["err_unterminated___pragma"]={ | ||
[a]="missing terminating \')\' character", | [a]="missing terminating \')\' character", | ||
[ | [b]=n, | ||
[ | [c]="missing terminating \'\\)\' character", | ||
[d]=m, | |||
[e]=u, | |||
[f]={"49039d4afb3f",1283044194,"Complain if a __pragma isn\'t terminated.\n\nllvm-svn: 112392","Complain if a __pragma isn\'t terminated.\n\nllvm-svn: 112392"}, | |||
[ | [g]={{jb,388,"/// HandleMicrosoft__pragma - Like Handle_Pragma except the pragma text\n/// is not enclosed within a string literal.\nvoid Preprocessor::HandleMicrosoft__pragma(Token &Tok) {\n // ...\n if (Tok.is(tok::eof)) {\n Diag(PragmaLoc, diag::err_unterminated___pragma);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unterminated_block_comment"]={ | ["err_unterminated_block_comment"]={ | ||
[a]="unterminated /* comment", | [a]="unterminated /* comment", | ||
[ | [b]=n, | ||
[ | [c]="unterminated \\/\\* comment", | ||
[d]=m, | |||
[e]=u, | |||
[f]={w,1236199783,v,x}, | |||
[ | [g]={{T,2735,"/// We have just read from input the / and * characters that started a comment.\n/// Read until we find the * and / characters that terminate the comment.\n/// Note that we don\'t bother decoding trigraphs or escaped newlines in block\n/// comments, because they cannot cause the comment to end. The only thing\n/// that can happen is the comment could end with an escaped newline between\n/// the terminating * and /.\n///\n/// If we\'re in KeepCommentMode or any CommentHandler has inserted\n/// some tokens, this will store the first token and return true.\nbool Lexer::SkipBlockComment(Token &Result, const char *CurPtr, bool &TokAtPhysicalStartOfLine) {\n // ...\n if (C == 0 && CurPtr == BufferEnd + 1) {\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::err_unterminated_block_comment);"},{T,2881,"#endif\n // ...\n FoundSlash:\n // ...\n } else if (C == 0 && CurPtr == BufferEnd + 1) {\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::err_unterminated_block_comment);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_unterminated_raw_string"]={ | ["err_unterminated_raw_string"]={ | ||
[a | [a]="raw string missing terminating delimiter )%0\"", | ||
[b]=n, | |||
[c]="raw string missing terminating delimiter \\)(.*?)\"", | |||
[d]=m, | |||
[ | [e]=u, | ||
[ | [f]={"54edccafc5e3",1313035575,"Add support for C++0x raw string literals.\n\nllvm-svn: 137298","Add support for C++0x raw string literals.\n\nllvm-svn: 137298"}, | ||
[ | [g]={{T,2198,"/// LexRawStringLiteral - Lex the remainder of a raw string literal, after\n/// having lexed R\", LR\", u8R\", uR\", or UR\".\nbool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n // ...\n while (true) {\n // ...\n if (C == \')\') {\n // ...\n } else if (C == 0 && CurPtr - 1 == BufferEnd) { // End of file.\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::err_unterminated_raw_string) << StringRef(Prefix, PrefixLen);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_upcast_to_inaccessible_base"]={ | ["err_upcast_to_inaccessible_base"]={ | ||
[a | [a]="cannot cast %0 to its %select{private|protected}2 base class %1", | ||
[b]=n, | |||
[c]="cannot cast (.*?) to its (?:private|protected) base class (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"5b0829a321d5",1265794272,"Improve access control diagnostics. Perform access control on member-pointer\nconversions. Fix an a...","Improve access control diagnostics. Perform access control on member-pointer\nconversions. Fix an access-control bug where privileges were not considered\nat intermediate points along the inheritance path. Prepare for friends.\n\nllvm-svn: 95775"}, | ||
[ | [g]={{wb,1833,"/// TryStaticMemberPointerUpcast - Tests whether a conversion according to\n/// C++ 5.2.9p9 is valid:\n///\n/// An rvalue of type \"pointer to member of D of type cv1 T\" can be\n/// converted to an rvalue of type \"pointer to member of B of type cv2 T\",\n/// where B is a base class of D [...].\n///\nTryCastResult TryStaticMemberPointerUpcast(Sema &Self, ExprResult &SrcExpr, QualType SrcType, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath) {\n // ...\n if (!CStyle) {\n switch (Self.CheckBaseClassAccess(OpRange.getBegin(), DestClass, SrcClass, Paths.front(), diag::err_upcast_to_inaccessible_base)) {"},{t,3166,"bool Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath, bool IgnoreAccess) { return CheckDerivedToBaseConversion(Derived, Base, diag::err_upcast_to_inaccessible_base, diag::err_ambiguous_derived_to_base_conv, Loc, Range, DeclarationName(), BasePath, IgnoreAccess); }"},{Db,3146,"/// CheckPointerConversion - Check the pointer conversion from the\n/// expression From to the type ToType. This routine checks for\n/// ambiguous or inaccessible derived-to-base pointer\n/// conversions for which IsPointerConversion has already returned\n/// true. It returns true and produces a diagnostic if there was an\n/// error, or returns false otherwise.\nbool Sema::CheckPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose) {\n // ...\n if (const PointerType *ToPtrType = ToType->getAs<PointerType>()) {\n if (const PointerType *FromPtrType = FromType->getAs<PointerType>()) {\n // ...\n if (FromPointeeType->isRecordType() && ToPointeeType->isRecordType() && !Context.hasSameUnqualifiedType(FromPointeeType, ToPointeeType)) {\n // ...\n if (Diagnose) {\n InaccessibleID = diag::err_upcast_to_inaccessible_base;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/access-member-pointer.cpp"]={"clang/test/SemaCXX/access-member-pointer.cpp:10:9: error: cannot cast \'B\' to its private base class \'A\'"} | ["clang/test/SemaCXX/access-member-pointer.cpp"]={"clang/test/SemaCXX/access-member-pointer.cpp:10:9: error: cannot cast \'B\' to its private base class \'A\'"} | ||
} | } | ||
}, | }, | ||
["err_use_continuation_class"]={ | ["err_use_continuation_class"]={ | ||
[a | [a]="illegal redeclaration of property in class extension %0 (attribute must be \'readwrite\', while its primary must be \'readonly\')", | ||
[b]=n, | |||
[c]="illegal redeclaration of property in class extension (.*?) \\(attribute must be \'readwrite\', while its primary must be \'readonly\'\\)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{Hc,464,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // A readonly property declared in the primary class can be refined\n // by adding a readwrite property within an extension.\n // Anything else is an error.\n if (!(PIDecl->isReadOnly() && isReadWrite)) {\n // ...\n unsigned diag = (Attributes & ObjCPropertyAttribute::kind_readwrite) && (PIDecl->getPropertyAttributesAsWritten() & ObjCPropertyAttribute::kind_readwrite) ? diag::err_use_continuation_class_redeclaration_readwrite : diag::err_use_continuation_class;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/continuation-class-err.m"]={"clang/test/SemaObjC/continuation-class-err.m:15:1: error: illegal redeclaration of property in class extension \'ReadOnly\' (attribute must be \'readwrite\', while its primary must be \'readonly\')","clang/test/SemaObjC/continuation-class-err.m:34:1: error: illegal redeclaration of property in class extension \'Bar\' (attribute must be \'readwrite\', while its primary must be \'readonly\')","clang/test/SemaObjC/continuation-class-err.m:35:1: error: illegal redeclaration of property in class extension \'Bar\' (attribute must be \'readwrite\', while its primary must be \'readonly\')"} | ["clang/test/SemaObjC/continuation-class-err.m"]={"clang/test/SemaObjC/continuation-class-err.m:15:1: error: illegal redeclaration of property in class extension \'ReadOnly\' (attribute must be \'readwrite\', while its primary must be \'readonly\')","clang/test/SemaObjC/continuation-class-err.m:34:1: error: illegal redeclaration of property in class extension \'Bar\' (attribute must be \'readwrite\', while its primary must be \'readonly\')","clang/test/SemaObjC/continuation-class-err.m:35:1: error: illegal redeclaration of property in class extension \'Bar\' (attribute must be \'readwrite\', while its primary must be \'readonly\')"} | ||
} | } | ||
}, | }, | ||
["err_use_continuation_class_redeclaration_readwrite"]={ | ["err_use_continuation_class_redeclaration_readwrite"]={ | ||
[a | [a]="illegal redeclaration of \'readwrite\' property in class extension %0 (perhaps you intended this to be a \'readwrite\' redeclaration of a \'readonly\' public property?)", | ||
[b]=n, | |||
[c]="illegal redeclaration of \'readwrite\' property in class extension (.*?) \\(perhaps you intended this to be a \'readwrite\' redeclaration of a \'readonly\' public property\\?\\)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"5ef9ad9907a7",1287686982,"Tweak diagnostics for redeclaration of a @property in a class extension where the redelcaration and ...","Tweak diagnostics for redeclaration of a @property in a class extension where the redelcaration and original\ndeclaration have the \'readwrite\' attribute. This is a common case, and we can issue a more lucid diagnostic.\n\nFixes <rdar://problem/7629420>.\n\nllvm-svn: 117045"}, | ||
[ | [g]={{Hc,463,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // A readonly property declared in the primary class can be refined\n // by adding a readwrite property within an extension.\n // Anything else is an error.\n if (!(PIDecl->isReadOnly() && isReadWrite)) {\n // ...\n unsigned diag = (Attributes & ObjCPropertyAttribute::kind_readwrite) && (PIDecl->getPropertyAttributesAsWritten() & ObjCPropertyAttribute::kind_readwrite) ? diag::err_use_continuation_class_redeclaration_readwrite : diag::err_use_continuation_class;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/duplicate-property-class-extension.m"]={"clang/test/SemaObjC/duplicate-property-class-extension.m:12:1: error: illegal redeclaration of \'readwrite\' property in class extension \'Foo\' (perhaps you intended this to be a \'readwrite\' redeclaration of a \'readonly\' public property?)"} | ["clang/test/SemaObjC/duplicate-property-class-extension.m"]={"clang/test/SemaObjC/duplicate-property-class-extension.m:12:1: error: illegal redeclaration of \'readwrite\' property in class extension \'Foo\' (perhaps you intended this to be a \'readwrite\' redeclaration of a \'readonly\' public property?)"} | ||
} | } | ||
}, | }, | ||
["err_use_of_default_argument_to_function_declared_later"]={ | ["err_use_of_default_argument_to_function_declared_later"]={ | ||
[a | [a]="use of default argument to function %0 that is declared later in class %1", | ||
[b]=n, | |||
[c]="use of default argument to function (.*?) that is declared later in class (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"84613c4eba08",1244825500,"It\'s an error to use a function declared in a class definition as a default argument before the func...","It\'s an error to use a function declared in a class definition as a default argument before the function has been declared.\n\nllvm-svn: 73234"}, | ||
[ | [g]={{r,6035,"bool Sema::CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *RewrittenInit, bool SkipImmediateInvocations) {\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n Diag(CallLoc, diag::err_use_of_default_argument_to_function_declared_later) << FD << cast<CXXRecordDecl>(FD->getDeclContext());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/default2.cpp"]={"clang/test/SemaCXX/default2.cpp:117:23: error: use of default argument to function \'f\' that is declared later in class \'C2\'","clang/test/SemaCXX/default2.cpp:123:23: error: use of default argument to function \'f\' that is declared later in class \'C3<int>\'"} | ["clang/test/SemaCXX/default2.cpp"]={"clang/test/SemaCXX/default2.cpp:117:23: error: use of default argument to function \'f\' that is declared later in class \'C2\'","clang/test/SemaCXX/default2.cpp:123:23: error: use of default argument to function \'f\' that is declared later in class \'C3<int>\'"} | ||
} | } | ||
Line 1,767: | Line 1,409: | ||
["err_use_of_empty_using_if_exists"]={ | ["err_use_of_empty_using_if_exists"]={ | ||
[a]="reference to unresolved using declaration", | [a]="reference to unresolved using declaration", | ||
[ | [b]=n, | ||
[ | [c]="reference to unresolved using declaration", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={lc,1615397021,kc,jc}, | ||
[ | [g]={{r,366,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // ...\n if (const auto *EmptyD = dyn_cast<UnresolvedUsingIfExistsDecl>(D)) {\n Diag(Loc, diag::err_use_of_empty_using_if_exists);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/using-if-exists.cpp"]={"clang/test/SemaCXX/using-if-exists.cpp:9:1: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:34:9: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:39:1: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:73:9: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:75:13: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:78:17: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:81:17: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:96:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:109:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:138:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:138:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:138:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:169:6: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:178:11: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:222:15: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:223:8: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:92:5: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:93:5: error: reference to unresolved using declaration"} | ["clang/test/SemaCXX/using-if-exists.cpp"]={"clang/test/SemaCXX/using-if-exists.cpp:9:1: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:34:9: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:39:1: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:73:9: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:75:13: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:78:17: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:81:17: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:96:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:109:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:138:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:138:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:138:3: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:169:6: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:178:11: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:222:15: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:223:8: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:92:5: error: reference to unresolved using declaration","clang/test/SemaCXX/using-if-exists.cpp:93:5: error: reference to unresolved using declaration"} | ||
} | } | ||
}, | }, | ||
["err_use_of_tag_name_without_tag"]={ | ["err_use_of_tag_name_without_tag"]={ | ||
[a | [a]="must use \'%1\' tag to refer to type %0%select{| in this scope}2", | ||
[b]=n, | |||
[c]="must use \'(.*?)\' tag to refer to type (.*?)(?:| in this scope)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"ffaa0e6919b0",1239572970,"Diagnose invalid uses of tagged types with a missing tag. For example, in:\n\nstruct xyz { int y; };\n...","Diagnose invalid uses of tagged types with a missing tag. For example, in:\n\nstruct xyz { int y; };\nenum abc { ZZZ };\n\nstatic xyz b;\nabc c;\n\nwe used to produce:\n\nt2.c:4:8: error: unknown type name \'xyz\'\nstatic xyz b;\n ^\nt2.c:5:1: error: unknown type name \'abc\'\nabc c;\n^\n\nwe now produce:\n\nt2.c:4:8: error: use of tagged type \'xyz\' without \'struct\' tag\nstatic xyz b;\n ^\n struct\nt2.c:5:1: error: use of tagged type \'abc\' without \'enum\' tag\nabc c;\n^\nenum\n\nGCC produces the normal:\nt2.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘b’\nt2.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’\n\nrdar://6783347\n\nllvm-svn: 68914"}, | ||
[ | [g]={{B,2823,"/// ParseImplicitInt - This method is called when we have an non-typename\n/// identifier in a declspec (which normally terminates the decl spec) when\n/// the declspec has no type specifier. In this case, the declspec is either\n/// malformed or is \"implicit int\" (in K&R and C89).\n///\n/// This method handles diagnosing this prettily and returns false if the\n/// declspec is done being processed. If it recovers and thinks there may be\n/// other pieces of declspec after it, it returns true.\n///\nbool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC, ParsedAttributes &Attrs) {\n // ...\n // Otherwise, if we don\'t consume this token, we are going to emit an\n // error anyway. Try to recover from various common problems. Check\n // to see if this was a reference to a tag name without a tag specified.\n // This is a common problem in C (saying \'foo\' instead of \'struct foo\').\n //\n // C++ doesn\'t need this, and isTagName doesn\'t take SS.\n if (SS == nullptr) {\n // ...\n if (TagName) {\n // ...\n Diag(Loc, diag::err_use_of_tag_name_without_tag) << TokenName << TagName << getLangOpts().CPlusPlus << FixItHint::CreateInsertion(Tok.getLocation(), FixitTagName);"},{p,883,"static bool isTagTypeWithMissingTag(Sema &SemaRef, LookupResult &Result, Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc) {\n // ...\n if (TagDecl *Tag = R.getAsSingle<TagDecl>()) {\n // ...\n SemaRef.Diag(NameLoc, diag::err_use_of_tag_name_without_tag) << Name << TagName << SemaRef.getLangOpts().CPlusPlus << FixItHint::CreateInsertion(NameLoc, FixItTagName);"}}, | ||
[ | [h]={ | ||
[ | [Mb]={"clang/test/Parser/declarators.c:54:1: error: must use \'struct\' tag to refer to type \'xyz\'","clang/test/Parser/declarators.c:55:1: error: must use \'enum\' tag to refer to type \'myenum\'"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_use_of_unaddressable_function"]={ | ["err_use_of_unaddressable_function"]={ | ||
[a]="taking address of non-addressable standard library function", | [a]="taking address of non-addressable standard library function", | ||
[ | [b]=n, | ||
[ | [c]="taking address of non\\-addressable standard library function", | ||
[d]=m, | |||
[e]=k, | |||
[f]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/cla...","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"}, | |||
[ | [g]={{r,21597,"/// Check for operands with placeholder types and complain if found.\n/// Returns ExprError() if there was an error and no recovery was possible.\nExprResult Sema::CheckPlaceholderExpr(Expr *E) {\n // ...\n case BuiltinType::BuiltinFn: {\n // ...\n if (DRE) {\n // ...\n if (Context.BuiltinInfo.isInStdNamespace(BuiltinID)) {\n // ...\n Diag(E->getBeginLoc(), getLangOpts().CPlusPlus20 ? diag::err_use_of_unaddressable_function : diag::warn_cxx20_compat_use_of_unaddressable_function);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/builtin-std-move.cpp"]={"clang/test/SemaCXX/builtin-std-move.cpp:119:20: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:120:31: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:121:24: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:122:28: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:123:29: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:124:25: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:125:35: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:129:20: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:130:23: error: taking address of non-addressable standard library function"} | ["clang/test/SemaCXX/builtin-std-move.cpp"]={"clang/test/SemaCXX/builtin-std-move.cpp:119:20: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:120:31: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:121:24: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:122:28: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:123:29: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:124:25: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:125:35: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:129:20: error: taking address of non-addressable standard library function","clang/test/SemaCXX/builtin-std-move.cpp:130:23: error: taking address of non-addressable standard library function"} | ||
} | } | ||
}, | }, | ||
["err_use_with_wrong_tag"]={ | ["err_use_with_wrong_tag"]={ | ||
[a | [a]="use of %0 with tag type that does not match previous declaration", | ||
[b]=n, | |||
[c]="use of (.*?) with tag type that does not match previous declaration", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{p,17241,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\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 // Make sure that this wasn\'t declared as an enum and now used as a\n // struct or something similar.\n if (!isAcceptableTagRedeclaration(PrevTagDecl, Kind, TUK == TUK_Definition, KWLoc, Name)) {\n // ...\n if (SafeToContinue)\n Diag(KWLoc, diag::err_use_with_wrong_tag) << Name << FixItHint::CreateReplacement(SourceRange(KWLoc), PrevTagDecl->getKindName());"},{p,17246,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\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 // Make sure that this wasn\'t declared as an enum and now used as a\n // struct or something similar.\n if (!isAcceptableTagRedeclaration(PrevTagDecl, Kind, TUK == TUK_Definition, KWLoc, Name)) {\n // ...\n if (SafeToContinue)\n // ...\n else\n Diag(KWLoc, diag::err_use_with_wrong_tag) << Name;"},{z,2006,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n // ...\n if (PrevClassTemplate) {\n // ...\n if (!isAcceptableTagRedeclaration(PrevRecordDecl, Kind, TUK == TUK_Definition, KWLoc, Name)) {\n Diag(KWLoc, diag::err_use_with_wrong_tag) << Name << FixItHint::CreateReplacement(KWLoc, PrevRecordDecl->getKindName());"},{z,4302,"TypeResult Sema::ActOnTagTemplateIdType(TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) {\n // ...\n // Check the tag kind\n if (const RecordType *RT = Result->getAs<RecordType>()) {\n // ...\n if (!isAcceptableTagRedeclaration(D, TagKind, TUK == TUK_Definition, TagLoc, Id)) {\n Diag(TagLoc, diag::err_use_with_wrong_tag) << Result << FixItHint::CreateReplacement(SourceRange(TagLoc), D->getKindName());"},{z,8714,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n // ...\n if (!isAcceptableTagRedeclaration(ClassTemplate->getTemplatedDecl(), Kind, TUK == TUK_Definition, KWLoc, ClassTemplate->getIdentifier())) {\n Diag(KWLoc, diag::err_use_with_wrong_tag) << ClassTemplate << FixItHint::CreateReplacement(KWLoc, ClassTemplate->getTemplatedDecl()->getKindName());"},{z,9971,"// Explicit instantiation of a class template specialization\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy TemplateD, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, const ParsedAttributesView &Attr) {\n // ...\n if (!isAcceptableTagRedeclaration(ClassTemplate->getTemplatedDecl(), Kind, /*isDefinition*/ false, KWLoc, ClassTemplate->getIdentifier())) {\n Diag(KWLoc, diag::err_use_with_wrong_tag) << ClassTemplate << FixItHint::CreateReplacement(KWLoc, ClassTemplate->getTemplatedDecl()->getKindName());"},{"clang/lib/Sema/SemaTemplateInstantiate.cpp",1683,"QualType TemplateInstantiator::RebuildElaboratedType(SourceLocation KeywordLoc, ElaboratedTypeKeyword Keyword, NestedNameSpecifierLoc QualifierLoc, QualType T) {\n if (const TagType *TT = T->getAs<TagType>()) {\n // ...\n // TODO: should we even warn on struct/class mismatches for this? Seems\n // like it\'s likely to produce a lot of spurious errors.\n if (Id && Keyword != ETK_None && Keyword != ETK_Typename) {\n // ...\n if (!SemaRef.isAcceptableTagRedeclaration(TD, Kind, /*isDefinition*/ false, TagLocation, Id)) {\n SemaRef.Diag(TagLocation, diag::err_use_with_wrong_tag) << Id << FixItHint::CreateReplacement(SourceRange(TagLocation), TD->getKindName());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp:18:1: error: use of \'Ident<int>\' with tag type that does not match previous declaration"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp:18:1: error: use of \'Ident<int>\' with tag type that does not match previous declaration"} | ||
} | } | ||
Line 1,827: | Line 1,457: | ||
["err_using_attribute_ns_conflict"]={ | ["err_using_attribute_ns_conflict"]={ | ||
[a]="attribute with scope specifier cannot follow default scope specifier", | [a]="attribute with scope specifier cannot follow default scope specifier", | ||
[ | [b]=n, | ||
[ | [c]="attribute with scope specifier cannot follow default scope specifier", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"b7d7a046d8e0",1466770512,"Using for attributes voted into C++17.\n\nllvm-svn: 273666","Using for attributes voted into C++17.\n\nllvm-svn: 273666"}, | ||
[g]={{F,4594,"/// Parse a C++11 or C2x attribute-specifier.\n///\n/// [C++11] attribute-specifier:\n/// \'[\' \'[\' attribute-list \']\' \']\'\n/// alignment-specifier\n///\n/// [C++11] attribute-list:\n/// attribute[opt]\n/// attribute-list \',\' attribute[opt]\n/// attribute \'...\'\n/// attribute-list \',\' attribute \'...\'\n///\n/// [C++11] attribute:\n/// attribute-token attribute-argument-clause[opt]\n///\n/// [C++11] attribute-token:\n/// identifier\n/// attribute-scoped-token\n///\n/// [C++11] attribute-scoped-token:\n/// attribute-namespace \'::\' identifier\n///\n/// [C++11] attribute-namespace:\n/// identifier\nvoid Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, CachedTokens &OpenMPTokens, SourceLocation *EndLoc) {\n // ...\n while (!Tok.isOneOf(tok::r_square, tok::semi, tok::eof)) {\n // ...\n if (CommonScopeName) {\n if (ScopeName) {\n Diag(ScopeLoc, diag::err_using_attribute_ns_conflict) << SourceRange(CommonScopeLoc);"}}, | |||
[ | [h]={ | ||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:13:15: error: attribute with scope specifier cannot follow default scope specifier"} | ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:13:15: error: attribute with scope specifier cannot follow default scope specifier"} | ||
} | } | ||
Line 1,842: | Line 1,469: | ||
["err_using_decl_can_not_refer_to_class_member"]={ | ["err_using_decl_can_not_refer_to_class_member"]={ | ||
[a]="using declaration cannot refer to class member", | [a]="using declaration cannot refer to class member", | ||
[ | [b]=n, | ||
[ | [c]="using declaration cannot refer to class member", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"5a9c5acf0f49",1251430518,"More work on using declarations.\n\nllvm-svn: 80333","More work on using declarations.\n\nllvm-svn: 80333"}, | ||
[ | [g]={{t,13057,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n if (!CurContext->isRecord()) {\n // ...\n Diag(NameLoc, Cxx20Enumerator ? diag::warn_cxx17_compat_using_decl_class_member_enumerator : diag::err_using_decl_can_not_refer_to_class_member) << SS.getRange();"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/special/class.inhctor/elsewhere.cpp"]={"clang/test/CXX/special/class.inhctor/elsewhere.cpp:12:11: error: using declaration cannot refer to class member"} | ["clang/test/CXX/special/class.inhctor/elsewhere.cpp"]={"clang/test/CXX/special/class.inhctor/elsewhere.cpp:12:11: error: using declaration cannot refer to class member"} | ||
} | } | ||
Line 1,857: | Line 1,481: | ||
["err_using_decl_can_not_refer_to_namespace"]={ | ["err_using_decl_can_not_refer_to_namespace"]={ | ||
[a]="using declaration cannot refer to a namespace", | [a]="using declaration cannot refer to a namespace", | ||
[ | [b]=n, | ||
[ | [c]="using declaration cannot refer to a namespace", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"5a9c5acf0f49",1251430518,"More work on using declarations.\n\nllvm-svn: 80333","More work on using declarations.\n\nllvm-svn: 80333"}, | ||
[ | [g]={{t,12795,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n // ...\n // C++14 [namespace.udecl]p6:\n // A using-declaration shall not name a namespace.\n if (R.getAsSingle<NamespaceDecl>()) {\n Diag(IdentLoc, diag::err_using_decl_can_not_refer_to_namespace) << SS.getRange();"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx11.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx11.cpp:7:10: error: using declaration cannot refer to a namespace"} | ["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx11.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx11.cpp:7:10: error: using declaration cannot refer to a namespace"} | ||
} | } | ||
Line 1,872: | Line 1,493: | ||
["err_using_decl_conflict"]={ | ["err_using_decl_conflict"]={ | ||
[a]="target of using declaration conflicts with declaration already in scope", | [a]="target of using declaration conflicts with declaration already in scope", | ||
[ | [b]=n, | ||
[ | [c]="target of using declaration conflicts with declaration already in scope", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"84d8767c1582",1260438112,"Implement redeclaration checking and hiding semantics for using declarations. There\nare a couple of...","Implement redeclaration checking and hiding semantics for using declarations. There\nare a couple of O(n^2) operations in this, some analogous to the usual O(n^2)\nredeclaration problem and some not. In particular, retroactively removing\nshadow declarations when they\'re hidden by later decls is pretty unfortunate.\nI\'m not yet convinced it\'s worse than the alternative, though.\n\nllvm-svn: 91045"}, | ||
[ | [g]={{t,12276,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n // Always emit a diagnostic for a mismatch between an unresolved\n // using_if_exists and a resolved using declaration in either direction.\n if (isa<UnresolvedUsingIfExistsDecl>(Target) != (isa_and_nonnull<UnresolvedUsingIfExistsDecl>(NonTag))) {\n // ...\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"},{t,12292,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n if (FunctionDecl *FD = Target->getAsFunction()) {\n // ...\n case Ovl_NonFunction:\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"},{t,12304,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n if (FunctionDecl *FD = Target->getAsFunction()) {\n // ...\n // We found a decl with the exact signature.\n case Ovl_Match:\n // ...\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"},{t,12320,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n if (isa<TagDecl>(Target)) {\n // ...\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"},{t,12330,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n Diag(BUD->getLocation(), diag::err_using_decl_conflict);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx1z-using-declaration.cpp"]={"clang/test/Parser/cxx1z-using-declaration.cpp:25:12: error: target of using declaration conflicts with declaration already in scope","clang/test/Parser/cxx1z-using-declaration.cpp:33:12: error: target of using declaration conflicts with declaration already in scope"} | ["clang/test/Parser/cxx1z-using-declaration.cpp"]={"clang/test/Parser/cxx1z-using-declaration.cpp:25:12: error: target of using declaration conflicts with declaration already in scope","clang/test/Parser/cxx1z-using-declaration.cpp:33:12: error: target of using declaration conflicts with declaration already in scope"} | ||
} | } | ||
Line 1,887: | Line 1,505: | ||
["err_using_decl_conflict_reverse"]={ | ["err_using_decl_conflict_reverse"]={ | ||
[a]="declaration conflicts with target of using declaration already in scope", | [a]="declaration conflicts with target of using declaration already in scope", | ||
[ | [b]=n, | ||
[ | [c]="declaration conflicts with target of using declaration already in scope", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"e29c5cd2398c",1260474663,"Improve the diagnostic when a new declaration conflicts with a using shadow\ndeclaration. Rename not...","Improve the diagnostic when a new declaration conflicts with a using shadow\ndeclaration. Rename note_using_decl to note_using, which is possibly less confusing.\nAdd a test for non-class-scope using decl collisions and be sure to note the case\nwe can\'t diagnose yet.\n\nllvm-svn: 91057"}, | ||
[ | [g]={{p,3554,"/// Check whether a redeclaration of an entity introduced by a\n/// using-declaration is valid, given that we know it\'s not an overload\n/// (nor a hidden tag declaration).\ntemplate <typename ExpectedDecl> static bool checkUsingShadowRedecl(Sema &S, UsingShadowDecl *OldS, ExpectedDecl *New) {\n // ...\n if (!Old) {\n S.Diag(New->getLocation(), diag::err_using_decl_conflict_reverse);"},{p,17214,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n // If this is a redeclaration of a using shadow declaration, it must\n // declare a tag in the same context. In MSVC mode, we allow a\n // redefinition if either context is within the other.\n if (auto *Shadow = dyn_cast<UsingShadowDecl>(DirectPrevDecl)) {\n // ...\n if (SS.isEmpty() && TUK != TUK_Reference && TUK != TUK_Friend && isDeclInScope(Shadow, SearchDC, S, isMemberSpecialization) && !(OldTag && isAcceptableTagRedeclContext(*this, OldTag->getDeclContext(), SearchDC))) {\n Diag(KWLoc, diag::err_using_decl_conflict_reverse);"},{z,1978,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n // ...\n if (auto *Shadow = dyn_cast_or_null<UsingShadowDecl>(PrevDecl ? Previous.getRepresentativeDecl() : nullptr)) {\n if (SS.isEmpty() && !(PrevClassTemplate && PrevClassTemplate->getDeclContext()->getRedeclContext()->Equals(SemanticContext->getRedeclContext()))) {\n Diag(KWLoc, diag::err_using_decl_conflict_reverse);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:8:1: error: declaration conflicts with target of using declaration already in scope"} | ["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:8:1: error: declaration conflicts with target of using declaration already in scope"} | ||
} | } | ||
Line 1,902: | Line 1,517: | ||
["err_using_decl_constructor"]={ | ["err_using_decl_constructor"]={ | ||
[a]="using declaration cannot refer to a constructor", | [a]="using declaration cannot refer to a constructor", | ||
[ | [b]=n, | ||
[ | [c]="using declaration cannot refer to a constructor", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"220f4277bd2a",1257352206,uc,uc}, | ||
[ | [g]={{t,12040,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n // ...\n case UnqualifiedIdKind::IK_ConstructorName:\n case UnqualifiedIdKind::IK_ConstructorTemplateId:\n // ...\n Diag(Name.getBeginLoc(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_using_decl_constructor : diag::err_using_decl_constructor) << SS.getRange();"}} | ||
[ | |||
}, | }, | ||
["err_using_decl_constructor_not_in_direct_base"]={ | ["err_using_decl_constructor_not_in_direct_base"]={ | ||
[a | [a]="%0 is not a direct base of %1, cannot inherit constructors", | ||
[b]=n, | |||
[c]="(.*?) is not a direct base of (.*?), cannot inherit constructors", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"0890502f44a1",1296933799,"Basic implementation of inherited constructors. Only generates declarations, and probably only works...","Basic implementation of inherited constructors. Only generates declarations, and probably only works for very basic use cases.\n\nllvm-svn: 124970"}, | ||
[ | [g]={{t,12905,"/// Additional checks for a using declaration referring to a constructor name.\nbool Sema::CheckInheritingConstructorUsingDecl(UsingDecl *UD) {\n // ...\n if (!Base && !AnyDependentBases) {\n Diag(UD->getUsingLoc(), diag::err_using_decl_constructor_not_in_direct_base) << UD->getNameInfo().getSourceRange() << QualType(SourceType, 0) << TargetClass;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/special/class.inhctor/elsewhere.cpp"]={"clang/test/CXX/special/class.inhctor/elsewhere.cpp:30:3: error: \'B1\' is not a direct base of \'D1\', cannot inherit constructors","clang/test/CXX/special/class.inhctor/elsewhere.cpp:50:3: error: \'A<bool>\' is not a direct base of \'E<bool>\', cannot inherit constructors","clang/test/CXX/special/class.inhctor/elsewhere.cpp:55:3: error: \'A<bool>\' is not a direct base of \'F<bool>\', cannot inherit constructors"} | ["clang/test/CXX/special/class.inhctor/elsewhere.cpp"]={"clang/test/CXX/special/class.inhctor/elsewhere.cpp:30:3: error: \'B1\' is not a direct base of \'D1\', cannot inherit constructors","clang/test/CXX/special/class.inhctor/elsewhere.cpp:50:3: error: \'A<bool>\' is not a direct base of \'E<bool>\', cannot inherit constructors","clang/test/CXX/special/class.inhctor/elsewhere.cpp:55:3: error: \'A<bool>\' is not a direct base of \'F<bool>\', cannot inherit constructors"} | ||
} | } | ||
Line 1,929: | Line 1,538: | ||
["err_using_decl_destructor"]={ | ["err_using_decl_destructor"]={ | ||
[a]="using declaration cannot refer to a destructor", | [a]="using declaration cannot refer to a destructor", | ||
[ | [b]=n, | ||
[ | [c]="using declaration cannot refer to a destructor", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"220f4277bd2a",1257352206,uc,uc}, | ||
[ | [g]={{t,12048,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n // ...\n case UnqualifiedIdKind::IK_DestructorName:\n Diag(Name.getBeginLoc(), diag::err_using_decl_destructor) << SS.getRange();"}} | ||
[ | |||
}, | }, | ||
["err_using_decl_friend"]={ | ["err_using_decl_friend"]={ | ||
[a]="cannot befriend target of using declaration", | [a]="cannot befriend target of using declaration", | ||
[ | [b]=n, | ||
[ | [c]="cannot befriend target of using declaration", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"c70fca60dab4",1365023987,"Complain about attempts to befriend declarations via a using\ndeclaration. Patch by Stephen Lin!\n\nll...","Complain about attempts to befriend declarations via a using\ndeclaration. Patch by Stephen Lin!\n\nllvm-svn: 178698"}, | ||
[ | [g]={{p,3638,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (!Old) {\n if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(OldD)) {\n if (New->getFriendObjectKind()) {\n Diag(New->getLocation(), diag::err_using_decl_friend);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/special/class.inhctor/p3.cpp"]={"clang/test/CXX/special/class.inhctor/p3.cpp:48:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:49:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:50:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:51:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:52:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:53:19: error: cannot befriend target of using declaration"} | ["clang/test/CXX/special/class.inhctor/p3.cpp"]={"clang/test/CXX/special/class.inhctor/p3.cpp:48:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:49:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:50:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:51:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:52:19: error: cannot befriend target of using declaration","clang/test/CXX/special/class.inhctor/p3.cpp:53:19: error: cannot befriend target of using declaration"} | ||
} | } | ||
Line 1,956: | Line 1,559: | ||
["err_using_decl_nested_name_specifier_is_current_class"]={ | ["err_using_decl_nested_name_specifier_is_current_class"]={ | ||
[a]="using declaration refers to its own class", | [a]="using declaration refers to its own class", | ||
[ | [b]=n, | ||
[ | [c]="using declaration refers to its own class", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"3969e30d3831",1260258378,"Correctly implement the C++03 and 0x restrictions on class-member using\ndeclarations.\n\nllvm-svn: 908...","Correctly implement the C++03 and 0x restrictions on class-member using\ndeclarations.\n\nllvm-svn: 90843"}, | ||
[ | [g]={{t,12201,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // Diagnose finding a decl which is not from a base class of the\n // current class. We do this now because there are cases where this\n // function will silently decide not to build a shadow decl, which\n // will pre-empt further diagnostics.\n //\n // We don\'t need to do this in C++11 because we do the check once on\n // the qualifier.\n //\n // FIXME: diagnose the following if we care enough:\n // struct A { int foo; };\n // struct B : A { using A::foo; };\n // template <class T> struct C : A {};\n // template <class T> struct D : C<T> { using B::foo; } // <---\n // This is invalid (during instantiation) in C++03 because B::foo\n // resolves to the using decl in B, which is not a base class of D<T>.\n // We can\'t diagnose it immediately because C<T> is an unknown\n // specialization. The UsingShadowDecl in D<T> then points directly\n // to A::foo, which will look well-formed when we instantiate.\n // The right solution is to not collapse the shadow-decl chain.\n if (!getLangOpts().CPlusPlus11 && CurContext->isRecord())\n if (auto *Using = dyn_cast<UsingDecl>(BUD)) {\n // ...\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(OrigRec)) {\n if (OrigDC == CurContext) {\n Diag(Using->getLocation(), diag::err_using_decl_nested_name_specifier_is_current_class) << Using->getQualifierLoc().getSourceRange();"},{t,13171,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n if (getLangOpts().CPlusPlus11) {\n // ...\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(cast<CXXRecordDecl>(NamedContext))) {\n // ...\n if (CurContext == NamedContext) {\n Diag(SS.getBeginLoc(), diag::err_using_decl_nested_name_specifier_is_current_class) << SS.getRange();"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/class.access/class.access.dcl/p1.cpp"]={"clang/test/CXX/class.access/class.access.dcl/p1.cpp:321:5: error: using declaration refers to its own class","clang/test/CXX/class.access/class.access.dcl/p1.cpp:341:5: error: using declaration refers to its own class"} | ["clang/test/CXX/class.access/class.access.dcl/p1.cpp"]={"clang/test/CXX/class.access/class.access.dcl/p1.cpp:321:5: error: using declaration refers to its own class","clang/test/CXX/class.access/class.access.dcl/p1.cpp:341:5: error: using declaration refers to its own class"} | ||
} | } | ||
}, | }, | ||
["err_using_decl_nested_name_specifier_is_not_base_class"]={ | ["err_using_decl_nested_name_specifier_is_not_base_class"]={ | ||
[a | [a]="using declaration refers into \'%0\', which is not a base class of %1", | ||
[b]=n, | |||
[c]="using declaration refers into \'(.*?)\', which is not a base class of (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"3969e30d3831",1260258378,"Correctly implement the C++03 and 0x restrictions on class-member using\ndeclarations.\n\nllvm-svn: 908...","Correctly implement the C++03 and 0x restrictions on class-member using\ndeclarations.\n\nllvm-svn: 90843"}, | ||
[ | [g]={{t,12209,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // Diagnose finding a decl which is not from a base class of the\n // current class. We do this now because there are cases where this\n // function will silently decide not to build a shadow decl, which\n // will pre-empt further diagnostics.\n //\n // We don\'t need to do this in C++11 because we do the check once on\n // the qualifier.\n //\n // FIXME: diagnose the following if we care enough:\n // struct A { int foo; };\n // struct B : A { using A::foo; };\n // template <class T> struct C : A {};\n // template <class T> struct D : C<T> { using B::foo; } // <---\n // This is invalid (during instantiation) in C++03 because B::foo\n // resolves to the using decl in B, which is not a base class of D<T>.\n // We can\'t diagnose it immediately because C<T> is an unknown\n // specialization. The UsingShadowDecl in D<T> then points directly\n // to A::foo, which will look well-formed when we instantiate.\n // The right solution is to not collapse the shadow-decl chain.\n if (!getLangOpts().CPlusPlus11 && CurContext->isRecord())\n if (auto *Using = dyn_cast<UsingDecl>(BUD)) {\n // ...\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(OrigRec)) {\n // ...\n Diag(Using->getQualifierLoc().getBeginLoc(), diag::err_using_decl_nested_name_specifier_is_not_base_class) << Using->getQualifier() << cast<CXXRecordDecl>(CurContext) << Using->getQualifierLoc().getSourceRange();"},{t,13178,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n if (getLangOpts().CPlusPlus11) {\n // ...\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(cast<CXXRecordDecl>(NamedContext))) {\n // ...\n if (!cast<CXXRecordDecl>(NamedContext)->isInvalidDecl()) {\n Diag(SS.getBeginLoc(), diag::err_using_decl_nested_name_specifier_is_not_base_class) << SS.getScopeRep() << cast<CXXRecordDecl>(CurContext) << SS.getRange();"},{t,13224,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n Diag(SS.getRange().getBegin(), diag::err_using_decl_nested_name_specifier_is_not_base_class) << SS.getScopeRep() << cast<CXXRecordDecl>(CurContext) << SS.getRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/using-decl-templates.cpp"]={"clang/test/SemaCXX/using-decl-templates.cpp:13:9: error: using declaration refers into \'A<double>::\', which is not a base class of \'B<int>\'"} | ["clang/test/SemaCXX/using-decl-templates.cpp"]={"clang/test/SemaCXX/using-decl-templates.cpp:13:9: error: using declaration refers into \'A<double>::\', which is not a base class of \'B<int>\'"} | ||
} | } | ||
}, | }, | ||
["err_using_decl_nested_name_specifier_is_not_class"]={ | ["err_using_decl_nested_name_specifier_is_not_class"]={ | ||
[a | [a]="using declaration in class refers into \'%0\', which is not a class", | ||
[b]=n, | |||
[c]="using declaration in class refers into \'(.*?)\', which is not a class", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"3969e30d3831",1260258378,"Correctly implement the C++03 and 0x restrictions on class-member using\ndeclarations.\n\nllvm-svn: 908...","Correctly implement the C++03 and 0x restrictions on class-member using\ndeclarations.\n\nllvm-svn: 90843"}, | ||
[ | [g]={{t,13141,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n // The current scope is a record.\n if (!NamedContext->isRecord()) {\n // ...\n Diag(SS.getBeginLoc(), Cxx20Enumerator ? diag::warn_cxx17_compat_using_decl_non_member_enumerator : diag::err_using_decl_nested_name_specifier_is_not_class) << SS.getScopeRep() << SS.getRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:81:9: error: using declaration in class refers into \'Three::\', which is not a class"} | ["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:81:9: error: using declaration in class refers into \'Three::\', which is not a class"} | ||
} | } | ||
Line 2,001: | Line 1,595: | ||
["err_using_decl_redeclaration"]={ | ["err_using_decl_redeclaration"]={ | ||
[a]="redeclaration of using declaration", | [a]="redeclaration of using declaration", | ||
[ | [b]=n, | ||
[ | [c]="redeclaration of using declaration", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"84d8767c1582",1260438112,"Implement redeclaration checking and hiding semantics for using declarations. There\nare a couple of...","Implement redeclaration checking and hiding semantics for using declarations. There\nare a couple of O(n^2) operations in this, some analogous to the usual O(n^2)\nredeclaration problem and some not. In particular, retroactively removing\nshadow declarations when they\'re hidden by later decls is pretty unfortunate.\nI\'m not yet convinced it\'s worse than the alternative, though.\n\nllvm-svn: 91045"}, | ||
[ | [g]={{t,12988,"/// Checks that the given using declaration is not an invalid\n/// redeclaration. Note that this is checking only for the using decl\n/// itself, not for any ill-formedness among the UsingShadowDecls.\nbool Sema::CheckUsingDeclRedeclaration(SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Prev) {\n // ...\n for (LookupResult::iterator I = Prev.begin(), E = Prev.end(); I != E; ++I) {\n // ...\n Diag(NameLoc, diag::err_using_decl_redeclaration) << SS.getRange();"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx1z-using-declaration.cpp"]={"clang/test/Parser/cxx1z-using-declaration.cpp:23:12: error: redeclaration of using declaration"} | ["clang/test/Parser/cxx1z-using-declaration.cpp"]={"clang/test/Parser/cxx1z-using-declaration.cpp:23:12: error: redeclaration of using declaration"} | ||
} | } | ||
Line 2,016: | Line 1,607: | ||
["err_using_decl_redeclaration_expansion"]={ | ["err_using_decl_redeclaration_expansion"]={ | ||
[a]="using declaration pack expansion at block scope produces multiple values", | [a]="using declaration pack expansion at block scope produces multiple values", | ||
[ | [b]=n, | ||
[ | [c]="using declaration pack expansion at block scope produces multiple values", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations.\n\nThis change introduces UsingPackDecl...","[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"}, | ||
[ | [g]={{Gc,3412,"template <typename T> Decl *TemplateDeclInstantiator::instantiateUnresolvedUsingDecl(T *D, bool InstantiatingPackElement) {\n // If this is a pack expansion, expand it now.\n if (D->isPackExpansion() && !InstantiatingPackElement) {\n // ...\n // Within a function, we don\'t have any normal way to check for conflicts\n // between shadow declarations from different using declarations in the\n // same pack expansion, but this is always ill-formed because all expansions\n // must produce (conflicting) enumerators.\n //\n // Sadly we can\'t just reject this in the template definition because it\n // could be valid if the pack is empty or has exactly one expansion.\n if (D->getDeclContext()->isFunctionOrMethod() && *NumExpansions > 1) {\n SemaRef.Diag(D->getEllipsisLoc(), diag::err_using_decl_redeclaration_expansion);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaTemplate/cxx1z-using-declaration.cpp"]={"clang/test/SemaTemplate/cxx1z-using-declaration.cpp:130:14: error: using declaration pack expansion at block scope produces multiple values","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:130:14: error: using declaration pack expansion at block scope produces multiple values"} | ["clang/test/SemaTemplate/cxx1z-using-declaration.cpp"]={"clang/test/SemaTemplate/cxx1z-using-declaration.cpp:130:14: error: using declaration pack expansion at block scope produces multiple values","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:130:14: error: using declaration pack expansion at block scope produces multiple values"} | ||
} | } | ||
Line 2,031: | Line 1,619: | ||
["err_using_decl_template_id"]={ | ["err_using_decl_template_id"]={ | ||
[a]="using declaration cannot refer to a template specialization", | [a]="using declaration cannot refer to a template specialization", | ||
[ | [b]=n, | ||
[ | [c]="using declaration cannot refer to a template specialization", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"220f4277bd2a",1257352206,uc,uc}, | ||
[ | [g]={{t,12052,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n // ...\n case UnqualifiedIdKind::IK_TemplateId:\n Diag(Name.getBeginLoc(), diag::err_using_decl_template_id) << SourceRange(Name.TemplateId->LAngleLoc, Name.TemplateId->RAngleLoc);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx-using-declaration.cpp"]={"clang/test/Parser/cxx-using-declaration.cpp:36:10: error: using declaration cannot refer to a template specialization"} | ["clang/test/Parser/cxx-using-declaration.cpp"]={"clang/test/Parser/cxx-using-declaration.cpp:36:10: error: using declaration cannot refer to a template specialization"} | ||
} | } | ||
Line 2,046: | Line 1,631: | ||
["err_using_dependent_value_is_type"]={ | ["err_using_dependent_value_is_type"]={ | ||
[a]="dependent using declaration resolved to type without \'typename\'", | [a]="dependent using declaration resolved to type without \'typename\'", | ||
[ | [b]=n, | ||
[ | [c]="dependent using declaration resolved to type without \'typename\'", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"e61f2ba7e44a",1258511779,"Incremental progress on using declarations. Split UnresolvedUsingDecl into\ntwo classes, one for typ...","Incremental progress on using declarations. Split UnresolvedUsingDecl into\ntwo classes, one for typenames and one for values; this seems to have some\nsupport from Doug if not necessarily from the extremely-vague-on-this-point\nstandard. Track the location of the \'typename\' keyword in a using-typename\ndecl. Make a new lookup result for unresolved values and deal with it in\nmost places.\n\nllvm-svn: 89184"}, | ||
[ | [g]={{t,12786,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n // ...\n if (HasTypenameKeyword) {\n // ...\n } else {\n // If we asked for a non-typename and we got a type, error out,\n // but only if this is an instantiation of an unresolved using\n // decl. Otherwise just silently find the type name.\n if (IsInstantiation && R.getAsSingle<TypeDecl>()) {\n Diag(IdentLoc, diag::err_using_dependent_value_is_type);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/using-decl-templates.cpp"]={"clang/test/SemaCXX/using-decl-templates.cpp:10:15: error: dependent using declaration resolved to type without \'typename\'"} | ["clang/test/SemaCXX/using-decl-templates.cpp"]={"clang/test/SemaCXX/using-decl-templates.cpp:10:15: error: dependent using declaration resolved to type without \'typename\'"} | ||
} | } | ||
}, | }, | ||
["err_using_directive_member_suggest"]={ | ["err_using_directive_member_suggest"]={ | ||
[a | [a]="no namespace named %0 in %1; did you mean %select{|simply }2%3?", | ||
[b]=n, | |||
[c]="no namespace named (.*?) in (.*?); did you mean (?:|simply )(.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace\n\"std\", with a warning, to impro...","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"}, | ||
[ | [g]={{t,11903,"static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), Sc, &SS, CCC, Sema::CTK_ErrorRecovery)) {\n if (DeclContext *DC = S.computeDeclContext(SS, false)) {\n // ...\n S.diagnoseTypo(Corrected, S.PDiag(diag::err_using_directive_member_suggest) << Ident << DC << DroppedSpecifier << SS.getRange(), S.PDiag(diag::note_namespace_defined_here));"},{"clang/unittests/Sema/ExternalSemaSourceTest.cpp",60,"/// Counts the number of typo-correcting diagnostics correcting from one name to\n/// another while still passing all diagnostics along a chain of consumers.\nclass DiagnosticWatcher : public clang::DiagnosticConsumer {\n // ...\n void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override {\n // ...\n if (Info.getID() - 1 == diag::err_using_directive_member_suggest) {"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx-using-directive.cpp"]={"clang/test/Parser/cxx-using-directive.cpp:23:19: error: no namespace named \'A\' in namespace \'D::B\'; did you mean \'::B::A\'?","clang/test/Parser/cxx-using-directive.cpp:26:19: error: no namespace named \'C\' in namespace \'D\'; did you mean simply \'C\'?","clang/test/Parser/cxx-using-directive.cpp:31:17: error: no namespace named \'A\' in the global namespace; did you mean \'B::A\'?"} | ["clang/test/Parser/cxx-using-directive.cpp"]={"clang/test/Parser/cxx-using-directive.cpp:23:19: error: no namespace named \'A\' in namespace \'D::B\'; did you mean \'::B::A\'?","clang/test/Parser/cxx-using-directive.cpp:26:19: error: no namespace named \'C\' in namespace \'D\'; did you mean simply \'C\'?","clang/test/Parser/cxx-using-directive.cpp:31:17: error: no namespace named \'A\' in the global namespace; did you mean \'B::A\'?"} | ||
} | } | ||
}, | }, | ||
["err_using_directive_suggest"]={ | ["err_using_directive_suggest"]={ | ||
[a | [a]="no namespace named %0; did you mean %1?", | ||
[b]=n, | |||
[c]="no namespace named (.*?); did you mean (.*?)\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace\n\"std\", with a warning, to impro...","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"}, | ||
[ | [g]={{t,11908,"static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), Sc, &SS, CCC, Sema::CTK_ErrorRecovery)) {\n if (DeclContext *DC = S.computeDeclContext(SS, false)) {\n // ...\n } else {\n S.diagnoseTypo(Corrected, S.PDiag(diag::err_using_directive_suggest) << Ident, S.PDiag(diag::note_namespace_defined_here));"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx-using-directive.cpp"]={"clang/test/Parser/cxx-using-directive.cpp:30:17: error: no namespace named \'A\'; did you mean \'B::A\'?"} | ["clang/test/Parser/cxx-using-directive.cpp"]={"clang/test/Parser/cxx-using-directive.cpp:30:17: error: no namespace named \'A\'; did you mean \'B::A\'?"} | ||
} | } | ||
Line 2,091: | Line 1,667: | ||
["err_using_enum_decl_redeclaration"]={ | ["err_using_enum_decl_redeclaration"]={ | ||
[a]="redeclaration of using-enum declaration", | [a]="redeclaration of using-enum declaration", | ||
[ | [b]=n, | ||
[ | [c]="redeclaration of using\\-enum declaration", | ||
[d]=m, | |||
[e]=k, | |||
[f]={lc,1615397021,kc,jc}, | |||
[ | [g]={{t,12840,"NamedDecl *Sema::BuildUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation NameLoc, TypeSourceInfo *EnumType, EnumDecl *ED) {\n // ...\n if (CurContext->getRedeclContext()->isRecord()) {\n // ...\n for (NamedDecl *D : Previous)\n if (UsingEnumDecl *UED = dyn_cast<UsingEnumDecl>(D))\n if (UED->getEnumDecl() == ED) {\n Diag(UsingLoc, diag::err_using_enum_decl_redeclaration) << SourceRange(EnumLoc, NameLoc);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:230:3: error: redeclaration of using-enum declaration","clang/test/SemaCXX/cxx20-using-enum.cpp:236:3: error: redeclaration of using-enum declaration"} | ["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:230:3: error: redeclaration of using-enum declaration","clang/test/SemaCXX/cxx20-using-enum.cpp:236:3: error: redeclaration of using-enum declaration"} | ||
} | } | ||
}, | }, | ||
["err_using_enum_expect_identifier"]={ | ["err_using_enum_expect_identifier"]={ | ||
[a | [a]="using enum %select{requires an enum or typedef name|does not permit an elaborated enum specifier}0", | ||
[b]=n, | |||
[c]="using enum (?:requires an enum or typedef name|does not permit an elaborated enum specifier)", | |||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"3d2080683f1d",1663177354,"[clang][DR2621] using enum NAME lookup fix\n\nAlthough using-enum\'s grammar is \'using elaborated-enum-...","[clang][DR2621] using enum NAME lookup fix\n\nAlthough using-enum\'s grammar is \'using elaborated-enum-specifier\',\nthe lookup for the enum is ordinary lookup (and not the tagged-type\nlookup that normally occurs wth an tagged-type specifier). Thus (a)\nwe can find typedefs and (b) do not find enum tags hidden by a non-tag\nname (the struct stat thing).\n\nThis reimplements that part of using-enum handling, to address DR2621,\nwhere clang\'s behaviour does not match std intent (and other\ncompilers).\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D134283"}, | ||
[ | [g]={{F,733,"/// ParseUsingDeclaration - Parse C++ using-declaration or alias-declaration.\n/// Assumes that \'using\' was already seen.\n///\n/// using-declaration: [C++ 7.3.p3: namespace.udecl]\n/// \'using\' using-declarator-list[opt] ;\n///\n/// using-declarator-list: [C++1z]\n/// using-declarator \'...\'[opt]\n/// using-declarator-list \',\' using-declarator \'...\'[opt]\n///\n/// using-declarator-list: [C++98-14]\n/// using-declarator\n///\n/// alias-declaration: C++11 [dcl.dcl]p1\n/// \'using\' identifier attribute-specifier-seq[opt] = type-id ;\n///\n/// using-enum-declaration: [C++20, dcl.enum]\n/// \'using\' elaborated-enum-specifier ;\n/// The terminal name of the elaborated-enum-specifier undergoes\n/// ordinary lookup\n///\n/// elaborated-enum-specifier:\n/// \'enum\' nested-name-specifier[opt] identifier\nParser::DeclGroupPtrTy Parser::ParseUsingDeclaration(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &PrefixAttrs, AccessSpecifier AS) {\n // ...\n if (TryConsumeToken(tok::kw_enum, UELoc) && !InInitStatement) {\n // ...\n if (!Tok.is(tok::identifier)) {\n Diag(Tok.getLocation(), diag::err_using_enum_expect_identifier) << Tok.is(tok::kw_enum);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx20-using-enum.cpp"]={"clang/test/Parser/cxx20-using-enum.cpp:7:17: error: using enum requires an enum or typedef name","clang/test/Parser/cxx20-using-enum.cpp:8:13: error: using enum requires an enum or typedef name","clang/test/Parser/cxx20-using-enum.cpp:9:14: error: using enum requires an enum or typedef name","clang/test/Parser/cxx20-using-enum.cpp:10:14: error: using enum does not permit an elaborated enum specifier"} | ["clang/test/Parser/cxx20-using-enum.cpp"]={"clang/test/Parser/cxx20-using-enum.cpp:7:17: error: using enum requires an enum or typedef name","clang/test/Parser/cxx20-using-enum.cpp:8:13: error: using enum requires an enum or typedef name","clang/test/Parser/cxx20-using-enum.cpp:9:14: error: using enum requires an enum or typedef name","clang/test/Parser/cxx20-using-enum.cpp:10:14: error: using enum does not permit an elaborated enum specifier"} | ||
} | } | ||
Line 2,121: | Line 1,691: | ||
["err_using_enum_is_dependent"]={ | ["err_using_enum_is_dependent"]={ | ||
[a]="using-enum cannot name a dependent type", | [a]="using-enum cannot name a dependent type", | ||
[ | [b]=n, | ||
[ | [c]="using\\-enum cannot name a dependent type", | ||
[d]=m, | |||
[e]=k, | |||
[f]={lc,1615397021,kc,jc}, | |||
[ | [g]={{t,12112,"Decl *Sema::ActOnUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation IdentLoc, IdentifierInfo &II, CXXScopeSpec *SS) {\n // ...\n if (EnumTy.isNull()) {\n Diag(IdentLoc, SS && isDependentScopeSpecifier(*SS) ? diag::err_using_enum_is_dependent : diag::err_unknown_typename) << II.getName() << SourceRange(SS ? SS->getBeginLoc() : IdentLoc, IdentLoc);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:116:22: error: using-enum cannot name a dependent type"} | ["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:116:22: error: using-enum cannot name a dependent type"} | ||
} | } | ||
}, | }, | ||
["err_using_enum_not_enum"]={ | ["err_using_enum_not_enum"]={ | ||
[a | [a]="%0 is not an enumerated type", | ||
[b]=n, | |||
[c]="(.*?) is not an enumerated type", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{t,12121,"Decl *Sema::ActOnUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation IdentLoc, IdentifierInfo &II, CXXScopeSpec *SS) {\n // ...\n if (!Enum) {\n Diag(IdentLoc, diag::err_using_enum_not_enum) << EnumTy;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:27:17: error: \'Bob::C\' is not an enumerated type"} | ["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:27:17: error: \'Bob::C\' is not an enumerated type"} | ||
} | } | ||
Line 2,151: | Line 1,715: | ||
["err_using_if_exists_on_ctor"]={ | ["err_using_if_exists_on_ctor"]={ | ||
[a]="\'using_if_exists\' attribute cannot be applied to an inheriting constructor", | [a]="\'using_if_exists\' attribute cannot be applied to an inheriting constructor", | ||
[ | [b]=n, | ||
[ | [c]="\'using_if_exists\' attribute cannot be applied to an inheriting constructor", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={lc,1615397021,kc,jc}, | ||
[ | [g]={{t,12625,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n // ...\n // \'using_if_exists\' doesn\'t make sense on an inherited constructor.\n if (IsUsingIfExists && UsingName.getName().getNameKind() == DeclarationName::CXXConstructorName) {\n Diag(UsingLoc, diag::err_using_if_exists_on_ctor);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/using-if-exists.cpp"]={"clang/test/SemaCXX/using-if-exists.cpp:66:3: error: \'using_if_exists\' attribute cannot be applied to an inheriting constructor"} | ["clang/test/SemaCXX/using-if-exists.cpp"]={"clang/test/SemaCXX/using-if-exists.cpp:66:3: error: \'using_if_exists\' attribute cannot be applied to an inheriting constructor"} | ||
} | } | ||
Line 2,166: | Line 1,727: | ||
["err_using_namespace_in_class"]={ | ["err_using_namespace_in_class"]={ | ||
[a]="\'using namespace\' is not allowed in classes", | [a]="\'using namespace\' is not allowed in classes", | ||
[ | [b]=n, | ||
[ | [c]="\'using namespace\' is not allowed in classes", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"fec52635f0d5",1245459114,ec,ec}, | ||
[g]={{F,2802,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n // ...\n if (Tok.is(tok::kw_using)) {\n // ...\n if (Tok.is(tok::kw_namespace)) {\n Diag(UsingLoc, diag::err_using_namespace_in_class);"}}, | |||
[ | [h]={ | ||
[ | |||
[ | |||
["clang/test/SemaCXX/using-directive.cpp"]={"clang/test/SemaCXX/using-directive.cpp:63:3: error: \'using namespace\' is not allowed in classes"} | ["clang/test/SemaCXX/using-directive.cpp"]={"clang/test/SemaCXX/using-directive.cpp:63:3: error: \'using namespace\' is not allowed in classes"} | ||
} | } | ||
}, | }, | ||
["err_using_pack_expansion_empty"]={ | ["err_using_pack_expansion_empty"]={ | ||
[a | [a]="%select{|member}0 using declaration %1 instantiates to an empty pack", | ||
[b]=n, | |||
[c]="(?:|member) using declaration (.*?) instantiates to an empty pack", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations.\n\nThis change introduces UsingPackDecl...","[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"}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaTemplate/cxx1z-using-declaration.cpp"]={"clang/test/SemaTemplate/cxx1z-using-declaration.cpp:164:23: error: member using declaration \'f\' instantiates to an empty pack","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:165:18: error: member using declaration \'type\' instantiates to an empty pack","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:26:26: error: member using declaration \'h\' instantiates to an empty pack","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:108:14: error: member using declaration \'type\' instantiates to an empty pack","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:132:10: error: using declaration \'e\' instantiates to an empty pack"} | ["clang/test/SemaTemplate/cxx1z-using-declaration.cpp"]={"clang/test/SemaTemplate/cxx1z-using-declaration.cpp:164:23: error: member using declaration \'f\' instantiates to an empty pack","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:165:18: error: member using declaration \'type\' instantiates to an empty pack","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:26:26: error: member using declaration \'h\' instantiates to an empty pack","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:108:14: error: member using declaration \'type\' instantiates to an empty pack","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:132:10: error: using declaration \'e\' instantiates to an empty pack"} | ||
} | } | ||
Line 2,195: | Line 1,750: | ||
["err_using_requires_qualname"]={ | ["err_using_requires_qualname"]={ | ||
[a]="using declaration requires a qualified name", | [a]="using declaration requires a qualified name", | ||
[ | [b]=n, | ||
[ | [c]="using declaration requires a qualified name", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"fec52635f0d5",1245459114,ec,ec}, | ||
[ | [g]={{t,12022,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n // ...\n if (SS.isEmpty()) {\n Diag(Name.getBeginLoc(), diag::err_using_requires_qualname);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/using-decl-1.cpp"]={"clang/test/SemaCXX/using-decl-1.cpp:405:34: error: using declaration requires a qualified name"} | ["clang/test/SemaCXX/using-decl-1.cpp"]={"clang/test/SemaCXX/using-decl-1.cpp:405:34: error: using declaration requires a qualified name"} | ||
} | } | ||
Line 2,210: | Line 1,762: | ||
["err_using_typename_non_type"]={ | ["err_using_typename_non_type"]={ | ||
[a]="\'typename\' keyword used on a non-type", | [a]="\'typename\' keyword used on a non-type", | ||
[ | [b]=n, | ||
[ | [c]="\'typename\' keyword used on a non\\-type", | ||
[d]=m, | |||
[e]=k, | |||
[f]={"fec52635f0d5",1245459114,ec,ec}, | |||
[ | [g]={{t,12775,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n // ...\n if (HasTypenameKeyword) {\n // If we asked for a typename and got a non-type decl, error out.\n if (!R.getAsSingle<TypeDecl>() && !R.getAsSingle<UnresolvedUsingIfExistsDecl>()) {\n Diag(IdentLoc, diag::err_using_typename_non_type);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp:68:23: error: \'typename\' keyword used on a non-type"} | ["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp:68:23: error: \'typename\' keyword used on a non-type"} | ||
} | } | ||
Line 2,225: | Line 1,774: | ||
["err_uuidof_with_multiple_guids"]={ | ["err_uuidof_with_multiple_guids"]={ | ||
[a]="cannot call operator __uuidof on a type with multiple GUIDs", | [a]="cannot call operator __uuidof on a type with multiple GUIDs", | ||
[ | [b]=n, | ||
[ | [c]="cannot call operator __uuidof on a type with multiple GUIDs", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"59c0ec23966a",1378537186,"AST: __uuidof should leak through templated types\n\nSummary:\n__uuidof on templated types should exmai...","AST: __uuidof should leak through templated types\n\nSummary:\n__uuidof on templated types should exmaine if any of its template\nparameters have a uuid declspec. If exactly one does, then take it.\nOtherwise, issue an appropriate error.\n\nReviewers: rsmith, thakis, rnk\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1419\n\nllvm-svn: 190240"}, | ||
[ | [g]={{O,760,"/// Build a Microsoft __uuidof expression with a type operand.\nExprResult Sema::BuildCXXUuidof(QualType Type, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc) {\n // ...\n if (!Operand->getType()->isDependentType()) {\n // ...\n if (UuidAttrs.size() > 1)\n return ExprError(Diag(TypeidLoc, diag::err_uuidof_with_multiple_guids));"},{O,782,"/// Build a Microsoft __uuidof expression with an expression operand.\nExprResult Sema::BuildCXXUuidof(QualType Type, SourceLocation TypeidLoc, Expr *E, SourceLocation RParenLoc) {\n // ...\n if (!E->getType()->isDependentType()) {\n if (E->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) {\n // ...\n } else {\n // ...\n if (UuidAttrs.size() > 1)\n return ExprError(Diag(TypeidLoc, diag::err_uuidof_with_multiple_guids));"}}, | ||
[h]={ | |||
[gc]={"clang/test/Parser/MicrosoftExtensions.cpp:164:26: error: cannot call operator __uuidof on a type with multiple GUIDs","clang/test/Parser/MicrosoftExtensions.cpp:166:26: error: cannot call operator __uuidof on a type with multiple GUIDs"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_uuidof_without_guid"]={ | ["err_uuidof_without_guid"]={ | ||
[a]="cannot call operator __uuidof on a type with no GUID", | [a]="cannot call operator __uuidof on a type with no GUID", | ||
[ | [b]=n, | ||
[ | [c]="cannot call operator __uuidof on a type with no GUID", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"9dddd40a1caf",1292817063,"Emit an error if operator __uuidof() is called on a type with no associated GUID.\n\nllvm-svn: 122226","Emit an error if operator __uuidof() is called on a type with no associated GUID.\n\nllvm-svn: 122226"}, | ||
[ | [g]={{O,758,"/// Build a Microsoft __uuidof expression with a type operand.\nExprResult Sema::BuildCXXUuidof(QualType Type, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc) {\n // ...\n if (!Operand->getType()->isDependentType()) {\n // ...\n if (UuidAttrs.empty())\n return ExprError(Diag(TypeidLoc, diag::err_uuidof_without_guid));"},{O,780,"/// Build a Microsoft __uuidof expression with an expression operand.\nExprResult Sema::BuildCXXUuidof(QualType Type, SourceLocation TypeidLoc, Expr *E, SourceLocation RParenLoc) {\n // ...\n if (!E->getType()->isDependentType()) {\n if (E->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) {\n // ...\n } else {\n // ...\n if (UuidAttrs.empty())\n return ExprError(Diag(TypeidLoc, diag::err_uuidof_without_guid));"}}, | ||
[h]={ | |||
[gc]={"clang/test/Parser/MicrosoftExtensions.cpp:90:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:92:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:94:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:96:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:99:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:101:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:103:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:105:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:108:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:110:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:112:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:115:4: error: cannot call operator __uuidof on a type with no GUID","clang/test/Parser/MicrosoftExtensions.cpp:162:26: error: cannot call operator __uuidof on a type with no GUID"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_va_arg_in_device"]={ | ["err_va_arg_in_device"]={ | ||
[a]="CUDA device code does not support va_arg", | [a]="CUDA device code does not support va_arg", | ||
[ | [b]=n, | ||
[ | [c]="CUDA device code does not support va_arg", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"6644e366b01e",1453249620,"[CUDA] Bail, rather than crash, on va_arg in device code.\n\nReviewers: tra\n\nSubscribers: echristo, jh...","[CUDA] Bail, rather than crash, on va_arg in device code.\n\nReviewers: tra\n\nSubscribers: echristo, jhen, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D16331\n\nllvm-svn: 258264"}, | ||
[ | [g]={{r,17165,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n // CUDA device code does not support varargs.\n if (getLangOpts().CUDA && getLangOpts().CUDAIsDevice) {\n if (const FunctionDecl *F = dyn_cast<FunctionDecl>(CurContext)) {\n // ...\n if (T == CFT_Global || T == CFT_Device || T == CFT_HostDevice)\n return ExprError(Diag(E->getBeginLoc(), diag::err_va_arg_in_device));"},{r,17215,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n // NVPTX does not support va_arg expression.\n if (getLangOpts().OpenMP && getLangOpts().OpenMPIsTargetDevice && Context.getTargetInfo().getTriple().isNVPTX())\n targetDiag(E->getBeginLoc(), diag::err_va_arg_in_device);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCUDA/vararg.cu"]={"clang/test/SemaCUDA/vararg.cu:15:10: error: CUDA device code does not support va_arg"} | ["clang/test/SemaCUDA/vararg.cu"]={"clang/test/SemaCUDA/vararg.cu:15:10: error: CUDA device code does not support va_arg"} | ||
} | } | ||
Line 2,270: | Line 1,810: | ||
["err_va_start_captured_stmt"]={ | ["err_va_start_captured_stmt"]={ | ||
[a]="\'va_start\' cannot be used in a captured statement", | [a]="\'va_start\' cannot be used in a captured statement", | ||
[ | [b]=n, | ||
[ | [c]="\'va_start\' cannot be used in a captured statement", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"f1deb837eee3",1493927465,"Fix bugs checking va_start in lambdas and erroneous contexts\n\nSummary:\nFirst, getCurFunction looks t...","Fix bugs checking va_start in lambdas and erroneous contexts\n\nSummary:\nFirst, getCurFunction looks through blocks and lambdas, which is wrong.\nInside a lambda, va_start should refer to the lambda call operator\nprototype. This fixes PR32737.\n\nSecond, we shouldn\'t use any of the getCur* methods, because they look\nthrough contexts that we don\'t want to look through (EnumDecl,\nCapturedStmtDecl). We can use CurContext directly as the calling\ncontext.\n\nFinally, this code assumed that CallExprs would never appear outside of\ncode contexts (block, function, obj-c method), which is wrong. Struct\nmember initializers are an easy way to create and parse exprs in a\nnon-code context.\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D32761\n\nllvm-svn: 302188"}, | ||
[ | [g]={{U,8082,"static bool checkVAStartIsInVariadicFunction(Sema &S, Expr *Fn, ParmVarDecl **LastParam = nullptr) {\n // ...\n if (auto *Block = dyn_cast<BlockDecl>(Caller)) {\n // ...\n } else if (auto *FD = dyn_cast<FunctionDecl>(Caller)) {\n // ...\n } else if (auto *MD = dyn_cast<ObjCMethodDecl>(Caller)) {\n // ...\n } else if (isa<CapturedDecl>(Caller)) {\n // ...\n S.Diag(Fn->getBeginLoc(), diag::err_va_start_captured_stmt);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/OpenMP/varargs.cpp"]={"clang/test/OpenMP/varargs.cpp:9:5: error: \'va_start\' cannot be used in a captured statement"} | ["clang/test/OpenMP/varargs.cpp"]={"clang/test/OpenMP/varargs.cpp:9:5: error: \'va_start\' cannot be used in a captured statement"} | ||
} | } | ||
Line 2,285: | Line 1,822: | ||
["err_va_start_fixed_function"]={ | ["err_va_start_fixed_function"]={ | ||
[a]="\'va_start\' used in function with fixed args", | [a]="\'va_start\' used in function with fixed args", | ||
[ | [b]=n, | ||
[ | [c]="\'va_start\' used in function with fixed args", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"f1deb837eee3",1493927465,"Fix bugs checking va_start in lambdas and erroneous contexts\n\nSummary:\nFirst, getCurFunction looks t...","Fix bugs checking va_start in lambdas and erroneous contexts\n\nSummary:\nFirst, getCurFunction looks through blocks and lambdas, which is wrong.\nInside a lambda, va_start should refer to the lambda call operator\nprototype. This fixes PR32737.\n\nSecond, we shouldn\'t use any of the getCur* methods, because they look\nthrough contexts that we don\'t want to look through (EnumDecl,\nCapturedStmtDecl). We can use CurContext directly as the calling\ncontext.\n\nFinally, this code assumed that CallExprs would never appear outside of\ncode contexts (block, function, obj-c method), which is wrong. Struct\nmember initializers are an easy way to create and parse exprs in a\nnon-code context.\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D32761\n\nllvm-svn: 302188"}, | ||
[ | [g]={{U,8091,"static bool checkVAStartIsInVariadicFunction(Sema &S, Expr *Fn, ParmVarDecl **LastParam = nullptr) {\n // ...\n if (!IsVariadic) {\n S.Diag(Fn->getBeginLoc(), diag::err_va_start_fixed_function);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Sema/varargs-x86-64.c"]={"clang/test/Sema/varargs-x86-64.c:18:3: error: \'va_start\' used in function with fixed args","clang/test/Sema/varargs-x86-64.c:38:3: error: \'va_start\' used in function with fixed args"} | ["clang/test/Sema/varargs-x86-64.c"]={"clang/test/Sema/varargs-x86-64.c:18:3: error: \'va_start\' used in function with fixed args","clang/test/Sema/varargs-x86-64.c:38:3: error: \'va_start\' used in function with fixed args"} | ||
} | } | ||
Line 2,300: | Line 1,834: | ||
["err_va_start_outside_function"]={ | ["err_va_start_outside_function"]={ | ||
[a]="\'va_start\' cannot be used outside a function", | [a]="\'va_start\' cannot be used outside a function", | ||
[ | [b]=n, | ||
[ | [c]="\'va_start\' cannot be used outside a function", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"f1deb837eee3",1493927465,"Fix bugs checking va_start in lambdas and erroneous contexts\n\nSummary:\nFirst, getCurFunction looks t...","Fix bugs checking va_start in lambdas and erroneous contexts\n\nSummary:\nFirst, getCurFunction looks through blocks and lambdas, which is wrong.\nInside a lambda, va_start should refer to the lambda call operator\nprototype. This fixes PR32737.\n\nSecond, we shouldn\'t use any of the getCur* methods, because they look\nthrough contexts that we don\'t want to look through (EnumDecl,\nCapturedStmtDecl). We can use CurContext directly as the calling\ncontext.\n\nFinally, this code assumed that CallExprs would never appear outside of\ncode contexts (block, function, obj-c method), which is wrong. Struct\nmember initializers are an easy way to create and parse exprs in a\nnon-code context.\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D32761\n\nllvm-svn: 302188"}, | ||
[ | [g]={{U,8086,"static bool checkVAStartIsInVariadicFunction(Sema &S, Expr *Fn, ParmVarDecl **LastParam = nullptr) {\n // ...\n if (auto *Block = dyn_cast<BlockDecl>(Caller)) {\n // ...\n } else if (auto *FD = dyn_cast<FunctionDecl>(Caller)) {\n // ...\n } else if (auto *MD = dyn_cast<ObjCMethodDecl>(Caller)) {\n // ...\n } else if (isa<CapturedDecl>(Caller)) {\n // ...\n } else {\n // ...\n S.Diag(Fn->getBeginLoc(), diag::err_va_start_outside_function);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/varargs.cpp"]={"clang/test/SemaCXX/varargs.cpp:27:31: error: \'va_start\' cannot be used outside a function","clang/test/SemaCXX/varargs.cpp:86:14: error: \'va_start\' cannot be used outside a function"} | ["clang/test/SemaCXX/varargs.cpp"]={"clang/test/SemaCXX/varargs.cpp:27:31: error: \'va_start\' cannot be used outside a function","clang/test/SemaCXX/varargs.cpp:86:14: error: \'va_start\' cannot be used outside a function"} | ||
} | } | ||
}, | }, | ||
["err_va_start_used_in_wrong_abi_function"]={ | ["err_va_start_used_in_wrong_abi_function"]={ | ||
[a | [a]="\'va_start\' used in %select{System V|Win64}0 ABI function", | ||
[b]=n, | |||
[c]="\'va_start\' used in (?:System V|Win64) ABI function", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"c7d5c94f78c7",1442523333,"Support __builtin_ms_va_list.\n\nSummary:\nThis change adds support for `__builtin_ms_va_list`, a GCC e...","Support __builtin_ms_va_list.\n\nSummary:\nThis change adds support for `__builtin_ms_va_list`, a GCC extension for\nvariadic `ms_abi` functions. The existing `__builtin_va_list` support is\ninadequate for this because `va_list` is defined differently in the Win64\nABI vs. the System V/AMD64 ABI.\n\nDepends on D1622.\n\nReviewers: rsmith, rnk, rjmccall\n\nCC: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D1623\n\nllvm-svn: 247941"}, | ||
[ | [g]={{U,8052,"/// Check that the user is calling the appropriate va_start builtin for the\n/// target and calling convention.\nstatic bool checkVAStartABI(Sema &S, unsigned BuiltinID, Expr *Fn) {\n // ...\n if (IsX64 || IsAArch64) {\n // ...\n if (IsMSVAStart) {\n // ...\n } else {\n // On x86-64/AArch64 Unix, don\'t allow this in Win64 ABI functions.\n // On x64 Windows, don\'t allow this in System V ABI functions.\n // (Yes, that means there\'s no corresponding way to support variadic\n // System V ABI functions on Windows.)\n if ((IsWindows && CC == CC_X86_64SysV) || (!IsWindows && CC == CC_Win64))\n return S.Diag(Fn->getBeginLoc(), diag::err_va_start_used_in_wrong_abi_function) << !IsWindows;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/varargs-aarch64.c"]={"clang/test/Sema/varargs-aarch64.c:10:3: error: \'va_start\' used in Win64 ABI function"} | ["clang/test/Sema/varargs-aarch64.c"]={"clang/test/Sema/varargs-aarch64.c:10:3: error: \'va_start\' used in Win64 ABI function"} | ||
} | } | ||
Line 2,330: | Line 1,858: | ||
["err_value_init_for_array_type"]={ | ["err_value_init_for_array_type"]={ | ||
[a]="array types cannot be value-initialized", | [a]="array types cannot be value-initialized", | ||
[ | [b]=n, | ||
[ | [c]="array types cannot be value\\-initialized", | ||
[d]=m, | |||
[e]=k, | |||
[f]={C,1237025389,s,s}, | |||
[ | [g]={{O,1565,"ExprResult Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization) {\n // ...\n if (Ty->isArrayType()) {\n if (!ListInitialization)\n return ExprError(Diag(TyBeginLoc, diag::err_value_init_for_array_type) << FullRange);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/class.derived/class.abstract/p3.cpp"]={"clang/test/CXX/class.derived/class.abstract/p3.cpp:68:3: error: array types cannot be value-initialized"} | ["clang/test/CXX/class.derived/class.abstract/p3.cpp"]={"clang/test/CXX/class.derived/class.abstract/p3.cpp:68:3: error: array types cannot be value-initialized"} | ||
} | } | ||
Line 2,345: | Line 1,870: | ||
["err_vaopt_paste_at_end"]={ | ["err_vaopt_paste_at_end"]={ | ||
[a]="\'##\' cannot appear at end of __VA_OPT__ argument", | [a]="\'##\' cannot appear at end of __VA_OPT__ argument", | ||
[ | [b]=n, | ||
[ | [c]="\'\\#\\#\' cannot appear at end of __VA_OPT__ argument", | ||
[d]=m, | |||
[e]=u, | |||
[f]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)\n\nThis patch implements an ext...","[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"}, | |||
[ | [g]={{P,2934,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n // ...\n } else {\n // ...\n while (Tok.isNot(tok::eod)) {\n // ...\n if (!Tok.isOneOf(tok::hash, tok::hashat, tok::hashhash)) {\n // ...\n if (VAOCtx.isVAOptToken(Tok)) {\n // ...\n } else if (VAOCtx.isInVAOpt()) {\n if (Tok.is(tok::r_paren)) {\n if (VAOCtx.sawClosingParen()) {\n // ...\n if (Tokens[Tokens.size() - 2].is(tok::hashhash)) {\n Diag(Tok, diag::err_vaopt_paste_at_end);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:41:36: error: \'##\' cannot appear at end of __VA_OPT__ argument"} | ["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:41:36: error: \'##\' cannot appear at end of __VA_OPT__ argument"} | ||
} | } | ||
Line 2,360: | Line 1,882: | ||
["err_vaopt_paste_at_start"]={ | ["err_vaopt_paste_at_start"]={ | ||
[a]="\'##\' cannot appear at start of __VA_OPT__ argument", | [a]="\'##\' cannot appear at start of __VA_OPT__ argument", | ||
[ | [b]=n, | ||
[ | [c]="\'\\#\\#\' cannot appear at start of __VA_OPT__ argument", | ||
[d]=m, | |||
[e]=u, | |||
[f]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)\n\nThis patch implements an ext...","[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"}, | |||
[ | [g]={{P,2923,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n // ...\n } else {\n // ...\n while (Tok.isNot(tok::eod)) {\n // ...\n if (!Tok.isOneOf(tok::hash, tok::hashat, tok::hashhash)) {\n // ...\n if (VAOCtx.isVAOptToken(Tok)) {\n // ...\n if (Tok.is(tok::hashhash)) {\n Diag(Tok, diag::err_vaopt_paste_at_start);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:33:30: error: \'##\' cannot appear at start of __VA_OPT__ argument","clang/test/Preprocessor/macro_vaopt_check.cpp:37:30: error: \'##\' cannot appear at start of __VA_OPT__ argument","clang/test/Preprocessor/macro_vaopt_check.cpp:52:30: error: \'##\' cannot appear at start of __VA_OPT__ argument","clang/test/Preprocessor/macro_vaopt_check.cpp:56:51: error: \'##\' cannot appear at start of __VA_OPT__ argument"} | ["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:33:30: error: \'##\' cannot appear at start of __VA_OPT__ argument","clang/test/Preprocessor/macro_vaopt_check.cpp:37:30: error: \'##\' cannot appear at start of __VA_OPT__ argument","clang/test/Preprocessor/macro_vaopt_check.cpp:52:30: error: \'##\' cannot appear at start of __VA_OPT__ argument","clang/test/Preprocessor/macro_vaopt_check.cpp:56:51: error: \'##\' cannot appear at start of __VA_OPT__ argument"} | ||
} | } | ||
}, | }, | ||
["err_var_partial_spec_redeclared"]={ | ["err_var_partial_spec_redeclared"]={ | ||
[a | [a]="variable template partial specialization %0 cannot be redefined", | ||
[b]=n, | |||
[c]="variable template partial specialization (.*?) cannot be redefined", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"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"}, | ||
[ | [g]={{Gc,4367,"/// Instantiate the declaration of a variable template partial\n/// specialization.\n///\n/// \\param VarTemplate the (instantiated) variable template that is partially\n/// specialized by the instantiation of \\p PartialSpec.\n///\n/// \\param PartialSpec the (uninstantiated) variable template partial\n/// specialization that we are instantiating.\n///\n/// \\returns The instantiated partial specialization, if successful; otherwise,\n/// NULL to indicate an error.\nVarTemplatePartialSpecializationDecl *TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(VarTemplateDecl *VarTemplate, VarTemplatePartialSpecializationDecl *PartialSpec) {\n // ...\n if (PrevDecl) {\n // ...\n SemaRef.Diag(PartialSpec->getLocation(), diag::err_var_partial_spec_redeclared) << WrittenTy->getType();"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_var_spec_no_template"]={ | ["err_var_spec_no_template"]={ | ||
[a | [a]="no variable template matches%select{| partial}0 specialization", | ||
[b]=n, | |||
[c]="no variable template matches(?:| partial) specialization", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"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"}, | ||
[ | [g]={{z,4544,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n // ...\n if (!VarTemplate) {\n // ...\n return Diag(D.getIdentifierLoc(), diag::err_var_spec_no_template) << IsPartialSpecialization;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:42:14: error: no variable template matches specialization"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:42:14: error: no variable template matches specialization"} | ||
} | } | ||
}, | }, | ||
["err_var_spec_no_template_but_method"]={ | ["err_var_spec_no_template_but_method"]={ | ||
[a | [a]="no variable template matches specialization; did you mean to use %0 as function template instead?", | ||
[b]=n, | |||
[c]="no variable template matches specialization; did you mean to use (.*?) as function template instead\\?", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"967c13d3fbfa",1399554980,"Fix PR19169 [Crash on invalid attempting to specialize a template method as a template variable].\nA ...","Fix PR19169 [Crash on invalid attempting to specialize a template method as a template variable].\nA template declaration of a template name can be null in case we have a dependent name or a set of function templates.\nHence use dyn_cast_or_null instead of dyn_cast. Also improve the diagnostic emitted in this case.\n\nllvm-svn: 208313"}, | ||
[ | [g]={{z,4542,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n // ...\n if (!VarTemplate) {\n // ...\n if (FnTemplate)\n return Diag(D.getIdentifierLoc(), diag::err_var_spec_no_template_but_method) << FnTemplate->getDeclName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp"]={"clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp:453:18: error: no variable template matches specialization; did you mean to use \'f\' as function template instead?","clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp:456:18: error: no variable template matches specialization; did you mean to use \'g\' as function template instead?"} | ["clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp"]={"clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp:453:18: error: no variable template matches specialization; did you mean to use \'f\' as function template instead?","clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp:456:18: error: no variable template matches specialization; did you mean to use \'g\' as function template instead?"} | ||
} | } | ||
}, | }, | ||
["err_variable_instantiates_to_function"]={ | ["err_variable_instantiates_to_function"]={ | ||
[a | [a]="%select{variable|static data member}0 instantiated with function type %1", | ||
[b]=n, | |||
[c]="(?:variable|static data member) instantiated with function type (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"6162334ce0f1",1284277044,"Diagnose the instantiation of variables (including static data\nmembers) with function type. Fixes PR...","Diagnose the instantiation of variables (including static data\nmembers) with function type. Fixes PR8047.\n\nllvm-svn: 113723"}, | ||
[ | [g]={{Gc,1139,"Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D, bool InstantiatingVarTemplate, ArrayRef<BindingDecl *> *Bindings) {\n // ...\n if (DI->getType()->isFunctionType()) {\n SemaRef.Diag(D->getLocation(), diag::err_variable_instantiates_to_function) << D->isStaticDataMember() << DI->getType();"},{Gc,3963,"Decl *TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl(VarTemplateDecl *VarTemplate, VarDecl *D, const TemplateArgumentListInfo &TemplateArgsInfo, ArrayRef<TemplateArgument> Converted, VarTemplateSpecializationDecl *PrevDecl) {\n // ...\n if (DI->getType()->isFunctionType()) {\n SemaRef.Diag(D->getLocation(), diag::err_variable_instantiates_to_function) << D->isStaticDataMember() << DI->getType();"},{Gc,4383,"/// Instantiate the declaration of a variable template partial\n/// specialization.\n///\n/// \\param VarTemplate the (instantiated) variable template that is partially\n/// specialized by the instantiation of \\p PartialSpec.\n///\n/// \\param PartialSpec the (uninstantiated) variable template partial\n/// specialization that we are instantiating.\n///\n/// \\returns The instantiated partial specialization, if successful; otherwise,\n/// NULL to indicate an error.\nVarTemplatePartialSpecializationDecl *TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(VarTemplateDecl *VarTemplate, VarTemplatePartialSpecializationDecl *PartialSpec) {\n // ...\n if (DI->getType()->isFunctionType()) {\n SemaRef.Diag(PartialSpec->getLocation(), diag::err_variable_instantiates_to_function) << PartialSpec->isStaticDataMember() << DI->getType();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/temp/temp.arg/temp.arg.type/p2.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.type/p2.cpp:6:12: error: static data member instantiated with function type \'int ()\'","clang/test/CXX/temp/temp.arg/temp.arg.type/p2.cpp:12:11: error: variable instantiated with function type \'int ()\'"} | ["clang/test/CXX/temp/temp.arg/temp.arg.type/p2.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.type/p2.cpp:6:12: error: static data member instantiated with function type \'int ()\'","clang/test/CXX/temp/temp.arg/temp.arg.type/p2.cpp:12:11: error: variable instantiated with function type \'int ()\'"} | ||
} | } | ||
Line 2,432: | Line 1,939: | ||
["err_variable_object_no_init"]={ | ["err_variable_object_no_init"]={ | ||
[a]="variable-sized object may not be initialized", | [a]="variable-sized object may not be initialized", | ||
[ | [b]=n, | ||
[ | [c]="variable\\-sized object may not be initialized", | ||
[d]=m, | |||
[e]=k, | |||
[f]={C,1237025389,s,s}, | |||
[ | [g]={{r,7679,"ExprResult Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr) {\n // ...\n if (literalType->isArrayType()) {\n // ...\n if (literalType->isVariableArrayType()) {\n // ...\n if ((LangOpts.CPlusPlus || NumInits.value_or(0)) && !tryToFixVariablyModifiedVarType(TInfo, literalType, LParenLoc, diag::err_variable_object_no_init))"},{N,1996,"void InitListChecker::CheckArrayType(const InitializedEntity &Entity, InitListExpr *IList, QualType &DeclType, llvm::APSInt elementIndex, bool SubobjectIsDesignatorContext, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\n if (const VariableArrayType *VAT = dyn_cast<VariableArrayType>(arrayType)) {\n // ...\n if (!VerifyOnly) {\n // C2x 6.7.9p4: An entity of variable length array type shall not be\n // initialized except by an empty initializer.\n //\n // The C extension warnings are issued from ParseBraceInitializer() and\n // do not need to be issued here. However, we continue to issue an error\n // in the case there are initializers or we are compiling C++. We allow\n // use of VLAs in C++, but it\'s not clear we want to allow {} to zero\n // init a VLA in C++ in all cases (such as with non-trivial constructors).\n // FIXME: should we allow this construct in C++ when it makes sense to do\n // so?\n if (HasErr)\n SemaRef.Diag(VAT->getSizeExpr()->getBeginLoc(), diag::err_variable_object_no_init) << VAT->getSizeExpr()->getSourceRange();"},{N,5480,"static void TryOrBuildParenListInitialization(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args, InitializationSequence &Sequence, bool VerifyOnly, ExprResult *Result = nullptr) {\n // ...\n if (const ArrayType *AT = S.getASTContext().getAsArrayType(Entity.getType())) {\n // ...\n // C++ [dcl.init]p16.5\n // if the destination type is an array, the object is initialized as\n // follows. Let x1, . . . , xk be the elements of the expression-list. If\n // the destination type is an array of unknown bound, it is defined as\n // having k elements.\n if (const ConstantArrayType *CAT = S.getASTContext().getAsConstantArrayType(Entity.getType())) {\n // ...\n } else if (const VariableArrayType *VAT = S.getASTContext().getAsVariableArrayType(Entity.getType())) {\n // ...\n S.Diag(SE->getBeginLoc(), diag::err_variable_object_no_init) << SE->getSourceRange();"},{N,9619,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_VariableLengthArrayHasInitializer:\n S.Diag(Kind.getLocation(), diag::err_variable_object_no_init) << Args[0]->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | [Pb]={"clang/test/Sema/vla.c:56:26: error: variable-sized object may not be initialized"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_variably_modified_new_type"]={ | ["err_variably_modified_new_type"]={ | ||
[a | [a]="\'new\' cannot allocate object of variably modified type %0", | ||
[b]=n, | |||
[c]="\'new\' cannot allocate object of variably modified type (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"3999e15d93d4",1286380831,"Reject the allocation of variably-modified types in C++ \'new\'\nexpressions. Fixes PR8209 in the narro...","Reject the allocation of variably-modified types in C++ \'new\'\nexpressions. Fixes PR8209 in the narrowest way possible. I\'m still\nconsidering whether I want to implement the extension that permits the\nuse of VLA types in a \'new\' expression.\n\nllvm-svn: 115790"}, | ||
[ | [g]={{O,2471,"/// Checks that a type is suitable as the allocated type\n/// in a new-expression.\nbool Sema::CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R) {\n // C++ 5.3.4p1: \"[The] type shall be a complete object type, but not an\n // abstract class type or array thereof.\n if (AllocType->isFunctionType())\n // ...\n else if (AllocType->isReferenceType())\n // ...\n else if (!AllocType->isDependentType() && RequireCompleteSizedType(Loc, AllocType, diag::err_new_incomplete_or_sizeless_type, R))\n // ...\n else if (RequireNonAbstractType(Loc, AllocType, diag::err_allocation_of_abstract_type))\n // ...\n else if (AllocType->isVariablyModifiedType())\n return Diag(Loc, diag::err_variably_modified_new_type) << AllocType;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/new-delete-0x.cpp"]={"clang/test/SemaCXX/new-delete-0x.cpp:24:17: error: \'new\' cannot allocate object of variably modified type \'int (*)[[] {"} | ["clang/test/SemaCXX/new-delete-0x.cpp"]={"clang/test/SemaCXX/new-delete-0x.cpp:24:17: error: \'new\' cannot allocate object of variably modified type \'int (*)[[] {"} | ||
} | } | ||
}, | }, | ||
["err_variably_modified_nontype_template_param"]={ | ["err_variably_modified_nontype_template_param"]={ | ||
[a | [a]="non-type template parameter of variably modified type %0", | ||
[b]=n, | |||
[c]="non\\-type template parameter of variably modified type (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"959d5a0cbd78",1274545050,"Implement support for variable length arrays in C++. VLAs are limited\nin several important ways:\n\n ...","Implement support for variable length arrays in C++. VLAs are limited\nin several important ways:\n\n - VLAs of non-POD types are not permitted.\n - VLAs cannot be used in conjunction with C++ templates.\n\nThese restrictions are intended to keep VLAs out of the parts of the\nC++ type system where they cause the most trouble. Fixes PR5678 and\n<rdar://problem/8013618>.\n\nllvm-svn: 104443"}, | ||
[ | [g]={{z,1431,"QualType Sema::CheckNonTypeTemplateParameterType(QualType T, SourceLocation Loc) {\n // We don\'t allow variably-modified types as the type of non-type template\n // parameters.\n if (T->isVariablyModifiedType()) {\n Diag(Loc, diag::err_variably_modified_nontype_template_param) << T;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/c99-variable-length-array.cpp"]={"clang/test/SemaCXX/c99-variable-length-array.cpp:60:18: error: non-type template parameter of variably modified type \'int (&)[HasNonConstantValue::value]\'"} | ["clang/test/SemaCXX/c99-variable-length-array.cpp"]={"clang/test/SemaCXX/c99-variable-length-array.cpp:60:18: error: non-type template parameter of variably modified type \'int (&)[HasNonConstantValue::value]\'"} | ||
} | } | ||
}, | }, | ||
["err_variably_modified_template_arg"]={ | ["err_variably_modified_template_arg"]={ | ||
[a | [a]="variably modified type %0 cannot be used as a template argument", | ||
[b]=n, | |||
[c]="variably modified type (.*?) cannot be used as a template argument", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"959d5a0cbd78",1274545050,"Implement support for variable length arrays in C++. VLAs are limited\nin several important ways:\n\n ...","Implement support for variable length arrays in C++. VLAs are limited\nin several important ways:\n\n - VLAs of non-POD types are not permitted.\n - VLAs cannot be used in conjunction with C++ templates.\n\nThese restrictions are intended to keep VLAs out of the parts of the\nC++ type system where they cause the most trouble. Fixes PR5678 and\n<rdar://problem/8013618>.\n\nllvm-svn: 104443"}, | ||
[ | [g]={{z,6509,"/// Check a template argument against its corresponding\n/// template type parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.type]. It\n/// returns true if an error occurred, and false otherwise.\nbool Sema::CheckTemplateArgument(TypeSourceInfo *ArgInfo) {\n // ...\n if (CanonArg->isVariablyModifiedType()) {\n return Diag(SR.getBegin(), diag::err_variably_modified_template_arg) << Arg;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/c99-variable-length-array.cpp"]={"clang/test/SemaCXX/c99-variable-length-array.cpp:55:6: error: variably modified type \'typeof (array)\' (aka \'int[N]\') cannot be used as a template argument"} | ["clang/test/SemaCXX/c99-variable-length-array.cpp"]={"clang/test/SemaCXX/c99-variable-length-array.cpp:55:6: error: variably modified type \'typeof (array)\' (aka \'int[N]\') cannot be used as a template argument"} | ||
} | } | ||
}, | }, | ||
["err_variably_modified_typeid"]={ | ["err_variably_modified_typeid"]={ | ||
[a | [a]="\'typeid\' of variably modified type %0", | ||
[b]=n, | |||
[c]="\'typeid\' of variably modified type (.*?)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"6f3150a7d262",1416604152,"Sema: Don\'t permit variably modified types in typeid\n\nGCC and ICC both reject this and the \'Runtime-...","Sema: Don\'t permit variably modified types in typeid\n\nGCC and ICC both reject this and the \'Runtime-sized arrays with\nautomatic storage duration\' (N3639) paper forbade this as well.\nPreviously, we would crash on our way to mangling.\n\nThis fixes PR21632.\n\nllvm-svn: 222569"}, | ||
[ | [g]={{O,564,"/// Build a C++ typeid expression with a type operand.\nExprResult Sema::BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc) {\n // ...\n if (T->isVariablyModifiedType())\n return ExprError(Diag(TypeidLoc, diag::err_variably_modified_typeid) << T);"},{O,634,"/// Build a C++ typeid expression with an expression operand.\nExprResult Sema::BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, Expr *E, SourceLocation RParenLoc) {\n // ...\n if (E->getType()->isVariablyModifiedType())\n return ExprError(Diag(TypeidLoc, diag::err_variably_modified_typeid) << E->getType());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/typeid.cpp"]={"clang/test/SemaCXX/typeid.cpp:27:3: error: \'typeid\' of variably modified type \'char[i]\'","clang/test/SemaCXX/typeid.cpp:28:3: error: \'typeid\' of variably modified type \'char[i]\'"} | ["clang/test/SemaCXX/typeid.cpp"]={"clang/test/SemaCXX/typeid.cpp:27:3: error: \'typeid\' of variably modified type \'char[i]\'","clang/test/SemaCXX/typeid.cpp:28:3: error: \'typeid\' of variably modified type \'char[i]\'"} | ||
} | } | ||
Line 2,507: | Line 1,999: | ||
["err_variadic_device_fn"]={ | ["err_variadic_device_fn"]={ | ||
[a]="CUDA device code does not support variadic functions", | [a]="CUDA device code does not support variadic functions", | ||
[ | [b]=n, | ||
[ | [c]="CUDA device code does not support variadic functions", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"e48cd6c5304d",1453584497,"[CUDA] Disallow variadic functions other than printf in device code.\n\nReviewers: tra\n\nSubscribers: c...","[CUDA] Disallow variadic functions other than printf in device code.\n\nReviewers: tra\n\nSubscribers: cfe-commits, echristo, jhen\n\nDifferential Revision: http://reviews.llvm.org/D16484\n\nllvm-svn: 258643"}, | ||
[ | [g]={{p,10680,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().CUDA) {\n // ...\n // Variadic functions, other than a *declaration* of printf, are not allowed\n // in device-side CUDA code, unless someone passed\n // -fcuda-allow-variadic-functions.\n if (!getLangOpts().CUDAAllowVariadicFunctions && NewFD->isVariadic() && (NewFD->hasAttr<CUDADeviceAttr>() || NewFD->hasAttr<CUDAGlobalAttr>()) && !(II && II->isStr(\"printf\") && NewFD->isExternC() && !D.isFunctionDefinition())) {\n Diag(NewFD->getLocation(), diag::err_variadic_device_fn);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCUDA/vararg.cu"]={"clang/test/SemaCUDA/vararg.cu:33:17: error: CUDA device code does not support variadic functions","clang/test/SemaCUDA/vararg.cu:39:17: error: CUDA device code does not support variadic functions","clang/test/SemaCUDA/vararg.cu:47:27: error: CUDA device code does not support variadic functions","clang/test/SemaCUDA/vararg.cu:53:16: error: CUDA device code does not support variadic functions"} | ["clang/test/SemaCUDA/vararg.cu"]={"clang/test/SemaCUDA/vararg.cu:33:17: error: CUDA device code does not support variadic functions","clang/test/SemaCUDA/vararg.cu:39:17: error: CUDA device code does not support variadic functions","clang/test/SemaCUDA/vararg.cu:47:27: error: CUDA device code does not support variadic functions","clang/test/SemaCUDA/vararg.cu:53:16: error: CUDA device code does not support variadic functions"} | ||
} | } | ||
}, | }, | ||
["err_vec_builtin_incompatible_vector"]={ | ["err_vec_builtin_incompatible_vector"]={ | ||
[a | [a]="first two arguments to %0 must have the same type", | ||
[b]=n, | |||
[c]="first two arguments to (.*?) must have the same type", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"edc7849b1bdd",1495637157,"Generalize two diagnostic messages to take function name as parameter.\n\nllvm-svn: 303753","Generalize two diagnostic messages to take function name as parameter.\n\nllvm-svn: 303753"}, | ||
[ | [g]={{U,8422,"// Customized Sema Checking for VSX builtins that have the following signature:\n// vector [...] builtinName(vector [...], vector [...], const int);\n// Which takes the same type of vectors (any legal vector type) for the first\n// two arguments and takes compile time constant for the third argument.\n// Example builtins are :\n// vector double vec_xxpermdi(vector double, vector double, int);\n// vector short vec_xxsldwi(vector short, vector short, int);\nbool Sema::SemaBuiltinVSX(CallExpr *TheCall) {\n // ...\n // Check the first two arguments are the same type.\n if (!Context.hasSameUnqualifiedType(Arg1Ty, Arg2Ty)) {\n return Diag(BuiltinLoc, diag::err_vec_builtin_incompatible_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(0)->getBeginLoc(), TheCall->getArg(1)->getEndLoc());"},{U,8473,"/// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.\n// This is declared to take (...), so we have to check everything.\nExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {\n // ...\n if (!TheCall->getArg(0)->isTypeDependent() && !TheCall->getArg(1)->isTypeDependent()) {\n // ...\n // Check to see if we have a call with 2 vector arguments, the unary shuffle\n // with mask. If so, verify that RHS is an integer vector type with the\n // same number of elts as lhs.\n if (TheCall->getNumArgs() == 2) {\n if (!RHSType->hasIntegerRepresentation() || RHSType->castAs<VectorType>()->getNumElements() != numElements)\n return ExprError(Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_incompatible_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(1)->getBeginLoc(), TheCall->getArg(1)->getEndLoc()));"},{U,8479,"/// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.\n// This is declared to take (...), so we have to check everything.\nExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {\n // ...\n if (!TheCall->getArg(0)->isTypeDependent() && !TheCall->getArg(1)->isTypeDependent()) {\n // ...\n // Check to see if we have a call with 2 vector arguments, the unary shuffle\n // with mask. If so, verify that RHS is an integer vector type with the\n // same number of elts as lhs.\n if (TheCall->getNumArgs() == 2) {\n // ...\n } else if (!Context.hasSameUnqualifiedType(LHSType, RHSType)) {\n return ExprError(Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_incompatible_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(0)->getBeginLoc(), TheCall->getArg(1)->getEndLoc()));"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGen/PowerPC/builtins-ppc-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-error.c:36:3: error: first two arguments to \'__builtin_vsx_xxpermdi\' must have the same type","clang/test/CodeGen/PowerPC/builtins-ppc-error.c:44:3: error: first two arguments to \'__builtin_vsx_xxsldwi\' must have the same type"} | ["clang/test/CodeGen/PowerPC/builtins-ppc-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-error.c:36:3: error: first two arguments to \'__builtin_vsx_xxpermdi\' must have the same type","clang/test/CodeGen/PowerPC/builtins-ppc-error.c:44:3: error: first two arguments to \'__builtin_vsx_xxsldwi\' must have the same type"} | ||
} | } | ||
}, | }, | ||
["err_vec_builtin_non_vector"]={ | ["err_vec_builtin_non_vector"]={ | ||
[a | [a]="first two arguments to %0 must be vectors", | ||
[b]=n, | |||
[c]="first two arguments to (.*?) must be vectors", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"edc7849b1bdd",1495637157,"Generalize two diagnostic messages to take function name as parameter.\n\nllvm-svn: 303753","Generalize two diagnostic messages to take function name as parameter.\n\nllvm-svn: 303753"}, | ||
[ | [g]={{U,8414,"// Customized Sema Checking for VSX builtins that have the following signature:\n// vector [...] builtinName(vector [...], vector [...], const int);\n// Which takes the same type of vectors (any legal vector type) for the first\n// two arguments and takes compile time constant for the third argument.\n// Example builtins are :\n// vector double vec_xxpermdi(vector double, vector double, int);\n// vector short vec_xxsldwi(vector short, vector short, int);\nbool Sema::SemaBuiltinVSX(CallExpr *TheCall) {\n // ...\n if ((!Arg1Ty->isVectorType() && !Arg1Ty->isDependentType()) || (!Arg2Ty->isVectorType() && !Arg2Ty->isDependentType())) {\n return Diag(BuiltinLoc, diag::err_vec_builtin_non_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(0)->getBeginLoc(), TheCall->getArg(1)->getEndLoc());"},{U,8458,"/// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.\n// This is declared to take (...), so we have to check everything.\nExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {\n // ...\n if (!TheCall->getArg(0)->isTypeDependent() && !TheCall->getArg(1)->isTypeDependent()) {\n // ...\n if (!LHSType->isVectorType() || !RHSType->isVectorType())\n return ExprError(Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_non_vector) << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(0)->getBeginLoc(), TheCall->getArg(1)->getEndLoc()));"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGen/PowerPC/builtins-ppc-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-error.c:35:3: error: first two arguments to \'__builtin_vsx_xxpermdi\' must be vectors","clang/test/CodeGen/PowerPC/builtins-ppc-error.c:43:3: error: first two arguments to \'__builtin_vsx_xxsldwi\' must be vectors"} | ["clang/test/CodeGen/PowerPC/builtins-ppc-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-error.c:35:3: error: first two arguments to \'__builtin_vsx_xxpermdi\' must be vectors","clang/test/CodeGen/PowerPC/builtins-ppc-error.c:43:3: error: first two arguments to \'__builtin_vsx_xxsldwi\' must be vectors"} | ||
} | } | ||
}, | }, | ||
["err_vecstep_non_scalar_vector_type"]={ | ["err_vecstep_non_scalar_vector_type"]={ | ||
[a | [a]="\'vec_step\' requires built-in scalar or vector type, %0 invalid", | ||
[b]=n, | |||
[c]="\'vec_step\' requires built\\-in scalar or vector type, (.*?) invalid", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"e190dee7a548",1299871489,"Add support for the OpenCL vec_step operator, by generalising and\nextending the existing support for...","Add support for the OpenCL vec_step operator, by generalising and\nextending the existing support for sizeof and alignof. Original\npatch by Guy Benyei.\n\nllvm-svn: 127475"}, | ||
[ | [g]={{r,4302,"static bool CheckVecStepTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange) {\n // [OpenCL 1.1 6.11.12] \"The vec_step built-in function takes a built-in\n // scalar or vector data type argument...\"\n // Every built-in scalar type (OpenCL 1.1 6.1.1) is either an arithmetic\n // type (C99 6.2.5p18) or void.\n if (!(T->isArithmeticType() || T->isVoidType() || T->isVectorType())) {\n S.Diag(Loc, diag::err_vecstep_non_scalar_vector_type) << T << ArgRange;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaOpenCL/vec_step.cl"]={"clang/test/SemaOpenCL/vec_step.cl:29:24: error: \'vec_step\' requires built-in scalar or vector type, \'__private struct S\' invalid","clang/test/SemaOpenCL/vec_step.cl:30:15: error: \'vec_step\' requires built-in scalar or vector type, \'__private int16 *\' invalid","clang/test/SemaOpenCL/vec_step.cl:31:15: error: \'vec_step\' requires built-in scalar or vector type, \'void (void)\' invalid"} | ["clang/test/SemaOpenCL/vec_step.cl"]={"clang/test/SemaOpenCL/vec_step.cl:29:24: error: \'vec_step\' requires built-in scalar or vector type, \'__private struct S\' invalid","clang/test/SemaOpenCL/vec_step.cl:30:15: error: \'vec_step\' requires built-in scalar or vector type, \'__private int16 *\' invalid","clang/test/SemaOpenCL/vec_step.cl:31:15: error: \'vec_step\' requires built-in scalar or vector type, \'void (void)\' invalid"} | ||
} | } | ||
}, | }, | ||
["err_vector_incorrect_num_initializers"]={ | ["err_vector_incorrect_num_initializers"]={ | ||
[a | [a]="%select{too many|too few}0 elements in vector initialization (expected %1 elements, have %2)", | ||
[b]=n, | |||
[c]="(?:too many|too few) elements in vector initialization \\(expected (.*?) elements, have (.*?)\\)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"a96114ed087b",1249840544,"AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);\n\nIn addition to being defined ...","AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);\n\nIn addition to being defined by the AltiVec PIM, this is also the vector\ninitializer syntax used by OpenCL, so that vector literals are compatible\nwith macro arguments.\n\nllvm-svn: 78535"}, | ||
[ | [g]={{N,1908,"void InitListChecker::CheckVectorType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\n // OpenCL and HLSL require all elements to be initialized.\n if (numEltsInit != maxElements) {\n if (!VerifyOnly)\n SemaRef.Diag(IList->getBeginLoc(), diag::err_vector_incorrect_num_initializers) << (numEltsInit < maxElements) << maxElements << numEltsInit;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl"]={"clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:14:32: error: too few elements in vector initialization (expected 3 elements, have 2)","clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:21:32: error: too few elements in vector initialization (expected 2 elements, have 1)"} | ["clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl"]={"clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:14:32: error: too few elements in vector initialization (expected 3 elements, have 2)","clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:21:32: error: too few elements in vector initialization (expected 2 elements, have 1)"} | ||
} | } | ||
}, | }, | ||
["err_verify_ambiguous_marker"]={ | ["err_verify_ambiguous_marker"]={ | ||
[a | [a]="reference to marker \'%0\' is ambiguous", | ||
[b]=n, | |||
[c]="reference to marker \'(.*?)\' is ambiguous", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"4e8144a0d140",1555130019,"[verify] Add support for location markers in directives.\n\nA marker (matching /#[A-Za-z0-9_-]/) is sp...","[verify] Add support for location markers in directives.\n\nA marker (matching /#[A-Za-z0-9_-]/) is specified by attaching a comment\ncontaining the marker to the line at which the diagnostic is expected,\nand then can be referenced from an expected-* directive after an @:\n\n foo // #1\n // expected-error@#1 {{undeclared identifier \'foo\'}}\n\nThe intent is for markers to be used in situations where relative line\nnumbers are currently used, to avoid the need to renumber when the test\ncase is rearranged.\n\nllvm-svn: 358326"}, | ||
[ | [g]={{ib,386,"// Tracker for markers in the input files. A marker is a comment of the form\n//\n// n = 123; // #123\n//\n// ... that can be referred to by a later expected-* directive:\n//\n// // expected-error@#123 {{undeclared identifier \'n\'}}\n//\n// Marker declarations must be at the start of a comment or preceded by\n// whitespace to distinguish them from uses of markers in directives.\nclass VerifyDiagnosticConsumer::MarkerTracker {\n // ...\n // Ensure we have no remaining deferred directives, and no\n // multiply-defined-and-used markers.\n void finalize() {\n for (auto &MarkerInfo : Markers) {\n // ...\n if (M.RedefLoc.isValid() && M.UseLoc.isValid()) {\n Diags.Report(M.UseLoc, diag::err_verify_ambiguous_marker) << Name;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_inconsistent_diags"]={ | ["err_verify_inconsistent_diags"]={ | ||
[a | [a]="\'%0\' diagnostics %select{expected|seen}1 but not %select{seen|expected}1: %2", | ||
[b]=n, | |||
[c]="\'(.*?)\' diagnostics (?:expected|seen) but not (?:seen|expected)\\: (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"348185548eb2",1258168999,"Add VerifyDiagnosticsClient, to replace old -verify.\n - This reimplements -verify as just another Di...","Add VerifyDiagnosticsClient, to replace old -verify.\n - This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.\n\n - This also tweaks a few things:\n o Errors are now just regular diagnostics.\n o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn\'t yet a way to specify that they are expected. That would be nice though.\n\n - Not yet used.\n\nllvm-svn: 88748"}, | ||
[ | [g]={{ib,880,"/// Takes a list of diagnostics that have been generated but not matched\n/// by an expected-* directive and produces a diagnostic to the user from this.\nstatic unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceMgr, const_diag_iterator diag_begin, const_diag_iterator diag_end, const char *Kind) {\n // ...\n Diags.Report(diag::err_verify_inconsistent_diags).setForceEmit() << Kind << /*Unexpected=*/true << OS.str();"},{ib,911,"/// Takes a list of diagnostics that were expected to have been generated\n/// but were not and produces a diagnostic to the user from this.\nstatic unsigned PrintExpected(DiagnosticsEngine &Diags, SourceManager &SourceMgr, std::vector<Directive *> &DL, const char *Kind) {\n // ...\n Diags.Report(diag::err_verify_inconsistent_diags).setForceEmit() << Kind << /*Unexpected=*/false << OS.str();"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_invalid_content"]={ | ["err_verify_invalid_content"]={ | ||
[a | [a]="invalid expected %0: %1", | ||
[b]=n, | |||
[c]="invalid expected (.*?)\\: (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"e82411b47f76",1272484950,"add regex support for -verify mode. You can now do things like\nexpected-error-re {{someregex}}\n\nPat...","add regex support for -verify mode. You can now do things like\nexpected-error-re {{someregex}}\n\nPatch by mike-m!\n\nllvm-svn: 102516"}, | ||
[ | [g]={{ib,308,"// Attach the specified directive to the line of code indicated by\n// \\p ExpectedLoc.\nvoid attachDirective(DiagnosticsEngine &Diags, const UnattachedDirective &UD, SourceLocation ExpectedLoc, bool MatchAnyFileAndLine = false, bool MatchAnyLine = false) {\n // ...\n if (!D->isValid(Error)) {\n Diags.Report(UD.ContentBegin, diag::err_verify_invalid_content) << (UD.RegexKind ? \"regex\" : \"string\") << Error;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_invalid_no_diags"]={ | ["err_verify_invalid_no_diags"]={ | ||
[a | [a]="%select{expected|\'expected-no-diagnostics\'}0 directive cannot follow %select{\'expected-no-diagnostics\' directive|other expected directives}0", | ||
[b]=n, | |||
[c]="(?:expected|\'expected\\-no\\-diagnostics\') directive cannot follow (?:\'expected\\-no\\-diagnostics\' directive|other expected directives)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"0fea04509a64",1350650972,"Change VerifyDiagnosticConsumer so that it *must* contain at least one \"expected-*\" directive. As a...","Change VerifyDiagnosticConsumer so that it *must* contain at least one \"expected-*\" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive \"expected-no-diagnostics\" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other \"expected-*\" directive.\n\nThis change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file.\n\nPatch reviewed by David Blaikie.\n\nllvm-svn: 166281"}, | ||
[ | [g]={{ib,483,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n // ...\n for (ParseHelper PH(S); !PH.Done();) {\n // ...\n if (NoDiag) {\n if (Status == VerifyDiagnosticConsumer::HasOtherExpectedDirectives)\n Diags.Report(Pos, diag::err_verify_invalid_no_diags) << /*IsExpectedNoDiagnostics=*/true;"},{ib,490,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n // ...\n for (ParseHelper PH(S); !PH.Done();) {\n // ...\n if (Status == VerifyDiagnosticConsumer::HasExpectedNoDiagnostics) {\n Diags.Report(Pos, diag::err_verify_invalid_no_diags) << /*IsExpectedNoDiagnostics=*/false;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_invalid_range"]={ | ["err_verify_invalid_range"]={ | ||
[a | [a]="invalid range following \'-\' in expected %0", | ||
[b]=n, | |||
[c]="invalid range following \'\\-\' in expected (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"b8b2ca6ffbfb",1341889046,"Allow -verify directives to specify a min and max count, not just \"+\".\n\n void f(); // expected-note...","Allow -verify directives to specify a min and max count, not just \"+\".\n\n void f(); // expected-note 0+ {{previous declaration is here}}\n void g(); // expected-note 0-1 {{previous declaration is here}}\n\nThe old \"+\" syntax is still an alias for \"1+\", and single numbers still work.\n\nPatch by Andy Gibbs!\n\nllvm-svn: 159979"}, | ||
[ | [g]={{ib,594,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n // ...\n for (ParseHelper PH(S); !PH.Done();) {\n // ...\n // Next optional token: positive integer or a \'+\'.\n if (PH.Next(D.Min)) {\n // ...\n // A positive integer can be followed by a \'+\' meaning min\n // or more, or by a \'-\' meaning a range from min to max.\n if (PH.Next(\"+\")) {\n // ...\n } else if (PH.Next(\"-\")) {\n // ...\n if (!PH.Next(D.Max) || D.Max < D.Min) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_invalid_range) << KindStr;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_missing_end"]={ | ["err_verify_missing_end"]={ | ||
[a | [a]="cannot find end (\'}}\') of expected %0", | ||
[b]=n, | |||
[c]="cannot find end \\(\'\\}\\}\'\\) of expected (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"348185548eb2",1258168999,"Add VerifyDiagnosticsClient, to replace old -verify.\n - This reimplements -verify as just another Di...","Add VerifyDiagnosticsClient, to replace old -verify.\n - This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.\n\n - This also tweaks a few things:\n o Errors are now just regular diagnostics.\n o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn\'t yet a way to specify that they are expected. That would be nice though.\n\n - Not yet used.\n\nllvm-svn: 88748"}, | ||
[ | [g]={{ib,621,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n // ...\n for (ParseHelper PH(S); !PH.Done();) {\n // ...\n // Search for token: }}\n if (!PH.SearchClosingBrace(\"{{\", \"}}\")) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_end) << KindStr;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_missing_file"]={ | ["err_verify_missing_file"]={ | ||
[a | [a]="file \'%0\' could not be located in expected %1", | ||
[b]=n, | |||
[c]="file \'(.*?)\' could not be located in expected (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"fcc699aee8db",1366186006,"Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.\n\nVerifyDiagnosticConsum...","Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.\n\nVerifyDiagnosticConsumer previously would not check that the diagnostic and\nits matching directive referenced the same source file. Common practice was\nto create directives that referenced other files but only by line number,\nand this led to problems such as when the file containing the directive\ndidn\'t have enough lines to match the location of the diagnostic in the\nother file, leading to bizarre file formatting and other oddities.\n\nThis patch causes VerifyDiagnosticConsumer to match source files as well as\nline numbers. Therefore, a new syntax is made available for directives, for\nexample:\n\n// expected-error@file:line {{diagnostic message}}\n\nThis extends the @line feature where \"file\" is the file where the diagnostic\nis generated. The @line syntax is still available and uses the current file\nfor the diagnostic. \"file\" can be specified either as a relative or absolute\npath - although the latter has less usefulness, I think! The #include search\npaths will be used to locate the file and if it is not found an error will be\ngenerated.\n\nThe new check is not optional: if the directive is in a different file to the\ndiagnostic, the file must be specified. Therefore, a number of test-cases\nhave been updated with regard to this.\n\nThis closes out PR15613.\n\nllvm-svn: 179677"}, | ||
[ | [g]={{ib,550,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n // ...\n for (ParseHelper PH(S); !PH.Done();) {\n // ...\n if (!PH.Next(\"@\")) {\n // ...\n } else {\n // ...\n if (FoundPlus || PH.Next(\"-\")) {\n // ...\n } else if (PH.Next(Line)) {\n // ...\n } else if (PH.NextMarker()) {\n // ...\n } else if (PP && PH.Search(\":\")) {\n // ...\n if (Filename == \"*\") {\n // ...\n } else {\n // ...\n if (!File) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_file) << Filename << KindStr;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_missing_line"]={ | ["err_verify_missing_line"]={ | ||
[a | [a]="missing or invalid line number following \'@\' in expected %0", | ||
[b]=n, | |||
[c]="missing or invalid line number following \'@\' in expected (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"e1572eb3e27c",1341889023,"Allow line numbers on -verify directives.\n\n// expected-warning@10 {{some text}}\n\nThe line number may...","Allow line numbers on -verify directives.\n\n// expected-warning@10 {{some text}}\n\nThe line number may be absolute (as above), or relative to the current\nline by prefixing the number with either \'+\' or \'-\'.\n\nPatch by Andy Gibbs!\n\nllvm-svn: 159978"}, | ||
[ | [g]={{ib,537,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n // ...\n for (ParseHelper PH(S); !PH.Done();) {\n // ...\n if (!PH.Next(\"@\")) {\n // ...\n } else {\n // ...\n if (FoundPlus || PH.Next(\"-\")) {\n // ...\n } else if (PH.Next(Line)) {\n // ...\n } else if (PH.NextMarker()) {\n // ...\n } else if (PP && PH.Search(\":\")) {\n // ...\n if (Filename == \"*\") {\n // ...\n if (!PH.Next(\"*\")) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_line) << \"\'*\'\";"},{ib,573,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n // ...\n for (ParseHelper PH(S); !PH.Done();) {\n // ...\n if (!PH.Next(\"@\")) {\n // ...\n } else {\n // ...\n if (ExpectedLoc.isInvalid() && !MatchAnyLine && Marker.empty()) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_line) << KindStr;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_missing_regex"]={ | ["err_verify_missing_regex"]={ | ||
[a | [a]="cannot find start of regex (\'{{\') in %0", | ||
[b]=n, | |||
[c]="cannot find start of regex \\(\'\\{\\{\'\\) in (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"cda4b6dd007c",1386805250,"Change semantics of regex expectations in the diagnostic verifier\n\nPreviously, a line like\n\n // exp...","Change semantics of regex expectations in the diagnostic verifier\n\nPreviously, a line like\n\n // expected-error-re {{foo}}\n\ntreats the entirety of foo as a regex. This is inconvenient when matching type\nnames containing regex characters. For example, to match\n\"void *(class test8::A::*)(void)\" inside such a regex, one would have to type\n\"void \\*\\(class test8::A::\\*\\)\\(void\\)\".\n\nThis patch changes the semantics of expected-error-re to only treat the parts\nof the directive wrapped in double curly braces as regexes. This avoids the\nescaping problem and leads to nicer patterns for those cases; see e.g. the\nchange to test/Sema/format-strings-scanf.c.\n\n(The balanced search for closing }} of a directive also makes us handle the\nfull directive in test\\SemaCXX\\constexpr-printing.cpp:41 and :53.)\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2388\n\nllvm-svn: 197092"}, | ||
[ | [g]={{ib,645,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n // ...\n for (ParseHelper PH(S); !PH.Done();) {\n // ...\n // Check that regex directives contain at least one regex.\n if (D.RegexKind && D.Text.find(\"{{\") == StringRef::npos) {\n Diags.Report(D.ContentBegin, diag::err_verify_missing_regex) << D.Text;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_missing_start"]={ | ["err_verify_missing_start"]={ | ||
[a | [a]="cannot find start (\'{{\') of expected %0", | ||
[b]=n, | |||
[c]="cannot find start \\(\'\\{\\{\'\\) of expected (.*?)", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"348185548eb2",1258168999,"Add VerifyDiagnosticsClient, to replace old -verify.\n - This reimplements -verify as just another Di...","Add VerifyDiagnosticsClient, to replace old -verify.\n - This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.\n\n - This also tweaks a few things:\n o Errors are now just regular diagnostics.\n o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn\'t yet a way to specify that they are expected. That would be nice though.\n\n - Not yet used.\n\nllvm-svn: 88748"}, | ||
[ | [g]={{ib,613,"/// ParseDirective - Go through the comment and see if it indicates expected\n/// diagnostics. If so, then put them in the appropriate directive list.\n///\n/// Returns true if any valid directives were found.\nstatic bool ParseDirective(StringRef S, ExpectedData *ED, SourceManager &SM, Preprocessor *PP, SourceLocation Pos, VerifyDiagnosticConsumer::DirectiveStatus &Status, VerifyDiagnosticConsumer::MarkerTracker &Markers) {\n // ...\n for (ParseHelper PH(S); !PH.Done();) {\n // ...\n // Next token: {{\n if (!PH.Next(\"{{\")) {\n Diags.Report(Pos.getLocWithOffset(PH.C - PH.Begin), diag::err_verify_missing_start) << KindStr;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_no_directives"]={ | ["err_verify_no_directives"]={ | ||
[a]="no expected directives found: consider use of \'expected-no-diagnostics\'", | [a]="no expected directives found: consider use of \'expected-no-diagnostics\'", | ||
[ | [b]=n, | ||
[ | [c]="no expected directives found\\: consider use of \'expected\\-no\\-diagnostics\'", | ||
[d]=m, | |||
[e]=m, | |||
[f]={"0fea04509a64",1350650972,"Change VerifyDiagnosticConsumer so that it *must* contain at least one \"expected-*\" directive. As a...","Change VerifyDiagnosticConsumer so that it *must* contain at least one \"expected-*\" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive \"expected-no-diagnostics\" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other \"expected-*\" directive.\n\nThis change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file.\n\nPatch reviewed by David Blaikie.\n\nllvm-svn: 166281"}, | |||
[ | [g]={{ib,1099,"#endif // !NDEBUG\n if (SrcManager) {\n // Produce an error if no expected-* directives could be found in the\n // source file(s) processed.\n if (Status == HasNoDirectives) {\n Diags.Report(diag::err_verify_no_directives).setForceEmit();"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_no_such_marker"]={ | ["err_verify_no_such_marker"]={ | ||
[a | [a]="use of undefined marker \'%0\'", | ||
[b]=n, | |||
[c]="use of undefined marker \'(.*?)\'", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"4e8144a0d140",1555130019,"[verify] Add support for location markers in directives.\n\nA marker (matching /#[A-Za-z0-9_-]/) is sp...","[verify] Add support for location markers in directives.\n\nA marker (matching /#[A-Za-z0-9_-]/) is specified by attaching a comment\ncontaining the marker to the line at which the diagnostic is expected,\nand then can be referenced from an expected-* directive after an @:\n\n foo // #1\n // expected-error@#1 {{undeclared identifier \'foo\'}}\n\nThe intent is for markers to be used in situations where relative line\nnumbers are currently used, to avoid the need to renumber when the test\ncase is rearranged.\n\nllvm-svn: 358326"}, | ||
[ | [g]={{ib,394,"// Tracker for markers in the input files. A marker is a comment of the form\n//\n// n = 123; // #123\n//\n// ... that can be referred to by a later expected-* directive:\n//\n// // expected-error@#123 {{undeclared identifier \'n\'}}\n//\n// Marker declarations must be at the start of a comment or preceded by\n// whitespace to distinguish them from uses of markers in directives.\nclass VerifyDiagnosticConsumer::MarkerTracker {\n // ...\n // Ensure we have no remaining deferred directives, and no\n // multiply-defined-and-used markers.\n void finalize() {\n // ...\n for (auto &DeferredPair : DeferredDirectives) {\n Diags.Report(DeferredPair.second.front().DirectivePos, diag::err_verify_no_such_marker) << DeferredPair.first();"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_verify_nonconst_addrspace"]={ | ["err_verify_nonconst_addrspace"]={ | ||
[a | [a]="qualifier \'const\' is needed for variables in address space \'%0\'", | ||
[b]=n, | |||
[c]="qualifier \'const\' is needed for variables in address space \'(.*?)\'", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={"b714f73defc8",1611802254,"Frontend: Add -f{,no-}implicit-modules-uses-lock and -Rmodule-lock\n\nAdd -cc1 flags `-fmodules-uses-l...","Frontend: Add -f{,no-}implicit-modules-uses-lock and -Rmodule-lock\n\nAdd -cc1 flags `-fmodules-uses-lock` and `-fno-modules-uses-lock` to\nallow the lock manager to be turned off when building implicit modules.\n\nAdd `-Rmodule-lock` so that we can see when it\'s being used.\n\nDifferential Revision: https://reviews.llvm.org/D95583"}, | ||
[ | [g]={{"clang/lib/CodeGen/Targets/AVR.cpp",128,"class AVRTargetCodeGenInfo : public TargetCodeGenInfo {\n // ...\n LangAS getGlobalVarAddressSpace(CodeGenModule &CGM, const VarDecl *D) const override {\n // Check if global/static variable is defined in address space\n // 1~6 (__flash, __flash1, __flash2, __flash3, __flash4, __flash5)\n // but not constant.\n if (D) {\n // ...\n if (isTargetAddressSpace(AS) && 1 <= toTargetAddressSpace(AS) && toTargetAddressSpace(AS) <= 6 && !D->getType().isConstQualified())\n CGM.getDiags().Report(D->getLocation(), diag::err_verify_nonconst_addrspace) << \"__flash*\";"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_vftable_ambiguous_component"]={ | ["err_vftable_ambiguous_component"]={ | ||
[a | [a]="ambiguous vftable component for %0 introduced via covariant thunks; this is an inherent limitation of the ABI", | ||
[b]=n, | |||
[c]="ambiguous vftable component for (.*?) introduced via covariant thunks; this is an inherent limitation of the ABI", | |||
[d]=m, | |||
[ | [e]="VTable ABI Issue", | ||
[ | [f]={"70e6a00170a4",1430516145,"[MS ABI] Detect and diagnose vftables which cannot be created\n\nThe MSVC ABI has a bug introduced by ...","[MS ABI] Detect and diagnose vftables which cannot be created\n\nThe MSVC ABI has a bug introduced by appending to the end of vftables\nwhich come from virtual bases: covariant thunks introduces via\nnon-overlapping regions of the inheritance lattice both append to the\nsame slot in the vftable.\n\nIt is possible to generate correct vftables in cases where one node in\nthe lattice completely dominates the other on the way to the base with\nthe vfptr; in all other cases, we must raise a diagnostic in order to\nprevent the illusion that we succeeded in laying out the vftable.\n\nThis fixes PR16759.\n\nllvm-svn: 236354"}, | ||
[ | [g]={{"clang/lib/AST/VTableBuilder.cpp",3553,"// We want to select the path which introduces the most covariant overrides. If\n// two paths introduce overrides which the other path doesn\'t contain, issue a\n// diagnostic.\nstatic const FullPathTy *selectBestPath(ASTContext &Context, const CXXRecordDecl *RD, const VPtrInfo &Info, std::list<FullPathTy> &FullPaths) {\n // ...\n for (const FullPathTy &SpecificPath : FullPaths) {\n // ...\n if (MissingOverrides.empty()) {\n // ...\n } else {\n // ...\n Diags.Report(RD->getLocation(), diag::err_vftable_ambiguous_component) << RD;"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["err_virt_specifier_outside_class"]={ | ["err_virt_specifier_outside_class"]={ | ||
[a | [a]="\'%0\' specifier is not allowed outside a class definition", | ||
[b]=n, | |||
[c]="\'(.*?)\' specifier is not allowed outside a class definition", | |||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{B,2174,"/// ParseDeclGroup - Having concluded that this is either a function\n/// definition or a group of object declarations, actually parse the\n/// result.\nParser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS, DeclaratorContext Context, ParsedAttributes &Attrs, SourceLocation *DeclEnd, ForRangeInit *FRI) {\n // ...\n if (D.isFunctionDeclarator()) {\n // ...\n // We\'re at the point where the parsing of function declarator is finished.\n //\n // A common error is that users accidently add a virtual specifier\n // (e.g. override) in an out-line method definition.\n // We attempt to recover by stripping all these specifiers coming after\n // the declarator.\n while (auto Specifier = isCXX11VirtSpecifier()) {\n Diag(Tok, diag::err_virt_specifier_outside_class) << VirtSpecifiers::getSpecifierName(Specifier) << FixItHint::CreateRemoval(Tok.getLocation());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx-extra-virtual-specifiers.cpp"]={"clang/test/Parser/cxx-extra-virtual-specifiers.cpp:10:15: error: \'override\' specifier is not allowed outside a class definition","clang/test/Parser/cxx-extra-virtual-specifiers.cpp:13:11: error: \'override\' specifier is not allowed outside a class definition","clang/test/Parser/cxx-extra-virtual-specifiers.cpp:15:11: error: \'override\' specifier is not allowed outside a class definition","clang/test/Parser/cxx-extra-virtual-specifiers.cpp:18:12: error: \'override\' specifier is not allowed outside a class definition"} | ["clang/test/Parser/cxx-extra-virtual-specifiers.cpp"]={"clang/test/Parser/cxx-extra-virtual-specifiers.cpp:10:15: error: \'override\' specifier is not allowed outside a class definition","clang/test/Parser/cxx-extra-virtual-specifiers.cpp:13:11: error: \'override\' specifier is not allowed outside a class definition","clang/test/Parser/cxx-extra-virtual-specifiers.cpp:15:11: error: \'override\' specifier is not allowed outside a class definition","clang/test/Parser/cxx-extra-virtual-specifiers.cpp:18:12: error: \'override\' specifier is not allowed outside a class definition"} | ||
} | } | ||
Line 2,765: | Line 2,197: | ||
["err_virtual_in_union"]={ | ["err_virtual_in_union"]={ | ||
[a]="unions cannot have virtual functions", | [a]="unions cannot have virtual functions", | ||
[ | [b]=n, | ||
[ | [c]="unions cannot have virtual functions", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"43899d44c2f4",1435432735,"[Sema] Unions cannot have virtual functions.\n\nPR: PR23931\nDifferential Revision: http://reviews.llv...","[Sema] Unions cannot have virtual functions.\n\nPR: PR23931\nDifferential Revision: http://reviews.llvm.org/D10752\nReviewed by: rsmith\n\nllvm-svn: 240889"}, | ||
[ | [g]={{p,9756,"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 this is a method defined in an __interface, and is not a constructor\n // or an overloaded operator, then set the pure flag (isVirtual will already\n // return true).\n if (const CXXRecordDecl *Parent = dyn_cast<CXXRecordDecl>(NewFD->getDeclContext())) {\n // ...\n // C++ [class.union]p2\n // A union can have member functions, but not virtual functions.\n if (isVirtual && Parent->isUnion()) {\n Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_in_union);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/virtual-function-in-union.cpp"]={"clang/test/SemaCXX/virtual-function-in-union.cpp:5:3: error: unions cannot have virtual functions"} | ["clang/test/SemaCXX/virtual-function-in-union.cpp"]={"clang/test/SemaCXX/virtual-function-in-union.cpp:5:3: error: unions cannot have virtual functions"} | ||
} | } | ||
Line 2,780: | Line 2,209: | ||
["err_virtual_member_function_template"]={ | ["err_virtual_member_function_template"]={ | ||
[a]="\'virtual\' cannot be specified on member function templates", | [a]="\'virtual\' cannot be specified on member function templates", | ||
[ | [b]=n, | ||
[ | [c]="\'virtual\' cannot be specified on member function templates", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"e973899f4687",1295707436,"A member function template cannot be virtual.\n\nllvm-svn: 124031","A member function template cannot be virtual.\n\nllvm-svn: 124031"}, | ||
[ | [g]={{p,9889,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // C++ [dcl.fct.spec]p5:\n // The virtual specifier shall only be used in declarations of\n // nonstatic class member functions that appear within a\n // member-specification of a class declaration; see 10.3.\n //\n if (isVirtual && !NewFD->isInvalidDecl()) {\n if (!isVirtualOkay) {\n // ...\n } else if (!CurContext->isRecord()) {\n // ...\n } else if (NewFD->getDescribedFunctionTemplate()) {\n // ...\n Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_member_function_template) << FixItHint::CreateRemoval(D.getDeclSpec().getVirtualSpecLoc());"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/temp/temp.decls/temp.mem/p3.cpp"]={"clang/test/CXX/temp/temp.decls/temp.mem/p3.cpp:4:22: error: \'virtual\' cannot be specified on member function templates"} | ["clang/test/CXX/temp/temp.decls/temp.mem/p3.cpp"]={"clang/test/CXX/temp/temp.decls/temp.mem/p3.cpp:4:22: error: \'virtual\' cannot be specified on member function templates"} | ||
} | } | ||
Line 2,795: | Line 2,221: | ||
["err_virtual_non_function"]={ | ["err_virtual_non_function"]={ | ||
[a]="\'virtual\' can only appear on non-static member functions", | [a]="\'virtual\' can only appear on non-static member functions", | ||
[ | [b]=n, | ||
[ | [c]="\'virtual\' can only appear on non\\-static member functions", | ||
[d]=m, | |||
[e]=k, | |||
[f]={w,1236199783,v,x}, | |||
[ | [g]={{p,6645,"/// Diagnose function specifiers on a declaration of an identifier that\n/// does not identify a function.\nvoid Sema::DiagnoseFunctionSpecifiers(const DeclSpec &DS) {\n // FIXME: We should probably indicate the identifier in question to avoid\n // confusion for constructs like \"virtual int a(), b;\"\n if (DS.isVirtualSpecified())\n Diag(DS.getVirtualSpecLoc(), diag::err_virtual_non_function);"},{p,9879,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // C++ [dcl.fct.spec]p5:\n // The virtual specifier shall only be used in declarations of\n // nonstatic class member functions that appear within a\n // member-specification of a class declaration; see 10.3.\n //\n if (isVirtual && !NewFD->isInvalidDecl()) {\n if (!isVirtualOkay) {\n Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_non_function);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/temp/temp.deduct.guide/p1.cpp"]={"clang/test/CXX/temp/temp.deduct.guide/p1.cpp:73:1: error: \'virtual\' can only appear on non-static member functions"} | ["clang/test/CXX/temp/temp.deduct.guide/p1.cpp"]={"clang/test/CXX/temp/temp.deduct.guide/p1.cpp:73:1: error: \'virtual\' can only appear on non-static member functions"} | ||
} | } | ||
Line 2,810: | Line 2,233: | ||
["err_virtual_out_of_class"]={ | ["err_virtual_out_of_class"]={ | ||
[a]="\'virtual\' can only be specified inside the class definition", | [a]="\'virtual\' can only be specified inside the class definition", | ||
[ | [b]=n, | ||
[ | [c]="\'virtual\' can only be specified inside the class definition", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{p,9883,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // C++ [dcl.fct.spec]p5:\n // The virtual specifier shall only be used in declarations of\n // nonstatic class member functions that appear within a\n // member-specification of a class declaration; see 10.3.\n //\n if (isVirtual && !NewFD->isInvalidDecl()) {\n if (!isVirtualOkay) {\n // ...\n } else if (!CurContext->isRecord()) {\n // ...\n Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_out_of_class) << FixItHint::CreateRemoval(D.getDeclSpec().getVirtualSpecLoc());"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/virtuals.cpp"]={"clang/test/SemaCXX/virtuals.cpp:18:1: error: \'virtual\' can only be specified inside the class definition"} | ["clang/test/SemaCXX/virtuals.cpp"]={"clang/test/SemaCXX/virtuals.cpp:18:1: error: \'virtual\' can only be specified inside the class definition"} | ||
} | } | ||
Line 2,825: | Line 2,245: | ||
["err_vla_decl_has_extern_linkage"]={ | ["err_vla_decl_has_extern_linkage"]={ | ||
[a]="variable length array declaration cannot have \'extern\' linkage", | [a]="variable length array declaration cannot have \'extern\' linkage", | ||
[ | [b]=n, | ||
[ | [c]="variable length array declaration cannot have \'extern\' linkage", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{p,8710,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n // ...\n if ((!FixedTInfo || FixedT.isNull()) && T->isVariableArrayType()) {\n // ...\n if (NewVD->isFileVarDecl())\n // ...\n else if (NewVD->isStaticLocal())\n // ...\n else\n Diag(NewVD->getLocation(), diag::err_vla_decl_has_extern_linkage) << SizeRange;"}}, | ||
[h]={ | |||
[Pb]={"clang/test/Sema/vla.c:22:14: error: variable length array declaration cannot have \'extern\' linkage","clang/test/Sema/vla.c:38:14: error: variable length array declaration cannot have \'extern\' linkage"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_vla_decl_has_static_storage"]={ | ["err_vla_decl_has_static_storage"]={ | ||
[a]="variable length array declaration cannot have \'static\' storage duration", | [a]="variable length array declaration cannot have \'static\' storage duration", | ||
[ | [b]=n, | ||
[ | [c]="variable length array declaration cannot have \'static\' storage duration", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{p,8707,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n // ...\n if ((!FixedTInfo || FixedT.isNull()) && T->isVariableArrayType()) {\n // ...\n if (NewVD->isFileVarDecl())\n // ...\n else if (NewVD->isStaticLocal())\n Diag(NewVD->getLocation(), diag::err_vla_decl_has_static_storage) << SizeRange;"}}, | ||
[h]={ | |||
[Pb]={"clang/test/Sema/vla.c:37:14: error: variable length array declaration cannot have \'static\' storage duration"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_vla_decl_in_file_scope"]={ | ["err_vla_decl_in_file_scope"]={ | ||
[a]="variable length array declaration not allowed at file scope", | [a]="variable length array declaration not allowed at file scope", | ||
[ | [b]=n, | ||
[ | [c]="variable length array declaration not allowed at file scope", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{p,6728,"void Sema::CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *NewTD) {\n // ...\n if (T->isVariablyModifiedType()) {\n // ...\n if (S->getFnParent() == nullptr) {\n // ...\n if (FixedTInfo) {\n // ...\n } else {\n if (SizeIsNegative)\n // ...\n else if (T->isVariableArrayType())\n Diag(NewTD->getLocation(), diag::err_vla_decl_in_file_scope);"},{p,8704,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n // ...\n if ((!FixedTInfo || FixedT.isNull()) && T->isVariableArrayType()) {\n // ...\n if (NewVD->isFileVarDecl())\n Diag(NewVD->getLocation(), diag::err_vla_decl_in_file_scope) << SizeRange;"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:38:9: error: variable length array declaration not allowed at file scope"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:38:9: error: variable length array declaration not allowed at file scope"} | ||
} | } | ||
Line 2,870: | Line 2,281: | ||
["err_vla_in_sfinae"]={ | ["err_vla_in_sfinae"]={ | ||
[a]="variable length array cannot be formed during template argument deduction", | [a]="variable length array cannot be formed during template argument deduction", | ||
[ | [b]=n, | ||
[ | [c]="variable length array cannot be formed during template argument deduction", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"a09387df9ffb",1274644621,"It turns out that people love using VLAs in templates, too. Weaken our\nVLA restrictions so that one ...","It turns out that people love using VLAs in templates, too. Weaken our\nVLA restrictions so that one can use VLAs in templates (even\naccidentally), but not as part of a non-type template parameter (which\nwould be very bad).\n\nllvm-svn: 104471"}, | ||
[ | [g]={{M,2586,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n } else if (getLangOpts().C99) {\n // ...\n } else if (isSFINAEContext()) {\n VLADiag = diag::err_vla_in_sfinae;"}} | ||
[ | |||
}, | }, | ||
["err_vla_unsupported"]={ | ["err_vla_unsupported"]={ | ||
[a | [a]="variable length arrays are not supported for %select{the current target|\'%1\'}0", | ||
[b]=n, | |||
[c]="variable length arrays are not supported for (?:the current target|\'(.*?)\')", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"87d44269885f",1511038846,"[OpenMP] Show error if VLAs are not supported\n\nSome target devices (e.g. Nvidia GPUs) don\'t support ...","[OpenMP] Show error if VLAs are not supported\n\nSome target devices (e.g. Nvidia GPUs) don\'t support dynamic stack\nallocation and hence no VLAs. Print errors with description instead\nof failing in the backend or generating code that doesn\'t work.\n\nThis patch handles explicit uses of VLAs (local variable in target\nor declare target region) or implicitly generated (private) VLAs\nfor reductions on VLAs or on array sections with non-constant size.\n\nDifferential Revision: https://reviews.llvm.org/D39505\n\nllvm-svn: 318601"}, | ||
[ | [g]={{O,4990,"static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, SourceLocation KeyLoc, QualType T) {\n // ...\n case UTT_IsBoundedArray:\n // ...\n Self.Diag(KeyLoc, diag::err_vla_unsupported) << 1 << tok::kw___is_bounded_array;"},{O,4998,"static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, SourceLocation KeyLoc, QualType T) {\n // ...\n case UTT_IsUnboundedArray:\n // ...\n Self.Diag(KeyLoc, diag::err_vla_unsupported) << 1 << tok::kw___is_unbounded_array;"},{M,2673,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n if (T->isVariableArrayType() && !Context.getTargetInfo().isVLASupported()) {\n // ...\n targetDiag(Loc, IsCUDADevice ? diag::err_cuda_vla : diag::err_vla_unsupported) << (IsCUDADevice ? CurrentCUDATarget() : 0);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/OpenMP/target_vla_messages.cpp"]={"clang/test/OpenMP/target_vla_messages.cpp:24:10: error: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:62:12: error: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:72:14: error: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:52:10: error: variable length arrays are not supported for the current target"} | ["clang/test/OpenMP/target_vla_messages.cpp"]={"clang/test/OpenMP/target_vla_messages.cpp:24:10: error: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:62:12: error: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:72:14: error: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:52:10: error: variable length arrays are not supported for the current target"} | ||
} | } | ||
Line 2,897: | Line 2,302: | ||
["err_vm_decl_has_extern_linkage"]={ | ["err_vm_decl_has_extern_linkage"]={ | ||
[a]="variably modified type declaration cannot have \'extern\' linkage", | [a]="variably modified type declaration cannot have \'extern\' linkage", | ||
[ | [b]=n, | ||
[ | [c]="variably modified type declaration cannot have \'extern\' linkage", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{p,8720,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n // ...\n if (!FixedTInfo) {\n if (NewVD->isFileVarDecl())\n // ...\n else\n Diag(NewVD->getLocation(), diag::err_vm_decl_has_extern_linkage);"}}, | ||
[h]={ | |||
[Pb]={"clang/test/Sema/vla.c:40:16: error: variably modified type declaration cannot have \'extern\' linkage"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_vm_decl_in_file_scope"]={ | ["err_vm_decl_in_file_scope"]={ | ||
[a]="variably modified type declaration not allowed at file scope", | [a]="variably modified type declaration not allowed at file scope", | ||
[ | [b]=n, | ||
[ | [c]="variably modified type declaration not allowed at file scope", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{p,6733,"void Sema::CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *NewTD) {\n // ...\n if (T->isVariablyModifiedType()) {\n // ...\n if (S->getFnParent() == nullptr) {\n // ...\n if (FixedTInfo) {\n // ...\n } else {\n if (SizeIsNegative)\n // ...\n else if (T->isVariableArrayType())\n // ...\n else if (Oversized.getBoolValue())\n // ...\n else\n Diag(NewTD->getLocation(), diag::err_vm_decl_in_file_scope);"},{p,8718,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n // ...\n if (!FixedTInfo) {\n if (NewVD->isFileVarDecl())\n Diag(NewVD->getLocation(), diag::err_vm_decl_in_file_scope);"}}, | ||
[h]={ | |||
[Pb]={"clang/test/Sema/vla.c:30:5: error: variably modified type declaration not allowed at file scope","clang/test/Sema/vla.c:33:7: error: variably modified type declaration not allowed at file scope"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_vm_func_decl"]={ | ["err_vm_func_decl"]={ | ||
[a]="function declaration cannot have variably modified type", | [a]="function declaration cannot have variably modified type", | ||
[ | [b]=n, | ||
[ | [c]="function declaration cannot have variably modified type", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"4f8b8ed2ac98",1242482280,"Missing change for r71941 (PR2044).\n\nllvm-svn: 71947","Missing change for r71941 (PR2044).\n\nllvm-svn: 71947"}, | ||
[ | [g]={{p,10198,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n // Functions returning a variably modified type violate C99 6.7.5.2p2\n // because all functions have linkage.\n if (!NewFD->isInvalidDecl() && NewFD->getReturnType()->isVariablyModifiedType()) {\n Diag(NewFD->getLocation(), diag::err_vm_func_decl);"}}, | ||
[h]={ | |||
[Pb]={"clang/test/Sema/vla.c:51:26: error: function declaration cannot have variably modified type","clang/test/Sema/vla.c:53:7: error: function declaration cannot have variably modified type"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_void_only_param"]={ | ["err_void_only_param"]={ | ||
[a]="\'void\' must be the first and only parameter if specified", | [a]="\'void\' must be the first and only parameter if specified", | ||
[ | [b]=n, | ||
[ | [c]="\'void\' must be the first and only parameter if specified", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{M,5503,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // ...\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // ...\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // If this is something like \'float(int, void)\', reject it. \'void\'\n // is an incomplete type (C99 6.2.5p19) and function decls cannot\n // have parameters of incomplete type.\n if (FTI.NumParams != 1 || FTI.isVariadic) {\n S.Diag(FTI.Params[i].IdentLoc, diag::err_void_only_param);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Sema/void_arg.c"]={"clang/test/Sema/void_arg.c:10:28: error: \'void\' must be the first and only parameter if specified","clang/test/Sema/void_arg.c:11:23: error: \'void\' must be the first and only parameter if specified","clang/test/Sema/void_arg.c:14:28: error: \'void\' must be the first and only parameter if specified","clang/test/Sema/void_arg.c:15:23: error: \'void\' must be the first and only parameter if specified"} | ["clang/test/Sema/void_arg.c"]={"clang/test/Sema/void_arg.c:10:28: error: \'void\' must be the first and only parameter if specified","clang/test/Sema/void_arg.c:11:23: error: \'void\' must be the first and only parameter if specified","clang/test/Sema/void_arg.c:14:28: error: \'void\' must be the first and only parameter if specified","clang/test/Sema/void_arg.c:15:23: error: \'void\' must be the first and only parameter if specified"} | ||
} | } | ||
Line 2,957: | Line 2,350: | ||
["err_void_param_qualified"]={ | ["err_void_param_qualified"]={ | ||
[a]="\'void\' as parameter must not have type qualifiers", | [a]="\'void\' as parameter must not have type qualifiers", | ||
[ | [b]=n, | ||
[ | [c]="\'void\' as parameter must not have type qualifiers", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{M,5514,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // ...\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // ...\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // If this is something like \'float(int, void)\', reject it. \'void\'\n // is an incomplete type (C99 6.2.5p19) and function decls cannot\n // have parameters of incomplete type.\n if (FTI.NumParams != 1 || FTI.isVariadic) {\n // ...\n } else if (FTI.Params[i].Ident) {\n // ...\n } else {\n // Reject, but continue to parse \'float(const void)\'.\n if (ParamTy.hasQualifiers())\n S.Diag(DeclType.Loc, diag::err_void_param_qualified);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Sema/void_arg.c"]={"clang/test/Sema/void_arg.c:26:7: error: \'void\' as parameter must not have type qualifiers"} | ["clang/test/Sema/void_arg.c"]={"clang/test/Sema/void_arg.c:26:7: error: \'void\' as parameter must not have type qualifiers"} | ||
} | } | ||
Line 2,972: | Line 2,362: | ||
["err_volatile_comparison_operator"]={ | ["err_volatile_comparison_operator"]={ | ||
[a]="defaulted comparison function must not be volatile", | [a]="defaulted comparison function must not be volatile", | ||
[ | [b]=n, | ||
[ | [c]="defaulted comparison function must not be volatile", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{t,8742,"bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, DefaultedComparisonKind DCK) {\n // ...\n if (IsMethod) {\n // ...\n if (MD->isVolatile()) {\n Diag(MD->getLocation(), diag::err_volatile_comparison_operator);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CXX/class/class.compare/class.compare.default/p1.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p1.cpp:19:8: error: defaulted comparison function must not be volatile"} | ["clang/test/CXX/class/class.compare/class.compare.default/p1.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p1.cpp:19:8: error: defaulted comparison function must not be volatile"} | ||
} | } | ||
}, | }, | ||
["err_vsx_builtin_nonconstant_argument"]={ | ["err_vsx_builtin_nonconstant_argument"]={ | ||
[a | [a]="argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)", | ||
[b]=n, | |||
[c]="argument (.*?) to (.*?) must be a 2\\-bit unsigned literal \\(i\\.e\\. 0, 1, 2 or 3\\)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"bbc48e91643b",1495638812,"[PowerPC] Implement vec_xxpermdi builtin.\n\nThe vec_xxpermdi builtin is missing from altivec.h. This ...","[PowerPC] Implement vec_xxpermdi builtin.\n\nThe vec_xxpermdi builtin is missing from altivec.h. This has been requested by\ndevelopers working on libvpx for VP9 support for Google.\n\nThe patch fixes PR: https://bugs.llvm.org/show_bug.cgi?id=32653\nDifferential Revision: https://reviews.llvm.org/D33053\n\nllvm-svn: 303760"}, | ||
[ | [g]={{U,8402,"// Customized Sema Checking for VSX builtins that have the following signature:\n// vector [...] builtinName(vector [...], vector [...], const int);\n// Which takes the same type of vectors (any legal vector type) for the first\n// two arguments and takes compile time constant for the third argument.\n// Example builtins are :\n// vector double vec_xxpermdi(vector double, vector double, int);\n// vector short vec_xxsldwi(vector short, vector short, int);\nbool Sema::SemaBuiltinVSX(CallExpr *TheCall) {\n // ...\n // Check the third argument is a compile time constant\n if (!TheCall->getArg(2)->isIntegerConstantExpr(Context))\n return Diag(TheCall->getBeginLoc(), diag::err_vsx_builtin_nonconstant_argument) << 3 /* argument index */ << TheCall->getDirectCallee() << SourceRange(TheCall->getArg(2)->getBeginLoc(), TheCall->getArg(2)->getEndLoc());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGen/PowerPC/builtins-ppc-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-error.c:34:3: error: argument 3 to \'__builtin_vsx_xxpermdi\' must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)","clang/test/CodeGen/PowerPC/builtins-ppc-error.c:42:3: error: argument 3 to \'__builtin_vsx_xxsldwi\' must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)"} | ["clang/test/CodeGen/PowerPC/builtins-ppc-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-error.c:34:3: error: argument 3 to \'__builtin_vsx_xxpermdi\' must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)","clang/test/CodeGen/PowerPC/builtins-ppc-error.c:42:3: error: argument 3 to \'__builtin_vsx_xxsldwi\' must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)"} | ||
} | } | ||
}, | }, | ||
["err_wasm_builtin_arg_must_be_integer_type"]={ | ["err_wasm_builtin_arg_must_be_integer_type"]={ | ||
[a | [a]="%ordinal0 argument must be an integer", | ||
[b]=n, | |||
[c]="(.*?) argument must be an integer", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{U,19017,"/// Checks the argument at the given index is an integer.\nstatic bool CheckWasmBuiltinArgIsInteger(Sema &S, CallExpr *E, unsigned ArgIndex) {\n // ...\n if (!ArgExpr->getType()->isIntegerType()) {\n return S.Diag(ArgExpr->getBeginLoc(), diag::err_wasm_builtin_arg_must_be_integer_type) << ArgIndex + 1 << ArgExpr->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/builtins-wasm.c"]={"clang/test/Sema/builtins-wasm.c:28:41: error: 3rd argument must be an integer","clang/test/Sema/builtins-wasm.c:37:36: error: 2nd argument must be an integer","clang/test/Sema/builtins-wasm.c:39:48: error: 4th argument must be an integer","clang/test/Sema/builtins-wasm.c:48:43: error: 3rd argument must be an integer","clang/test/Sema/builtins-wasm.c:49:52: error: 4th argument must be an integer","clang/test/Sema/builtins-wasm.c:50:61: error: 5th argument must be an integer"} | ["clang/test/Sema/builtins-wasm.c"]={"clang/test/Sema/builtins-wasm.c:28:41: error: 3rd argument must be an integer","clang/test/Sema/builtins-wasm.c:37:36: error: 2nd argument must be an integer","clang/test/Sema/builtins-wasm.c:39:48: error: 4th argument must be an integer","clang/test/Sema/builtins-wasm.c:48:43: error: 3rd argument must be an integer","clang/test/Sema/builtins-wasm.c:49:52: error: 4th argument must be an integer","clang/test/Sema/builtins-wasm.c:50:61: error: 5th argument must be an integer"} | ||
} | } | ||
}, | }, | ||
["err_wasm_builtin_arg_must_be_table_type"]={ | ["err_wasm_builtin_arg_must_be_table_type"]={ | ||
[a | [a]="%ordinal0 argument must be a WebAssembly table", | ||
[b]=n, | |||
[c]="(.*?) argument must be a WebAssembly table", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{U,19004,"/// Checks the argument at the given index is a WebAssembly table and if it\n/// is, sets ElTy to the element type.\nstatic bool CheckWasmBuiltinArgIsTable(Sema &S, CallExpr *E, unsigned ArgIndex, QualType &ElTy) {\n // ...\n if (!ATy || !ATy->getElementType().isWebAssemblyReferenceType()) {\n return S.Diag(ArgExpr->getBeginLoc(), diag::err_wasm_builtin_arg_must_be_table_type) << ArgIndex + 1 << ArgExpr->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/builtins-wasm.c"]={"clang/test/Sema/builtins-wasm.c:14:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:15:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:16:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:17:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:26:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:36:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:46:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:47:36: error: 2nd argument must be a WebAssembly table"} | ["clang/test/Sema/builtins-wasm.c"]={"clang/test/Sema/builtins-wasm.c:14:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:15:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:16:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:17:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:26:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:36:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:46:29: error: 1st argument must be a WebAssembly table","clang/test/Sema/builtins-wasm.c:47:36: error: 2nd argument must be a WebAssembly table"} | ||
} | } | ||
}, | }, | ||
["err_wasm_builtin_arg_must_match_table_element_type"]={ | ["err_wasm_builtin_arg_must_match_table_element_type"]={ | ||
[a | [a]="%ordinal0 argument must match the element type of the WebAssembly table in the %ordinal1 argument", | ||
[b]=n, | |||
[c]="(.*?) argument must match the element type of the WebAssembly table in the (.*?) argument", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{U,19091,"/// Check that the first argument is a WebAssembly table, the second is the\n/// value to use for new elements (of a type matching the table type), the\n/// third value is an integer.\nbool Sema::BuiltinWasmTableGrow(CallExpr *TheCall) {\n // ...\n if (!Context.hasSameType(ElTy, NewElemArg->getType())) {\n return Diag(NewElemArg->getBeginLoc(), diag::err_wasm_builtin_arg_must_match_table_element_type) << 2 << 1 << NewElemArg->getSourceRange();"},{U,19118,"/// Check that the first argument is a WebAssembly table, the second is an\n/// integer, the third is the value to use to fill the table (of a type\n/// matching the table type), and the fourth is an integer.\nbool Sema::BuiltinWasmTableFill(CallExpr *TheCall) {\n // ...\n if (!Context.hasSameType(ElTy, NewElemArg->getType())) {\n return Diag(NewElemArg->getBeginLoc(), diag::err_wasm_builtin_arg_must_match_table_element_type) << 3 << 1 << NewElemArg->getSourceRange();"},{U,19146,"/// Check that the first argument is a WebAssembly table, the second is also a\n/// WebAssembly table (of the same element type), and the third to fifth\n/// arguments are integers.\nbool Sema::BuiltinWasmTableCopy(CallExpr *TheCall) {\n // ...\n if (!Context.hasSameType(XElTy, YElTy)) {\n return Diag(TableYArg->getBeginLoc(), diag::err_wasm_builtin_arg_must_match_table_element_type) << 2 << 1 << TableYArg->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/builtins-wasm.c"]={"clang/test/Sema/builtins-wasm.c:27:36: error: 2nd argument must match the element type of the WebAssembly table in the 1st argument","clang/test/Sema/builtins-wasm.c:38:43: error: 3rd argument must match the element type of the WebAssembly table in the 1st argument"} | ["clang/test/Sema/builtins-wasm.c"]={"clang/test/Sema/builtins-wasm.c:27:36: error: 2nd argument must match the element type of the WebAssembly table in the 1st argument","clang/test/Sema/builtins-wasm.c:38:43: error: 3rd argument must match the element type of the WebAssembly table in the 1st argument"} | ||
} | } | ||
}, | }, | ||
["err_wasm_ca_reference"]={ | ["err_wasm_ca_reference"]={ | ||
[a | [a]="cannot %select{capture|take address of}0 WebAssembly reference", | ||
[b]=n, | |||
[c]="cannot (?:capture|take address of) WebAssembly reference", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{r,15078,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n // ...\n // Cannot take the address of WebAssembly references or tables.\n if (Context.getTargetInfo().getTriple().isWasm()) {\n // ...\n if (OpTy.isWebAssemblyReferenceType()) {\n Diag(OpLoc, diag::err_wasm_ca_reference) << 1 << OrigOp.get()->getSourceRange();"},{r,19393,"/// Capture the given variable in the lambda.\nstatic bool captureInLambda(LambdaScopeInfo *LSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool RefersToCapturedVariable, const Sema::TryCaptureKind Kind, SourceLocation EllipsisLoc, const bool IsTopScope, Sema &S, bool Invalid) {\n // ...\n if (BuildAndDiagnose && S.Context.getTargetInfo().getTriple().isWasm() && CaptureType.getNonReferenceType().isWebAssemblyReferenceType()) {\n S.Diag(Loc, diag::err_wasm_ca_reference) << 0;"}}, | ||
[ | [h]={ | ||
[ | [yb]={"clang/test/Sema/wasm-refs-and-tables.c:62:3: error: cannot take address of WebAssembly reference"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_wasm_cast_table"]={ | ["err_wasm_cast_table"]={ | ||
[a | [a]="cannot cast %select{to|from}0 a WebAssembly table", | ||
[b]=n, | |||
[c]="cannot cast (?:to|from) a WebAssembly table", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{wb,2780,"void CastOperation::CheckCXXCStyleCast(bool FunctionalStyle, bool ListInitialization) {\n // ...\n if (SrcType->isWebAssemblyTableType()) {\n Self.Diag(OpRange.getBegin(), diag::err_wasm_cast_table) << 1 << SrcExpr.get()->getSourceRange();"},{wb,2962,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n if (SrcType->isWebAssemblyTableType()) {\n Self.Diag(OpRange.getBegin(), diag::err_wasm_cast_table) << 1 << SrcExpr.get()->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | [yb]={"clang/test/Sema/wasm-refs-and-tables.c:101:3: error: cannot cast from a WebAssembly table"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_wasm_funcref_not_wasm"]={ | ["err_wasm_funcref_not_wasm"]={ | ||
[a]="invalid use of \'__funcref\' keyword outside the WebAssembly triple", | [a]="invalid use of \'__funcref\' keyword outside the WebAssembly triple", | ||
[ | [b]=n, | ||
[ | [c]="invalid use of \'__funcref\' keyword outside the WebAssembly triple", | ||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[g]={{B,863,"void Parser::ParseWebAssemblyFuncrefTypeAttribute(ParsedAttributes &attrs) {\n // ...\n if (!getTargetInfo().getTriple().isWasm()) {\n // ...\n Diag(StartLoc, diag::err_wasm_funcref_not_wasm);"}}, | |||
[ | [h]={ | ||
[ | |||
[ | |||
["clang/test/Parser/wasm-funcref.c"]={"clang/test/Parser/wasm-funcref.c:5:16: error: invalid use of \'__funcref\' keyword outside the WebAssembly triple","clang/test/Parser/wasm-funcref.c:6:15: error: invalid use of \'__funcref\' keyword outside the WebAssembly triple"} | ["clang/test/Parser/wasm-funcref.c"]={"clang/test/Parser/wasm-funcref.c:5:16: error: invalid use of \'__funcref\' keyword outside the WebAssembly triple","clang/test/Parser/wasm-funcref.c:6:15: error: invalid use of \'__funcref\' keyword outside the WebAssembly triple"} | ||
} | } | ||
}, | }, | ||
["err_wasm_reference_pr"]={ | ["err_wasm_reference_pr"]={ | ||
[a | [a]="%select{pointer|reference}0 to WebAssembly reference type is not allowed", | ||
[b]=n, | |||
[c]="(?:pointer|reference) to WebAssembly reference type is not allowed", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{M,2210,"/// Build a pointer type.\n///\n/// \\param T The type to which we\'ll be building a pointer.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// pointer type or, if there is no such entity, the location of the\n/// type that will have pointer type.\n///\n/// \\param Entity The name of the entity that involves the pointer\n/// type, if known.\n///\n/// \\returns A suitable pointer type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildPointerType(QualType T, SourceLocation Loc, DeclarationName Entity) {\n // ...\n // In WebAssembly, pointers to reference types and pointers to tables are\n // illegal.\n if (getASTContext().getTargetInfo().getTriple().isWasm()) {\n if (T.isWebAssemblyReferenceType()) {\n Diag(Loc, diag::err_wasm_reference_pr) << 0;"},{M,2299,"/// Build a reference type.\n///\n/// \\param T The type to which we\'ll be building a reference.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// reference type or, if there is no such entity, the location of the\n/// type that will have reference type.\n///\n/// \\param Entity The name of the entity that involves the reference\n/// type, if known.\n///\n/// \\returns A suitable reference type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildReferenceType(QualType T, bool SpelledAsLValue, SourceLocation Loc, DeclarationName Entity) {\n // ...\n // In WebAssembly, references to reference types and tables are illegal.\n if (getASTContext().getTargetInfo().getTriple().isWasm() && T.isWebAssemblyReferenceType()) {\n Diag(Loc, diag::err_wasm_reference_pr) << 1;"}}, | ||
[ | [h]={ | ||
[ | [yb]={"clang/test/Sema/wasm-refs-and-tables.c:12:15: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:13:15: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:14:15: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:31:17: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:32:17: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:41:17: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:42:17: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:48:39: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:49:39: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:53:15: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:54:15: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:64:18: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:65:18: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:71:24: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:72:24: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:80:26: error: pointer to WebAssembly reference type is not allowed","clang/test/Sema/wasm-refs-and-tables.c:81:26: error: pointer to WebAssembly reference type is not allowed"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_wasm_reftype_exception_spec"]={ | ["err_wasm_reftype_exception_spec"]={ | ||
[a]="WebAssembly reference type not allowed in exception specification", | [a]="WebAssembly reference type not allowed in exception specification", | ||
[ | [b]=n, | ||
[ | [c]="WebAssembly reference type not allowed in exception specification", | ||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[g]={{xb,178,"/// CheckSpecifiedExceptionType - Check if the given type is valid in an\n/// exception specification. Incomplete types, or pointers to incomplete types\n/// other than void are not allowed.\n///\n/// \\param[in,out] T The exception type. This will be decayed to a pointer type\n/// when the input is an array or a function type.\nbool Sema::CheckSpecifiedExceptionType(QualType &T, SourceRange Range) {\n // ...\n // WebAssembly reference types can\'t be used in exception specifications.\n if (PointeeT.isWebAssemblyReferenceType()) {\n Diag(Range.getBegin(), diag::err_wasm_reftype_exception_spec);"}} | |||
[ | |||
[ | |||
}, | }, | ||
["err_wasm_reftype_multidimensional_array"]={ | ["err_wasm_reftype_multidimensional_array"]={ | ||
[a]="multi-dimensional arrays of WebAssembly references are not allowed", | [a]="multi-dimensional arrays of WebAssembly references are not allowed", | ||
[ | [b]=n, | ||
[ | [c]="multi\\-dimensional arrays of WebAssembly references are not allowed", | ||
[d]=m, | |||
[e]=m, | |||
[f]={I,1625925174,J,H}, | |||
[ | [g]={{M,2520,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n // Multi-dimensional arrays of WebAssembly references are not allowed.\n if (Context.getTargetInfo().getTriple().isWasm() && T->isArrayType()) {\n // ...\n if (ATy && ATy->getElementType().isWebAssemblyReferenceType()) {\n Diag(Loc, diag::err_wasm_reftype_multidimensional_array);"}}, | ||
[ | [h]={ | ||
[ | [yb]={"clang/test/Sema/wasm-refs-and-tables.c:19:24: error: multi-dimensional arrays of WebAssembly references are not allowed","clang/test/Sema/wasm-refs-and-tables.c:30:19: error: multi-dimensional arrays of WebAssembly references are not allowed","clang/test/Sema/wasm-refs-and-tables.c:40:19: error: multi-dimensional arrays of WebAssembly references are not allowed","clang/test/Sema/wasm-refs-and-tables.c:47:44: error: multi-dimensional arrays of WebAssembly references are not allowed","clang/test/Sema/wasm-refs-and-tables.c:70:23: error: multi-dimensional arrays of WebAssembly references are not allowed","clang/test/Sema/wasm-refs-and-tables.c:79:25: error: multi-dimensional arrays of WebAssembly references are not allowed","clang/test/Sema/wasm-refs-and-tables.c:86:27: error: multi-dimensional arrays of WebAssembly references are not allowed"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_wasm_reftype_tc"]={ | ["err_wasm_reftype_tc"]={ | ||
[a | [a]="cannot %select{throw|catch}0 a WebAssembly reference type", | ||
[b]=n, | |||
[c]="cannot (?:throw|catch) a WebAssembly reference type", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{t,16650,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n // ...\n if (!Invalid && BaseType.isWebAssemblyReferenceType()) {\n Diag(Loc, diag::err_wasm_reftype_tc) << 1;"},{O,988,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // ...\n // Cannot throw WebAssembly reference type.\n if (Ty.isWebAssemblyReferenceType()) {\n Diag(ThrowLoc, diag::err_wasm_reftype_tc) << 0 << E->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/wasm-refs-and-tables.cpp"]={"clang/test/SemaCXX/wasm-refs-and-tables.cpp:22:3: error: cannot throw a WebAssembly reference type","clang/test/SemaCXX/wasm-refs-and-tables.cpp:23:3: error: cannot throw a WebAssembly reference type","clang/test/SemaCXX/wasm-refs-and-tables.cpp:25:24: error: cannot catch a WebAssembly reference type"} | ["clang/test/SemaCXX/wasm-refs-and-tables.cpp"]={"clang/test/SemaCXX/wasm-refs-and-tables.cpp:22:3: error: cannot throw a WebAssembly reference type","clang/test/SemaCXX/wasm-refs-and-tables.cpp:23:3: error: cannot throw a WebAssembly reference type","clang/test/SemaCXX/wasm-refs-and-tables.cpp:25:24: error: cannot catch a WebAssembly reference type"} | ||
} | } | ||
}, | }, | ||
["err_wasm_table_art"]={ | ["err_wasm_table_art"]={ | ||
[a | [a]="cannot %select{assign|return|throw|subscript}0 a WebAssembly table", | ||
[b]=n, | |||
[c]="cannot (?:assign|return|throw|subscript) a WebAssembly table", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{U,12965,"void Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, SourceLocation ReturnLoc, bool isObjCMethod, const AttrVec *Attrs, const FunctionDecl *FD) {\n // ...\n if (RetValExp && RetValExp->getType()->isWebAssemblyTableType()) {\n Diag(ReturnLoc, diag::err_wasm_table_art) << 1;"},{p,13148,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // ...\n // WebAssembly tables can\'t be used to initialise a variable.\n if (Init && !Init->getType().isNull() && Init->getType()->isWebAssemblyTableType()) {\n Diag(Init->getExprLoc(), diag::err_wasm_table_art) << 0;"},{r,5052,"ExprResult Sema::ActOnArraySubscriptExpr(Scope *S, Expr *base, SourceLocation lbLoc, MultiExprArg ArgExprs, SourceLocation rbLoc) {\n // ...\n if (base->getType()->isWebAssemblyTableType()) {\n Diag(base->getExprLoc(), diag::err_wasm_table_art) << SourceRange(base->getBeginLoc(), rbLoc) << 3;"},{r,14482,"// C99 6.5.16.1\nQualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType, BinaryOperatorKind Opc) {\n // ...\n // WebAssembly tables can\'t be used on RHS of an assignment expression.\n if (RHSType->isWebAssemblyTableType()) {\n Diag(Loc, diag::err_wasm_table_art) << 0;"},{O,994,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // ...\n // Cannot throw WebAssembly table.\n if (isPointer && Ty.isWebAssemblyReferenceType()) {\n Diag(ThrowLoc, diag::err_wasm_table_art) << 2 << E->getSourceRange();"},{Gb,3991,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (RetValExp) {\n // ...\n if (ATy && ATy->getElementType().isWebAssemblyReferenceType()) {\n Diag(ReturnLoc, diag::err_wasm_table_art) << 1;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/wasm-refs-and-tables.cpp"]={"clang/test/SemaCXX/wasm-refs-and-tables.cpp:29:3: error: cannot return a WebAssembly table"} | ["clang/test/SemaCXX/wasm-refs-and-tables.cpp"]={"clang/test/SemaCXX/wasm-refs-and-tables.cpp:29:3: error: cannot return a WebAssembly table"} | ||
} | } | ||
Line 3,164: | Line 2,515: | ||
["err_wasm_table_as_function_parameter"]={ | ["err_wasm_table_as_function_parameter"]={ | ||
[a]="cannot use WebAssembly table as a function parameter", | [a]="cannot use WebAssembly table as a function parameter", | ||
[ | [b]=n, | ||
[ | [c]="cannot use WebAssembly table as a function parameter", | ||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{U,16708,"/// CheckParmsForFunctionDef - Check that the parameters of the given\n/// function are appropriate for the definition of a function. This\n/// takes care of any checks that cannot be performed on the\n/// declaration itself, e.g., that the types of each of the function\n/// parameters are complete.\nbool Sema::CheckParmsForFunctionDef(ArrayRef<ParmVarDecl *> Parameters, bool CheckParameterNames) {\n // ...\n for (ParmVarDecl *Param : Parameters) {\n // ...\n if (!Param->isInvalidDecl() && Param->getOriginalType()->isWebAssemblyTableType()) {\n // ...\n Diag(Param->getLocation(), diag::err_wasm_table_as_function_parameter);"},{p,10755,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n for (const ParmVarDecl *Param : NewFD->parameters()) {\n // ...\n // WebAssembly tables can\'t be used as function parameters.\n if (Context.getTargetInfo().getTriple().isWasm()) {\n if (PT->getUnqualifiedDesugaredType()->isWebAssemblyTableType()) {\n Diag(Param->getTypeSpecStartLoc(), diag::err_wasm_table_as_function_parameter);"},{r,7533,"/// BuildResolvedCallExpr - Build a call to a resolved expression,\n/// i.e. an expression not of \\p OverloadTy. The expression should\n/// unary-convert to an expression of function-pointer or\n/// block-pointer type.\n///\n/// \\param NDecl the declaration being called, if available\nExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef<Expr *> Args, SourceLocation RParenLoc, Expr *Config, bool IsExecConfig, ADLCallKind UsesADL) {\n // ...\n // WebAssembly tables can\'t be used as arguments.\n if (Context.getTargetInfo().getTriple().isWasm()) {\n for (const Expr *Arg : Args) {\n if (Arg && Arg->getType()->isWebAssemblyTableType()) {\n return ExprError(Diag(Arg->getExprLoc(), diag::err_wasm_table_as_function_parameter));"},{M,3034,"QualType Sema::BuildFunctionType(QualType T, MutableArrayRef<QualType> ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI) {\n // ...\n for (unsigned Idx = 0, Cnt = ParamTypes.size(); Idx < Cnt; ++Idx) {\n // ...\n if (ParamType->isVoidType()) {\n // ...\n } else if (ParamType->isHalfType() && !getLangOpts().NativeHalfArgsAndReturns && !Context.getTargetInfo().allowHalfArgsAndReturns()) {\n // ...\n } else if (ParamType->isWebAssemblyTableType()) {\n Diag(Loc, diag::err_wasm_table_as_function_parameter);"}}, | ||
[h]={ | |||
[yb]={"clang/test/Sema/wasm-refs-and-tables.c:46:25: error: cannot use WebAssembly table as a function parameter","clang/test/Sema/wasm-refs-and-tables.c:51:25: error: cannot use WebAssembly table as a function parameter","clang/test/Sema/wasm-refs-and-tables.c:91:14: error: cannot use WebAssembly table as a function parameter"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_wasm_table_conditional_expression"]={ | ["err_wasm_table_conditional_expression"]={ | ||
[a]="cannot use a WebAssembly table within a branch of a conditional expression", | [a]="cannot use a WebAssembly table within a branch of a conditional expression", | ||
[ | [b]=n, | ||
[ | [c]="cannot use a WebAssembly table within a branch of a conditional expression", | ||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{r,9124,"/// Note that LHS is not null here, even if this is the gnu \"x ?: y\" extension.\n/// In that case, LHS = cond.\n/// C99 6.5.15\nQualType Sema::CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n // ...\n if (LHSTy->isWebAssemblyTableType() || RHSTy->isWebAssemblyTableType()) {\n Diag(QuestionLoc, diag::err_wasm_table_conditional_expression) << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{O,6604,"/// Check the operands of ?: under C++ semantics.\n///\n/// See C++ [expr.cond]. Note that LHS is never null, even for the GNU x ?: y\n/// extension. In this case, LHS == Cond. (But they\'re not aliases.)\n///\n/// This function also implements GCC\'s vector extension and the\n/// OpenCL/ext_vector_type extension for conditionals. The vector extensions\n/// permit the use of a?b:c where the type of a is that of a integer vector with\n/// the same number of elements and size as the vectors of b and c. If one of\n/// either b or c is a scalar it is implicitly converted to match the type of\n/// the vector. Otherwise the expression is ill-formed. If both b and c are\n/// scalars, then b and c are checked and converted to the type of a if\n/// possible.\n///\n/// The expressions are evaluated differently for GCC\'s and OpenCL\'s extensions.\n/// For the GCC extension, the ?: operator is evaluated as\n/// (a[0] != 0 ? b[0] : c[0], .. , a[n] != 0 ? b[n] : c[n]).\n/// For the OpenCL extensions, the ?: operator is evaluated as\n/// (most-significant-bit-set(a[0]) ? b[0] : c[0], .. ,\n/// most-significant-bit-set(a[n]) ? b[n] : c[n]).\nQualType Sema::CXXCheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n // ...\n // WebAssembly tables are not allowed as conditional LHS or RHS.\n if (LTy->isWebAssemblyTableType() || RTy->isWebAssemblyTableType()) {\n Diag(QuestionLoc, diag::err_wasm_table_conditional_expression) << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[h]={ | |||
[yb]={"clang/test/Sema/wasm-refs-and-tables.c:99:5: error: cannot use a WebAssembly table within a branch of a conditional expression","clang/test/Sema/wasm-refs-and-tables.c:100:9: error: cannot use a WebAssembly table within a branch of a conditional expression"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_wasm_table_in_function"]={ | ["err_wasm_table_in_function"]={ | ||
[a]="WebAssembly table cannot be declared within a function", | [a]="WebAssembly table cannot be declared within a function", | ||
[ | [b]=n, | ||
[ | [c]="WebAssembly table cannot be declared within a function", | ||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[g]={{p,8659,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n // WebAssembly tables must be static with a zero length and can\'t be\n // declared within functions.\n if (T->isWebAssemblyTableType()) {\n if (getCurScope()->getParent()) { // Parent is null at top-level\n Diag(NewVD->getLocation(), diag::err_wasm_table_in_function);"}}, | |||
[ | [h]={ | ||
[yb]={"clang/test/Sema/wasm-refs-and-tables.c:84:17: error: WebAssembly table cannot be declared within a function","clang/test/Sema/wasm-refs-and-tables.c:85:24: error: WebAssembly table cannot be declared within a function","clang/test/Sema/wasm-refs-and-tables.c:112:17: error: WebAssembly table cannot be declared within a function","clang/test/Sema/wasm-refs-and-tables.c:118:24: error: WebAssembly table cannot be declared within a function","clang/test/Sema/wasm-refs-and-tables.c:120:26: error: WebAssembly table cannot be declared within a function","clang/test/Sema/wasm-refs-and-tables.c:122:28: error: WebAssembly table cannot be declared within a function","clang/test/Sema/wasm-refs-and-tables.c:126:26: error: WebAssembly table cannot be declared within a function"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_wasm_table_invalid_uett_operand"]={ | ["err_wasm_table_invalid_uett_operand"]={ | ||
[a | [a]="invalid application of \'%0\' to WebAssembly table", | ||
[b]=n, | |||
[c]="invalid application of \'(.*?)\' to WebAssembly table", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{r,4411,"/// Check the constraints on expression operands to unary type expression\n/// and type traits.\n///\n/// Completes any types necessary and validates the constraints on the operand\n/// expression. The logic mostly mirrors the type-based overload, but may modify\n/// the expression as it completes the type for that expression through template\n/// instantiation, etc.\nbool Sema::CheckUnaryExprOrTypeTraitOperand(Expr *E, UnaryExprOrTypeTrait ExprKind) {\n // ...\n // WebAssembly tables are always illegal operands to unary expressions and\n // type traits.\n if (Context.getTargetInfo().getTriple().isWasm() && E->getType()->isWebAssemblyTableType()) {\n Diag(E->getExprLoc(), diag::err_wasm_table_invalid_uett_operand) << getTraitSpelling(ExprKind);"},{r,4782,"/// Check the constraints on operands to unary expression and type\n/// traits.\n///\n/// This will complete any types necessary, and validate the various constraints\n/// on those operands.\n///\n/// The UsualUnaryConversions() function is *not* called by this routine.\n/// C99 6.3.2.1p[2-4] all state:\n/// Except when it is the operand of the sizeof operator ...\n///\n/// C++ [expr.sizeof]p4\n/// The lvalue-to-rvalue, array-to-pointer, and function-to-pointer\n/// standard conversions are not applied to the operand of sizeof.\n///\n/// This policy is followed for all of the unary trait expressions.\nbool Sema::CheckUnaryExprOrTypeTraitOperand(QualType ExprType, SourceLocation OpLoc, SourceRange ExprRange, UnaryExprOrTypeTrait ExprKind, StringRef KWName) {\n // ...\n // WebAssembly tables are always illegal operands to unary expressions and\n // type traits.\n if (Context.getTargetInfo().getTriple().isWasm() && ExprType->isWebAssemblyTableType()) {\n Diag(OpLoc, diag::err_wasm_table_invalid_uett_operand) << getTraitSpelling(ExprKind);"}}, | ||
[ | [h]={ | ||
[ | [yb]={"clang/test/Sema/wasm-refs-and-tables.c:68:3: error: invalid application of \'sizeof\' to WebAssembly table","clang/test/Sema/wasm-refs-and-tables.c:69:9: error: invalid application of \'sizeof\' to WebAssembly table","clang/test/Sema/wasm-refs-and-tables.c:78:11: error: invalid application of \'alignof\' to WebAssembly table"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_wasm_table_must_be_static"]={ | ["err_wasm_table_must_be_static"]={ | ||
[a]="WebAssembly table must be static", | [a]="WebAssembly table must be static", | ||
[ | [b]=n, | ||
[ | [c]="WebAssembly table must be static", | ||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{p,8664,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n // WebAssembly tables must be static with a zero length and can\'t be\n // declared within functions.\n if (T->isWebAssemblyTableType()) {\n // ...\n if (NewVD->getStorageClass() != SC_Static) {\n Diag(NewVD->getLocation(), diag::err_wasm_table_must_be_static);"}}, | ||
[h]={ | |||
[yb]={"clang/test/Sema/wasm-refs-and-tables.c:18:15: error: WebAssembly table must be static"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_wasm_table_pr"]={ | ["err_wasm_table_pr"]={ | ||
[a | [a]="cannot form a %select{pointer|reference}0 to a WebAssembly table", | ||
[b]=n, | |||
[c]="cannot form a (?:pointer|reference) to a WebAssembly table", | |||
[d]=m, | |||
[ | [e]=m, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{r,15141,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n // ...\n // Cannot take the address of WebAssembly references or tables.\n if (Context.getTargetInfo().getTriple().isWasm()) {\n // ...\n if (OpTy->isWebAssemblyTableType()) {\n Diag(OpLoc, diag::err_wasm_table_pr) << 1 << OrigOp.get()->getSourceRange();"},{M,2216,"/// Build a pointer type.\n///\n/// \\param T The type to which we\'ll be building a pointer.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// pointer type or, if there is no such entity, the location of the\n/// type that will have pointer type.\n///\n/// \\param Entity The name of the entity that involves the pointer\n/// type, if known.\n///\n/// \\returns A suitable pointer type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildPointerType(QualType T, SourceLocation Loc, DeclarationName Entity) {\n // ...\n // In WebAssembly, pointers to reference types and pointers to tables are\n // illegal.\n if (getASTContext().getTargetInfo().getTriple().isWasm()) {\n // ...\n // We need to desugar the type here in case T is a ParenType.\n if (T->getUnqualifiedDesugaredType()->isWebAssemblyTableType()) {\n Diag(Loc, diag::err_wasm_table_pr) << 0;"},{M,2303,"/// Build a reference type.\n///\n/// \\param T The type to which we\'ll be building a reference.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// reference type or, if there is no such entity, the location of the\n/// type that will have reference type.\n///\n/// \\param Entity The name of the entity that involves the reference\n/// type, if known.\n///\n/// \\returns A suitable reference type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildReferenceType(QualType T, bool SpelledAsLValue, SourceLocation Loc, DeclarationName Entity) {\n // ...\n if (T->isWebAssemblyTableType()) {\n Diag(Loc, diag::err_wasm_table_pr) << 1;"}}, | ||
[ | [h]={ | ||
[ | [yb]={"clang/test/Sema/wasm-refs-and-tables.c:20:23: error: cannot form a pointer to a WebAssembly table","clang/test/Sema/wasm-refs-and-tables.c:33:18: error: cannot form a pointer to a WebAssembly table","clang/test/Sema/wasm-refs-and-tables.c:43:18: error: cannot form a pointer to a WebAssembly table","clang/test/Sema/wasm-refs-and-tables.c:50:40: error: cannot form a pointer to a WebAssembly table","clang/test/Sema/wasm-refs-and-tables.c:55:16: error: cannot form a pointer to a WebAssembly table","clang/test/Sema/wasm-refs-and-tables.c:87:24: error: cannot form a pointer to a WebAssembly table","clang/test/Sema/wasm-refs-and-tables.c:105:3: error: cannot form a reference to a WebAssembly table"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["err_weak_property"]={ | ["err_weak_property"]={ | ||
[a | [a]="existing instance variable %1 for __weak property %0 must be __weak", | ||
[b]=n, | |||
[c]="existing instance variable (.*?) for __weak property (.*?) must be __weak", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"f881267db9a9",1480718311,"Mass-rename the handful of error_* diagnostics to err_*.\n\nllvm-svn: 288545","Mass-rename the handful of error_* diagnostics to err_*.\n\nllvm-svn: 288545"}, | ||
[ | [g]={{Hc,771,"static void checkARCPropertyImpl(Sema &S, SourceLocation propertyImplLoc, ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {\n // ...\n case Qualifiers::OCL_Weak:\n S.Diag(ivar->getLocation(), diag::err_weak_property) << property->getDeclName() << ivar->getDeclName();"},{Hc,1401,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n // Check that type of property and its ivar are type compatible.\n if (!Context.hasSameType(PropertyIvarType, IvarType)) {\n // ...\n // __weak is explicit. So it works on Canonical type.\n if ((PropType.isObjCGCWeak() && !IvarType.isObjCGCWeak() && getLangOpts().getGC() != LangOptions::NonGC)) {\n Diag(PropertyDiagLoc, diag::err_weak_property) << property->getDeclName() << Ivar->getDeclName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/mrc-weak.m"]={"clang/test/SemaObjC/mrc-weak.m:20:6: error: existing instance variable \'_wa\' for __weak property \'wa\' must be __weak","clang/test/SemaObjC/mrc-weak.m:22:26: error: existing instance variable \'_wc\' for __weak property \'wc\' must be __weak"} | ["clang/test/SemaObjC/mrc-weak.m"]={"clang/test/SemaObjC/mrc-weak.m:20:6: error: existing instance variable \'_wa\' for __weak property \'wa\' must be __weak","clang/test/SemaObjC/mrc-weak.m:22:26: error: existing instance variable \'_wc\' for __weak property \'wc\' must be __weak"} | ||
} | } | ||
Line 3,269: | Line 2,599: | ||
["err_while_loop_outside_of_a_function"]={ | ["err_while_loop_outside_of_a_function"]={ | ||
[a]="while loop outside of a function", | [a]="while loop outside of a function", | ||
[ | [b]=n, | ||
[ | [c]="while loop outside of a function", | ||
[d]=m, | |||
[ | [e]=q, | ||
[ | [f]={"edaae251cca0",1657642332,"[clang] better error message for while loops outside of control flow\n\nreport an error when encounter...","[clang] better error message for while loops outside of control flow\n\nreport an error when encountering \'while\' token parsing declarator\n\n```\nclang/test/Parser/while-loop-outside-function.c:3:1: error: while loop outside of a function\nwhile // expected-error {{while loop outside of a function}}\n^\nclang/test/Parser/while-loop-outside-function.c:7:1: error: while loop outside of a function\nwhile // expected-error {{while loop outside of a function}}\n^\n```\n\nFixes: https://github.com/llvm/llvm-project/issues/34462\n\nDifferential Revision: https://reviews.llvm.org/D129573"}, | ||
[g]={{B,6618,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (D.mayOmitIdentifier()) {\n // ...\n } else {\n // ...\n if (D.getContext() == DeclaratorContext::Member) {\n // ...\n } else {\n if (Tok.getKind() == tok::TokenKind::kw_while) {\n Diag(Tok, diag::err_while_loop_outside_of_a_function);"}}, | |||
[ | [h]={ | ||
[ | |||
[ | |||
["clang/test/Parser/while-loop-outside-function.cpp"]={"clang/test/Parser/while-loop-outside-function.cpp:3:1: error: while loop outside of a function","clang/test/Parser/while-loop-outside-function.cpp:7:1: error: while loop outside of a function","clang/test/Parser/while-loop-outside-function.cpp:14:1: error: while loop outside of a function"} | ["clang/test/Parser/while-loop-outside-function.cpp"]={"clang/test/Parser/while-loop-outside-function.cpp:3:1: error: while loop outside of a function","clang/test/Parser/while-loop-outside-function.cpp:7:1: error: while loop outside of a function","clang/test/Parser/while-loop-outside-function.cpp:14:1: error: while loop outside of a function"} | ||
} | } | ||
Line 3,284: | Line 2,611: | ||
["err_wrong_sampler_addressspace"]={ | ["err_wrong_sampler_addressspace"]={ | ||
[a]="sampler type cannot be used with the __local and __global address space qualifiers", | [a]="sampler type cannot be used with the __local and __global address space qualifiers", | ||
[ | [b]=n, | ||
[ | [c]="sampler type cannot be used with the __local and __global address space qualifiers", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"610541989a52",1360234547,"Add OpenCL samplers as Clang builtin types and check sampler related restrictions.\n\nllvm-svn: 174601","Add OpenCL samplers as Clang builtin types and check sampler related restrictions.\n\nllvm-svn: 174601"}, | ||
[ | [g]={{p,7384,"/// Returns true if there hasn\'t been any invalid type diagnosed.\nstatic bool diagnoseOpenCLTypes(Sema &Se, VarDecl *NewVD) {\n // ...\n if (R->isSamplerT()) {\n // OpenCL v1.2 s6.9.b p4:\n // The sampler type cannot be used with the __local and __global address\n // space qualifiers.\n if (R.getAddressSpace() == LangAS::opencl_local || R.getAddressSpace() == LangAS::opencl_global) {\n Se.Diag(NewVD->getLocation(), diag::err_wrong_sampler_addressspace);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/SemaOpenCL/sampler_t.cl"]={"clang/test/SemaOpenCL/sampler_t.cl:18:18: error: sampler type cannot be used with the __local and __global address space qualifiers","clang/test/SemaOpenCL/sampler_t.cl:19:24: error: sampler type cannot be used with the __local and __global address space qualifiers","clang/test/SemaOpenCL/sampler_t.cl:56:19: error: sampler type cannot be used with the __local and __global address space qualifiers"} | ["clang/test/SemaOpenCL/sampler_t.cl"]={"clang/test/SemaOpenCL/sampler_t.cl:18:18: error: sampler type cannot be used with the __local and __global address space qualifiers","clang/test/SemaOpenCL/sampler_t.cl:19:24: error: sampler type cannot be used with the __local and __global address space qualifiers","clang/test/SemaOpenCL/sampler_t.cl:56:19: error: sampler type cannot be used with the __local and __global address space qualifiers"} | ||
} | } | ||
Line 3,299: | Line 2,623: | ||
["err_x86_builtin_invalid_rounding"]={ | ["err_x86_builtin_invalid_rounding"]={ | ||
[a]="invalid rounding argument", | [a]="invalid rounding argument", | ||
[ | [b]=n, | ||
[ | [c]="invalid rounding argument", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"a7e253e8fb06",1474606111,"[AVX-512] Add initial support for checking rounding mode arguments of builtins.\n\nThe backend can\'t e...","[AVX-512] Add initial support for checking rounding mode arguments of builtins.\n\nThe backend can\'t encode all possible values of the argument and will fail isel. Checking in the frontend presents a friendlier experience to the user.\n\nI started with builtins that can only take _MM_CUR_DIRECTION or _MM_NO_EXC. More builtins coming in the future.\n\nllvm-svn: 282228"}, | ||
[ | [g]={{U,5790,"// Check if the rounding mode is legal.\nbool Sema::CheckX86BuiltinRoundingOrSAE(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n return Diag(TheCall->getBeginLoc(), diag::err_x86_builtin_invalid_rounding) << Arg->getSourceRange();"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Sema/builtins-x86.c"]={"clang/test/Sema/builtins-x86.c:81:10: error: invalid rounding argument","clang/test/Sema/builtins-x86.c:98:10: error: invalid rounding argument","clang/test/Sema/builtins-x86.c:102:10: error: invalid rounding argument"} | ["clang/test/Sema/builtins-x86.c"]={"clang/test/Sema/builtins-x86.c:81:10: error: invalid rounding argument","clang/test/Sema/builtins-x86.c:98:10: error: invalid rounding argument","clang/test/Sema/builtins-x86.c:102:10: error: invalid rounding argument"} | ||
} | } | ||
Line 3,314: | Line 2,635: | ||
["err_x86_builtin_invalid_scale"]={ | ["err_x86_builtin_invalid_scale"]={ | ||
[a]="scale argument must be 1, 2, 4, or 8", | [a]="scale argument must be 1, 2, 4, or 8", | ||
[ | [b]=n, | ||
[ | [c]="scale argument must be 1, 2, 4, or 8", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"df5beb2d6f83",1489425410,"[X86] Add checking of the scale argument to scatter/gather builtins\n\nThe only valid values for scale...","[X86] Add checking of the scale argument to scatter/gather builtins\n\nThe only valid values for scale immediate of scatter/gather builtins are 1, 2, 4, or 8. This patch enforces this in the frontend otherwise we generate invalid instruction encodings in the backend.\n\nDifferential Revision: https://reviews.llvm.org/D30875\n\nllvm-svn: 297642"}, | ||
[ | [g]={{U,5893,"// Check if the gather/scatter scale is legal.\nbool Sema::CheckX86BuiltinGatherScatterScale(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n return Diag(TheCall->getBeginLoc(), diag::err_x86_builtin_invalid_scale) << Arg->getSourceRange();"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Sema/builtins-x86.c"]={"clang/test/Sema/builtins-x86.c:106:10: error: scale argument must be 1, 2, 4, or 8","clang/test/Sema/builtins-x86.c:110:3: error: scale argument must be 1, 2, 4, or 8"} | ["clang/test/Sema/builtins-x86.c"]={"clang/test/Sema/builtins-x86.c:106:10: error: scale argument must be 1, 2, 4, or 8","clang/test/Sema/builtins-x86.c:110:3: error: scale argument must be 1, 2, 4, or 8"} | ||
} | } | ||
Line 3,329: | Line 2,647: | ||
["err_x86_builtin_tile_arg_duplicate"]={ | ["err_x86_builtin_tile_arg_duplicate"]={ | ||
[a]="tile arguments must refer to different tiles", | [a]="tile arguments must refer to different tiles", | ||
[ | [b]=n, | ||
[ | [c]="tile arguments must refer to different tiles", | ||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the n...","[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"}, | ||
[ | [g]={{U,5926,"bool Sema::CheckX86BuiltinTileDuplicate(CallExpr *TheCall, ArrayRef<int> ArgNums) {\n // ...\n for (int ArgNum : ArgNums) {\n // ...\n if (ArgValues.test(ArgExtValue))\n return Diag(TheCall->getBeginLoc(), diag::err_x86_builtin_tile_arg_duplicate) << TheCall->getArg(ArgNum)->getSourceRange();"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/CodeGen/X86/amxcomplex-errors.c"]={"clang/test/CodeGen/X86/amxcomplex-errors.c:10:3: error: tile arguments must refer to different tiles","clang/test/CodeGen/X86/amxcomplex-errors.c:17:3: error: tile arguments must refer to different tiles"} | ["clang/test/CodeGen/X86/amxcomplex-errors.c"]={"clang/test/CodeGen/X86/amxcomplex-errors.c:10:3: error: tile arguments must refer to different tiles","clang/test/CodeGen/X86/amxcomplex-errors.c:17:3: error: tile arguments must refer to different tiles"} | ||
} | } | ||
Line 3,344: | Line 2,659: | ||
["err_zero_version"]={ | ["err_zero_version"]={ | ||
[a]="version number must have non-zero major, minor, or sub-minor version", | [a]="version number must have non-zero major, minor, or sub-minor version", | ||
[ | [b]=n, | ||
[ | [c]="version number must have non\\-zero major, minor, or sub\\-minor version", | ||
[d]=m, | |||
[e]=q, | |||
[f]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify\nwhich versions of an OS provide...","Implement a new \'availability\' attribute, that allows one to specify\nwhich versions of an OS provide a certain facility. For example,\n\n void foo()\n __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));\n\nsays that the function \"foo\" was introduced in 10.2, deprecated in\n10.4, and completely obsoleted in 10.6. This attribute ties in with\nthe deployment targets (e.g., -mmacosx-version-min=10.1 specifies that\nwe want to deploy back to Mac OS X 10.1). There are several concrete\nbehaviors that this attribute enables, as illustrated with the\nfunction foo() above:\n\n - If we choose a deployment target >= Mac OS X 10.4, uses of \"foo\"\n will result in a deprecation warning, as if we had placed\n attribute((deprecated)) on it (but with a better diagnostic)\n - If we choose a deployment target >= Mac OS X 10.6, uses of \"foo\"\n will result in an \"unavailable\" warning (in C)/error (in C++), as\n if we had placed attribute((unavailable)) on it\n - If we choose a deployment target prior to 10.2, foo() is\n weak-imported (if it is a kind of entity that can be weak\n imported), as if we had placed the weak_import attribute on it.\n\nNaturally, there can be multiple availability attributes on a\ndeclaration, for different platforms; only the current platform\nmatters when checking availability attributes.\n\nThe only platforms this attribute currently works for are \"ios\" and\n\"macosx\", since we already have -mxxxx-version-min flags for them and we\nhave experience there with macro tricks translating down to the\ndeprecated/unavailable/weak_import attributes. The end goal is to open\nthis up to other platforms, and even extension to other \"platforms\"\nthat are really libraries (say, through a #pragma clang\ndefine_system), but that hasn\'t yet been designed and we may want to\nshake out more issues with this narrower problem first.\n\nAddresses <rdar://problem/6690412>.\n\nAs a drive-by bug-fix, if an entity is both deprecated and\nunavailable, we only emit the \"unavailable\" diagnostic.\n\nllvm-svn: 128127"}, | |||
[ | [g]={{B,1037,"/// Parse a version number.\n///\n/// version:\n/// simple-integer\n/// simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer\n/// simple-integer \'.\' simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer \'_\' simple-integer\nVersionTuple Parser::ParseVersionTuple(SourceRange &Range) {\n // ...\n if (AfterMajor == ActualLength) {\n // ...\n // We only had a single version component.\n if (Major == 0) {\n Diag(Tok, diag::err_zero_version);"},{B,1066,"/// Parse a version number.\n///\n/// version:\n/// simple-integer\n/// simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer\n/// simple-integer \'.\' simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer \'_\' simple-integer\nVersionTuple Parser::ParseVersionTuple(SourceRange &Range) {\n // ...\n if (AfterMinor == ActualLength) {\n // ...\n // We had major.minor.\n if (Major == 0 && Minor == 0) {\n Diag(Tok, diag::err_zero_version);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["error_cconv_unsupported"]={ | ["error_cconv_unsupported"]={ | ||
[a | [a]="%0 calling convention is not supported %select{for this target|on variadic function|on constructor/destructor|on builtin function}1", | ||
[b]=n, | |||
[c]="(.*?) calling convention is not supported (?:for this target|on variadic function|on constructor\\/destructor|on builtin function)", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"f4038e75d202",1563572314,"Disallow most calling convention attributes on PS4\n\nPS4 now only allows \"cdecl\", and its equivalent ...","Disallow most calling convention attributes on PS4\n\nPS4 now only allows \"cdecl\", and its equivalent on PS4, \"sysv_abi\".\n\nDifferential Revision: https://reviews.llvm.org/D64780\n\nllvm-svn: 366617"}, | ||
[ | [g]={{Nb,5448,"bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, const FunctionDecl *FD) {\n // ...\n case TargetInfo::CCCR_Error:\n Diag(Attrs.getLoc(), diag::error_cconv_unsupported) << Attrs << (int)CallingConventionIgnoredReason::ForThisTarget;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/no_callconv.cpp"]={"clang/test/Sema/no_callconv.cpp:7:6: error: \'__vectorcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:8:6: error: \'__regcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:9:21: error: \'vectorcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:10:21: error: \'regcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:11:21: error: \'ms_abi\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:12:21: error: \'intel_ocl_bicc\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:13:21: error: \'swiftcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:14:21: error: \'swiftasynccall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:15:21: error: \'pascal\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:16:21: error: \'preserve_most\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:17:21: error: \'preserve_all\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:18:21: error: \'stdcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:19:21: error: \'fastcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:20:21: error: \'thiscall\' calling convention is not supported for this target"} | ["clang/test/Sema/no_callconv.cpp"]={"clang/test/Sema/no_callconv.cpp:7:6: error: \'__vectorcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:8:6: error: \'__regcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:9:21: error: \'vectorcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:10:21: error: \'regcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:11:21: error: \'ms_abi\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:12:21: error: \'intel_ocl_bicc\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:13:21: error: \'swiftcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:14:21: error: \'swiftasynccall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:15:21: error: \'pascal\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:16:21: error: \'preserve_most\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:17:21: error: \'preserve_all\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:18:21: error: \'stdcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:19:21: error: \'fastcall\' calling convention is not supported for this target","clang/test/Sema/no_callconv.cpp:20:21: error: \'thiscall\' calling convention is not supported for this target"} | ||
} | } | ||
}, | }, | ||
["error_duplicate_asm_operand_name"]={ | ["error_duplicate_asm_operand_name"]={ | ||
[a | [a]="duplicate use of asm operand name \"%0\"", | ||
[b]=n, | |||
[c]="duplicate use of asm operand name \"(.*?)\"", | |||
[d]=m, | |||
[ | [e]="Inline Assembly Issue", | ||
[ | [f]={"954ec09aed4f",1559178346,"clang support gnu asm goto.\nSyntax:\n asm [volatile] goto ( AssemblerTemplate\n ...","clang support gnu asm goto.\nSyntax:\n asm [volatile] goto ( AssemblerTemplate\n :\n : InputOperands\n : Clobbers\n : GotoLabels)\n\nhttps://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html\n\nNew llvm IR is \"callbr\" for inline asm goto instead \"call\" for inline asm\nFor:\nasm goto(\"testl %0, %0; jne %l1;\" :: \"r\"(cond)::label_true, loop);\nIR:\ncallbr void asm sideeffect \"testl $0, $0; jne ${1:l};\", \"r,X,X,~{dirflag},~{fpsr},~{flags}\"(i32 %0, i8* blockaddress(@foo, %label_true), i8* blockaddress(@foo, %loop)) #1\n to label %asm.fallthrough [label %label_true, label %loop], !srcloc !3\n\nasm.fallthrough: \n\nCompiler need to generate:\n1> a dummy constarint \'X\' for each label.\n2> an unique fallthrough label for each asm goto stmt \" asm.fallthrough%number\".\n\n\nDiagnostic \n1> duplicate asm operand name are used in output, input and label.\n2> goto out of scope.\n\nllvm-svn: 362045"}, | ||
[ | [g]={{"clang/lib/Sema/SemaStmtAsm.cpp",736,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n // ...\n if (Found != NamedOperandList.end()) {\n Diag((Found + 1)->second->getBeginLoc(), diag::error_duplicate_asm_operand_name) << (Found + 1)->first;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:300:29: error: duplicate use of asm operand name \"lab\"","clang/test/Sema/asm.c:303:69: error: duplicate use of asm operand name \"lab\"","clang/test/Sema/asm.c:309:40: error: duplicate use of asm operand name \"lab\"","clang/test/Sema/asm.c:312:42: error: duplicate use of asm operand name \"lab\""} | ["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:300:29: error: duplicate use of asm operand name \"lab\"","clang/test/Sema/asm.c:303:69: error: duplicate use of asm operand name \"lab\"","clang/test/Sema/asm.c:309:40: error: duplicate use of asm operand name \"lab\"","clang/test/Sema/asm.c:312:42: error: duplicate use of asm operand name \"lab\""} | ||
} | } | ||
Line 3,386: | Line 2,692: | ||
["error_inoutput_conflict_with_clobber"]={ | ["error_inoutput_conflict_with_clobber"]={ | ||
[a]="asm-specifier for input or output variable conflicts with asm clobber list", | [a]="asm-specifier for input or output variable conflicts with asm clobber list", | ||
[ | [b]=n, | ||
[ | [c]="asm\\-specifier for input or output variable conflicts with asm clobber list", | ||
[d]=m, | |||
[e]=m, | |||
[f]={"c42fd03bf854",1482755022,"[inline-asm]No error for conflict between inputs\\outputs and clobber list\n\nAccording to extended asm...","[inline-asm]No error for conflict between inputs\\outputs and clobber list\n\nAccording to extended asm syntax, a case where the clobber list includes a variable from the inputs or outputs should be an error - conflict.\nfor example:\n\nconst long double a = 0.0;\nint main()\n{\n\nchar b;\ndouble t1 = a;\n__asm__ (\"fucompp\": \"=a\" (b) : \"u\" (t1), \"t\" (t1) : \"cc\", \"st\", \"st(1)\");\n\nreturn 0;\n}\n\nThis should conflict with the output - t1 which is st, and st which is st aswell.\nThe patch fixes it.\n\nCommit on behald of Ziv Izhar.\n\nDifferential Revision: https://reviews.llvm.org/D15075\n\nllvm-svn: 290539"}, | |||
[ | [g]={{"clang/lib/Sema/SemaStmtAsm.cpp",717,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n // ...\n if (ConstraintLoc.isValid())\n targetDiag(ConstraintLoc, diag::error_inoutput_conflict_with_clobber);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/arm64-inline-asm.c"]={"clang/test/Sema/arm64-inline-asm.c:13:34: error: asm-specifier for input or output variable conflicts with asm clobber list","clang/test/Sema/arm64-inline-asm.c:14:35: error: asm-specifier for input or output variable conflicts with asm clobber list"} | ["clang/test/Sema/arm64-inline-asm.c"]={"clang/test/Sema/arm64-inline-asm.c:13:34: error: asm-specifier for input or output variable conflicts with asm clobber list","clang/test/Sema/arm64-inline-asm.c:14:35: error: asm-specifier for input or output variable conflicts with asm clobber list"} | ||
} | } | ||
}, | }, | ||
["error_subscript_overload"]={ | ["error_subscript_overload"]={ | ||
[a | [a]="overloaded %0 cannot have %select{no|a defaulted|more than one}1 parameter before C++23", | ||
[b]=n, | |||
[c]="overloaded (.*?) cannot have (?:no|a defaulted|more than one) parameter before C\\+\\+23", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables i...","[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"}, | ||
[ | [g]={{t,16193,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\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();"},{t,16244,"#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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx2b-subscript.cpp"]={"clang/test/Parser/cxx2b-subscript.cpp:10:17: error: overloaded \'operator[]\' cannot have more than one parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:13:17: error: overloaded \'operator[]\' cannot have no parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:19:17: error: overloaded \'operator[]\' cannot have a defaulted parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:22:17: error: overloaded \'operator[]\' cannot have a defaulted parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:22:17: error: overloaded \'operator[]\' cannot have more than one parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:30:18: error: overloaded \'operator[]\' cannot have no parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:30:18: error: overloaded \'operator[]\' cannot have more than one parameter before C++23"} | ["clang/test/Parser/cxx2b-subscript.cpp"]={"clang/test/Parser/cxx2b-subscript.cpp:10:17: error: overloaded \'operator[]\' cannot have more than one parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:13:17: error: overloaded \'operator[]\' cannot have no parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:19:17: error: overloaded \'operator[]\' cannot have a defaulted parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:22:17: error: overloaded \'operator[]\' cannot have a defaulted parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:22:17: error: overloaded \'operator[]\' cannot have more than one parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:30:18: error: overloaded \'operator[]\' cannot have no parameter before C++23","clang/test/Parser/cxx2b-subscript.cpp:30:18: error: overloaded \'operator[]\' cannot have more than one parameter before C++23"} | ||
} | } | ||
}, | }, | ||
["escaped_newline_block_comment_end"]={ | ["escaped_newline_block_comment_end"]={ | ||
[ | [j]={cb,mb,ac,"comments",kb}, | ||
[i]=ac, | |||
[a]="escaped newline between */ characters at block comment end", | |||
[b]=l, | |||
[ | [c]="escaped newline between \\*\\/ characters at block comment end", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wcomment[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{T,2695,"/// isBlockCommentEndOfEscapedNewLine - Return true if the specified newline\n/// character (either \\\\n or \\\\r) is part of an escaped newline sequence. Issue\n/// a diagnostic if so. We know that the newline is inside of a block comment.\nstatic bool isEndOfBlockCommentWithEscapedNewLine(const char *CurPtr, Lexer *L, bool Trigraphs) {\n // ...\n // Warn about having an escaped newline between the */ characters.\n if (!L->isLexingRawMode())\n L->Diag(CurPtr + 1, diag::escaped_newline_block_comment_end);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Lexer/comment-escape.c"]={"clang/test/Lexer/comment-escape.c:9:6: warning: escaped newline between */ characters at block comment end [-Wcomment]","clang/test/Lexer/comment-escape.c:14:6: warning: escaped newline between */ characters at block comment end [-Wcomment]","clang/test/Lexer/comment-escape.c:21:5: warning: escaped newline between */ characters at block comment end [-Wcomment]","clang/test/Lexer/comment-escape.c:26:5: warning: escaped newline between */ characters at block comment end [-Wcomment]"} | ["clang/test/Lexer/comment-escape.c"]={"clang/test/Lexer/comment-escape.c:9:6: warning: escaped newline between */ characters at block comment end [-Wcomment]","clang/test/Lexer/comment-escape.c:14:6: warning: escaped newline between */ characters at block comment end [-Wcomment]","clang/test/Lexer/comment-escape.c:21:5: warning: escaped newline between */ characters at block comment end [-Wcomment]","clang/test/Lexer/comment-escape.c:26:5: warning: escaped newline between */ characters at block comment end [-Wcomment]"} | ||
} | } | ||
}, | }, | ||
["ext_abstract_pack_declarator_parens"]={ | ["ext_abstract_pack_declarator_parens"]={ | ||
[ | [j]={"anonymous-pack-parens"}, | ||
[i]="anonymous-pack-parens", | |||
[a]="ISO C++11 requires a parenthesized pack declaration to have a name", | |||
[b]=l, | |||
[ | [c]="ISO C\\+\\+11 requires a parenthesized pack declaration to have a name", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wanonymous\\-pack\\-parens[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"b19337fbe474",1361391567,"PR15311: Finish implementation of the suggested resolution of core issue 1488,\nwhich allows grouping...","PR15311: Finish implementation of the suggested resolution of core issue 1488,\nwhich allows grouping parens in an abstract-pack-declarator. This was already\nmostly implemented, but missed some cases. Add an ExtWarn for use of this\nextension until CWG ratifies it.\n\nllvm-svn: 175660"}, | ||
[ | [g]={{B,6590,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (D.mayOmitIdentifier()) {\n // ...\n // The grammar for abstract-pack-declarator does not allow grouping parens.\n // FIXME: Revisit this once core issue 1488 is resolved.\n if (D.hasEllipsis() && D.hasGroupingParens())\n Diag(PP.getLocForEndOfToken(D.getEllipsisLoc()), diag::ext_abstract_pack_declarator_parens);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx0x-ambig.cpp"]={"clang/test/Parser/cxx0x-ambig.cpp:125:17: warning: ISO C++11 requires a parenthesized pack declaration to have a name [-Wanonymous-pack-parens]","clang/test/Parser/cxx0x-ambig.cpp:140:20: warning: ISO C++11 requires a parenthesized pack declaration to have a name [-Wanonymous-pack-parens]","clang/test/Parser/cxx0x-ambig.cpp:141:20: warning: ISO C++11 requires a parenthesized pack declaration to have a name [-Wanonymous-pack-parens]","clang/test/Parser/cxx0x-ambig.cpp:142:28: warning: ISO C++11 requires a parenthesized pack declaration to have a name [-Wanonymous-pack-parens]"} | ["clang/test/Parser/cxx0x-ambig.cpp"]={"clang/test/Parser/cxx0x-ambig.cpp:125:17: warning: ISO C++11 requires a parenthesized pack declaration to have a name [-Wanonymous-pack-parens]","clang/test/Parser/cxx0x-ambig.cpp:140:20: warning: ISO C++11 requires a parenthesized pack declaration to have a name [-Wanonymous-pack-parens]","clang/test/Parser/cxx0x-ambig.cpp:141:20: warning: ISO C++11 requires a parenthesized pack declaration to have a name [-Wanonymous-pack-parens]","clang/test/Parser/cxx0x-ambig.cpp:142:28: warning: ISO C++11 requires a parenthesized pack declaration to have a name [-Wanonymous-pack-parens]"} | ||
} | } | ||
}, | }, | ||
["ext_adl_only_template_id"]={ | ["ext_adl_only_template_id"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="use of function template name with no prior declaration in function call with explicit template arguments is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={"b23c5e8c3df8",1557372687,"[c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose\ntemplate name is not visible...","[c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose\ntemplate name is not visible to unqualified lookup.\n\nIn order to support this without a severe degradation in our ability to\ndiagnose typos in template names, this change significantly restructures\nthe way we handle template-id-shaped syntax for which lookup of the\ntemplate name finds nothing.\n\nInstead of eagerly diagnosing an undeclared template name, we now form a\nplaceholder template-name representing a name that is known to not find\nany templates. When the parser sees such a name, it attempts to\ndisambiguate whether we have a less-than comparison or a template-id.\nAny diagnostics or typo-correction for the name are delayed until its\npoint of use.\n\nThe upshot should be a small improvement of our diagostic quality\noverall: we now take more syntactic context into account when trying to\nresolve an undeclared identifier on the left hand side of a \'<\'. In\nfact, this works well enough that the backwards-compatible portion (for\nan undeclared identifier rather than a lookup that finds functions but\nno function templates) is enabled in all language modes.\n\nllvm-svn: 360308"}, | ||
[ | [g]={{r,7080,"ExprResult Sema::ActOnCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig) {\n // ...\n // Diagnose uses of the C++20 \"ADL-only template-id call\" feature in earlier\n // language modes.\n if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(Fn)) {\n if (ULE->hasExplicitTemplateArgs() && ULE->decls_begin() == ULE->decls_end()) {\n Diag(Fn->getExprLoc(), getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_adl_only_template_id : diag::ext_adl_only_template_id) << ULE->getName();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp:44:11: warning: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp:44:11: warning: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Wc++20-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_aggregate_init_not_constant"]={ | ["ext_aggregate_init_not_constant"]={ | ||
[ | [j]={Q,o}, | ||
[i]=Q, | |||
[a]="initializer for aggregate is not a compile-time constant", | |||
[b]=l, | |||
[c]="initializer for aggregate is not a compile\\-time constant", | |||
[ | [d]=zb, | ||
[ | [e]=k, | ||
[ | [f]={"1aac546d3108",1374490706,"Implement the part of C89 6.5.7 p3 requiring a constant initializer list\nwhen initializing aggregate...","Implement the part of C89 6.5.7 p3 requiring a constant initializer list\nwhen initializing aggregate/union types, no matter if static or not.\n\nllvm-svn: 186817"}, | ||
[ | [g]={{p,13435,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // ...\n if (VDecl->isLocalVarDecl()) {\n // Don\'t check the initializer if the declaration is malformed.\n if (VDecl->isInvalidDecl()) {\n // ...\n } else if (VDecl->getType().getAddressSpace() == LangAS::opencl_constant) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else if (VDecl->getStorageClass() == SC_Static) {\n // ...\n } else if (!getLangOpts().C99 && VDecl->getType()->isAggregateType() && isa<InitListExpr>(Init)) {\n // ...\n if (!Init->isConstantInitializer(Context, false, &Culprit)) {\n Diag(Culprit->getExprLoc(), diag::ext_aggregate_init_not_constant) << Culprit->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | [nc]={"clang/test/Sema/c89.c:121:16: warning: initializer for aggregate is not a compile-time constant [-Wc99-extensions]","clang/test/Sema/c89.c:122:24: warning: initializer for aggregate is not a compile-time constant [-Wc99-extensions]"} | ||
[ | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_alias_declaration"]={ | ["ext_alias_declaration"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="alias declarations are a C++11 extension", | |||
[b]=l, | |||
[ | [c]="alias declarations are a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"dda56e4b4a9c",1302877477,"Support for C++11 (non-template) alias declarations.\n\nllvm-svn: 129567","Support for C++11 (non-template) alias declarations.\n\nllvm-svn: 129567"}, | ||
[ | [g]={{F,879,"Decl *Parser::ParseAliasDeclarationAfterDeclarator(const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, UsingDeclarator &D, SourceLocation &DeclEnd, AccessSpecifier AS, ParsedAttributes &Attrs, Decl **OwnedType) {\n // ...\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_alias_declaration : diag::ext_alias_declaration);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaHLSL/group_shared.hlsl"]={"clang/test/SemaHLSL/group_shared.hlsl:62:14: warning: alias declarations are a C++11 extension [-Wc++11-extensions]"} | ["clang/test/SemaHLSL/group_shared.hlsl"]={"clang/test/SemaHLSL/group_shared.hlsl:62:14: warning: alias declarations are a C++11 extension [-Wc++11-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_alias_in_init_statement"]={ | ["ext_alias_in_init_statement"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="alias declaration in this context is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="alias declaration in this context is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{rb,2003,"Parser::DeclGroupPtrTy Parser::ParseAliasDeclarationInInitStatement(DeclaratorContext Context, ParsedAttributes &Attrs) {\n // ...\n Diag(DeclStart, !getLangOpts().CPlusPlus23 ? diag::ext_alias_in_init_statement : diag::warn_cxx20_alias_in_init_statement) << SourceRange(DeclStart, DeclEnd);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx2b-init-statement.cpp"]={"clang/test/Parser/cxx2b-init-statement.cpp:10:10: warning: alias declaration in this context is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/cxx2b-init-statement.cpp:12:12: warning: alias declaration in this context is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/cxx2b-init-statement.cpp:16:8: warning: alias declaration in this context is a C++23 extension [-Wc++23-extensions]"} | ["clang/test/Parser/cxx2b-init-statement.cpp"]={"clang/test/Parser/cxx2b-init-statement.cpp:10:10: warning: alias declaration in this context is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/cxx2b-init-statement.cpp:12:12: warning: alias declaration in this context is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/cxx2b-init-statement.cpp:16:8: warning: alias declaration in this context is a C++23 extension [-Wc++23-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_alignof_expr"]={ | ["ext_alignof_expr"]={ | ||
[ | [j]={E,"gnu-alignof-expression"}, | ||
[i]="gnu-alignof-expression", | |||
[a]="%0 applied to an expression is a GNU extension", | |||
[b]=l, | |||
[ | [c]="(.*?) applied to an expression is a GNU extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-alignof\\-expression[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"7dd5fe5ce60c",1359454698,"Produce a diagnostic if alignas is applied to an expression. Neither C11 nor\nC++11 allows that.\n\nllv...","Produce a diagnostic if alignas is applied to an expression. Neither C11 nor\nC++11 allows that.\n\nllvm-svn: 173789"}, | ||
[ | [g]={{nb,2529,"/// Parse a sizeof or alignof expression.\n///\n/// \\verbatim\n/// unary-expression: [C99 6.5.3]\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++11] \'alignof\' \'(\' type-id \')\'\n/// \\endverbatim\nExprResult Parser::ParseUnaryExprOrTypeTraitExpression() {\n // ...\n if (OpTok.isOneOf(tok::kw_alignof, tok::kw__Alignof))\n Diag(OpTok, diag::ext_alignof_expr) << OpTok.getIdentifierInfo();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/alignof-sizeof-reference.cpp"]={"clang/test/SemaCXX/alignof-sizeof-reference.cpp:7:17: warning: \'alignof\' applied to an expression is a GNU extension [-Wgnu-alignof-expression]","clang/test/SemaCXX/alignof-sizeof-reference.cpp:23:9: warning: \'alignof\' applied to an expression is a GNU extension [-Wgnu-alignof-expression]"} | ["clang/test/SemaCXX/alignof-sizeof-reference.cpp"]={"clang/test/SemaCXX/alignof-sizeof-reference.cpp:7:17: warning: \'alignof\' applied to an expression is a GNU extension [-Wgnu-alignof-expression]","clang/test/SemaCXX/alignof-sizeof-reference.cpp:23:9: warning: \'alignof\' applied to an expression is a GNU extension [-Wgnu-alignof-expression]"} | ||
} | } | ||
}, | }, | ||
["ext_anonymous_record_with_anonymous_type"]={ | ["ext_anonymous_record_with_anonymous_type"]={ | ||
[ | [j]={"nested-anon-types",o}, | ||
[i]="nested-anon-types", | |||
[a]="anonymous types declared in an anonymous %select{struct|union}0 are an extension", | |||
[b]=l, | |||
[c]="anonymous types declared in an anonymous (?:struct|union) are an extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wnested\\-anon\\-types[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"254d2666e435",1359334445,"Add a -pedantic warning: an anonymous union within an anonymous union is not\npermitted in standard C...","Add a -pedantic warning: an anonymous union within an anonymous union is not\npermitted in standard C++, despite being silently accepted by many (all?) major\nC++ implementations.\n\nllvm-svn: 173643"}, | ||
[ | [g]={{p,5635,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n // ...\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n // ...\n } else if (Mem->isImplicit()) {\n // ...\n } else if (isa<TagDecl>(Mem) && Mem->getDeclContext() != Record) {\n // ...\n } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {\n if (!MemRecord->isAnonymousStructOrUnion() && MemRecord->getDeclName()) {\n // ...\n } else {\n // ...\n Diag(MemRecord->getLocation(), diag::ext_anonymous_record_with_anonymous_type) << Record->isUnion();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/anonymous-union.cpp"]={"clang/test/SemaCXX/anonymous-union.cpp:12:5: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]","clang/test/SemaCXX/anonymous-union.cpp:113:5: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]","clang/test/SemaCXX/anonymous-union.cpp:140:7: warning: anonymous types declared in an anonymous struct are an extension [-Wnested-anon-types]","clang/test/SemaCXX/anonymous-union.cpp:148:7: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]","clang/test/SemaCXX/anonymous-union.cpp:199:7: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]"} | ["clang/test/SemaCXX/anonymous-union.cpp"]={"clang/test/SemaCXX/anonymous-union.cpp:12:5: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]","clang/test/SemaCXX/anonymous-union.cpp:113:5: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]","clang/test/SemaCXX/anonymous-union.cpp:140:7: warning: anonymous types declared in an anonymous struct are an extension [-Wnested-anon-types]","clang/test/SemaCXX/anonymous-union.cpp:148:7: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]","clang/test/SemaCXX/anonymous-union.cpp:199:7: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]"} | ||
} | } | ||
}, | }, | ||
["ext_anonymous_record_with_type"]={ | ["ext_anonymous_record_with_type"]={ | ||
[ | [j]={A,"microsoft-anon-tag",o}, | ||
[i]="microsoft-anon-tag", | |||
[a]="types declared in an anonymous %select{struct|union}0 are a Microsoft extension", | |||
[b]=l, | |||
[c]="types declared in an anonymous (?:struct|union) are a Microsoft extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-anon\\-tag[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"4ad4b5863947",1283945545,"Allow type definitions inside anonymous struct/union in Microsoft mode.\n\nllvm-svn: 113354","Allow type definitions inside anonymous struct/union in Microsoft mode.\n\nllvm-svn: 113354"}, | ||
[ | [g]={{p,5622,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n // ...\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n // ...\n } else if (Mem->isImplicit()) {\n // ...\n } else if (isa<TagDecl>(Mem) && Mem->getDeclContext() != Record) {\n // ...\n } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {\n if (!MemRecord->isAnonymousStructOrUnion() && MemRecord->getDeclName()) {\n // Visual C++ allows type definition in anonymous struct or union.\n if (getLangOpts().MicrosoftExt)\n Diag(MemRecord->getLocation(), diag::ext_anonymous_record_with_type) << Record->isUnion();"},{p,5656,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // C++ [class.union]p2:\n // The member-specification of an anonymous union shall only\n // define non-static data members. [Note: nested types and\n // functions cannot be declared within an anonymous union. ]\n for (auto *Mem : Record->decls()) {\n // ...\n if (auto *FD = dyn_cast<FieldDecl>(Mem)) {\n // ...\n } else if (Mem->isImplicit()) {\n // ...\n } else if (isa<TagDecl>(Mem) && Mem->getDeclContext() != Record) {\n // ...\n } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {\n // ...\n } else if (isa<AccessSpecDecl>(Mem)) {\n // ...\n } else if (isa<StaticAssertDecl>(Mem)) {\n // ...\n } else {\n // ...\n // Visual C++ allows type definition in anonymous struct or union.\n if (getLangOpts().MicrosoftExt && DK == diag::err_anonymous_record_with_type)\n Diag(Mem->getLocation(), diag::ext_anonymous_record_with_type) << Record->isUnion();"}}, | ||
[ | [h]={ | ||
[ | [Nc]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:15:12: warning: types declared in an anonymous union are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/SemaCXX/MicrosoftExtensions.cpp:20:11: warning: types declared in an anonymous union are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/SemaCXX/MicrosoftExtensions.cpp:26:17: warning: types declared in an anonymous union are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/SemaCXX/MicrosoftExtensions.cpp:27:12: warning: types declared in an anonymous union are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/SemaCXX/MicrosoftExtensions.cpp:34:12: warning: types declared in an anonymous struct are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/SemaCXX/MicrosoftExtensions.cpp:39:8: warning: types declared in an anonymous struct are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/SemaCXX/MicrosoftExtensions.cpp:45:17: warning: types declared in an anonymous struct are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/SemaCXX/MicrosoftExtensions.cpp:46:12: warning: types declared in an anonymous struct are a Microsoft extension [-Wmicrosoft-anon-tag]"} | ||
[ | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_anonymous_struct_union_qualified"]={ | ["ext_anonymous_struct_union_qualified"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="anonymous %select{struct|union}0 cannot be \'%1\'", | |||
[b]=l, | |||
[c]="anonymous (?:struct|union) cannot be \'(.*?)\'", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={"0f8bc97abd6d",1304982333,"Ignore const/volatile/restrict qualifiers on anonymous structs and\nunions. Fixes PR8326.\n\nllvm-svn: ...","Ignore const/volatile/restrict qualifiers on anonymous structs and\nunions. Fixes PR8326.\n\nllvm-svn: 131109"}, | ||
[ | [g]={{p,5556,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n if (DS.getTypeQualifiers() & DeclSpec::TQ_const)\n Diag(DS.getConstSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"const\" << FixItHint::CreateRemoval(DS.getConstSpecLoc());"},{p,5561,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n // ...\n if (DS.getTypeQualifiers() & DeclSpec::TQ_volatile)\n Diag(DS.getVolatileSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"volatile\" << FixItHint::CreateRemoval(DS.getVolatileSpecLoc());"},{p,5566,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n // ...\n if (DS.getTypeQualifiers() & DeclSpec::TQ_restrict)\n Diag(DS.getRestrictSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"restrict\" << FixItHint::CreateRemoval(DS.getRestrictSpecLoc());"},{p,5571,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n // ...\n if (DS.getTypeQualifiers() & DeclSpec::TQ_atomic)\n Diag(DS.getAtomicSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"_Atomic\" << FixItHint::CreateRemoval(DS.getAtomicSpecLoc());"},{p,5576,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // Ignore const/volatile/restrict qualifiers.\n if (DS.getTypeQualifiers()) {\n // ...\n if (DS.getTypeQualifiers() & DeclSpec::TQ_unaligned)\n Diag(DS.getUnalignedSpecLoc(), diag::ext_anonymous_struct_union_qualified) << Record->isUnion() << \"__unaligned\" << FixItHint::CreateRemoval(DS.getUnalignedSpecLoc());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/anonymous-union.cpp"]={"clang/test/SemaCXX/anonymous-union.cpp:198:5: warning: anonymous union cannot be \'const\' [-Wpedantic]"} | ["clang/test/SemaCXX/anonymous-union.cpp"]={"clang/test/SemaCXX/anonymous-union.cpp:198:5: warning: anonymous union cannot be \'const\' [-Wpedantic]"} | ||
} | } | ||
}, | }, | ||
["ext_anonymous_union"]={ | ["ext_anonymous_union"]={ | ||
[ | [j]={Lb,o}, | ||
[i]=Lb, | |||
[a]="anonymous unions are a C11 extension", | |||
[b]=l, | |||
[c]="anonymous unions are a C11 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc11\\-extensions[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{p,5508,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n // Diagnose whether this anonymous struct/union is an extension.\n if (Record->isUnion() && !getLangOpts().CPlusPlus && !getLangOpts().C11)\n Diag(Record->getLocation(), diag::ext_anonymous_union);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/anonymous-struct-union-c11.c"]={"clang/test/Sema/anonymous-struct-union-c11.c:16:3: warning: anonymous unions are a C11 extension [-Wc11-extensions]"} | ["clang/test/Sema/anonymous-struct-union-c11.c"]={"clang/test/Sema/anonymous-struct-union-c11.c:16:3: warning: anonymous unions are a C11 extension [-Wc11-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_array_init_copy"]={ | ["ext_array_init_copy"]={ | ||
[ | [j]={E,"gnu-compound-literal-initializer",o}, | ||
[i]="gnu-compound-literal-initializer", | |||
[a]="initialization of an array %diff{of type $ from a compound literal of type $|from a compound literal}0,1 is a GNU extension", | |||
[b]=l, | |||
[c]="initialization of an array (?:of type (.*?) from a compound literal of type (.*?)|from a compound literal) is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-compound\\-literal\\-initializer[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"e2f943b5cb44",1298399391,"Implement the GNU C extension which permits the initialization of an\narray from a constant array com...","Implement the GNU C extension which permits the initialization of an\narray from a constant array compound literal. Fixes PR9261.\n\nllvm-svn: 126230"}, | ||
[ | [g]={{N,9223,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n for (step_iterator Step = step_begin(), StepEnd = step_end(); Step != StepEnd; ++Step) {\n // ...\n case SK_GNUArrayInit:\n // ...\n S.Diag(Kind.getLocation(), diag::ext_array_init_copy) << Step->Type << CurInit.get()->getType() << CurInit.get()->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/array-init.c"]={"clang/test/Sema/array-init.c:284:5: warning: initialization of an array of type \'int[5]\' from a compound literal of type \'int[5]\' is a GNU extension [-Wgnu-compound-literal-initializer]","clang/test/Sema/array-init.c:285:5: warning: initialization of an array of type \'int[5]\' from a compound literal of type \'int[5]\' is a GNU extension [-Wgnu-compound-literal-initializer]","clang/test/Sema/array-init.c:286:5: warning: initialization of an array of type \'int[]\' from a compound literal of type \'int[5]\' is a GNU extension [-Wgnu-compound-literal-initializer]","clang/test/Sema/array-init.c:287:5: warning: initialization of an array of type \'int[]\' from a compound literal of type \'int[5]\' is a GNU extension [-Wgnu-compound-literal-initializer]","clang/test/Sema/array-init.c:288:5: warning: initialization of an array of type \'int[]\' from a compound literal of type \'int5\' (aka \'int[5]\') is a GNU extension [-Wgnu-compound-literal-initializer]"} | ["clang/test/Sema/array-init.c"]={"clang/test/Sema/array-init.c:284:5: warning: initialization of an array of type \'int[5]\' from a compound literal of type \'int[5]\' is a GNU extension [-Wgnu-compound-literal-initializer]","clang/test/Sema/array-init.c:285:5: warning: initialization of an array of type \'int[5]\' from a compound literal of type \'int[5]\' is a GNU extension [-Wgnu-compound-literal-initializer]","clang/test/Sema/array-init.c:286:5: warning: initialization of an array of type \'int[]\' from a compound literal of type \'int[5]\' is a GNU extension [-Wgnu-compound-literal-initializer]","clang/test/Sema/array-init.c:287:5: warning: initialization of an array of type \'int[]\' from a compound literal of type \'int[5]\' is a GNU extension [-Wgnu-compound-literal-initializer]","clang/test/Sema/array-init.c:288:5: warning: initialization of an array of type \'int[]\' from a compound literal of type \'int5\' (aka \'int[5]\') is a GNU extension [-Wgnu-compound-literal-initializer]"} | ||
} | } | ||
}, | }, | ||
["ext_array_init_parens"]={ | ["ext_array_init_parens"]={ | ||
[ | [j]={"gnu-array-member-paren-init"}, | ||
[i]="gnu-array-member-paren-init", | |||
[a]="parenthesized initialization of a member array is a GNU extension", | |||
[b]=K, | |||
[ | [c]="parenthesized initialization of a member array is a GNU extension", | ||
[ | [d]=" \\[[^\\]]*\\-Wgnu\\-array\\-member\\-paren\\-init[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"ebeed415870b",1329345489,"Support GCC\'s bug^Wextension allowing class array members to be initalized by a\nparenthesized braced...","Support GCC\'s bug^Wextension allowing class array members to be initalized by a\nparenthesized braced-init-list in the base/member initialization list.\n\nllvm-svn: 150625"}, | ||
[ | [g]={{N,9249,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n for (step_iterator Step = step_begin(), StepEnd = step_end(); Step != StepEnd; ++Step) {\n // ...\n case SK_ParenthesizedArrayInit:\n // ...\n S.Diag(Kind.getLocation(), diag::ext_array_init_parens) << CurInit.get()->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp:73:28: error: parenthesized initialization of a member array is a GNU extension [-Wgnu-array-member-paren-init]"} | ["clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp:73:28: error: parenthesized initialization of a member array is a GNU extension [-Wgnu-array-member-paren-init]"} | ||
} | } | ||
}, | }, | ||
["ext_array_size_conversion"]={ | ["ext_array_size_conversion"]={ | ||
[ | [j]={L,y,o}, | ||
[i]=y, | |||
[a]="implicit conversion from array size expression of type %0 to %select{integral|enumeration}1 type %2 is a C++11 extension", | |||
[b]=l, | |||
[c]="implicit conversion from array size expression of type (.*?) to (?:integral|enumeration) type (.*?) is a C\\+\\+11 extension", | |||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class\ntype to an integral or enumera...","Implement C++ DR299, which allows an implicit conversion from a class\ntype to an integral or enumeration type in the size of an array new\nexpression, e.g.,\n\n new int[ConvertibleToInt(10)];\n\nThis is a GNU and C++0x extension.\n\nllvm-svn: 107229"}, | ||
[ | [g]={{O,2187,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n // ...\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n // ...\n if (getLangOpts().CPlusPlus14) {\n // ...\n } else {\n class SizeConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder diagnoseConversion(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy) override { return S.Diag(Loc, S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_array_size_conversion : diag::ext_array_size_conversion) << T << ConvTy->isEnumeralType() << ConvTy; }"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/new-array-size-conv.cpp"]={"clang/test/SemaCXX/new-array-size-conv.cpp:25:9: warning: implicit conversion from array size expression of type \'ValueInt\' to integral type \'int\' is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/new-array-size-conv.cpp:30:9: warning: implicit conversion from array size expression of type \'ValueEnum\' to enumeration type \'E\' is a C++11 extension [-Wc++11-extensions]"} | ["clang/test/SemaCXX/new-array-size-conv.cpp"]={"clang/test/SemaCXX/new-array-size-conv.cpp:25:9: warning: implicit conversion from array size expression of type \'ValueInt\' to integral type \'int\' is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/new-array-size-conv.cpp:30:9: warning: implicit conversion from array size expression of type \'ValueEnum\' to enumeration type \'E\' is a C++11 extension [-Wc++11-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_auto_new_list_init"]={ | ["ext_auto_new_list_init"]={ | ||
[ | [j]={G,ab,o}, | ||
[i]=G, | |||
[a]="ISO C++ standards before C++17 do not allow new expression for type %0 to use list-initialization", | |||
[b]=l, | |||
[c]="ISO C\\+\\+ standards before C\\+\\+17 do not allow new expression for type (.*?) to use list\\-initialization", | |||
[ | [d]=bb, | ||
[ | [e]=k, | ||
[ | [f]={"00c9dfdfd094",1513016994,"P0620 follow-up: deducing `auto` from braced-init-list in new expr\n\nSummary:\nThis is a side-effect b...","P0620 follow-up: deducing `auto` from braced-init-list in new expr\n\nSummary:\nThis is a side-effect brought in by p0620r0, which allows other placeholder types (derived from `auto` and `decltype(auto)`) to be usable in a `new` expression with a single-clause //braced-init-list// as its initializer (8.3.4 [expr.new]/2). N3922 defined its semantics.\n\nReferences:\n http://wg21.link/p0620r0\n http://wg21.link/n3922\n\nReviewers: rsmith, aaron.ballman\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D39451\n\nllvm-svn: 320401"}, | ||
[ | [g]={{O,2060,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n // ...\n if (Deduced && !Deduced->isDeduced() && isa<DeducedTemplateSpecializationType>(Deduced)) {\n // ...\n } else if (Deduced && !Deduced->isDeduced()) {\n // ...\n if (Braced && !getLangOpts().CPlusPlus17)\n Diag(Initializer->getBeginLoc(), diag::ext_auto_new_list_init) << AllocType << TypeRange;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/expr/expr.unary/expr.new/p2-cxx14.cpp"]={"clang/test/CXX/expr/expr.unary/expr.new/p2-cxx14.cpp:5:12: warning: ISO C++ standards before C++17 do not allow new expression for type \'auto\' to use list-initialization [-Wc++17-extensions]"} | ["clang/test/CXX/expr/expr.unary/expr.new/p2-cxx14.cpp"]={"clang/test/CXX/expr/expr.unary/expr.new/p2-cxx14.cpp:5:12: warning: ISO C++ standards before C++17 do not allow new expression for type \'auto\' to use list-initialization [-Wc++17-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_auto_storage_class"]={ | ["ext_auto_storage_class"]={ | ||
[ | [j]={"auto-storage-class"}, | ||
[i]="auto-storage-class", | |||
[a]="\'auto\' storage class specifier is not permitted in C++11, and will not be supported in future releases", | |||
[b]=l, | |||
[ | [c]="\'auto\' storage class specifier is not permitted in C\\+\\+11, and will not be supported in future releases", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wauto\\-storage\\-class[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"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"}, | ||
[ | [g]={{B,3969,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw_auto:\n if (getLangOpts().CPlusPlus11) {\n if (isKnownToBeTypeSpecifier(GetLookAheadToken(1))) {\n // ...\n if (!isInvalid)\n Diag(Tok, diag::ext_auto_storage_class) << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/auto-cxx0x.cpp"]={"clang/test/SemaCXX/auto-cxx0x.cpp:4:3: warning: \'auto\' storage class specifier is not permitted in C++11, and will not be supported in future releases [-Wauto-storage-class]"} | ["clang/test/SemaCXX/auto-cxx0x.cpp"]={"clang/test/SemaCXX/auto-cxx0x.cpp:4:3: warning: \'auto\' storage class specifier is not permitted in C++11, and will not be supported in future releases [-Wauto-storage-class]"} | ||
} | } | ||
}, | }, | ||
["ext_auto_type"]={ | ["ext_auto_type"]={ | ||
[ | [j]={E,"gnu-auto-type",o}, | ||
[i]="gnu-auto-type", | |||
[a]="\'__auto_type\' is a GNU extension", | |||
[b]=l, | |||
[c]="\'__auto_type\' is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-auto\\-type[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"e301ba2b4891",1447207335,"Add support for GCC\'s \'__auto_type\' extension, per the GCC manual:\nhttps://gcc.gnu.org/onlinedocs/gc...","Add support for GCC\'s \'__auto_type\' extension, per the GCC manual:\nhttps://gcc.gnu.org/onlinedocs/gcc/Typeof.html\n\nDifferences from the GCC extension:\n * __auto_type is also permitted in C++ (but only in places where\n it could appear in C), allowing its use in headers that might\n be shared across C and C++, or used from C++98\n * __auto_type can be combined with a declarator, as with C++ auto\n (for instance, \"__auto_type *p\")\n * multiple variables can be declared in a single __auto_type\n declaration, with the C++ semantics (the deduced type must be\n the same in each case)\n\nThis patch also adds a missing restriction on applying typeof to\na bit-field, which GCC has historically rejected in C (due to\nlack of clarity as to whether the operand should be promoted).\nThe same restriction also applies to __auto_type in C (in both\nGCC and Clang).\n\nThis also fixes PR25449.\n\nPatch by Nicholas Allegra!\n\nllvm-svn: 252690"}, | ||
[ | [g]={{B,3980,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw___auto_type:\n Diag(Tok, diag::ext_auto_type);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/auto-type.c"]={"clang/test/Sema/auto-type.c:3:1: warning: \'__auto_type\' is a GNU extension [-Wgnu-auto-type]"} | ["clang/test/Sema/auto-type.c"]={"clang/test/Sema/auto-type.c:3:1: warning: \'__auto_type\' is a GNU extension [-Wgnu-auto-type]"} | ||
} | } | ||
}, | }, | ||
["ext_auto_type_specifier"]={ | ["ext_auto_type_specifier"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="\'auto\' type specifier is a C++11 extension", | |||
[b]=l, | |||
[ | [c]="\'auto\' type specifier is a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"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"}, | ||
[ | [g]={{hc,1369,"/// Finish - This does final analysis of the declspec, rejecting things like\n/// \"_Imaginary\" (lacking an FP type). After calling this method, DeclSpec is\n/// guaranteed to be self-consistent, even if an error occurred.\nvoid DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {\n // ...\n // Diagnose if we\'ve recovered from an ill-formed \'auto\' storage class\n // specifier in a pre-C++11 dialect of C++.\n if (!S.getLangOpts().CPlusPlus11 && TypeSpecType == TST_auto)\n S.Diag(TSTLoc, diag::ext_auto_type_specifier);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaHLSL/group_shared.hlsl"]={"clang/test/SemaHLSL/group_shared.hlsl:77:1: warning: \'auto\' type specifier is a C++11 extension [-Wc++11-extensions]"} | ["clang/test/SemaHLSL/group_shared.hlsl"]={"clang/test/SemaHLSL/group_shared.hlsl:77:1: warning: \'auto\' type specifier is a C++11 extension [-Wc++11-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_bad_cxx_cast_qualifiers_away_incoherent"]={ | ["ext_bad_cxx_cast_qualifiers_away_incoherent"]={ | ||
[ | [j]={"cast-qual-unrelated"}, | ||
[i]="cast-qual-unrelated", | |||
[a]="ISO C++ does not allow %select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast|}0 from %1 to %2 because it casts away qualifiers, even though the source and destination types are unrelated", | |||
[b]=l, | |||
[ | [c]="ISO C\\+\\+ does not allow (?:const_cast|static_cast|reinterpret_cast|dynamic_cast|C\\-style cast|functional\\-style cast|) from (.*?) to (.*?) because it casts away qualifiers, even though the source and destination types are unrelated", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wcast\\-qual\\-unrelated[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"f276e2dc4618",1531263875,"Fix determination of whether a reinterpret_cast casts away constness.\n\nThe \"casts away constness\" ch...","Fix determination of whether a reinterpret_cast casts away constness.\n\nThe \"casts away constness\" check doesn\'t care at all how the different\nlayers of the source and destination type were formed: for example, if\nthe source is a pointer and the destination is a pointer-to-member, the\ntypes are still decomposed and their pointee qualifications are still\nchecked.\n\nThis rule is bizarre and somewhat ridiculous, so as an extension we\naccept code making use of such reinterpret_casts with a warning outside\nof SFINAE contexts.\n\nllvm-svn: 336738"}, | ||
[ | [g]={{wb,771,"static TryCastResult getCastAwayConstnessCastKind(CastAwayConstnessKind CACK, unsigned &DiagID) {\n // ...\n case CastAwayConstnessKind::CACK_Incoherent:\n DiagID = diag::ext_bad_cxx_cast_qualifiers_away_incoherent;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp"]={"clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:15:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'double Y::*X::***\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:18:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const volatile double Y::*X::***\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:19:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const volatile double Y::*const X::*const **\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:20:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const volatile double Y::*const X::**const *\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:21:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const volatile double Y::*X::*const *const *\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:24:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const double Y::*volatile X::**const *\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]"} | ["clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp"]={"clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:15:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'double Y::*X::***\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:18:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const volatile double Y::*X::***\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:19:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const volatile double Y::*const X::*const **\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:20:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const volatile double Y::*const X::**const *\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:21:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const volatile double Y::*X::*const *const *\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]","clang/test/CXX/expr/expr.post/expr.reinterpret.cast/p2.cpp:24:9: warning: ISO C++ does not allow reinterpret_cast from \'const int *X::*Y::**\' to \'const double Y::*volatile X::**const *\' because it casts away qualifiers, even though the source and destination types are unrelated [-Wcast-qual-unrelated]"} | ||
} | } | ||
}, | }, | ||
["ext_binary_literal"]={ | ["ext_binary_literal"]={ | ||
[ | [j]={"binary-literal",E,"gnu-binary-literal",o}, | ||
[i]="gnu-binary-literal", | |||
[a]="binary integer literals are a GNU extension", | |||
[b]=l, | |||
[c]="binary integer literals are a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-binary\\-literal[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{X,1349,"/// ParseNumberStartingWithZero - This method is called when the first character\n/// of the number is found to be a zero. This means it is either an octal\n/// number (like \'04\') or a hex number (\'0x123a\') a binary number (\'0b1010\') or\n/// a floating point number (01239.123e4). Eat the prefix, determining the\n/// radix etc.\nvoid NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {\n // ...\n // Handle simple binary numbers 0b01010\n if ((c1 == \'b\' || c1 == \'B\') && (s[1] == \'0\' || s[1] == \'1\')) {\n // ...\n Diags.Report(TokLoc, LangOpts.CPlusPlus14 ? diag::warn_cxx11_compat_binary_literal : LangOpts.CPlusPlus ? diag::ext_binary_literal_cxx14 : diag::ext_binary_literal);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Lexer/gnu-flags.c"]={"clang/test/Lexer/gnu-flags.c:45:9: warning: binary integer literals are a GNU extension [-Wgnu-binary-literal]"} | ["clang/test/Lexer/gnu-flags.c"]={"clang/test/Lexer/gnu-flags.c:45:9: warning: binary integer literals are a GNU extension [-Wgnu-binary-literal]"} | ||
} | } | ||
}, | }, | ||
["ext_binary_literal_cxx14"]={ | ["ext_binary_literal_cxx14"]={ | ||
[ | [j]={"binary-literal","c++14-binary-literal",db,Eb,o}, | ||
[i]="c++14-binary-literal", | |||
[a]="binary integer literals are a C++14 extension", | |||
[b]=l, | |||
[c]="binary integer literals are a C\\+\\+14 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+14\\-binary\\-literal[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"c5c27f2a1f26",1366404440,"Note that we support (and in fact have supported since the dawn of time itself)\nC++1y binary literal...","Note that we support (and in fact have supported since the dawn of time itself)\nC++1y binary literals.\n\nllvm-svn: 179883"}, | ||
[ | [g]={{X,1348,"/// ParseNumberStartingWithZero - This method is called when the first character\n/// of the number is found to be a zero. This means it is either an octal\n/// number (like \'04\') or a hex number (\'0x123a\') a binary number (\'0b1010\') or\n/// a floating point number (01239.123e4). Eat the prefix, determining the\n/// radix etc.\nvoid NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {\n // ...\n // Handle simple binary numbers 0b01010\n if ((c1 == \'b\' || c1 == \'B\') && (s[1] == \'0\' || s[1] == \'1\')) {\n // ...\n Diags.Report(TokLoc, LangOpts.CPlusPlus14 ? diag::warn_cxx11_compat_binary_literal : LangOpts.CPlusPlus ? diag::ext_binary_literal_cxx14 : diag::ext_binary_literal);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Lexer/warn_binary_literals.cpp"]={"clang/test/Lexer/warn_binary_literals.cpp:4:9: warning: binary integer literals are a C++14 extension [-Wc++14-binary-literal]"} | ["clang/test/Lexer/warn_binary_literals.cpp"]={"clang/test/Lexer/warn_binary_literals.cpp:4:9: warning: binary integer literals are a C++14 extension [-Wc++14-binary-literal]"} | ||
} | } | ||
}, | }, | ||
["ext_bit_int"]={ | ["ext_bit_int"]={ | ||
[ | [j]={"bit-int-extension",o}, | ||
[i]="bit-int-extension", | |||
[a]="\'_BitInt\' in %select{C17 and earlier|C++}0 is a Clang extension", | |||
[b]=l, | |||
[c]="\'_BitInt\' in (?:C17 and earlier|C\\+\\+) is a Clang extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wbit\\-int\\-extension[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{B,7962,"void Parser::DiagnoseBitIntUse(const Token &Tok) {\n // ...\n if (Tok.is(tok::kw__ExtInt)) {\n // ...\n } else {\n // In C2x mode, diagnose that the use is not compatible with pre-C2x modes.\n // Otherwise, diagnose that the use is a Clang extension.\n if (getLangOpts().C2x)\n // ...\n else\n Diag(Loc, diag::ext_bit_int) << getLangOpts().CPlusPlus;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/builtins-elementwise-math.c"]={"clang/test/Sema/builtins-elementwise-math.c:80:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]","clang/test/Sema/builtins-elementwise-math.c:138:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]","clang/test/Sema/builtins-elementwise-math.c:193:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]","clang/test/Sema/builtins-elementwise-math.c:248:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]","clang/test/Sema/builtins-elementwise-math.c:665:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]"} | ["clang/test/Sema/builtins-elementwise-math.c"]={"clang/test/Sema/builtins-elementwise-math.c:80:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]","clang/test/Sema/builtins-elementwise-math.c:138:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]","clang/test/Sema/builtins-elementwise-math.c:193:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]","clang/test/Sema/builtins-elementwise-math.c:248:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]","clang/test/Sema/builtins-elementwise-math.c:665:3: warning: \'_BitInt\' in C17 and earlier is a Clang extension [-Wbit-int-extension]"} | ||
} | } | ||
}, | }, | ||
["ext_bitfield_member_init"]={ | ["ext_bitfield_member_init"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="default member initializer for bit-field is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="default member initializer for bit\\-field is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=q, | ||
[ | [f]={"6b8e3c02ca44",1503880094,"[c++2a] P0683R1: Permit default member initializers for bit-fields.\n\nThis would be trivial, except t...","[c++2a] P0683R1: Permit default member initializers for bit-fields.\n\nThis would be trivial, except that our in-memory and serialized representations\nfor FieldDecls assumed that this can\'t happen.\n\nllvm-svn: 311867"}, | ||
[ | [g]={{F,3037,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n // ...\n while (true) {\n // ...\n if (Tok.isOneOf(tok::equal, tok::l_brace) && PureSpecLoc.isInvalid()) {\n // DRXXXX: Anonymous bit-fields cannot have a brace-or-equal-initializer.\n if (BitfieldSize.isUsable() && !DeclaratorInfo.hasName()) {\n // ...\n } else if (DeclaratorInfo.isDeclarationOfFunction()) {\n // ...\n } else if (DeclaratorInfo.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_static && DeclaratorInfo.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_typedef && !DS.isFriendSpecified()) {\n // It\'s a default member initializer.\n if (BitfieldSize.get())\n Diag(Tok, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_bitfield_member_init : diag::ext_bitfield_member_init);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/member-init.cpp"]={"clang/test/SemaCXX/member-init.cpp:4:13: warning: default member initializer for bit-field is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/SemaCXX/member-init.cpp"]={"clang/test/SemaCXX/member-init.cpp:4:13: warning: default member initializer for bit-field is a C++20 extension [-Wc++20-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c11_anonymous_struct"]={ | ["ext_c11_anonymous_struct"]={ | ||
[ | [j]={Lb,o}, | ||
[i]=Lb, | |||
[a]="anonymous structs are a C11 extension", | |||
[b]=l, | |||
[c]="anonymous structs are a C11 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc11\\-extensions[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"b64a1fa65ca1",1328284024,"Don\'t warn about anonymous struct/union in C11.\n\nAlso, in C, call this a C11 extension rather than a...","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"}, | ||
[ | [g]={{p,5512,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\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 // ...\n else if (!Record->isUnion() && !getLangOpts().C11)\n Diag(Record->getLocation(), diag::ext_c11_anonymous_struct);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/anonymous-struct-union-c11.c"]={"clang/test/Sema/anonymous-struct-union-c11.c:9:3: warning: anonymous structs are a C11 extension [-Wc11-extensions]"} | ["clang/test/Sema/anonymous-struct-union-c11.c"]={"clang/test/Sema/anonymous-struct-union-c11.c:9:3: warning: anonymous structs are a C11 extension [-Wc11-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c11_feature"]={ | ["ext_c11_feature"]={ | ||
[a]="\' | [j]={Lb,o}, | ||
[ | [i]=Lb, | ||
[ | [a]="\'%0\' is a C11 extension", | ||
[ | [b]=l, | ||
[c]="\'(.*?)\' is a C11 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc11\\-extensions[^\\]]*\\]", | ||
[ | [e]=q, | ||
[f]={"774bd6ef1c93",1566848647,"Diagnose use of _Thread_local as an extension when not in C11 mode.\n\nllvm-svn: 369954","Diagnose use of _Thread_local as an extension when not in C11 mode.\n\nllvm-svn: 369954"}, | |||
[g]={{B,4015,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw__Thread_local:\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{B,4072,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw__Noreturn:\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{B,4079,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n // alignment-specifier\n case tok::kw__Alignas:\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{B,4409,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::kw__Atomic:\n // C11 6.7.2.4/4:\n // If the _Atomic keyword is immediately followed by a left parenthesis,\n // it is interpreted as a type specifier (with a type name), not as a\n // type qualifier.\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{B,5967,"/// ParseTypeQualifierListOpt\n/// type-qualifier-list: [C99 6.7.5]\n/// type-qualifier\n/// [vendor] attributes\n/// [ only if AttrReqs & AR_VendorAttributesParsed ]\n/// type-qualifier-list type-qualifier\n/// [vendor] type-qualifier-list attributes\n/// [ only if AttrReqs & AR_VendorAttributesParsed ]\n/// [C++0x] attribute-specifier[opt] is allowed before cv-qualifier-seq\n/// [ only if AttReqs & AR_CXX11AttributesParsed ]\n/// Note: vendor can be GNU, MS, etc and can be explicitly controlled via\n/// AttrRequirements bitmask values.\nvoid Parser::ParseTypeQualifierListOpt(DeclSpec &DS, unsigned AttrReqs, bool AtomicAllowed, bool IdentifierRequired, std::optional<llvm::function_ref<void()>> CodeCompletionHandler) {\n // ...\n while (true) {\n // ...\n case tok::kw__Atomic:\n // ...\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{F,972,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n // ...\n if (Tok.is(tok::kw__Static_assert) && !getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{nb,1437,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::kw__Alignof: // unary-expression: \'_Alignof\' \'(\' type-name \')\'\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"},{nb,3315,"/// ParseGenericSelectionExpression - Parse a C11 generic-selection\n/// [C11 6.5.1.1].\n///\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( assignment-expression , generic-assoc-list )\n/// generic-assoc-list:\n/// generic-association\n/// generic-assoc-list , generic-association\n/// generic-association:\n/// type-name : assignment-expression\n/// default : assignment-expression\n/// \\endverbatim\n///\n/// As an extension, Clang also accepts:\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( type-name, generic-assoc-list )\n/// \\endverbatim\nExprResult Parser::ParseGenericSelectionExpression() {\n // ...\n if (!getLangOpts().C11)\n Diag(Tok, diag::ext_c11_feature) << Tok.getName();"}}, | |||
[ | [h]={ | ||
[ | |||
["clang/test/SemaOpenCLCXX/restricted.clcpp"]={"clang/test/SemaOpenCLCXX/restricted.clcpp:32:12: warning: \'_Thread_local\' is a C11 extension [-Wc11-extensions]"} | ["clang/test/SemaOpenCLCXX/restricted.clcpp"]={"clang/test/SemaOpenCLCXX/restricted.clcpp:32:12: warning: \'_Thread_local\' is a C11 extension [-Wc11-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c2x_bitint_suffix"]={ | ["ext_c2x_bitint_suffix"]={ | ||
[ | [j]={lb}, | ||
[i]=lb, | |||
[a]="\'_BitInt\' suffix for literals is a C2x extension", | |||
[b]=l, | |||
[ | [c]="\'_BitInt\' suffix for literals is a C2x extension", | ||
[ | [d]=Ub, | ||
[ | [e]=m, | ||
[ | [f]={"8cba72177dcd",1647264157,"Implement literal suffixes for _BitInt\n\nWG14 adopted N2775 (http://www.open-std.org/jtc1/sc22/wg14/w...","Implement literal suffixes for _BitInt\n\nWG14 adopted N2775 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2775.pdf)\nat our Feb 2022 meeting. This paper adds a literal suffix for\nbit-precise types that automatically sizes the bit-precise type to be\nthe smallest possible legal _BitInt type that can represent the literal\nvalue. The suffix chosen is wb (for a signed bit-precise type) which\ncan be combined with the u suffix (for an unsigned bit-precise type).\n\nThe preprocessor continues to operate as-if all integer types were\nintmax_t/uintmax_t, including bit-precise integer types. It is a\nconstraint violation if the bit-precise literal is too large to fit\nwithin that type in the context of the preprocessor (when still using\na pp-number preprocessing token), but it is not a constraint violation\nin other circumstances. This allows you to make bit-precise integer\nliterals that are wider than what the preprocessor currently supports\nin order to initialize variables, etc."}, | ||
[ | [g]={{fc,341,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::numeric_constant: {\n // ...\n // \'wb/uwb\' literals are a C2x feature. We explicitly do not support the\n // suffix in C++ as an extension because a library-based UDL that resolves\n // to a library type may be more appropriate there.\n if (Literal.isBitInt)\n PP.Diag(PeekTok, PP.getLangOpts().C2x ? diag::warn_c2x_compat_bitint_suffix : diag::ext_c2x_bitint_suffix);"},{r,4069,"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 // \'wb/uwb\' literals are a C2x feature. We support _BitInt as a type in C++,\n // but we do not currently support the suffix in C++ mode because it\'s not\n // entirely clear whether WG21 will prefer this suffix to return a library\n // type such as std::bit_int instead of returning a _BitInt.\n if (Literal.isBitInt && !getLangOpts().CPlusPlus)\n PP.Diag(Tok.getLocation(), getLangOpts().C2x ? diag::warn_c2x_compat_bitint_suffix : diag::ext_c2x_bitint_suffix);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Lexer/bitint-constants-compat.c"]={"clang/test/Lexer/bitint-constants-compat.c:5:5: warning: \'_BitInt\' suffix for literals is a C2x extension [-Wc2x-extensions]","clang/test/Lexer/bitint-constants-compat.c:11:3: warning: \'_BitInt\' suffix for literals is a C2x extension [-Wc2x-extensions]"} | ["clang/test/Lexer/bitint-constants-compat.c"]={"clang/test/Lexer/bitint-constants-compat.c:5:5: warning: \'_BitInt\' suffix for literals is a C2x extension [-Wc2x-extensions]","clang/test/Lexer/bitint-constants-compat.c:11:3: warning: \'_BitInt\' suffix for literals is a C2x extension [-Wc2x-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c2x_pp_directive"]={ | ["ext_c2x_pp_directive"]={ | ||
[ | [j]={lb}, | ||
[i]=lb, | |||
[a]="use of a \'#%select{<BUG IF SEEN>|elifdef|elifndef}0\' directive is a C2x extension", | |||
[b]=l, | |||
[ | [c]="use of a \'\\#(?:elifdef|elifndef)\' directive is a C2x extension", | ||
[ | [d]=Ub, | ||
[ | [e]=u, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{P,772,"/// SkipExcludedConditionalBlock - We just read a \\#if or related directive and\n/// decided that the subsequent tokens are in the \\#if\'d out portion of the\n/// file. Lex the rest of the file, until we see an \\#endif. If\n/// FoundNonSkipPortion is true, then we have already emitted code for part of\n/// this \\#if directive, so \\#else/\\#elif blocks should never be entered.\n/// If ElseOk is true, then \\#else directives are ok, if not, then we have\n/// already seen one so a \\#else directive is a duplicate. When this returns,\n/// the caller can lex the first valid token.\nvoid Preprocessor::SkipExcludedConditionalBlock(SourceLocation HashTokenLoc, SourceLocation IfTokenLoc, bool FoundNonSkipPortion, bool FoundElse, SourceLocation ElseLoc) {\n // ...\n while (true) {\n // ...\n if (Directive.startswith(\"if\")) {\n // ...\n } else if (Directive[0] == \'e\') {\n // ...\n if (Sub == \"ndif\") { // \"endif\"\n // ...\n } else if (Sub == \"lse\") { // \"else\".\n // ...\n } else if (Sub == \"lif\") { // \"elif\".\n // ...\n } else if (Sub == \"lifdef\" || // \"elifdef\"\n // ...\n if (LangOpts.CPlusPlus)\n // ...\n else\n DiagID = LangOpts.C2x ? diag::warn_c2x_compat_pp_directive : diag::ext_c2x_pp_directive;"},{P,3458,"/// Implements the \\#elif, \\#elifdef, and \\#elifndef directives.\nvoid Preprocessor::HandleElifFamilyDirective(Token &ElifToken, const Token &HashToken, tok::PPKeywordKind Kind) {\n // ...\n case PED_Elifdef:\n case PED_Elifndef:\n // ...\n if (LangOpts.CPlusPlus)\n // ...\n else\n DiagID = LangOpts.C2x ? diag::warn_c2x_compat_pp_directive : diag::ext_c2x_pp_directive;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:10:2: warning: use of a \'#elifdef\' directive is a C2x extension [-Wc2x-extensions]","clang/test/Preprocessor/if_warning.c:21:2: warning: use of a \'#elifdef\' directive is a C2x extension [-Wc2x-extensions]"} | ["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:10:2: warning: use of a \'#elifdef\' directive is a C2x extension [-Wc2x-extensions]","clang/test/Preprocessor/if_warning.c:21:2: warning: use of a \'#elifdef\' directive is a C2x extension [-Wc2x-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c99_array_usage"]={ | ["ext_c99_array_usage"]={ | ||
[ | [j]={Q,o}, | ||
[i]=Q, | |||
[a]="%select{qualifier in |static |}0array size %select{||\'[*] \'}0is a C99 feature", | |||
[b]=l, | |||
[c]="(?:qualifier in |static |)array size (?:||\'\\[\\*\\] \')is a C99 feature", | |||
[ | [d]=zb, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{M,2681,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n // If this is not C99, diagnose array size modifiers on non-VLAs.\n if (!getLangOpts().C99 && !T->isVariableArrayType() && (ASM != ArrayType::Normal || Quals != 0)) {\n Diag(Loc, getLangOpts().CPlusPlus ? diag::err_c99_array_usage_cxx : diag::ext_c99_array_usage) << ASM;"}}, | ||
[ | [h]={ | ||
[ | [nc]={"clang/test/Sema/c89.c:61:19: warning: static array size is a C99 feature [-Wc99-extensions]","clang/test/Sema/c89.c:63:19: warning: qualifier in array size is a C99 feature [-Wc99-extensions]"} | ||
[ | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_c99_compound_literal"]={ | ["ext_c99_compound_literal"]={ | ||
[ | [j]={Q,o}, | ||
[i]=Q, | |||
[a]="compound literals are a C99-specific feature", | |||
[b]=l, | |||
[c]="compound literals are a C99\\-specific feature", | |||
[ | [d]=zb, | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{nb,3243,"/// ParseCompoundLiteralExpression - We have parsed the parenthesized type-name\n/// and we are at the left brace.\n///\n/// \\verbatim\n/// postfix-expression: [C99 6.5.2]\n/// \'(\' type-name \')\' \'{\' initializer-list \'}\'\n/// \'(\' type-name \')\' \'{\' initializer-list \',\' \'}\'\n/// \\endverbatim\nExprResult Parser::ParseCompoundLiteralExpression(ParsedType Ty, SourceLocation LParenLoc, SourceLocation RParenLoc) {\n // ...\n if (!getLangOpts().C99) // Compound literals don\'t exist in C90.\n Diag(LParenLoc, diag::ext_c99_compound_literal);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/vector-gcc-compat.cpp"]={"clang/test/Sema/vector-gcc-compat.cpp:39:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]","clang/test/Sema/vector-gcc-compat.cpp:62:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]","clang/test/Sema/vector-gcc-compat.cpp:81:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]","clang/test/Sema/vector-gcc-compat.cpp:82:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]","clang/test/Sema/vector-gcc-compat.cpp:83:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]"} | ["clang/test/Sema/vector-gcc-compat.cpp"]={"clang/test/Sema/vector-gcc-compat.cpp:39:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]","clang/test/Sema/vector-gcc-compat.cpp:62:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]","clang/test/Sema/vector-gcc-compat.cpp:81:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]","clang/test/Sema/vector-gcc-compat.cpp:82:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]","clang/test/Sema/vector-gcc-compat.cpp:83:19: warning: compound literals are a C99-specific feature [-Wc99-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c99_feature"]={ | ["ext_c99_feature"]={ | ||
[a]="\' | [j]={Q,o}, | ||
[ | [i]=Q, | ||
[ | [a]="\'%0\' is a C99 extension", | ||
[ | [b]=l, | ||
[ | [c]="\'(.*?)\' is a C99 extension", | ||
[ | [d]=zb, | ||
[e]=q, | |||
[ | [f]={"9fac4a5d3522",1566933324,"Diagnose both _Complex and _Imaginary as C99 extensions.\n\nllvm-svn: 370100","Diagnose both _Complex and _Imaginary as C99 extensions.\n\nllvm-svn: 370100"}, | ||
[g]={{B,4140,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw__Complex:\n if (!getLangOpts().C99)\n Diag(Tok, diag::ext_c99_feature) << Tok.getName();"},{B,4146,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw__Imaginary:\n if (!getLangOpts().C99)\n Diag(Tok, diag::ext_c99_feature) << Tok.getName();"},{B,4249,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw__Bool:\n if (Tok.is(tok::kw__Bool) && !getLangOpts().C99)\n Diag(Tok, diag::ext_c99_feature) << Tok.getName();"}}, | |||
[h]={ | |||
[ | |||
["clang/test/SemaCXX/complex-init-list.cpp"]={"clang/test/SemaCXX/complex-init-list.cpp:13:1: warning: \'_Complex\' is a C99 extension [-Wc99-extensions]"} | ["clang/test/SemaCXX/complex-init-list.cpp"]={"clang/test/SemaCXX/complex-init-list.cpp:13:1: warning: \'_Complex\' is a C99 extension [-Wc99-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c99_flexible_array_member"]={ | ["ext_c99_flexible_array_member"]={ | ||
[ | [j]={Q,o}, | ||
[i]=Q, | |||
[a]="flexible array members are a C99 feature", | |||
[b]=l, | |||
[c]="flexible array members are a C99 feature", | |||
[ | [d]=zb, | ||
[ | [e]=k, | ||
[ | [f]={"07518f249f91",1331900137,"Warn on flexible array members when in C89 mode, with -pedantic.\nThis fixes PR 4307.\n\nPatch by Eitan...","Warn on flexible array members when in C89 mode, with -pedantic.\nThis fixes PR 4307.\n\nPatch by Eitan Adler!\n\nllvm-svn: 152918"}, | ||
[ | [g]={{p,18823,"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 (!getLangOpts().C99)\n Diag(FD->getLocation(), diag::ext_c99_flexible_array_member) << FD->getDeclName() << Record->getTagKind();"}}, | ||
[ | [h]={ | ||
[ | [nc]={"clang/test/Sema/c89.c:89:18: warning: flexible array members are a C99 feature [-Wc99-extensions]"} | ||
[ | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_c99_longlong"]={ | ["ext_c99_longlong"]={ | ||
[ | [j]={"long-long",o}, | ||
[i]="long-long", | |||
[a]="\'long long\' is an extension when C99 mode is not enabled", | |||
[b]=l, | |||
[c]="\'long long\' is an extension when C99 mode is not enabled", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wlong\\-long[^\\]]*\\]", | ||
[ | [e]=m, | ||
[ | [f]={"1cd230570394",1348510761,"Change the wording of the extension warning from\n> \'long long\' is an extension when C99 mode is not ...","Change the wording of the extension warning from\n> \'long long\' is an extension when C99 mode is not enabled\nto\n> \'long long\' is a C++11 extension\nwhile compiling in C++98 mode.\n\nllvm-svn: 164545"}, | ||
[ | [g]={{fc,324,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::numeric_constant: {\n // ...\n // \'long long\' is a C99 or C++11 feature.\n if (!PP.getLangOpts().C99 && Literal.isLongLong) {\n if (PP.getLangOpts().CPlusPlus)\n // ...\n else\n PP.Diag(PeekTok, diag::ext_c99_longlong);"},{r,4237,"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 // Check long long if needed.\n if (Ty.isNull() && !Literal.isSizeT) {\n // ...\n // Does it fit in a unsigned long long?\n if (ResultVal.isIntN(LongLongSize)) {\n // ...\n // \'long long\' is a C99 or C++11 feature, whether the literal\n // explicitly specified \'long long\' or we needed the extra width.\n if (getLangOpts().CPlusPlus)\n // ...\n else if (!getLangOpts().C99)\n Diag(Tok.getLocation(), diag::ext_c99_longlong);"},{M,1413,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n // ...\n case DeclSpec::TST_int: {\n if (DS.getTypeSpecSign() != TypeSpecifierSign::Unsigned) {\n // ...\n case TypeSpecifierWidth::LongLong:\n // ...\n // \'long long\' is a C99 or C++11 feature.\n if (!S.getLangOpts().C99) {\n if (S.getLangOpts().CPlusPlus)\n // ...\n else\n S.Diag(DS.getTypeSpecWidthLoc(), diag::ext_c99_longlong);"},{M,1438,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n // ...\n case DeclSpec::TST_int: {\n if (DS.getTypeSpecSign() != TypeSpecifierSign::Unsigned) {\n // ...\n } else {\n // ...\n case TypeSpecifierWidth::LongLong:\n // ...\n // \'long long\' is a C99 or C++11 feature.\n if (!S.getLangOpts().C99) {\n if (S.getLangOpts().CPlusPlus)\n // ...\n else\n S.Diag(DS.getTypeSpecWidthLoc(), diag::ext_c99_longlong);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/extension.c"]={"clang/test/Parser/extension.c:18:21: warning: \'long long\' is an extension when C99 mode is not enabled [-Wlong-long]"} | ["clang/test/Parser/extension.c"]={"clang/test/Parser/extension.c:18:21: warning: \'long long\' is an extension when C99 mode is not enabled [-Wlong-long]"} | ||
} | } | ||
}, | }, | ||
["ext_c99_variable_decl_in_for_loop"]={ | ["ext_c99_variable_decl_in_for_loop"]={ | ||
[ | [j]={Q,o}, | ||
[i]=Q, | |||
[a]="variable declaration in for loop is a C99-specific feature", | |||
[b]=l, | |||
[c]="variable declaration in for loop is a C99\\-specific feature", | |||
[ | [d]=zb, | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{sb,2054,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // ...\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 // Parse declaration, which eats the \';\'.\n if (!C99orCXXorObjC) { // Use of C99-style for loops in C90 mode?\n Diag(Tok, diag::ext_c99_variable_decl_in_for_loop);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/C/drs/dr2xx.c"]={"clang/test/C/drs/dr2xx.c:400:8: warning: variable declaration in for loop is a C99-specific feature [-Wc99-extensions]"} | ["clang/test/C/drs/dr2xx.c"]={"clang/test/C/drs/dr2xx.c:400:8: warning: variable declaration in for loop is a C99-specific feature [-Wc99-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c99_whitespace_required_after_macro_name"]={ | ["ext_c99_whitespace_required_after_macro_name"]={ | ||
[ | [j]={Q}, | ||
[i]=Q, | |||
[a]="ISO C99 requires whitespace after the macro name", | |||
[b]=l, | |||
[ | [c]="ISO C99 requires whitespace after the macro name", | ||
[ | [d]=zb, | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,2857,"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 Diag(Tok, diag::ext_c99_whitespace_required_after_macro_name);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/ucn-allowed-chars.c"]={"clang/test/Preprocessor/ucn-allowed-chars.c:85:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]","clang/test/Preprocessor/ucn-allowed-chars.c:87:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]","clang/test/Preprocessor/ucn-allowed-chars.c:89:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]"} | ["clang/test/Preprocessor/ucn-allowed-chars.c"]={"clang/test/Preprocessor/ucn-allowed-chars.c:85:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]","clang/test/Preprocessor/ucn-allowed-chars.c:87:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]","clang/test/Preprocessor/ucn-allowed-chars.c:89:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c_empty_initializer"]={ | ["ext_c_empty_initializer"]={ | ||
[ | [j]={lb,o}, | ||
[i]=lb, | |||
[a]="use of an empty initializer is a C2x extension", | |||
[b]=l, | |||
[c]="use of an empty initializer is a C2x extension", | |||
[ | [d]=Ub, | ||
[ | [e]=q, | ||
[ | [f]={"5d8aaad4452f",1680549555,"[C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)\n\nThis implements ...","[C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)\n\nThis implements support for allowing {} to consistently zero initialize\nobjects. We already supported most of this work as a GNU extension, but\nthe C2x feature goes beyond what the GNU extension allowed.\n\nThe changes in this patch are:\n\n* Removed the -Wgnu-empty-initializer warning group. The extension is\n now a C2x extension warning instead. Note that use of\n `-Wno-gnu-empty-initializer seems` to be quite low in the wild\n(https://sourcegraph.com/search?q=context%3Aglobal+-file%3A.*test.*+%22-Wno-gnu-empty-initializer%22&patternType=standard&sm=1&groupBy=repo\n which currently only gives 8 hits total), so this is not expected to\n be an overly disruptive change. But I\'m adding the clang vendors\n review group just in case this expectation is wrong.\n* Reworded the diagnostic wording to be about a C2x extension, added a\n pre-C2x compat warning.\n* Allow {} to zero initialize a VLA\n\nThis functionality is exposed as an extension in all older C modes\n(same as the GNU extension was), but does *not* allow the extension for\nVLA initialization in C++ due to concern about handling non-trivially\nconstructible types.\n\nDifferential Revision: https://reviews.llvm.org/D147349"}, | ||
[ | [g]={{Sc,457,"/// ParseBraceInitializer - Called when parsing an initializer that has a\n/// leading open brace.\n///\n/// initializer: [C99 6.7.8]\n/// \'{\' initializer-list \'}\'\n/// \'{\' initializer-list \',\' \'}\'\n/// [C2x] \'{\' \'}\'\n///\n/// initializer-list:\n/// designation[opt] initializer ...[opt]\n/// initializer-list \',\' designation[opt] initializer ...[opt]\n///\nExprResult Parser::ParseBraceInitializer() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // Empty initializers are a C++ feature and a GNU extension to C before C2x.\n if (!getLangOpts().CPlusPlus) {\n Diag(LBraceLoc, getLangOpts().C2x ? diag::warn_c2x_compat_empty_initializer : diag::ext_c_empty_initializer);"}}, | ||
[ | [h]={ | ||
[ | [Pb]={"clang/test/Sema/vla.c:116:20: warning: use of an empty initializer is a C2x extension [-Wc2x-extensions]","clang/test/Sema/vla.c:123:23: warning: use of an empty initializer is a C2x extension [-Wc2x-extensions]"} | ||
[ | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_c_label_end_of_compound_statement"]={ | ["ext_c_label_end_of_compound_statement"]={ | ||
[ | [j]={lb}, | ||
[i]=lb, | |||
[a]="label at end of compound statement is a C2x extension", | |||
[b]=l, | |||
[ | [c]="label at end of compound statement is a C2x extension", | ||
[ | [d]=Ub, | ||
[ | [e]=q, | ||
[ | [f]={"782ac2182c2b",1657907157,"[HLSL] Support cbuffer/tbuffer for hlsl.\n\nThis is first part for support cbuffer/tbuffer.\n\nThe forma...","[HLSL] Support cbuffer/tbuffer for hlsl.\n\nThis is first part for support cbuffer/tbuffer.\n\nThe format for cbuffer/tbuffer is\nBufferType [Name] [: register(b#)] { VariableDeclaration [: packoffset(c#.xyzw)]; ... };\n\nMore details at https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-constants\n\nNew keyword \'cbuffer\' and \'tbuffer\' are added.\nNew AST node HLSLBufferDecl is added.\nBuild AST for simple cbuffer/tbuffer without attribute support.\n\nThe special thing is variables declared inside cbuffer is exposed into global scope.\nSo isTransparentContext should return true for HLSLBuffer.\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D129883"}, | ||
[ | [g]={{sb,1081,"void Parser::DiagnoseLabelAtEndOfCompoundStatement() {\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n Diag(Tok, getLangOpts().C2x ? diag::warn_c2x_compat_label_end_of_compound_statement : diag::ext_c_label_end_of_compound_statement);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/c2x-label.c"]={"clang/test/Parser/c2x-label.c:9:1: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]","clang/test/Parser/c2x-label.c:19:5: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]","clang/test/Parser/c2x-label.c:26:5: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]"} | ["clang/test/Parser/c2x-label.c"]={"clang/test/Parser/c2x-label.c:9:1: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]","clang/test/Parser/c2x-label.c:19:5: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]","clang/test/Parser/c2x-label.c:26:5: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_c_nullptr"]={ | ["ext_c_nullptr"]={ | ||
[ | [j]={lb,o}, | ||
[i]=lb, | |||
[a]="\'nullptr\' is a C2x extension", | |||
[b]=l, | |||
[c]="\'nullptr\' is a C2x extension", | |||
[ | [d]=Ub, | ||
[ | [e]=q, | ||
[ | [f]={"3a31970ee2af",1665756274,"[C2x] Implement support for nullptr and nullptr_t\n\nThis introduces support for nullptr and nullptr_t...","[C2x] Implement support for nullptr and nullptr_t\n\nThis introduces support for nullptr and nullptr_t in C2x mode. The\nproposal accepted by WG14 is:\nhttps://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm\n\nNote, there are quite a few incompatibilities with the C++ feature in\nsome of the edge cases of this feature. Therefore, there are some FIXME\ncomments in tests for testing behavior that might change after WG14 has\nresolved national body comments (a process we\'ve not yet started). So\nthis implementation might change slightly depending on the resolution\nof comments. This is called out explicitly in the release notes as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D135099"}, | ||
[ | [g]={{nb,1015,"/// Parse a cast-expression, or, if \\pisUnaryExpression is true, parse\n/// a unary-expression.\n///\n/// \\p isAddressOfOperand exists because an id-expression that is the operand\n/// of address-of gets special treatment due to member pointers. NotCastExpr\n/// is set to true if the token is not the start of a cast-expression, and no\n/// diagnostic is emitted in this case and no tokens are consumed.\n///\n/// \\verbatim\n/// cast-expression: [C99 6.5.4]\n/// unary-expression\n/// \'(\' type-name \')\' cast-expression\n///\n/// unary-expression: [C99 6.5.3]\n/// postfix-expression\n/// \'++\' unary-expression\n/// \'--\' unary-expression\n/// [Coro] \'co_await\' cast-expression\n/// unary-operator cast-expression\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++11] \'alignof\' \'(\' type-id \')\'\n/// [GNU] \'&&\' identifier\n/// [C++11] \'noexcept\' \'(\' expression \')\' [C++11 5.3.7]\n/// [C++] new-expression\n/// [C++] delete-expression\n///\n/// unary-operator: one of\n/// \'&\' \'*\' \'+\' \'-\' \'~\' \'!\'\n/// [GNU] \'__extension__\' \'__real\' \'__imag\'\n///\n/// primary-expression: [C99 6.5.1]\n/// [C99] identifier\n/// [C++] id-expression\n/// constant\n/// string-literal\n/// [C++] boolean-literal [C++ 2.13.5]\n/// [C++11] \'nullptr\' [C++11 2.14.7]\n/// [C++11] user-defined-literal\n/// \'(\' expression \')\'\n/// [C11] generic-selection\n/// [C++2a] requires-expression\n/// \'__func__\' [C99 6.4.2.2]\n/// [GNU] \'__FUNCTION__\'\n/// [MS] \'__FUNCDNAME__\'\n/// [MS] \'L__FUNCTION__\'\n/// [MS] \'__FUNCSIG__\'\n/// [MS] \'L__FUNCSIG__\'\n/// [GNU] \'__PRETTY_FUNCTION__\'\n/// [GNU] \'(\' compound-statement \')\'\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__null\'\n/// [OBJC] \'[\' objc-message-expr \']\'\n/// [OBJC] \'\\@selector\' \'(\' objc-selector-arg \')\'\n/// [OBJC] \'\\@protocol\' \'(\' identifier \')\'\n/// [OBJC] \'\\@encode\' \'(\' type-name \')\'\n/// [OBJC] objc-string-literal\n/// [C++] simple-type-specifier \'(\' expression-list[opt] \')\' [C++ 5.2.3]\n/// [C++11] simple-type-specifier braced-init-list [C++11 5.2.3]\n/// [C++] typename-specifier \'(\' expression-list[opt] \')\' [C++ 5.2.3]\n/// [C++11] typename-specifier braced-init-list [C++11 5.2.3]\n/// [C++] \'const_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'dynamic_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'reinterpret_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'static_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'typeid\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'typeid\' \'(\' type-id \')\' [C++ 5.2p1]\n/// [C++] \'this\' [C++ 9.3.2]\n/// [G++] unary-type-trait \'(\' type-id \')\'\n/// [G++] binary-type-trait \'(\' type-id \',\' type-id \')\' [TODO]\n/// [EMBT] array-type-trait \'(\' type-id \',\' integer \')\'\n/// [clang] \'^\' block-literal\n///\n/// constant: [C99 6.4.4]\n/// integer-constant\n/// floating-constant\n/// enumeration-constant -> identifier\n/// character-constant\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// new-expression: [C++ 5.3.4]\n/// \'::\'[opt] \'new\' new-placement[opt] new-type-id\n/// new-initializer[opt]\n/// \'::\'[opt] \'new\' new-placement[opt] \'(\' type-id \')\'\n/// new-initializer[opt]\n///\n/// delete-expression: [C++ 5.3.5]\n/// \'::\'[opt] \'delete\' cast-expression\n/// \'::\'[opt] \'delete\' \'[\' \']\' cast-expression\n///\n/// [GNU/Embarcadero] unary-type-trait:\n/// \'__is_arithmetic\'\n/// \'__is_floating_point\'\n/// \'__is_integral\'\n/// \'__is_lvalue_expr\'\n/// \'__is_rvalue_expr\'\n/// \'__is_complete_type\'\n/// \'__is_void\'\n/// \'__is_array\'\n/// \'__is_function\'\n/// \'__is_reference\'\n/// \'__is_lvalue_reference\'\n/// \'__is_rvalue_reference\'\n/// \'__is_fundamental\'\n/// \'__is_object\'\n/// \'__is_scalar\'\n/// \'__is_compound\'\n/// \'__is_pointer\'\n/// \'__is_member_object_pointer\'\n/// \'__is_member_function_pointer\'\n/// \'__is_member_pointer\'\n/// \'__is_const\'\n/// \'__is_volatile\'\n/// \'__is_trivial\'\n/// \'__is_standard_layout\'\n/// \'__is_signed\'\n/// \'__is_unsigned\'\n///\n/// [GNU] unary-type-trait:\n/// \'__has_nothrow_assign\'\n/// \'__has_nothrow_copy\'\n/// \'__has_nothrow_constructor\'\n/// \'__has_trivial_assign\' [TODO]\n/// \'__has_trivial_copy\' [TODO]\n/// \'__has_trivial_constructor\'\n/// \'__has_trivial_destructor\'\n/// \'__has_virtual_destructor\'\n/// \'__is_abstract\' [TODO]\n/// \'__is_class\'\n/// \'__is_empty\' [TODO]\n/// \'__is_enum\'\n/// \'__is_final\'\n/// \'__is_pod\'\n/// \'__is_polymorphic\'\n/// \'__is_sealed\' [MS]\n/// \'__is_trivial\'\n/// \'__is_union\'\n/// \'__has_unique_object_representations\'\n///\n/// [Clang] unary-type-trait:\n/// \'__is_aggregate\'\n/// \'__trivially_copyable\'\n///\n/// binary-type-trait:\n/// [GNU] \'__is_base_of\'\n/// [MS] \'__is_convertible_to\'\n/// \'__is_convertible\'\n/// \'__is_same\'\n///\n/// [Embarcadero] array-type-trait:\n/// \'__array_rank\'\n/// \'__array_extent\'\n///\n/// [Embarcadero] expression-trait:\n/// \'__is_lvalue_expr\'\n/// \'__is_rvalue_expr\'\n/// \\endverbatim\n///\nExprResult Parser::ParseCastExpression(CastParseKind ParseKind, bool isAddressOfOperand, bool &NotCastExpr, TypeCastState isTypeCast, bool isVectorLiteral, bool *NotPrimaryExpression) {\n // ...\n case tok::kw_nullptr:\n if (getLangOpts().CPlusPlus)\n // ...\n else\n Diag(Tok, getLangOpts().C2x ? diag::warn_c2x_compat_keyword : diag::ext_c_nullptr) << Tok.getName();"}} | ||
[ | |||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["ext_c_static_assert_no_message"]={ | ["ext_c_static_assert_no_message"]={ | ||
[ | [j]={lb}, | ||
[i]=lb, | |||
[a]="\'_Static_assert\' with no message is a C2x extension", | |||
[b]=l, | |||
[ | [c]="\'_Static_assert\' with no message is a C2x extension", | ||
[ | [d]=Ub, | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{F,1011,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n // ...\n if (Tok.is(tok::r_paren)) {\n // ...\n if (getLangOpts().CPlusPlus17)\n // ...\n else if (getLangOpts().CPlusPlus)\n // ...\n else if (getLangOpts().C2x)\n // ...\n else\n DiagVal = diag::ext_c_static_assert_no_message;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/C/C11/n1330.c"]={"clang/test/C/C11/n1330.c:12:17: warning: \'_Static_assert\' with no message is a C2x extension [-Wc2x-extensions]","clang/test/C/C11/n1330.c:17:17: warning: \'_Static_assert\' with no message is a C2x extension [-Wc2x-extensions]"} | ["clang/test/C/C11/n1330.c"]={"clang/test/C/C11/n1330.c:12:17: warning: \'_Static_assert\' with no message is a C2x extension [-Wc2x-extensions]","clang/test/C/C11/n1330.c:17:17: warning: \'_Static_assert\' with no message is a C2x extension [-Wc2x-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_cannot_use_trivial_abi"]={ | ["ext_cannot_use_trivial_abi"]={ | ||
[ | [j]={"attributes","ignored-attributes"}, | ||
[i]="ignored-attributes", | |||
[a]="\'trivial_abi\' cannot be applied to %0", | |||
[b]=l, | |||
[ | [c]="\'trivial_abi\' cannot be applied to (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wignored\\-attributes[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"02914dc1278c",1517862202,"Add support for attribute \'trivial_abi\'.\n\nThe \'trivial_abi\' attribute can be applied to a C++ class,...","Add support for attribute \'trivial_abi\'.\n\nThe \'trivial_abi\' attribute can be applied to a C++ class, struct, or\nunion. It makes special functions of the annotated class (the destructor\nand copy/move constructors) to be trivial for the purpose of calls and,\nas a result, enables the annotated class or containing classes to be\npassed or returned using the C ABI for the underlying type.\n\nWhen a type that is considered trivial for the purpose of calls despite\nhaving a non-trivial destructor (which happens only when the class type\nor one of its subobjects is a \'trivial_abi\' class) is passed to a\nfunction, the callee is responsible for destroying the object.\n\nFor more background, see the discussions that took place on the mailing\nlist:\n\nhttp://lists.llvm.org/pipermail/cfe-dev/2017-November/055955.html\nhttp://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180101/thread.html#214043\n\nrdar://problem/35204524\n\nDifferential Revision: https://reviews.llvm.org/D41039\n\nllvm-svn: 324269"}, | ||
[ | [g]={{t,10302,"void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl &RD) {\n auto PrintDiagAndRemoveAttr = [&](unsigned N) {\n // No diagnostics if this is a template instantiation.\n if (!isTemplateInstantiation(RD.getTemplateSpecializationKind())) {\n Diag(RD.getAttr<TrivialABIAttr>()->getLocation(), diag::ext_cannot_use_trivial_abi) << &RD;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/attr-trivial-abi.cpp"]={"clang/test/SemaCXX/attr-trivial-abi.cpp:28:23: warning: \'trivial_abi\' cannot be applied to \'S3\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:35:18: warning: \'trivial_abi\' cannot be applied to \'S3_2\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:38:23: warning: \'trivial_abi\' cannot be applied to \'S3_3\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:53:23: warning: \'trivial_abi\' cannot be applied to \'S3_4\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:64:23: warning: \'trivial_abi\' cannot be applied to \'S5\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:117:23: warning: \'trivial_abi\' cannot be applied to \'CopyMoveDeleted\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:127:23: warning: \'trivial_abi\' cannot be applied to \'S18\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:152:23: warning: \'trivial_abi\' cannot be applied to \'S19\' [-Wignored-attributes]"} | ["clang/test/SemaCXX/attr-trivial-abi.cpp"]={"clang/test/SemaCXX/attr-trivial-abi.cpp:28:23: warning: \'trivial_abi\' cannot be applied to \'S3\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:35:18: warning: \'trivial_abi\' cannot be applied to \'S3_2\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:38:23: warning: \'trivial_abi\' cannot be applied to \'S3_3\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:53:23: warning: \'trivial_abi\' cannot be applied to \'S3_4\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:64:23: warning: \'trivial_abi\' cannot be applied to \'S5\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:117:23: warning: \'trivial_abi\' cannot be applied to \'CopyMoveDeleted\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:127:23: warning: \'trivial_abi\' cannot be applied to \'S18\' [-Wignored-attributes]","clang/test/SemaCXX/attr-trivial-abi.cpp:152:23: warning: \'trivial_abi\' cannot be applied to \'S19\' [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["ext_capture_binding"]={ | ["ext_capture_binding"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="captured structured bindings are a C++20 extension", | |||
[b]=l, | |||
[ | [c]="captured structured bindings are a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{r,19211,"// Certain capturing entities (lambdas, blocks etc.) are not allowed to capture\n// certain types of variables (unnamed, variably modified types etc.)\n// so check for eligibility.\nstatic bool isVariableCapturable(CapturingScopeInfo *CSI, ValueDecl *Var, SourceLocation Loc, const bool Diagnose, Sema &S) {\n // ...\n if (isa<BindingDecl>(Var)) {\n if (!IsLambda || !S.getLangOpts().CPlusPlus) {\n // ...\n } else if (Diagnose && S.getLangOpts().CPlusPlus) {\n S.Diag(Loc, S.LangOpts.CPlusPlus20 ? diag::warn_cxx17_compat_capture_binding : diag::ext_capture_binding) << Var;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx1z-decomposition.cpp"]={"clang/test/SemaCXX/cxx1z-decomposition.cpp:75:22: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1z-decomposition.cpp:76:10: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1z-decomposition.cpp:89:11: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1z-decomposition.cpp:98:22: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]"} | ["clang/test/SemaCXX/cxx1z-decomposition.cpp"]={"clang/test/SemaCXX/cxx1z-decomposition.cpp:75:22: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1z-decomposition.cpp:76:10: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1z-decomposition.cpp:89:11: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1z-decomposition.cpp:98:22: warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_cast_fn_obj"]={ | ["ext_cast_fn_obj"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="cast between pointer-to-function and pointer-to-object is an extension", | |||
[b]=l, | |||
[c]="cast between pointer\\-to\\-function and pointer\\-to\\-object is an extension", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={"9f831dbbcdfa",1248536498,"Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conve...","Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.\nAdd custom conversions to static_cast.\n\nllvm-svn: 77076"}, | ||
[ | [g]={{wb,2559,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n // ...\n if (SrcType->isFunctionPointerType()) {\n // ...\n Self.Diag(OpRange.getBegin(), Self.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_cast_fn_obj : diag::ext_cast_fn_obj) << OpRange;"},{wb,2568,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n // ...\n if (DestType->isFunctionPointerType()) {\n // ...\n Self.Diag(OpRange.getBegin(), Self.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_cast_fn_obj : diag::ext_cast_fn_obj) << OpRange;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp"]={"clang/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp:7:14: warning: cast between pointer-to-function and pointer-to-object is an extension [-Wpedantic]","clang/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp:8:9: warning: cast between pointer-to-function and pointer-to-object is an extension [-Wpedantic]"} | ["clang/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp"]={"clang/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp:7:14: warning: cast between pointer-to-function and pointer-to-object is an extension [-Wpedantic]","clang/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp:8:9: warning: cast between pointer-to-function and pointer-to-object is an extension [-Wpedantic]"} | ||
} | } | ||
}, | }, | ||
["ext_cce_narrowing"]={ | ["ext_cce_narrowing"]={ | ||
[ | [j]={mc,"c++0x-narrowing",Qb,Xb,Kb,"narrowing"}, | ||
[i]=Kb, | |||
[a]="%select{case value|enumerator value|non-type template argument|array size|explicit specifier argument|noexcept specifier argument}0 %select{cannot be narrowed from type %2 to %3|evaluates to %2, which cannot be narrowed to type %3}1", | |||
[b]=K, | |||
[ | [c]="(?:case value|enumerator value|non\\-type template argument|array size|explicit specifier argument|noexcept specifier argument) (?:cannot be narrowed from type (.*?) to (.*?)|evaluates to (.*?), which cannot be narrowed to type (.*?))", | ||
[ | [d]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow 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"}, | ||
[ | [g]={{Db,5929,"/// BuildConvertedConstantExpression - Check that the expression From is a\n/// converted constant expression of type T, perform the conversion but\n/// does not evaluate the expression\nstatic ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From, QualType T, Sema::CCEKind CCE, NamedDecl *Dest, APValue &PreNarrowingValue) {\n // ...\n case NK_Constant_Narrowing:\n // ...\n S.Diag(From->getBeginLoc(), diag::ext_cce_narrowing) << CCE << /*Constant*/ 1 << PreNarrowingValue.getAsString(S.Context, PreNarrowingType) << T;"},{Db,5937,"/// BuildConvertedConstantExpression - Check that the expression From is a\n/// converted constant expression of type T, perform the conversion but\n/// does not evaluate the expression\nstatic ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From, QualType T, Sema::CCEKind CCE, NamedDecl *Dest, APValue &PreNarrowingValue) {\n // ...\n case NK_Type_Narrowing:\n // ...\n S.Diag(From->getBeginLoc(), diag::ext_cce_narrowing) << CCE << /*Constant*/ 0 << From->getType() << T;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx0x-noexcept-expression.cpp"]={"clang/test/SemaCXX/cxx0x-noexcept-expression.cpp:86:19: error: noexcept specifier argument evaluates to 2, which cannot be narrowed to type \'bool\' [-Wc++11-narrowing]","clang/test/SemaCXX/cxx0x-noexcept-expression.cpp:92:19: error: noexcept specifier argument evaluates to 2, which cannot be narrowed to type \'bool\' [-Wc++11-narrowing]"} | ["clang/test/SemaCXX/cxx0x-noexcept-expression.cpp"]={"clang/test/SemaCXX/cxx0x-noexcept-expression.cpp:86:19: error: noexcept specifier argument evaluates to 2, which cannot be narrowed to type \'bool\' [-Wc++11-narrowing]","clang/test/SemaCXX/cxx0x-noexcept-expression.cpp:92:19: error: noexcept specifier argument evaluates to 2, which cannot be narrowed to type \'bool\' [-Wc++11-narrowing]"} | ||
} | } | ||
}, | }, | ||
["ext_charize_microsoft"]={ | ["ext_charize_microsoft"]={ | ||
[ | [j]={A,"microsoft-charize",o}, | ||
[i]="microsoft-charize", | |||
[a]="charizing operator #@ is a Microsoft extension", | |||
[b]=l, | |||
[c]="charizing operator \\#@ is a Microsoft extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-charize[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"a08713ce8610",1318888073,"Move about 20 random diagnostics under -W flags. Patch by Ahmed Charles!\n\nllvm-svn: 142284","Move about 20 random diagnostics under -W flags. Patch by Ahmed Charles!\n\nllvm-svn: 142284"}, | ||
[ | [g]={{T,4073,"LexStart:\n // ...\n case \'%\':\n // ...\n if (Char == \'=\') {\n // ...\n } else if (LangOpts.Digraphs && Char == \'>\') {\n // ...\n } else if (LangOpts.Digraphs && Char == \':\') {\n // ...\n if (Char == \'%\' && getCharAndSize(CurPtr + SizeTmp, SizeTmp2) == \':\') {\n // ...\n } else if (Char == \'@\' && LangOpts.MicrosoftExt) { // %:@ -> #@ -> Charize\n // ...\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::ext_charize_microsoft);"},{T,4262,"LexStart:\n // ...\n case \'#\':\n // ...\n if (Char == \'#\') {\n // ...\n } else if (Char == \'@\' && LangOpts.MicrosoftExt) { // #@ -> Charize\n // ...\n if (!isLexingRawMode())\n Diag(BufferPtr, diag::ext_charize_microsoft);"}} | ||
[ | |||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["ext_clang_c_enum_fixed_underlying_type"]={ | ["ext_clang_c_enum_fixed_underlying_type"]={ | ||
[ | [j]={"fixed-enum-extension",o}, | ||
[i]="fixed-enum-extension", | |||
[a]="enumeration types with a fixed underlying type are a Clang extension", | |||
[b]=l, | |||
[c]="enumeration types with a fixed underlying type are a Clang extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wfixed\\-enum\\-extension[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"6f11db137034",1538166298,"Support enums with a fixed underlying type in all language modes.\n\nPreviously we supported these in ...","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"}, | ||
[ | [g]={{B,4949,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\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 // ...\n else\n Diag(ColonLoc, diag::ext_clang_c_enum_fixed_underlying_type) << BaseRange;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/fixed-enum.c"]={"clang/test/Sema/fixed-enum.c:8:8: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]","clang/test/Sema/fixed-enum.c:22:10: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]","clang/test/Sema/fixed-enum.c:23:10: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]","clang/test/Sema/fixed-enum.c:30:13: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]","clang/test/Sema/fixed-enum.c:35:13: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]"} | ["clang/test/Sema/fixed-enum.c"]={"clang/test/Sema/fixed-enum.c:8:8: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]","clang/test/Sema/fixed-enum.c:22:10: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]","clang/test/Sema/fixed-enum.c:23:10: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]","clang/test/Sema/fixed-enum.c:30:13: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]","clang/test/Sema/fixed-enum.c:35:13: warning: enumeration types with a fixed underlying type are a Clang extension [-Wfixed-enum-extension]"} | ||
} | } | ||
}, | }, | ||
["ext_clang_diagnose_if"]={ | ["ext_clang_diagnose_if"]={ | ||
[ | [j]={qc,o}, | ||
[i]=qc, | |||
[a]="\'diagnose_if\' is a clang extension", | |||
[b]=l, | |||
[c]="\'diagnose_if\' is a clang extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgcc\\-compat[^\\]]*\\]", | ||
[ | [e]=m, | ||
[ | [f]={"177399e2277c",1483935134,"Add the diagnose_if attribute to clang.\n\n`diagnose_if` can be used to have clang emit either warning...","Add the diagnose_if attribute to clang.\n\n`diagnose_if` can be used to have clang emit either warnings or errors\nfor function calls that meet user-specified conditions. For example:\n\n```\nconstexpr int foo(int a)\n __attribute__((diagnose_if(a > 10, \"configurations with a > 10 are \"\n \"expensive.\", \"warning\")));\n\nint f1 = foo(9);\nint f2 = foo(10); // warning: configuration with a > 10 are expensive.\nint f3 = foo(f2);\n```\n\nIt currently only emits diagnostics in cases where the condition is\nguaranteed to always be true. So, the following code will emit no\nwarnings:\n\n```\nconstexpr int bar(int a) {\n foo(a);\n return 0;\n}\n\nconstexpr int i = bar(10);\n```\n\nWe hope to support optionally emitting diagnostics for cases like that\n(and emitting runtime checks) in the future.\n\nRelease notes will appear shortly. :)\n\nDifferential Revision: https://reviews.llvm.org/D27424\n\nllvm-svn: 291418"}, | ||
[ | [g]={{Nb,1098,"static void handleDiagnoseIfAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n S.Diag(AL.getLoc(), diag::ext_clang_diagnose_if);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/diagnose_if-ext.cpp"]={"clang/test/SemaCXX/diagnose_if-ext.cpp:3:27: warning: \'diagnose_if\' is a clang extension [-Wgcc-compat]","clang/test/SemaCXX/diagnose_if-ext.cpp:4:32: warning: \'diagnose_if\' is a clang extension [-Wgcc-compat]"} | ["clang/test/SemaCXX/diagnose_if-ext.cpp"]={"clang/test/SemaCXX/diagnose_if-ext.cpp:3:27: warning: \'diagnose_if\' is a clang extension [-Wgcc-compat]","clang/test/SemaCXX/diagnose_if-ext.cpp:4:32: warning: \'diagnose_if\' is a clang extension [-Wgcc-compat]"} | ||
} | } | ||
}, | }, | ||
["ext_clang_enable_if"]={ | ["ext_clang_enable_if"]={ | ||
[ | [j]={qc,o}, | ||
[i]=qc, | |||
[a]="\'enable_if\' is a clang extension", | |||
[b]=l, | |||
[c]="\'enable_if\' is a clang extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgcc\\-compat[^\\]]*\\]", | ||
[ | [e]=m, | ||
[ | [f]={"046ba5b66fae",1455778171,"Sema: provide an extension warning for enable_if\n\nClang implements an enable_if attribute as an exte...","Sema: provide an extension warning for enable_if\n\nClang implements an enable_if attribute as an extension. Hook up `-Wpedantic`\nto issue an extension usage warning when __enable_if__ is used.\n\nllvm-svn: 261192"}, | ||
[ | [g]={{Nb,957,"static void handleEnableIfAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n S.Diag(AL.getLoc(), diag::ext_clang_enable_if);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/enable_if-ext.c"]={"clang/test/Sema/enable_if-ext.c:11:18: warning: \'enable_if\' is a clang extension [-Wgcc-compat]","clang/test/Sema/enable_if-ext.c:17:18: warning: \'enable_if\' is a clang extension [-Wgcc-compat]","clang/test/Sema/enable_if-ext.c:23:18: warning: \'enable_if\' is a clang extension [-Wgcc-compat]","clang/test/Sema/enable_if-ext.c:29:18: warning: \'enable_if\' is a clang extension [-Wgcc-compat]"} | ["clang/test/Sema/enable_if-ext.c"]={"clang/test/Sema/enable_if-ext.c:11:18: warning: \'enable_if\' is a clang extension [-Wgcc-compat]","clang/test/Sema/enable_if-ext.c:17:18: warning: \'enable_if\' is a clang extension [-Wgcc-compat]","clang/test/Sema/enable_if-ext.c:23:18: warning: \'enable_if\' is a clang extension [-Wgcc-compat]","clang/test/Sema/enable_if-ext.c:29:18: warning: \'enable_if\' is a clang extension [-Wgcc-compat]"} | ||
} | } | ||
}, | }, | ||
["ext_comment_paste_microsoft"]={ | ["ext_comment_paste_microsoft"]={ | ||
[ | [j]={A,"microsoft-comment-paste",o}, | ||
[i]="microsoft-comment-paste", | |||
[a]="pasting two \'/\' tokens into a \'//\' comment is a Microsoft extension", | |||
[b]=l, | |||
[c]="pasting two \'\\/\' tokens into a \'\\/\\/\' comment is a Microsoft extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-comment\\-paste[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"446cf25c2131",1451430377,"Emit a -Wmicrosoft warning when pasting /##/ into a comment token in MS mode.\n\nllvm-svn: 256595","Emit a -Wmicrosoft warning when pasting /##/ into a comment token in MS mode.\n\nllvm-svn: 256595"}, | ||
[ | [g]={{"clang/lib/Lex/TokenLexer.cpp",947,"/// HandleMicrosoftCommentPaste - In microsoft compatibility mode, /##/ pastes\n/// together to form a comment that comments out everything in the current\n/// macro, other active macros, and anything left on the current physical\n/// source line of the expanded buffer. Handle this by returning the\n/// first token on the next line.\nvoid TokenLexer::HandleMicrosoftCommentPaste(Token &Tok, SourceLocation OpLoc) {\n PP.Diag(OpLoc, diag::ext_comment_paste_microsoft);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/macro_paste_msextensions.c"]={"clang/test/Preprocessor/macro_paste_msextensions.c:15:1: warning: pasting two \'/\' tokens into a \'//\' comment is a Microsoft extension [-Wmicrosoft-comment-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:24:1: warning: pasting two \'/\' tokens into a \'//\' comment is a Microsoft extension [-Wmicrosoft-comment-paste]"} | ["clang/test/Preprocessor/macro_paste_msextensions.c"]={"clang/test/Preprocessor/macro_paste_msextensions.c:15:1: warning: pasting two \'/\' tokens into a \'//\' comment is a Microsoft extension [-Wmicrosoft-comment-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:24:1: warning: pasting two \'/\' tokens into a \'//\' comment is a Microsoft extension [-Wmicrosoft-comment-paste]"} | ||
} | } | ||
}, | }, | ||
["ext_complex_component_init"]={ | ["ext_complex_component_init"]={ | ||
[ | [j]={"complex-component-init",o}, | ||
[i]="complex-component-init", | |||
[a]="complex initialization specifying real and imaginary components is an extension", | |||
[b]=l, | |||
[c]="complex initialization specifying real and imaginary components is an extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wcomplex\\-component\\-init[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"6b9c41ea68f8",1316474264,"Add list initialization for complex numbers in C. Essentially, this allows \"_Complex float x = {1.0...","Add list initialization for complex numbers in C. Essentially, this allows \"_Complex float x = {1.0f, 2.0f};\". See changes to docs/LanguageExtensions.html for a longer description.\n\n<rdar://problem/9397672>.\n\nllvm-svn: 140090"}, | ||
[ | [g]={{N,1606,"void InitListChecker::CheckComplexType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\n // This is an extension in C. (The builtin _Complex type does not exist\n // in the C++ standard.)\n if (!SemaRef.getLangOpts().CPlusPlus && !VerifyOnly)\n SemaRef.Diag(IList->getBeginLoc(), diag::ext_complex_component_init) << IList->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/complex-init-list.c"]={"clang/test/Sema/complex-init-list.c:20:25: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:28:23: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:30:30: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:31:30: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:31:44: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:33:25: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:39:27: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:45:32: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:45:46: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:47:44: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:51:41: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:54:22: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:56:21: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]"} | ["clang/test/Sema/complex-init-list.c"]={"clang/test/Sema/complex-init-list.c:20:25: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:28:23: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:30:30: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:31:30: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:31:44: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:33:25: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:39:27: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:45:32: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:45:46: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:47:44: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:51:41: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:54:22: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]","clang/test/Sema/complex-init-list.c:56:21: warning: complex initialization specifying real and imaginary components is an extension [-Wcomplex-component-init]"} | ||
} | } | ||
}, | }, | ||
["ext_consteval_if"]={ | ["ext_consteval_if"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="consteval if is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="consteval if is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{sb,1480,"/// ParseIfStatement\n/// if-statement: [C99 6.8.4.1]\n/// \'if\' \'(\' expression \')\' statement\n/// \'if\' \'(\' expression \')\' statement \'else\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement \'else\' statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement \'else\' statement\n///\nStmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) {\n // ...\n if (Tok.is(tok::kw_constexpr)) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::kw_consteval)) {\n Diag(Tok, getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_consteval_if : diag::ext_consteval_if);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["ext_constexpr_body_invalid_stmt"]={ | ["ext_constexpr_body_invalid_stmt"]={ | ||
[ | [j]={db,Eb}, | ||
[i]=db, | |||
[a]="use of this statement in a constexpr %select{function|constructor}0 is a C++14 extension", | |||
[b]=l, | |||
[ | [c]="use of this statement in a constexpr (?:function|constructor) is a C\\+\\+14 extension", | ||
[ | [d]=Ob, | ||
[ | [e]=k, | ||
[ | [f]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr func...","C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr functions. Everything which doesn\'t require variable\nmutation is also allowed as an extension in C++11. \'void\' becomes a literal\ntype to support constexpr functions which return \'void\'.\n\nllvm-svn: 180022"}, | ||
[ | [g]={{t,2301,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (Kind == Sema::CheckConstexprKind::CheckValid) {\n // ...\n } else if (Cxx2bLoc.isValid()) {\n // ...\n } else if (Cxx2aLoc.isValid()) {\n // ...\n } else if (Cxx1yLoc.isValid()) {\n SemaRef.Diag(Cxx1yLoc, SemaRef.getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_constexpr_body_invalid_stmt : diag::ext_constexpr_body_invalid_stmt) << isa<CXXConstructorDecl>(Dcl);"}}, | ||
[ | [h]={ | ||
[ | [Mc]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:57:11: error: use of this statement in a constexpr constructor is a C++14 extension [-Werror,-Wc++14-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:106:5: error: use of this statement in a constexpr constructor is a C++14 extension [-Werror,-Wc++14-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:130:5: error: use of this statement in a constexpr constructor is a C++14 extension [-Werror,-Wc++14-extensions]"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_constexpr_body_invalid_stmt_cxx20"]={ | ["ext_constexpr_body_invalid_stmt_cxx20"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="use of this statement in a constexpr %select{function|constructor}0 is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="use of this statement in a constexpr (?:function|constructor) is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={"5c1399a58237",1544468592,"[constexpr][c++2a] Try-catch blocks in constexpr functions\n\nImplement support for try-catch blocks i...","[constexpr][c++2a] Try-catch blocks in constexpr functions\n\nImplement support for try-catch blocks in constexpr functions, as\nproposed in http://wg21.link/P1002 and voted in San Diego for c++20.\n\nThe idea is that we can still never throw inside constexpr, so the catch\nblock is never entered. A try-catch block like this:\n\ntry { f(); } catch (...) { }\n\nis then morally equivalent to just\n\n{ f(); }\n\nSame idea should apply for function/constructor try blocks.\n\nrdar://problem/45530773\n\nDifferential Revision: https://reviews.llvm.org/D55097\n\nllvm-svn: 348789"}, | ||
[ | [g]={{t,2295,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (Kind == Sema::CheckConstexprKind::CheckValid) {\n // ...\n } else if (Cxx2bLoc.isValid()) {\n // ...\n } else if (Cxx2aLoc.isValid()) {\n SemaRef.Diag(Cxx2aLoc, SemaRef.getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_constexpr_body_invalid_stmt : diag::ext_constexpr_body_invalid_stmt_cxx20) << isa<CXXConstructorDecl>(Dcl);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:124:5: warning: use of this statement in a constexpr function is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:140:3: warning: use of this statement in a constexpr function is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:124:5: warning: use of this statement in a constexpr function is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:140:3: warning: use of this statement in a constexpr function is a C++20 extension [-Wc++20-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_constexpr_body_invalid_stmt_cxx23"]={ | ["ext_constexpr_body_invalid_stmt_cxx23"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="use of this statement in a constexpr %select{function|constructor}0 is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="use of this statement in a constexpr (?:function|constructor) is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=k, | ||
[ | [f]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handlin...","[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handling for:\n\nexport module M;\n\nexport namespace {};\n\nexport namespace N {};\nexport using namespace N;\n\nIn the first case, we were allowing empty anonymous namespaces\nas part of an extension allowing empty top-level entities, but that seems\ninappropriate in this case, since the linkage would be internal for the\nanonymous namespace. We now report an error for this.\n\nThe second case was producing a warning diagnostic that this was\naccepted as an extension - however the C++20 standard does allow this\nas well-formed.\n\nIn the third case we keep the current practice that this is accepted with a\nwarning (as an extension). The C++20 standard says it\'s an error.\n\nWe also ensure that using decls are only applied to items with external linkage.\n\nThis adjusts error messages for exports involving redeclarations in modules to\nbe more specific about the reason that the decl has been rejected.\n\nDifferential Revision: https://reviews.llvm.org/D122119"}, | ||
[ | [g]={{t,2289,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (Kind == Sema::CheckConstexprKind::CheckValid) {\n // ...\n } else if (Cxx2bLoc.isValid()) {\n SemaRef.Diag(Cxx2bLoc, SemaRef.getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_constexpr_body_invalid_stmt : diag::ext_constexpr_body_invalid_stmt_cxx23) << isa<CXXConstructorDecl>(Dcl);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:17:7: warning: use of this statement in a constexpr function is a C++23 extension [-Wc++23-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:23:5: warning: use of this statement in a constexpr function is a C++23 extension [-Wc++23-extensions]"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:17:7: warning: use of this statement in a constexpr function is a C++23 extension [-Wc++23-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:23:5: warning: use of this statement in a constexpr function is a C++23 extension [-Wc++23-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_constexpr_body_multiple_return"]={ | ["ext_constexpr_body_multiple_return"]={ | ||
[ | [j]={db,Eb}, | ||
[i]=db, | |||
[a]="multiple return statements in constexpr function is a C++14 extension", | |||
[b]=l, | |||
[ | [c]="multiple return statements in constexpr function is a C\\+\\+14 extension", | ||
[ | [d]=Ob, | ||
[ | [e]=k, | ||
[ | [f]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr func...","C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr functions. Everything which doesn\'t require variable\nmutation is also allowed as an extension in C++11. \'void\' becomes a literal\ntype to support constexpr functions which return \'void\'.\n\nllvm-svn: 180022"}, | ||
[ | [g]={{t,2400,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (const CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Dcl)) {\n // ...\n } else {\n if (ReturnStmts.empty()) {\n // ...\n } else if (ReturnStmts.size() > 1) {\n // ...\n case Sema::CheckConstexprKind::Diagnose:\n SemaRef.Diag(ReturnStmts.back(), SemaRef.getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_constexpr_body_multiple_return : diag::ext_constexpr_body_multiple_return);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:132:5: warning: multiple return statements in constexpr function is a C++14 extension [-Wc++14-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:218:3: warning: multiple return statements in constexpr function is a C++14 extension [-Wc++14-extensions]"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:132:5: warning: multiple return statements in constexpr function is a C++14 extension [-Wc++14-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:218:3: warning: multiple return statements in constexpr function is a C++14 extension [-Wc++14-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_constexpr_ctor_missing_init"]={ | ["ext_constexpr_ctor_missing_init"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="constexpr constructor that does not initialize all members is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="constexpr constructor that does not initialize all members is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={Vb,1567434909,Rb,Sb}, | ||
[ | [g]={{t,2045,"/// Check that the given field is initialized within a constexpr constructor.\n///\n/// \\param Dcl The constexpr constructor being checked.\n/// \\param Field The field being checked. This may be a member of an anonymous\n/// struct or union nested within the class being checked.\n/// \\param Inits All declarations, including anonymous struct/union members and\n/// indirect members, for which any initialization was provided.\n/// \\param Diagnosed Whether we\'ve emitted the error message yet. Used to attach\n/// multiple notes for different members to the same error.\n/// \\param Kind Whether we\'re diagnosing a constructor as written or determining\n/// whether the formal requirements are satisfied.\n/// \\return \\c false if we\'re checking for validity and the constructor does\n/// not satisfy the requirements on a constexpr constructor.\nstatic bool CheckConstexprCtorInitializer(Sema &SemaRef, const FunctionDecl *Dcl, FieldDecl *Field, llvm::SmallSet<Decl *, 16> &Inits, bool &Diagnosed, Sema::CheckConstexprKind Kind) {\n // ...\n if (!Inits.count(Field)) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n if (!Diagnosed) {\n SemaRef.Diag(Dcl->getLocation(), SemaRef.getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_constexpr_ctor_missing_init : diag::ext_constexpr_ctor_missing_init);"}}, | ||
[ | [h]={ | ||
[ | [Mc]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:140:13: error: constexpr constructor that does not initialize all members is a C++20 extension [-Werror,-Wc++20-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:173:13: error: constexpr constructor that does not initialize all members is a C++20 extension [-Werror,-Wc++20-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:179:13: error: constexpr constructor that does not initialize all members is a C++20 extension [-Werror,-Wc++20-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:184:13: error: constexpr constructor that does not initialize all members is a C++20 extension [-Werror,-Wc++20-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:189:13: error: constexpr constructor that does not initialize all members is a C++20 extension [-Werror,-Wc++20-extensions]"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_constexpr_function_never_constant_expr"]={ | ["ext_constexpr_function_never_constant_expr"]={ | ||
[ | [j]={"invalid-constexpr"}, | ||
[i]="invalid-constexpr", | |||
[a]="%select{constexpr|consteval}1 %select{function|constructor}0 never produces a constant expression", | |||
[b]=K, | |||
[ | [c]="(?:constexpr|consteval) (?:function|constructor) never produces a constant expression", | ||
[ | [d]=" \\[[^\\]]*\\-Winvalid\\-constexpr[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"f86b5dc7009e",1355032543,"PR14550: If a system header contains a bogus constexpr function definition,\ndon\'t mark the function ...","PR14550: If a system header contains a bogus constexpr function definition,\ndon\'t mark the function as invalid, since we suppress the error.\n\nllvm-svn: 169689"}, | ||
[ | [g]={{t,2431,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (Kind == Sema::CheckConstexprKind::Diagnose && !Expr::isPotentialConstantExpr(Dcl, Diags)) {\n SemaRef.Diag(Dcl->getLocation(), diag::ext_constexpr_function_never_constant_expr) << isa<CXXConstructorDecl>(Dcl) << Dcl->isConsteval();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/literal-type.cpp"]={"clang/test/SemaCXX/literal-type.cpp:57:13: error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]"} | ["clang/test/SemaCXX/literal-type.cpp"]={"clang/test/SemaCXX/literal-type.cpp:57:13: error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]"} | ||
} | } | ||
}, | }, | ||
["ext_constexpr_function_try_block_cxx20"]={ | ["ext_constexpr_function_try_block_cxx20"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="function try block in constexpr %select{function|constructor}0 is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="function try block in constexpr (?:function|constructor) is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={"5c1399a58237",1544468592,"[constexpr][c++2a] Try-catch blocks in constexpr functions\n\nImplement support for try-catch blocks i...","[constexpr][c++2a] Try-catch blocks in constexpr functions\n\nImplement support for try-catch blocks in constexpr functions, as\nproposed in http://wg21.link/P1002 and voted in San Diego for c++20.\n\nThe idea is that we can still never throw inside constexpr, so the catch\nblock is never entered. A try-catch block like this:\n\ntry { f(); } catch (...) { }\n\nis then morally equivalent to just\n\n{ f(); }\n\nSame idea should apply for function/constructor try blocks.\n\nrdar://problem/45530773\n\nDifferential Revision: https://reviews.llvm.org/D55097\n\nllvm-svn: 348789"}, | ||
[ | [g]={{t,2258,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (isa<CXXTryStmt>(Body)) {\n // ...\n case Sema::CheckConstexprKind::Diagnose:\n SemaRef.Diag(Body->getBeginLoc(), !SemaRef.getLangOpts().CPlusPlus20 ? diag::ext_constexpr_function_try_block_cxx20 : diag::warn_cxx17_compat_constexpr_function_try_block) << isa<CXXConstructorDecl>(Dcl);"}}, | ||
[ | [h]={ | ||
[ | [Mc]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:53:5: error: function try block in constexpr constructor is a C++20 extension [-Werror,-Wc++20-extensions]"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_constexpr_if"]={ | ["ext_constexpr_if"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="constexpr if is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="constexpr if is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"b130fe7d316e",1466709409,"Implement p0292r2 (constexpr if), a likely C++1z feature.\n\nllvm-svn: 273602","Implement p0292r2 (constexpr if), a likely C++1z feature.\n\nllvm-svn: 273602"}, | ||
[ | [g]={{sb,1470,"/// ParseIfStatement\n/// if-statement: [C99 6.8.4.1]\n/// \'if\' \'(\' expression \')\' statement\n/// \'if\' \'(\' expression \')\' statement \'else\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement \'else\' statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement \'else\' statement\n///\nStmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) {\n // ...\n if (Tok.is(tok::kw_constexpr)) {\n Diag(Tok, getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_constexpr_if : diag::ext_constexpr_if);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGenCXX/nrvo.cpp"]={"clang/test/CodeGenCXX/nrvo.cpp:2568:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]","clang/test/CodeGenCXX/nrvo.cpp:2577:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]","clang/test/CodeGenCXX/nrvo.cpp:2927:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]"} | ["clang/test/CodeGenCXX/nrvo.cpp"]={"clang/test/CodeGenCXX/nrvo.cpp:2568:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]","clang/test/CodeGenCXX/nrvo.cpp:2577:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]","clang/test/CodeGenCXX/nrvo.cpp:2927:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_constexpr_local_var"]={ | ["ext_constexpr_local_var"]={ | ||
[ | [j]={db,Eb}, | ||
[i]=db, | |||
[a]="variable declaration in a constexpr %select{function|constructor}0 is a C++14 extension", | |||
[b]=l, | |||
[ | [c]="variable declaration in a constexpr (?:function|constructor) is a C\\+\\+14 extension", | ||
[ | [d]=Ob, | ||
[ | [e]=k, | ||
[ | [f]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr func...","C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr functions. Everything which doesn\'t require variable\nmutation is also allowed as an extension in C++11. \'void\' becomes a literal\ntype to support constexpr functions which return \'void\'.\n\nllvm-svn: 180022"}, | ||
[ | [g]={{t,1972,"/// Check the given declaration statement is legal within a constexpr function\n/// body. C++11 [dcl.constexpr]p3,p4, and C++1y [dcl.constexpr]p3.\n///\n/// \\return true if the body is OK (maybe only as an extension), false if we\n/// have diagnosed a problem.\nstatic bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl, DeclStmt *DS, SourceLocation &Cxx1yLoc, Sema::CheckConstexprKind Kind) {\n // C++11 [dcl.constexpr]p3 and p4:\n // The definition of a constexpr function(p3) or constructor(p4) [...] shall\n // contain only\n for (const auto *DclIt : DS->decls()) {\n // ...\n case Decl::Var:\n case Decl::Decomposition: {\n // ...\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(VD->getLocation(), SemaRef.getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_constexpr_local_var : diag::ext_constexpr_local_var) << isa<CXXConstructorDecl>(Dcl);"}}, | ||
[ | [h]={ | ||
[ | [Mc]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:100:19: error: variable declaration in a constexpr constructor is a C++14 extension [-Werror,-Wc++14-extensions]"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_constexpr_local_var_no_init"]={ | ["ext_constexpr_local_var_no_init"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="uninitialized variable in a constexpr %select{function|constructor}0 is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="uninitialized variable in a constexpr (?:function|constructor) is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={Vb,1567434909,Rb,Sb}, | ||
[ | [g]={{t,1960,"/// Check the given declaration statement is legal within a constexpr function\n/// body. C++11 [dcl.constexpr]p3,p4, and C++1y [dcl.constexpr]p3.\n///\n/// \\return true if the body is OK (maybe only as an extension), false if we\n/// have diagnosed a problem.\nstatic bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl, DeclStmt *DS, SourceLocation &Cxx1yLoc, Sema::CheckConstexprKind Kind) {\n // C++11 [dcl.constexpr]p3 and p4:\n // The definition of a constexpr function(p3) or constructor(p4) [...] shall\n // contain only\n for (const auto *DclIt : DS->decls()) {\n // ...\n case Decl::Var:\n case Decl::Decomposition: {\n // ...\n if (VD->isThisDeclarationADefinition()) {\n // ...\n if (!VD->getType()->isDependentType() && !VD->hasInit() && !VD->isCXXForRangeDecl()) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(VD->getLocation(), SemaRef.getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_constexpr_local_var_no_init : diag::ext_constexpr_local_var_no_init) << isa<CXXConstructorDecl>(Dcl);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:167:7: warning: uninitialized variable in a constexpr function is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:272:9: warning: uninitialized variable in a constexpr function is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:167:7: warning: uninitialized variable in a constexpr function is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:272:9: warning: uninitialized variable in a constexpr function is a C++20 extension [-Wc++20-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_constexpr_on_lambda_cxx17"]={ | ["ext_constexpr_on_lambda_cxx17"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="\'constexpr\' on lambda expressions is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="\'constexpr\' on lambda expressions is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"a734ab980865",1459008697,"[Cxx1z-constexpr-lambda-P0170R1] Support parsing of constexpr specifier (and its inference) on lamb...","[Cxx1z-constexpr-lambda-P0170R1] Support parsing of constexpr specifier (and its inference) on lambda expressions\n\nSupport the constexpr specifier on lambda expressions - and support its inference from the lambda call operator\'s body.\n\ni.e.\n auto L = [] () constexpr { return 5; };\n static_assert(L() == 5); // OK\n auto Implicit = [] (auto a) { return a; };\n static_assert(Implicit(5) == 5); \n\nWe do not support evaluation of lambda\'s within constant expressions just yet.\n\nImplementation Strategy:\n - teach ParseLambdaExpressionAfterIntroducer to expect a constexpr specifier and mark the invented function call operator\'s declarator\'s decl-specifier with it; Have it emit fixits for multiple decl-specifiers (mutable or constexpr) in this location.\n - for cases where constexpr is not explicitly specified, have buildLambdaExpr check whether the invented function call operator satisfies the requirements of a constexpr function, by calling CheckConstexprFunctionDecl/Body.\n\nMuch obliged to Richard Smith for his patience and his care, in ensuring the code is clang-worthy.\n\nllvm-svn: 264513"}, | ||
[ | [g]={{rb,1227,"static void addConstexprToLambdaDeclSpecifier(Parser &P, SourceLocation ConstexprLoc, DeclSpec &DS) {\n if (ConstexprLoc.isValid()) {\n P.Diag(ConstexprLoc, !P.getLangOpts().CPlusPlus17 ? diag::ext_constexpr_on_lambda_cxx17 : diag::warn_cxx14_compat_constexpr_on_lambda);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx1z-constexpr-lambdas.cpp"]={"clang/test/Parser/cxx1z-constexpr-lambdas.cpp:7:15: warning: \'constexpr\' on lambda expressions is a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx1z-constexpr-lambdas.cpp:33:23: warning: \'constexpr\' on lambda expressions is a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx1z-constexpr-lambdas.cpp:34:16: warning: \'constexpr\' on lambda expressions is a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx1z-constexpr-lambdas.cpp:35:16: warning: \'constexpr\' on lambda expressions is a C++17 extension [-Wc++17-extensions]"} | ["clang/test/Parser/cxx1z-constexpr-lambdas.cpp"]={"clang/test/Parser/cxx1z-constexpr-lambdas.cpp:7:15: warning: \'constexpr\' on lambda expressions is a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx1z-constexpr-lambdas.cpp:33:23: warning: \'constexpr\' on lambda expressions is a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx1z-constexpr-lambdas.cpp:34:16: warning: \'constexpr\' on lambda expressions is a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx1z-constexpr-lambdas.cpp:35:16: warning: \'constexpr\' on lambda expressions is a C++17 extension [-Wc++17-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_constexpr_static_var"]={ | ["ext_constexpr_static_var"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="definition of a %select{static|thread_local}1 variable in a constexpr %select{function|constructor}0 is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="definition of a (?:static|thread_local) variable in a constexpr (?:function|constructor) is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=k, | ||
[ | [f]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handlin...","[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handling for:\n\nexport module M;\n\nexport namespace {};\n\nexport namespace N {};\nexport using namespace N;\n\nIn the first case, we were allowing empty anonymous namespaces\nas part of an extension allowing empty top-level entities, but that seems\ninappropriate in this case, since the linkage would be internal for the\nanonymous namespace. We now report an error for this.\n\nThe second case was producing a warning diagnostic that this was\naccepted as an extension - however the C++20 standard does allow this\nas well-formed.\n\nIn the third case we keep the current practice that this is accepted with a\nwarning (as an extension). The C++20 standard says it\'s an error.\n\nWe also ensure that using decls are only applied to items with external linkage.\n\nThis adjusts error messages for exports involving redeclarations in modules to\nbe more specific about the reason that the decl has been rejected.\n\nDifferential Revision: https://reviews.llvm.org/D122119"}, | ||
[ | [g]={{t,1935,"/// Check the given declaration statement is legal within a constexpr function\n/// body. C++11 [dcl.constexpr]p3,p4, and C++1y [dcl.constexpr]p3.\n///\n/// \\return true if the body is OK (maybe only as an extension), false if we\n/// have diagnosed a problem.\nstatic bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl, DeclStmt *DS, SourceLocation &Cxx1yLoc, Sema::CheckConstexprKind Kind) {\n // C++11 [dcl.constexpr]p3 and p4:\n // The definition of a constexpr function(p3) or constructor(p4) [...] shall\n // contain only\n for (const auto *DclIt : DS->decls()) {\n // ...\n case Decl::Var:\n case Decl::Decomposition: {\n // ...\n if (VD->isThisDeclarationADefinition()) {\n if (VD->isStaticLocal()) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(VD->getLocation(), SemaRef.getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_constexpr_var : diag::ext_constexpr_static_var) << isa<CXXConstructorDecl>(Dcl) << (VD->getTLSKind() == VarDecl::TLS_Dynamic);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:38:18: warning: definition of a static variable in a constexpr function is a C++23 extension [-Wc++23-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:44:24: warning: definition of a thread_local variable in a constexpr function is a C++23 extension [-Wc++23-extensions]"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:38:18: warning: definition of a static variable in a constexpr function is a C++23 extension [-Wc++23-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:44:24: warning: definition of a thread_local variable in a constexpr function is a C++23 extension [-Wc++23-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_constexpr_type_definition"]={ | ["ext_constexpr_type_definition"]={ | ||
[ | [j]={db,Eb}, | ||
[i]=db, | |||
[a]="type definition in a constexpr %select{function|constructor}0 is a C++14 extension", | |||
[b]=l, | |||
[ | [c]="type definition in a constexpr (?:function|constructor) is a C\\+\\+14 extension", | ||
[ | [d]=Ob, | ||
[ | [e]=k, | ||
[ | [f]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr func...","C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr functions. Everything which doesn\'t require variable\nmutation is also allowed as an extension in C++11. \'void\' becomes a literal\ntype to support constexpr functions which return \'void\'.\n\nllvm-svn: 180022"}, | ||
[ | [g]={{t,1907,"/// Check the given declaration statement is legal within a constexpr function\n/// body. C++11 [dcl.constexpr]p3,p4, and C++1y [dcl.constexpr]p3.\n///\n/// \\return true if the body is OK (maybe only as an extension), false if we\n/// have diagnosed a problem.\nstatic bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl, DeclStmt *DS, SourceLocation &Cxx1yLoc, Sema::CheckConstexprKind Kind) {\n // C++11 [dcl.constexpr]p3 and p4:\n // The definition of a constexpr function(p3) or constructor(p4) [...] shall\n // contain only\n for (const auto *DclIt : DS->decls()) {\n // ...\n case Decl::Enum:\n case Decl::CXXRecord:\n // C++1y allows types to be defined, not just declared.\n if (cast<TagDecl>(DclIt)->isThisDeclarationADefinition()) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(DS->getBeginLoc(), SemaRef.getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_constexpr_type_definition : diag::ext_constexpr_type_definition) << isa<CXXConstructorDecl>(Dcl);"}}, | ||
[ | [h]={ | ||
[ | [Mc]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:112:5: error: type definition in a constexpr constructor is a C++14 extension [-Werror,-Wc++14-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:118:5: error: type definition in a constexpr constructor is a C++14 extension [-Werror,-Wc++14-extensions]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:124:5: error: type definition in a constexpr constructor is a C++14 extension [-Werror,-Wc++14-extensions]"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_constexpr_union_ctor_no_init"]={ | ["ext_constexpr_union_ctor_no_init"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="constexpr union constructor that does not initialize any member is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="constexpr union constructor that does not initialize any member is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={Vb,1567434909,Rb,Sb}, | ||
[ | [g]={{t,2322,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (const CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Dcl)) {\n // ...\n // DR1359:\n // - every non-variant non-static data member and base class sub-object\n // shall be initialized;\n // DR1460:\n // - if the class is a union having variant members, exactly one of them\n // shall be initialized;\n if (RD->isUnion()) {\n if (Constructor->getNumCtorInitializers() == 0 && RD->hasVariantMembers()) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n SemaRef.Diag(Dcl->getLocation(), SemaRef.getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_constexpr_union_ctor_no_init : diag::ext_constexpr_union_ctor_no_init);"}} | ||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["ext_constinit_missing"]={ | ["ext_constinit_missing"]={ | ||
[ | [j]={"missing-constinit"}, | ||
[i]="missing-constinit", | |||
[a]="\'constinit\' specifier missing on initializing declaration of %0", | |||
[b]=l, | |||
[ | [c]="\'constinit\' specifier missing on initializing declaration of (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmissing\\-constinit[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Vb,1567434909,Rb,Sb}, | ||
[ | [g]={{p,3165,"static void diagnoseMissingConstinit(Sema &S, const VarDecl *InitDecl, const ConstInitAttr *CIAttr, bool AttrBeforeInit) {\n // ...\n if (AttrBeforeInit) {\n // ...\n S.Diag(InitDecl->getLocation(), diag::ext_constinit_missing) << InitDecl << FixItHint::CreateInsertion(InsertLoc, SuitableSpelling);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p2.cpp:8:5: warning: \'constinit\' specifier missing on initializing declaration of \'c\' [-Wmissing-constinit]"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p2.cpp:8:5: warning: \'constinit\' specifier missing on initializing declaration of \'c\' [-Wmissing-constinit]"} | ||
} | } | ||
}, | }, | ||
["ext_ctrl_z_eof_microsoft"]={ | ["ext_ctrl_z_eof_microsoft"]={ | ||
[ | [j]={A,"microsoft-end-of-file",o}, | ||
[i]="microsoft-end-of-file", | |||
[a]="treating Ctrl-Z as end-of-file is a Microsoft extension", | |||
[b]=l, | |||
[c]="treating Ctrl\\-Z as end\\-of\\-file is a Microsoft extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-end\\-of\\-file[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"de2310bddf64",1451431047,"Emit a -Wmicrosoft warning when treating ^Z as EOF in MS mode.\n\nllvm-svn: 256596","Emit a -Wmicrosoft warning when treating ^Z as EOF in MS mode.\n\nllvm-svn: 256596"}, | ||
[ | [g]={{T,3654,"LexStart:\n // ...\n case 26: // DOS & CP/M EOF: \"^Z\".\n // If we\'re in Microsoft extensions mode, treat this as end of file.\n if (LangOpts.MicrosoftExt) {\n if (!isLexingRawMode())\n Diag(CurPtr - 1, diag::ext_ctrl_z_eof_microsoft);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Lexer/msdos-cpm-eof.c"]={"clang/test/Lexer/msdos-cpm-eof.c:6:1: warning: treating Ctrl-Z as end-of-file is a Microsoft extension [-Wmicrosoft-end-of-file]"} | ["clang/test/Lexer/msdos-cpm-eof.c"]={"clang/test/Lexer/msdos-cpm-eof.c:6:1: warning: treating Ctrl-Z as end-of-file is a Microsoft extension [-Wmicrosoft-end-of-file]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx11_attr_placement"]={ | ["ext_cxx11_attr_placement"]={ | ||
[ | [j]={"cxx-attribute-extension"}, | ||
[i]="cxx-attribute-extension", | |||
[a]="ISO C++ does not allow %select{an attribute list|%0}1 to appear here", | |||
[b]=l, | |||
[ | [c]="ISO C\\+\\+ does not allow (?:an attribute list|(.*?)) to appear here", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wcxx\\-attribute\\-extension[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{B,1782,"void Parser::DiagnoseCXX11AttributeExtension(ParsedAttributes &Attrs) {\n for (const ParsedAttr &PA : Attrs) {\n if (PA.isCXX11Attribute() || PA.isC2xAttribute() || PA.isRegularKeywordAttribute())\n Diag(PA.getLoc(), diag::ext_cxx11_attr_placement) << PA << PA.isRegularKeywordAttribute() << PA.getRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp"]={"clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:7:3: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:10:3: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:11:15: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:15:10: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:18:3: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:18:40: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:18:72: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:22:5: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:23:5: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:25:25: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:26:16: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]"} | ["clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp"]={"clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:7:3: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:10:3: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:11:15: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:15:10: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:18:3: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:18:40: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:18:72: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:22:5: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:23:5: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:25:25: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]","clang/test/SemaCXX/cxx11-attributes-on-using-declaration.cpp:26:16: warning: ISO C++ does not allow an attribute list to appear here [-Wcxx-attribute-extension]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx11_enum_fixed_underlying_type"]={ | ["ext_cxx11_enum_fixed_underlying_type"]={ | ||
[ | [j]={L,y,o}, | ||
[i]=y, | |||
[a]="enumeration types with a fixed underlying type are a C++11 extension", | |||
[b]=l, | |||
[c]="enumeration types with a fixed underlying type are a C\\+\\+11 extension", | |||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"0d0355abfca9",1351820068,"Change diagnostics for enums with fixed underlying type so in C++98 mode, we cite C++11.\n\nllvm-svn: ...","Change diagnostics for enums with fixed underlying type so in C++98 mode, we cite C++11.\n\nllvm-svn: 167273"}, | ||
[ | [g]={{B,4943,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\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 Diag(ColonLoc, diag::ext_cxx11_enum_fixed_underlying_type) << BaseRange;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/enum.cpp"]={"clang/test/SemaCXX/enum.cpp:111:13: warning: enumeration types with a fixed underlying type are a C++11 extension [-Wc++11-extensions]"} | ["clang/test/SemaCXX/enum.cpp"]={"clang/test/SemaCXX/enum.cpp:111:13: warning: enumeration types with a fixed underlying type are a C++11 extension [-Wc++11-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx11_longlong"]={ | ["ext_cxx11_longlong"]={ | ||
[ | [j]={L,y,"c++11-long-long","long-long",o,o}, | ||
[i]="c++11-long-long", | |||
[a]="\'long long\' is a C++11 extension", | |||
[b]=l, | |||
[c]="\'long long\' is a C\\+\\+11 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-long\\-long[^\\]]*\\]", | ||
[ | [e]=m, | ||
[ | [f]={"1cd230570394",1348510761,"Change the wording of the extension warning from\n> \'long long\' is an extension when C99 mode is not ...","Change the wording of the extension warning from\n> \'long long\' is an extension when C99 mode is not enabled\nto\n> \'long long\' is a C++11 extension\nwhile compiling in C++98 mode.\n\nllvm-svn: 164545"}, | ||
[ | [g]={{fc,322,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::numeric_constant: {\n // ...\n // \'long long\' is a C99 or C++11 feature.\n if (!PP.getLangOpts().C99 && Literal.isLongLong) {\n if (PP.getLangOpts().CPlusPlus)\n PP.Diag(PeekTok, PP.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_longlong : diag::ext_cxx11_longlong);"},{r,4228,"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 // Check long long if needed.\n if (Ty.isNull() && !Literal.isSizeT) {\n // ...\n // Does it fit in a unsigned long long?\n if (ResultVal.isIntN(LongLongSize)) {\n // ...\n // \'long long\' is a C99 or C++11 feature, whether the literal\n // explicitly specified \'long long\' or we needed the extra width.\n if (getLangOpts().CPlusPlus)\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_longlong : diag::ext_cxx11_longlong);"},{M,1411,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n // ...\n case DeclSpec::TST_int: {\n if (DS.getTypeSpecSign() != TypeSpecifierSign::Unsigned) {\n // ...\n case TypeSpecifierWidth::LongLong:\n // ...\n // \'long long\' is a C99 or C++11 feature.\n if (!S.getLangOpts().C99) {\n if (S.getLangOpts().CPlusPlus)\n S.Diag(DS.getTypeSpecWidthLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_longlong : diag::ext_cxx11_longlong);"},{M,1436,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n // ...\n case DeclSpec::TST_int: {\n if (DS.getTypeSpecSign() != TypeSpecifierSign::Unsigned) {\n // ...\n } else {\n // ...\n case TypeSpecifierWidth::LongLong:\n // ...\n // \'long long\' is a C99 or C++11 feature.\n if (!S.getLangOpts().C99) {\n if (S.getLangOpts().CPlusPlus)\n S.Diag(DS.getTypeSpecWidthLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_longlong : diag::ext_cxx11_longlong);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/warn-c++11-extensions.cpp"]={"clang/test/SemaCXX/warn-c++11-extensions.cpp:3:1: warning: \'long long\' is a C++11 extension [-Wc++11-long-long]","clang/test/SemaCXX/warn-c++11-extensions.cpp:4:11: warning: \'long long\' is a C++11 extension [-Wc++11-long-long]","clang/test/SemaCXX/warn-c++11-extensions.cpp:5:10: warning: \'long long\' is a C++11 extension [-Wc++11-long-long]","clang/test/SemaCXX/warn-c++11-extensions.cpp:6:20: warning: \'long long\' is a C++11 extension [-Wc++11-long-long]"} | ["clang/test/SemaCXX/warn-c++11-extensions.cpp"]={"clang/test/SemaCXX/warn-c++11-extensions.cpp:3:1: warning: \'long long\' is a C++11 extension [-Wc++11-long-long]","clang/test/SemaCXX/warn-c++11-extensions.cpp:4:11: warning: \'long long\' is a C++11 extension [-Wc++11-long-long]","clang/test/SemaCXX/warn-c++11-extensions.cpp:5:10: warning: \'long long\' is a C++11 extension [-Wc++11-long-long]","clang/test/SemaCXX/warn-c++11-extensions.cpp:6:20: warning: \'long long\' is a C++11 extension [-Wc++11-long-long]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx14_attr"]={ | ["ext_cxx14_attr"]={ | ||
[ | [j]={"c++14-attribute-extensions",db,Eb,"future-attribute-extensions",o,o}, | ||
[i]="c++14-attribute-extensions", | |||
[a]="use of the %0 attribute is a C++14 extension", | |||
[b]=l, | |||
[c]="use of the (.*?) attribute is a C\\+\\+14 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+14\\-attribute\\-extensions[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"4f902c7eccd4",1457397175,"P0188R1: add support for standard [[fallthrough]] attribute. This is almost\nexactly the same as clan...","P0188R1: add support for standard [[fallthrough]] attribute. This is almost\nexactly the same as clang\'s existing [[clang::fallthrough]] attribute, which\nhas been updated to have the same semantics. The one significant difference\nis that [[fallthrough]] is ill-formed if it\'s not used immediately before a\nswitch label (even when -Wimplicit-fallthrough is disabled). To support that,\nwe now build a CFG of any function that uses a \'[[fallthrough]];\' statement\nto check.\n\nIn passing, fix some bugs with our support for statement attributes -- in\nparticular, diagnose their use on declarations, rather than asserting.\n\nllvm-svn: 262881"}, | ||
[ | [g]={{Nb,8200,"static void handleDeprecatedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!S.getLangOpts().CPlusPlus14 && AL.isCXX11Attribute() && !AL.isGNUScope())\n S.Diag(AL.getLoc(), diag::ext_cxx14_attr) << AL;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/generalized-deprecated.cpp"]={"clang/test/SemaCXX/generalized-deprecated.cpp:6:3: warning: use of the \'deprecated\' attribute is a C++14 extension [-Wc++14-attribute-extensions]"} | ["clang/test/SemaCXX/generalized-deprecated.cpp"]={"clang/test/SemaCXX/generalized-deprecated.cpp:6:3: warning: use of the \'deprecated\' attribute is a C++14 extension [-Wc++14-attribute-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx17_attr"]={ | ["ext_cxx17_attr"]={ | ||
[ | [j]={"c++17-attribute-extensions",G,ab,"future-attribute-extensions",o,o}, | ||
[i]="c++17-attribute-extensions", | |||
[a]="use of the %0 attribute is a C++17 extension", | |||
[b]=l, | |||
[c]="use of the (.*?) attribute is a C\\+\\+17 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+17\\-attribute\\-extensions[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"4f902c7eccd4",1457397175,"P0188R1: add support for standard [[fallthrough]] attribute. This is almost\nexactly the same as clan...","P0188R1: add support for standard [[fallthrough]] attribute. This is almost\nexactly the same as clang\'s existing [[clang::fallthrough]] attribute, which\nhas been updated to have the same semantics. The one significant difference\nis that [[fallthrough]] is ill-formed if it\'s not used immediately before a\nswitch label (even when -Wimplicit-fallthrough is disabled). To support that,\nwe now build a CFG of any function that uses a \'[[fallthrough]];\' statement\nto check.\n\nIn passing, fix some bugs with our support for statement attributes -- in\nparticular, diagnose their use on declarations, rather than asserting.\n\nllvm-svn: 262881"}, | ||
[ | [g]={{Nb,2336,"static void handleUnusedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // If this is spelled as the standard C++17 attribute, but not in C++17, warn\n // about using it as an extension.\n if (!S.getLangOpts().CPlusPlus17 && IsCXX17Attr)\n S.Diag(AL.getLoc(), diag::ext_cxx17_attr) << AL;"},{Nb,3176,"static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isStandardAttributeSyntax() && !AL.getScopeName()) {\n // ...\n if (AL.getNumArgs() == 1) {\n // ...\n } else if (LO.CPlusPlus && !LO.CPlusPlus17)\n S.Diag(AL.getLoc(), diag::ext_cxx17_attr) << AL;"},{"clang/lib/Sema/SemaStmtAttr.cpp",49,"static Attr *handleFallThroughAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n // ...\n // If this is spelled as the standard C++17 attribute, but not in C++17, warn\n // about using it as an extension.\n if (!S.getLangOpts().CPlusPlus17 && A.isCXX11Attribute() && !A.getScopeName())\n S.Diag(A.getLoc(), diag::ext_cxx17_attr) << A;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx0x-attributes.cpp"]={"clang/test/Parser/cxx0x-attributes.cpp:387:7: warning: use of the \'fallthrough\' attribute is a C++17 extension [-Wc++17-attribute-extensions]"} | ["clang/test/Parser/cxx0x-attributes.cpp"]={"clang/test/Parser/cxx0x-attributes.cpp:387:7: warning: use of the \'fallthrough\' attribute is a C++17 extension [-Wc++17-attribute-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx20_attr"]={ | ["ext_cxx20_attr"]={ | ||
[ | [j]={"c++20-attribute-extensions",D,V,"future-attribute-extensions",o,o}, | ||
[i]="c++20-attribute-extensions", | |||
[a]="use of the %0 attribute is a C++20 extension", | |||
[b]=l, | |||
[c]="use of the (.*?) attribute is a C\\+\\+20 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+20\\-attribute\\-extensions[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"3bef014e7d79",1563609394,"Implement P1301R4, which allows specifying an optional message on the [[nodiscard]] attribute.\n\nThis...","Implement P1301R4, which allows specifying an optional message on the [[nodiscard]] attribute.\n\nThis also bumps the attribute feature test value and introduces the notion of a C++2a extension warning.\n\nllvm-svn: 366626"}, | ||
[ | [g]={{Nb,3167,"static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isStandardAttributeSyntax() && !AL.getScopeName()) {\n // ...\n if (AL.getNumArgs() == 1) {\n if (LO.CPlusPlus && !LO.CPlusPlus20)\n S.Diag(AL.getLoc(), diag::ext_cxx20_attr) << AL;"},{"clang/lib/Sema/SemaStmtAttr.cpp",312,"static Attr *handleLikely(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n if (!S.getLangOpts().CPlusPlus20 && A.isCXX11Attribute() && !A.getScopeName())\n S.Diag(A.getLoc(), diag::ext_cxx20_attr) << A << Range;"},{"clang/lib/Sema/SemaStmtAttr.cpp",321,"static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n if (!S.getLangOpts().CPlusPlus20 && A.isCXX11Attribute() && !A.getScopeName())\n S.Diag(A.getLoc(), diag::ext_cxx20_attr) << A << Range;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/attr-likelihood.cpp"]={"clang/test/SemaCXX/attr-likelihood.cpp:7:7: warning: use of the \'likely\' attribute is a C++20 extension [-Wc++20-attribute-extensions]","clang/test/SemaCXX/attr-likelihood.cpp:9:7: warning: use of the \'unlikely\' attribute is a C++20 extension [-Wc++20-attribute-extensions]"} | ["clang/test/SemaCXX/attr-likelihood.cpp"]={"clang/test/SemaCXX/attr-likelihood.cpp:7:7: warning: use of the \'likely\' attribute is a C++20 extension [-Wc++20-attribute-extensions]","clang/test/SemaCXX/attr-likelihood.cpp:9:7: warning: use of the \'unlikely\' attribute is a C++20 extension [-Wc++20-attribute-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx23_pp_directive"]={ | ["ext_cxx23_pp_directive"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="use of a \'#%select{<BUG IF SEEN>|elifdef|elifndef}0\' directive is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="use of a \'\\#(?:elifdef|elifndef)\' directive is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=u, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{P,769,"/// SkipExcludedConditionalBlock - We just read a \\#if or related directive and\n/// decided that the subsequent tokens are in the \\#if\'d out portion of the\n/// file. Lex the rest of the file, until we see an \\#endif. If\n/// FoundNonSkipPortion is true, then we have already emitted code for part of\n/// this \\#if directive, so \\#else/\\#elif blocks should never be entered.\n/// If ElseOk is true, then \\#else directives are ok, if not, then we have\n/// already seen one so a \\#else directive is a duplicate. When this returns,\n/// the caller can lex the first valid token.\nvoid Preprocessor::SkipExcludedConditionalBlock(SourceLocation HashTokenLoc, SourceLocation IfTokenLoc, bool FoundNonSkipPortion, bool FoundElse, SourceLocation ElseLoc) {\n // ...\n while (true) {\n // ...\n if (Directive.startswith(\"if\")) {\n // ...\n } else if (Directive[0] == \'e\') {\n // ...\n if (Sub == \"ndif\") { // \"endif\"\n // ...\n } else if (Sub == \"lse\") { // \"else\".\n // ...\n } else if (Sub == \"lif\") { // \"elif\".\n // ...\n } else if (Sub == \"lifdef\" || // \"elifdef\"\n // ...\n if (LangOpts.CPlusPlus)\n DiagID = LangOpts.CPlusPlus23 ? diag::warn_cxx23_compat_pp_directive : diag::ext_cxx23_pp_directive;"},{P,3455,"/// Implements the \\#elif, \\#elifdef, and \\#elifndef directives.\nvoid Preprocessor::HandleElifFamilyDirective(Token &ElifToken, const Token &HashToken, tok::PPKeywordKind Kind) {\n // ...\n case PED_Elifdef:\n case PED_Elifndef:\n // ...\n if (LangOpts.CPlusPlus)\n DiagID = LangOpts.CPlusPlus23 ? diag::warn_cxx23_compat_pp_directive : diag::ext_cxx23_pp_directive;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:18:2: warning: use of a \'#elifdef\' directive is a C++23 extension [-Wc++23-extensions]","clang/test/Preprocessor/ext-pp-directive.c:29:2: warning: use of a \'#elifndef\' directive is a C++23 extension [-Wc++23-extensions]","clang/test/Preprocessor/ext-pp-directive.c:40:2: warning: use of a \'#elifdef\' directive is a C++23 extension [-Wc++23-extensions]","clang/test/Preprocessor/ext-pp-directive.c:51:2: warning: use of a \'#elifndef\' directive is a C++23 extension [-Wc++23-extensions]"} | ["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:18:2: warning: use of a \'#elifdef\' directive is a C++23 extension [-Wc++23-extensions]","clang/test/Preprocessor/ext-pp-directive.c:29:2: warning: use of a \'#elifndef\' directive is a C++23 extension [-Wc++23-extensions]","clang/test/Preprocessor/ext-pp-directive.c:40:2: warning: use of a \'#elifdef\' directive is a C++23 extension [-Wc++23-extensions]","clang/test/Preprocessor/ext-pp-directive.c:51:2: warning: use of a \'#elifndef\' directive is a C++23 extension [-Wc++23-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx23_size_t_suffix"]={ | ["ext_cxx23_size_t_suffix"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="\'size_t\' suffix for literals is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="\'size_t\' suffix for literals is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=m, | ||
[ | [f]={"dc7ebd2cb0cf",1616862441,"[C++2b] Support size_t literals\n\nThis adds support for C++2b\'s z/uz suffixes for size_t literals (P0...","[C++2b] Support size_t literals\n\nThis adds support for C++2b\'s z/uz suffixes for size_t literals (P0330)."}, | ||
[ | [g]={{fc,332,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::numeric_constant: {\n // ...\n // \'z/uz\' literals are a C++23 feature.\n if (Literal.isSizeT)\n PP.Diag(PeekTok, PP.getLangOpts().CPlusPlus ? PP.getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_size_t_suffix : diag::ext_cxx23_size_t_suffix : diag::err_cxx23_size_t_suffix);"},{r,4059,"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 // \'z/uz\' literals are a C++23 feature.\n if (Literal.isSizeT)\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus ? getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_size_t_suffix : diag::ext_cxx23_size_t_suffix : diag::err_cxx23_size_t_suffix);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/size_t-literal.cpp"]={"clang/test/SemaCXX/size_t-literal.cpp:19:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:24:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:31:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:36:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:41:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:46:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:51:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:56:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:61:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:66:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]"} | ["clang/test/SemaCXX/size_t-literal.cpp"]={"clang/test/SemaCXX/size_t-literal.cpp:19:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:24:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:31:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:36:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:41:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:46:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:51:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:56:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:61:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]","clang/test/SemaCXX/size_t-literal.cpp:66:13: warning: \'size_t\' suffix for literals is a C++23 extension [-Wc++23-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx_designated_init"]={ | ["ext_cxx_designated_init"]={ | ||
[ | [j]={"c++20-designator",D,V,tb,Q,o}, | ||
[i]="c++20-designator", | |||
[a]="designated initializers are a C++20 extension", | |||
[b]=l, | |||
[c]="designated initializers are a C\\+\\+20 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+20\\-designator[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Yb,1567205575,Zb,cc}, | ||
[ | [g]={{r,7833,"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 Diag(FirstDesignator, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_designated_init : diag::ext_cxx_designated_init);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/c99.cpp"]={"clang/test/SemaCXX/c99.cpp:11:14: warning: designated initializers are a C++20 extension [-Wc++20-designator]","clang/test/SemaCXX/c99.cpp:20:3: warning: designated initializers are a C++20 extension [-Wc++20-designator]","clang/test/SemaCXX/c99.cpp:53:3: warning: designated initializers are a C++20 extension [-Wc++20-designator]"} | ["clang/test/SemaCXX/c99.cpp"]={"clang/test/SemaCXX/c99.cpp:11:14: warning: designated initializers are a C++20 extension [-Wc++20-designator]","clang/test/SemaCXX/c99.cpp:20:3: warning: designated initializers are a C++20 extension [-Wc++20-designator]","clang/test/SemaCXX/c99.cpp:53:3: warning: designated initializers are a C++20 extension [-Wc++20-designator]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx_label_end_of_compound_statement"]={ | ["ext_cxx_label_end_of_compound_statement"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="label at end of compound statement is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="label at end of compound statement is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=q, | ||
[ | [f]={"782ac2182c2b",1657907157,"[HLSL] Support cbuffer/tbuffer for hlsl.\n\nThis is first part for support cbuffer/tbuffer.\n\nThe forma...","[HLSL] Support cbuffer/tbuffer for hlsl.\n\nThis is first part for support cbuffer/tbuffer.\n\nThe format for cbuffer/tbuffer is\nBufferType [Name] [: register(b#)] { VariableDeclaration [: packoffset(c#.xyzw)]; ... };\n\nMore details at https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-constants\n\nNew keyword \'cbuffer\' and \'tbuffer\' are added.\nNew AST node HLSLBufferDecl is added.\nBuild AST for simple cbuffer/tbuffer without attribute support.\n\nThe special thing is variables declared inside cbuffer is exposed into global scope.\nSo isTransparentContext should return true for HLSLBuffer.\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D129883"}, | ||
[ | [g]={{sb,1077,"void Parser::DiagnoseLabelAtEndOfCompoundStatement() {\n if (getLangOpts().CPlusPlus) {\n Diag(Tok, getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_label_end_of_compound_statement : diag::ext_cxx_label_end_of_compound_statement);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/switch-recovery.cpp"]={"clang/test/Parser/switch-recovery.cpp:164:3: warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/switch-recovery.cpp:171:3: warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/switch-recovery.cpp:182:3: warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/switch-recovery.cpp:213:3: warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]"} | ["clang/test/Parser/switch-recovery.cpp"]={"clang/test/Parser/switch-recovery.cpp:164:3: warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/switch-recovery.cpp:171:3: warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/switch-recovery.cpp:182:3: warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/switch-recovery.cpp:213:3: warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_cxx_static_assert_no_message"]={ | ["ext_cxx_static_assert_no_message"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="\'static_assert\' with no message is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="\'static_assert\' with no message is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{F,1007,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n // ...\n if (Tok.is(tok::r_paren)) {\n // ...\n if (getLangOpts().CPlusPlus17)\n // ...\n else if (getLangOpts().CPlusPlus)\n DiagVal = diag::ext_cxx_static_assert_no_message;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/static-assert.cpp"]={"clang/test/SemaCXX/static-assert.cpp:85:19: warning: \'static_assert\' with no message is a C++17 extension [-Wc++17-extensions]","clang/test/SemaCXX/static-assert.cpp:86:20: warning: \'static_assert\' with no message is a C++17 extension [-Wc++17-extensions]","clang/test/SemaCXX/static-assert.cpp:241:22: warning: \'static_assert\' with no message is a C++17 extension [-Wc++17-extensions]"} | ["clang/test/SemaCXX/static-assert.cpp"]={"clang/test/SemaCXX/static-assert.cpp:85:19: warning: \'static_assert\' with no message is a C++17 extension [-Wc++17-extensions]","clang/test/SemaCXX/static-assert.cpp:86:20: warning: \'static_assert\' with no message is a C++17 extension [-Wc++17-extensions]","clang/test/SemaCXX/static-assert.cpp:241:22: warning: \'static_assert\' with no message is a C++17 extension [-Wc++17-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_decl_attrs_on_lambda"]={ | ["ext_decl_attrs_on_lambda"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="%select{an attribute specifier sequence|%0}1 in this position is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="(?:an attribute specifier sequence|(.*?)) in this position is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{rb,1368,"/// ParseLambdaExpressionAfterIntroducer - Parse the rest of a lambda\n/// expression.\nExprResult Parser::ParseLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro) {\n // ...\n // Implement WG21 P2173, which allows attributes immediately before the\n // lambda declarator and applies them to the corresponding function operator\n // or operator template declaration. We accept this as a conforming extension\n // in all language modes that support lambdas.\n if (isCXX11AttributeSpecifier()) {\n Diag(Tok, getLangOpts().CPlusPlus23 ? diag::warn_cxx20_compat_decl_attrs_on_lambda : diag::ext_decl_attrs_on_lambda) << Tok.getIdentifierInfo() << Tok.isRegularKeywordAttribute();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/cxx0x-lambda-expressions.cpp"]={"clang/test/Parser/cxx0x-lambda-expressions.cpp:129:7: warning: an attribute specifier sequence in this position is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/cxx0x-lambda-expressions.cpp:134:17: warning: an attribute specifier sequence in this position is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/cxx0x-lambda-expressions.cpp:139:7: warning: an attribute specifier sequence in this position is a C++23 extension [-Wc++23-extensions]"} | ["clang/test/Parser/cxx0x-lambda-expressions.cpp"]={"clang/test/Parser/cxx0x-lambda-expressions.cpp:129:7: warning: an attribute specifier sequence in this position is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/cxx0x-lambda-expressions.cpp:134:17: warning: an attribute specifier sequence in this position is a C++23 extension [-Wc++23-extensions]","clang/test/Parser/cxx0x-lambda-expressions.cpp:139:7: warning: an attribute specifier sequence in this position is a C++23 extension [-Wc++23-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_decltype_auto_type_specifier"]={ | ["ext_decltype_auto_type_specifier"]={ | ||
[ | [j]={db,Eb}, | ||
[i]=db, | |||
[a]="\'decltype(auto)\' type specifier is a C++14 extension", | |||
[b]=l, | |||
[ | [c]="\'decltype\\(auto\\)\' type specifier is a C\\+\\+14 extension", | ||
[ | [d]=Ob, | ||
[ | [e]=q, | ||
[ | [f]={"74aeef50a0cc",1366992935,"Implement C++1y decltype(auto).\n\nllvm-svn: 180610","Implement C++1y decltype(auto).\n\nllvm-svn: 180610"}, | ||
[ | [g]={{F,1105,"/// ParseDecltypeSpecifier - Parse a C++11 decltype specifier.\n///\n/// \'decltype\' ( expression )\n/// \'decltype\' ( \'auto\' ) [C++1y]\n///\nSourceLocation Parser::ParseDecltypeSpecifier(DeclSpec &DS) {\n // ...\n if (Tok.is(tok::annot_decltype)) {\n // ...\n } else {\n // ...\n // Check for C++1y \'decltype(auto)\'.\n if (Tok.is(tok::kw_auto) && NextToken().is(tok::r_paren)) {\n // ...\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_decltype_auto_type_specifier : diag::ext_decltype_auto_type_specifier);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/trailing-return-0x.cpp"]={"clang/test/SemaCXX/trailing-return-0x.cpp:21:10: warning: \'decltype(auto)\' type specifier is a C++14 extension [-Wc++14-extensions]"} | ["clang/test/SemaCXX/trailing-return-0x.cpp"]={"clang/test/SemaCXX/trailing-return-0x.cpp:21:10: warning: \'decltype(auto)\' type specifier is a C++14 extension [-Wc++14-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_decomp_decl"]={ | ["ext_decomp_decl"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="decomposition declarations are a C++17 extension", | |||
[b]=l, | |||
[ | [c]="decomposition declarations are a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=k, | ||
[ | [f]={"bdb84f374cde",1469230619,"P0217R3: Parsing support and framework for AST representation of C++1z\ndecomposition declarations.\n\n...","P0217R3: Parsing support and framework for AST representation of C++1z\ndecomposition declarations.\n\nThere are a couple of things in the wording that seem strange here:\ndecomposition declarations are permitted at namespace scope (which we partially\nsupport here) and they are permitted as the declaration in a template (which we\nreject).\n\nllvm-svn: 276492"}, | ||
[ | [g]={{t,752,"NamedDecl *Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n // ...\n Diag(Decomp.getLSquareLoc(), !getLangOpts().CPlusPlus17 ? diag::ext_decomp_decl : D.getContext() == DeclaratorContext::Condition ? diag::ext_decomp_decl_cond : diag::warn_cxx14_compat_decomp_decl) << Decomp.getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGenCXX/mangle.cpp"]={"clang/test/CodeGenCXX/mangle.cpp:1209:10: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]","clang/test/CodeGenCXX/mangle.cpp:1216:8: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]"} | ["clang/test/CodeGenCXX/mangle.cpp"]={"clang/test/CodeGenCXX/mangle.cpp:1209:10: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]","clang/test/CodeGenCXX/mangle.cpp:1216:8: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_decomp_decl_cond"]={ | ["ext_decomp_decl_cond"]={ | ||
[ | [j]={"binding-in-condition"}, | ||
[i]="binding-in-condition", | |||
[a]="ISO C++17 does not permit structured binding declaration in a condition", | |||
[b]=l, | |||
[ | [c]="ISO C\\+\\+17 does not permit structured binding declaration in a condition", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wbinding\\-in\\-condition[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"c81f4538ecd9",1512630195,"Allow conditions to be decomposed with structured bindings\n\nSummary:\nThis feature was discussed but ...","Allow conditions to be decomposed with structured bindings\n\nSummary:\nThis feature was discussed but not yet proposed. It allows a structured binding to appear as a //condition//\n\n if (auto [ok, val] = f(...))\n\nSo the user can save an extra //condition// if the statement can test the value to-be-decomposed instead. Formally, it makes the value of the underlying object of the structured binding declaration also the value of a //condition// that is an initialized declaration.\n\nConsidering its logicality which is entirely evident from its trivial implementation, I think it might be acceptable to land it as an extension for now before I write the paper.\n\nReviewers: rsmith, faisalv, aaron.ballman\n\nReviewed By: rsmith\n\nSubscribers: aaron.ballman, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D39284\n\nllvm-svn: 320011"}, | ||
[ | [g]={{t,754,"NamedDecl *Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n // ...\n Diag(Decomp.getLSquareLoc(), !getLangOpts().CPlusPlus17 ? diag::ext_decomp_decl : D.getContext() == DeclaratorContext::Condition ? diag::ext_decomp_decl_cond : diag::warn_cxx14_compat_decomp_decl) << Decomp.getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/decomposed-condition.cpp"]={"clang/test/Parser/decomposed-condition.cpp:36:12: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:38:12: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:40:12: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:47:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:49:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:51:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:58:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:60:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:62:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:77:16: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:79:16: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:81:16: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]"} | ["clang/test/Parser/decomposed-condition.cpp"]={"clang/test/Parser/decomposed-condition.cpp:36:12: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:38:12: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:40:12: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:47:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:49:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:51:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:58:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:60:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:62:15: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:77:16: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:79:16: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]","clang/test/Parser/decomposed-condition.cpp:81:16: warning: ISO C++17 does not permit structured binding declaration in a condition [-Wbinding-in-condition]"} | ||
} | } | ||
}, | }, | ||
["ext_decomp_decl_empty"]={ | ["ext_decomp_decl_empty"]={ | ||
[ | [j]={"empty-decomposition"}, | ||
[i]="empty-decomposition", | |||
[a]="ISO C++17 does not allow a decomposition group to be empty", | |||
[b]=l, | |||
[ | [c]="ISO C\\+\\+17 does not allow a decomposition group to be empty", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wempty\\-decomposition[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"bdb84f374cde",1469230619,"P0217R3: Parsing support and framework for AST representation of C++1z\ndecomposition declarations.\n\n...","P0217R3: Parsing support and framework for AST representation of C++1z\ndecomposition declarations.\n\nThere are a couple of things in the wording that seem strange here:\ndecomposition declarations are permitted at namespace scope (which we partially\nsupport here) and they are permitted as the declaration in a template (which we\nreject).\n\nllvm-svn: 276492"}, | ||
[ | [g]={{B,6783,"void Parser::ParseDecompositionDeclarator(Declarator &D) {\n // ...\n if (Tok.isNot(tok::r_square))\n // ...\n else {\n // C++17 does not allow the identifier-list in a structured binding\n // to be empty.\n if (Bindings.empty())\n Diag(Tok.getLocation(), diag::ext_decomp_decl_empty);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx1z-decomposition.cpp"]={"clang/test/SemaCXX/cxx1z-decomposition.cpp:12:9: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]","clang/test/SemaCXX/cxx1z-decomposition.cpp:14:9: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]","clang/test/SemaCXX/cxx1z-decomposition.cpp:17:9: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]","clang/test/SemaCXX/cxx1z-decomposition.cpp:162:9: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]","clang/test/SemaCXX/cxx1z-decomposition.cpp:196:13: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]"} | ["clang/test/SemaCXX/cxx1z-decomposition.cpp"]={"clang/test/SemaCXX/cxx1z-decomposition.cpp:12:9: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]","clang/test/SemaCXX/cxx1z-decomposition.cpp:14:9: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]","clang/test/SemaCXX/cxx1z-decomposition.cpp:17:9: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]","clang/test/SemaCXX/cxx1z-decomposition.cpp:162:9: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]","clang/test/SemaCXX/cxx1z-decomposition.cpp:196:13: warning: ISO C++17 does not allow a decomposition group to be empty [-Wempty-decomposition]"} | ||
} | } | ||
}, | }, | ||
["ext_decomp_decl_spec"]={ | ["ext_decomp_decl_spec"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="decomposition declaration declared %plural{1:\'%1\'|:with \'%1\' specifiers}0 is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="decomposition declaration declared (?:\'(.*?)\'|with \'(.*?)\' specifiers) is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={"13bf9892dc2a",1558554775,"Part of P1091R3: permit structured bindings to be declared \'static\' and\n\'thread_local\' in C++20.\n\nll...","Part of P1091R3: permit structured bindings to be declared \'static\' and\n\'thread_local\' in C++20.\n\nllvm-svn: 361424"}, | ||
[ | [g]={{t,813,"NamedDecl *Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n // ...\n {\n // ...\n if (!BadSpecifiers.empty()) {\n // ...\n } else if (!CPlusPlus20Specifiers.empty()) {\n auto &&Warn = Diag(CPlusPlus20SpecifierLocs.front(), getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_decomp_decl_spec : diag::ext_decomp_decl_spec);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGenCXX/cxx1z-decomposition.cpp"]={"clang/test/CodeGenCXX/cxx1z-decomposition.cpp:122:3: warning: decomposition declaration declared \'static\' is a C++20 extension [-Wc++20-extensions]","clang/test/CodeGenCXX/cxx1z-decomposition.cpp:138:3: warning: decomposition declaration declared \'static\' is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/CodeGenCXX/cxx1z-decomposition.cpp"]={"clang/test/CodeGenCXX/cxx1z-decomposition.cpp:122:3: warning: decomposition declaration declared \'static\' is a C++20 extension [-Wc++20-extensions]","clang/test/CodeGenCXX/cxx1z-decomposition.cpp:138:3: warning: decomposition declaration declared \'static\' is a C++20 extension [-Wc++20-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_default_init_const"]={ | ["ext_default_init_const"]={ | ||
[ | [j]={A,"microsoft-const-init"}, | ||
[i]="microsoft-const-init", | |||
[a]="default initialization of an object of const type %0%select{| without a user-provided default constructor}1 is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="default initialization of an object of const type (.*?)(?:| without a user\\-provided default constructor) is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-const\\-init[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"337d5aa58fc2",1429259558,"Move fixit for const init from note to diag, weaken to warning in MS mode.\n\nr235046 turned \"extern _...","Move fixit for const init from note to diag, weaken to warning in MS mode.\n\nr235046 turned \"extern __declspec(selectany) int a;\" from a declaration into\na definition to fix PR23242 (required for compatibility with mc.exe output).\nHowever, this broke parsing Windows headers: A d3d11 headers contain something\nlike\n\n struct SomeStruct {};\n extern const __declspec(selectany) SomeStruct some_struct;\n\nThis is now a definition, and const objects either need an explicit default\nctor or an initializer so this errors out with \n\n d3d11.h(1065,48) :\n error: default initialization of an object of const type\n \'const CD3D11_DEFAULT\' without a user-provided default constructor\n\n(cl.exe just doesn\'t implement this rule, independent of selectany.)\n\nTo work around this, weaken this error into a warning for selectany decls\nin microsoft mode, and recover with zero-initialization.\n\nDoing this is a bit hairy since it adds a fixit on an error emitted\nby InitializationSequence – this means it needs to build a correct AST, which\nin turn means InitializationSequence::Failed() cannot return true when this\nfixit is applied. As a workaround, the patch adds a fixit member to\nInitializationSequence, and InitializationSequence::Perform() prints the\ndiagnostic if the fixit member is set right after its call to Diagnose.\nThat function is usually called when InitializationSequences are used –\nInitListChecker::PerformEmptyInit() doesn\'t call it, but the InitListChecker\ncase never performs default-initialization, so this is technically OK.\n\nThis is the alternative, original fix for PR20208 that got reviewed in the\nthread \"[patch] Improve diagnostic on default-initializing const variables\n(PR20208)\". This change basically reverts r213725, adds the original fix for\nPR20208, and makes the error a warning in Microsoft mode.\n\nllvm-svn: 235166"}, | ||
[ | [g]={{N,8537,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n if (!ZeroInitializationFixit.empty()) {\n // ...\n // The initialization would have succeeded with this fixit. Since the fixit\n // is on the error, we need to build a valid AST in this case, so this isn\'t\n // handled in the Failed() branch above.\n if (!DestType->isRecordType() && VD && VD->isConstexpr()) {\n // ...\n } else {\n // ...\n if (S.getLangOpts().MSVCCompat && D && D->hasAttr<SelectAnyAttr>())\n DiagID = diag::ext_default_init_const;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/attr-selectany.cpp"]={"clang/test/SemaCXX/attr-selectany.cpp:48:47: warning: default initialization of an object of const type \'const SomeStruct\' without a user-provided default constructor is a Microsoft extension [-Wmicrosoft-const-init]"} | ["clang/test/SemaCXX/attr-selectany.cpp"]={"clang/test/SemaCXX/attr-selectany.cpp:48:47: warning: default initialization of an object of const type \'const SomeStruct\' without a user-provided default constructor is a Microsoft extension [-Wmicrosoft-const-init]"} | ||
} | } | ||
}, | }, | ||
["ext_defaulted_comparison"]={ | ["ext_defaulted_comparison"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="defaulted comparison operators are a C++20 extension", | |||
[b]=l, | |||
[ | [c]="defaulted comparison operators are a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={Vb,1567434909,Rb,Sb}, | ||
[ | [g]={{t,17884,"void Sema::SetDeclDefaulted(Decl *Dcl, SourceLocation DefaultLoc) {\n // ...\n // Issue compatibility warning. We already warned if the operator is\n // \'operator<=>\' when parsing the \'<=>\' token.\n if (DefKind.isComparison() && DefKind.asComparison() != DefaultedComparisonKind::ThreeWay) {\n Diag(DefaultLoc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_defaulted_comparison : diag::ext_defaulted_comparison);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/cxx17-compat.cpp"]={"clang/test/SemaCXX/cxx17-compat.cpp:93:56: warning: defaulted comparison operators are a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx17-compat.cpp:94:56: warning: defaulted comparison operators are a C++20 extension [-Wc++20-extensions]"} | ["clang/test/SemaCXX/cxx17-compat.cpp"]={"clang/test/SemaCXX/cxx17-compat.cpp:93:56: warning: defaulted comparison operators are a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx17-compat.cpp:94:56: warning: defaulted comparison operators are a C++20 extension [-Wc++20-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_defaulted_comparison_constexpr_mismatch"]={ | ["ext_defaulted_comparison_constexpr_mismatch"]={ | ||
[ | [j]={"c++23-default-comp-relaxed-constexpr",o}, | ||
[i]="c++23-default-comp-relaxed-constexpr", | |||
[a]="defaulted definition of %select{%select{<ERROR>|equality|three-way|equality|relational}1 comparison operator|three-way comparison operator}0 that is declared %select{constexpr|consteval}2 but%select{|for which the corresponding implicit \'operator==\' }0 invokes a non-constexpr comparison function is a C++23 extension", | |||
[b]=l, | |||
[c]="defaulted definition of (?:(?:equality|three\\-way|equality|relational) comparison operator|three\\-way comparison operator) that is declared (?:constexpr|consteval) but(?:|for which the corresponding implicit \'operator\\=\\=\' ) invokes a non\\-constexpr comparison function is a C\\+\\+23 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+23\\-default\\-comp\\-relaxed\\-constexpr[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{t,8968,"bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, DefaultedComparisonKind DCK) {\n // ...\n // C++2a [dcl.fct.def.default]p3 [P2002R0]:\n // An explicitly-defaulted function that is not defined as deleted may be\n // declared constexpr or consteval only if it is constexpr-compatible.\n // C++2a [class.compare.default]p3 [P2002R0]:\n // A defaulted comparison function is constexpr-compatible if it satisfies\n // the requirements for a constexpr function [...]\n // The only relevant requirements are that the parameter and return types are\n // literal types. The remaining conditions are checked by the analyzer.\n //\n // We support P2448R2 in language modes earlier than C++23 as an extension.\n // The concept of constexpr-compatible was removed.\n // C++23 [dcl.fct.def.default]p3 [P2448R2]\n // A function explicitly defaulted on its first declaration is implicitly\n // inline, and is implicitly constexpr if it is constexpr-suitable.\n // C++23 [dcl.constexpr]p3\n // A function is constexpr-suitable if\n // - it is not a coroutine, and\n // - if the function is a constructor or destructor, its class does not\n // have any virtual base classes.\n if (FD->isConstexpr()) {\n if (CheckConstexprReturnType(*this, FD, CheckConstexprKind::Diagnose) && CheckConstexprParameterTypes(*this, FD, CheckConstexprKind::Diagnose) && !Info.Constexpr) {\n Diag(FD->getBeginLoc(), getLangOpts().CPlusPlus23 ? diag::warn_cxx23_compat_defaulted_comparison_constexpr_mismatch : diag::ext_defaulted_comparison_constexpr_mismatch) << FD->isImplicit() << (int)DCK << FD->isConsteval();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/CXX/class/class.compare/class.compare.default/p4.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:87:3: warning: defaulted definition of three-way comparison operator that is declared constexpr butfor which the corresponding implicit \'operator==\' invokes a non-constexpr comparison function is a C++23 extension [-Wc++23-default-comp-relaxed-constexpr]","clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:153:5: warning: defaulted definition of equality comparison operator that is declared constexpr but invokes a non-constexpr comparison function is a C++23 extension [-Wc++23-default-comp-relaxed-constexpr]"} | ["clang/test/CXX/class/class.compare/class.compare.default/p4.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:87:3: warning: defaulted definition of three-way comparison operator that is declared constexpr butfor which the corresponding implicit \'operator==\' invokes a non-constexpr comparison function is a C++23 extension [-Wc++23-default-comp-relaxed-constexpr]","clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:153:5: warning: defaulted definition of equality comparison operator that is declared constexpr but invokes a non-constexpr comparison function is a C++23 extension [-Wc++23-default-comp-relaxed-constexpr]"} | ||
} | } | ||
}, | }, | ||
["ext_defaulted_deleted_function"]={ | ["ext_defaulted_deleted_function"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="%select{defaulted|deleted}0 function definitions are a C++11 extension", | |||
[b]=l, | |||
[ | [c]="(?:defaulted|deleted) function definitions are a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"54a6a68c706b",1447524968,"Merge some similar diagnostics using %select.\n\nllvm-svn: 253136","Merge some similar diagnostics using %select.\n\nllvm-svn: 253136"}, | ||
[ | [g]={{"clang/lib/Parse/ParseCXXInlineMethods.cpp",72,"/// ParseCXXInlineMethodDef - We parsed and verified that the specified\n/// Declarator is a well formed C++ inline method definition. Now lex its body\n/// and store its tokens for parsing after the C++ class is complete.\nNamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, const ParsedAttributesView &AccessAttrs, ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, const VirtSpecifiers &VS, SourceLocation PureSpecLoc) {\n // ...\n if (TryConsumeToken(tok::equal)) {\n // ...\n if (TryConsumeToken(tok::kw_delete, KWLoc)) {\n Diag(KWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_defaulted_deleted_function : diag::ext_defaulted_deleted_function) << 1 /* deleted */;"},{"clang/lib/Parse/ParseCXXInlineMethods.cpp",82,"/// ParseCXXInlineMethodDef - We parsed and verified that the specified\n/// Declarator is a well formed C++ inline method definition. Now lex its body\n/// and store its tokens for parsing after the C++ class is complete.\nNamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, const ParsedAttributesView &AccessAttrs, ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, const VirtSpecifiers &VS, SourceLocation PureSpecLoc) {\n // ...\n if (TryConsumeToken(tok::equal)) {\n // ...\n if (TryConsumeToken(tok::kw_delete, KWLoc)) {\n // ...\n } else if (TryConsumeToken(tok::kw_default, KWLoc)) {\n Diag(KWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_defaulted_deleted_function : diag::ext_defaulted_deleted_function) << 0 /* defaulted */;"},{ub,1368,"/// ParseFunctionDefinition - We parsed and verified that the specified\n/// Declarator is well formed. If this is a K&R-style function, read the\n/// parameters declaration-list, then start the compound-statement.\n///\n/// function-definition: [C99 6.9.1]\n/// decl-specs declarator declaration-list[opt] compound-statement\n/// [C90] function-definition: [C99 6.7.1] - implicit int result\n/// [C90] decl-specs[opt] declarator declaration-list[opt] compound-statement\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator ctor-initializer[opt]\n/// function-body\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator function-try-block\n///\nDecl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, LateParsedAttrList *LateParsedAttrs) {\n // ...\n if (TryConsumeToken(tok::equal)) {\n // ...\n if (TryConsumeToken(tok::kw_delete, KWLoc)) {\n Diag(KWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_defaulted_deleted_function : diag::ext_defaulted_deleted_function) << 1 /* deleted */;"},{ub,1374,"/// ParseFunctionDefinition - We parsed and verified that the specified\n/// Declarator is well formed. If this is a K&R-style function, read the\n/// parameters declaration-list, then start the compound-statement.\n///\n/// function-definition: [C99 6.9.1]\n/// decl-specs declarator declaration-list[opt] compound-statement\n/// [C90] function-definition: [C99 6.7.1] - implicit int result\n/// [C90] decl-specs[opt] declarator declaration-list[opt] compound-statement\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator ctor-initializer[opt]\n/// function-body\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator function-try-block\n///\nDecl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, LateParsedAttrList *LateParsedAttrs) {\n // ...\n if (TryConsumeToken(tok::equal)) {\n // ...\n if (TryConsumeToken(tok::kw_delete, KWLoc)) {\n // ...\n } else if (TryConsumeToken(tok::kw_default, KWLoc)) {\n Diag(KWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_defaulted_deleted_function : diag::ext_defaulted_deleted_function) << 0 /* defaulted */;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/aggregate-init-cxx98.cpp"]={"clang/test/SemaCXX/aggregate-init-cxx98.cpp:4:9: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]"} | ["clang/test/SemaCXX/aggregate-init-cxx98.cpp"]={"clang/test/SemaCXX/aggregate-init-cxx98.cpp:4:9: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]"} | ||
} | } | ||
}, | }, | ||
["ext_delete_void_ptr_operand"]={ | ["ext_delete_void_ptr_operand"]={ | ||
[ | [j]={"delete-incomplete"}, | ||
[i]="delete-incomplete", | |||
[a]="cannot delete expression with pointer-to-\'void\' type %0", | |||
[b]=l, | |||
[ | [c]="cannot delete expression with pointer\\-to\\-\'void\' type (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wdelete\\-incomplete[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"bb3348ed33ac",1274720516,"Downgrade deletion of a void* from an error (which is should be) to an\nextension warning (which othe...","Downgrade deletion of a void* from an error (which is should be) to an\nextension warning (which other compilers seem to use). Works around a\nknown bug in Xalan.\n\nllvm-svn: 104509"}, | ||
[ | [g]={{O,3686,"/// ActOnCXXDelete - Parsed a C++ \'delete\' expression (C++ 5.3.5), as in:\n/// @code ::delete ptr; @endcode\n/// or\n/// @code delete [] ptr; @endcode\nExprResult Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *ExE) {\n // ...\n if (!Ex.get()->isTypeDependent()) {\n // ...\n if (Pointee->isVoidType() && !isSFINAEContext()) {\n // ...\n Diag(StartLoc, diag::ext_delete_void_ptr_operand) << Type << Ex.get()->getSourceRange();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/new-delete.cpp"]={"clang/test/SemaCXX/new-delete.cpp:174:3: warning: cannot delete expression with pointer-to-\'void\' type \'void *\' [-Wdelete-incomplete]"} | ["clang/test/SemaCXX/new-delete.cpp"]={"clang/test/SemaCXX/new-delete.cpp:174:3: warning: cannot delete expression with pointer-to-\'void\' type \'void *\' [-Wdelete-incomplete]"} | ||
} | } | ||
}, | }, | ||
["ext_delimited_escape_sequence"]={ | ["ext_delimited_escape_sequence"]={ | ||
[ | [j]={"delimited-escape-sequence-extension",o}, | ||
[i]="delimited-escape-sequence-extension", | |||
[a]="%select{delimited|named}0 escape sequences are a %select{Clang|C++23}1 extension", | |||
[b]=l, | |||
[c]="(?:delimited|named) escape sequences are a (?:Clang|C\\+\\+23) extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wdelimited\\-escape\\-sequence\\-extension[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{T,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);"},{T,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);"},{X,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);"},{X,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_deprecated_string_literal_conversion"]={ | ||
[ | [j]={"writable-strings","write-strings"}, | ||
[i]="writable-strings", | |||
[a]="ISO C++11 does not allow conversion from string literal to %0", | |||
[b]=l, | |||
[ | [c]="ISO C\\+\\+11 does not allow conversion from string literal to (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wwritable\\-strings[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"1121de36c26b",1389992932,"Fix string-literal to char* conversion in overload resolution for C++11\n\nString literal to char* con...","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"}, | ||
[ | [g]={{O,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_designated_init"]={ | ||
[ | [j]={tb,Q,o}, | ||
[i]=tb, | |||
[a]="designated initializers are a C99 feature", | |||
[b]=l, | |||
[c]="designated initializers are a C99 feature", | |||
[ | [d]=Kc, | ||
[ | [e]=k, | ||
[ | [f]={"c124e59c90a3",1295194396,"Emit an extension diagnostic for C99 designated initializers that appear in C++ code\n\nllvm-svn: 1235...","Emit an extension diagnostic for C99 designated initializers that appear in C++ code\n\nllvm-svn: 123582"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | [nc]={"clang/test/Sema/c89.c:80:19: warning: designated initializers are a C99 feature [-Wc99-designator]"} | ||
[ | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_designated_init_array"]={ | ["ext_designated_init_array"]={ | ||
[ | [j]={tb,Q}, | ||
[i]=tb, | |||
[a]="array designators are a C99 extension", | |||
[b]=l, | |||
[ | [c]="array designators are a C99 extension", | ||
[ | [d]=Kc, | ||
[ | [e]=k, | ||
[ | [f]={Yb,1567205575,Zb,cc}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/eval-crashes.cpp"]={"clang/test/SemaCXX/eval-crashes.cpp:40:22: warning: array designators are a C99 extension [-Wc99-designator]"} | ["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"]={ | ["ext_designated_init_brace_elision"]={ | ||
[ | [j]={tb,Q}, | ||
[i]=tb, | |||
[a]="brace elision for designated initializer is a C99 extension", | |||
[b]=l, | |||
[ | [c]="brace elision for designated initializer is a C99 extension", | ||
[ | [d]=Kc, | ||
[ | [e]=k, | ||
[ | [f]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to ...","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"}, | ||
[ | [g]={{N,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()), \"}\");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_designated_init_mixed"]={ | ||
[ | [j]={tb,Q}, | ||
[i]=tb, | |||
[a]="mixture of designated and non-designated initializers in the same initializer list is a C99 extension", | |||
[b]=l, | |||
[ | [c]="mixture of designated and non\\-designated initializers in the same initializer list is a C99 extension", | ||
[ | [d]=Kc, | ||
[ | [e]=k, | ||
[ | [f]={Yb,1567205575,Zb,cc}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_designated_init_nested"]={ | ||
[ | [j]={tb,Q}, | ||
[i]=tb, | |||
[a]="nested designators are a C99 extension", | |||
[b]=l, | |||
[ | [c]="nested designators are a C99 extension", | ||
[ | [d]=Kc, | ||
[ | [e]=k, | ||
[ | [f]={Yb,1567205575,Zb,cc}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_designated_init_reordered"]={ | ||
[ | [j]={cb,mb,kb,"reorder","reorder-init-list"}, | ||
[i]="reorder-init-list", | |||
[a]="ISO C++ requires field designators to be specified in declaration order; field %1 will be initialized after field %0", | |||
[b]=l, | |||
[ | [c]="ISO C\\+\\+ requires field designators to be specified in declaration order; field (.*?) will be initialized after field (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wreorder\\-init\\-list[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Yb,1567205575,Zb,cc}, | ||
[ | [g]={{N,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_destructor_typedef_name"]={ | ||
[ | [j]={"dtor-typedef"}, | ||
[i]="dtor-typedef", | |||
[a]="destructor cannot be declared using a %select{typedef|type alias}1 %0 of the class name", | |||
[b]=K, | |||
[ | [c]="destructor cannot be declared using a (?:typedef|type alias) (.*?) of the class name", | ||
[ | [d]=" \\[[^\\]]*\\-Wdtor\\-typedef[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Oc,1576809732,Rc,Lc}, | ||
[ | [g]={{t,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());"},{t,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_dollar_in_identifier"]={ | ||
[ | [j]={"dollar-in-identifier-extension",o}, | ||
[i]="dollar-in-identifier-extension", | |||
[a]="\'$\' in identifier", | |||
[b]=l, | |||
[c]="\'\\$\' in identifier", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wdollar\\-in\\-identifier\\-extension[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{T,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);"},{T,3881,"LexStart:\n // ...\n case \'$\': // $ in identifiers.\n if (LangOpts.DollarIdents) {\n if (!isLexingRawMode())\n Diag(CurPtr - 1, diag::ext_dollar_in_identifier);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/c90.c"]={"clang/test/Preprocessor/c90.c:10:13: error: \'$\' in identifier [-Werror,-Wdollar-in-identifier-extension]"} | ["clang/test/Preprocessor/c90.c"]={"clang/test/Preprocessor/c90.c:10:13: error: \'$\' in identifier [-Werror,-Wdollar-in-identifier-extension]"} | ||
} | } | ||
}, | }, | ||
["ext_dtor_name_ambiguous"]={ | ["ext_dtor_name_ambiguous"]={ | ||
[ | [j]={ic,o}, | ||
[i]=ic, | |||
[a]="ISO C++ considers this destructor name lookup to be ambiguous", | |||
[b]=l, | |||
[c]="ISO C\\+\\+ considers this destructor name lookup to be ambiguous", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wdtor\\-name[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Jc,1576908663,Cc,Dc}, | ||
[ | [g]={{O,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"]={ | ["ext_dtor_named_in_wrong_scope"]={ | ||
[ | [j]={ic,o}, | ||
[i]=ic, | |||
[a]="ISO C++ requires the name after \'::~\' to be found in the same scope as the name before \'::~\'", | |||
[b]=l, | |||
[c]="ISO C\\+\\+ requires the name after \'\\:\\:~\' to be found in the same scope as the name before \'\\:\\:~\'", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wdtor\\-name[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Oc,1576809732,Rc,Lc}, | ||
[ | [g]={{O,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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_duplicate_declspec"]={ | ||
[ | [j]={"duplicate-decl-specifier",o}, | ||
[i]="duplicate-decl-specifier", | |||
[a]="duplicate \'%0\' declaration specifier", | |||
[b]=l, | |||
[c]="duplicate \'(.*?)\' declaration specifier", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wduplicate\\-decl\\-specifier[^\\]]*\\]", | ||
[ | [e]=m, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{B,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)"},{M,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\";"},{M,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\";"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/MicrosoftExtensions.c"]={"clang/test/Parser/MicrosoftExtensions.c:25:20: warning: duplicate \'__forceinline\' declaration specifier [-Wduplicate-decl-specifier]"} | ["clang/test/Parser/MicrosoftExtensions.c"]={"clang/test/Parser/MicrosoftExtensions.c:25:20: warning: duplicate \'__forceinline\' declaration specifier [-Wduplicate-decl-specifier]"} | ||
} | } | ||
}, | }, | ||
["ext_dynamic_exception_spec"]={ | ["ext_dynamic_exception_spec"]={ | ||
[ | [j]={"dynamic-exception-spec"}, | ||
[i]="dynamic-exception-spec", | |||
[a]="ISO C++17 does not allow dynamic exception specifications", | |||
[b]=K, | |||
[ | [c]="ISO C\\+\\+17 does not allow dynamic exception specifications", | ||
[ | [d]=" \\[[^\\]]*\\-Wdynamic\\-exception\\-spec[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"82da19ddb327",1481165347,"[c++1z] P0003R5: Removing dynamic exception specifications.\n\nWe continue to support dynamic exceptio...","[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"}, | ||
[ | [g]={{F,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_elaborated_enum_class"]={ | ||
[ | [j]={"elaborated-enum-class"}, | ||
[i]="elaborated-enum-class", | |||
[a]="reference to enumeration must use \'enum\' not \'enum %select{struct|class}0\'", | |||
[b]=K, | |||
[ | [c]="reference to enumeration must use \'enum\' not \'enum (?:struct|class)\'", | ||
[ | [d]=" \\[[^\\]]*\\-Welaborated\\-enum\\-class[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"d6425e2c1437",1589141691,"Properly implement \'enum class\' parsing.\n\nThe \'class\' or \'struct\' keyword is only permitted as part ...","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."}, | ||
[ | [g]={{B,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ellipsis_exception_spec"]={ | ||
[ | [j]={A,Cb,o}, | ||
[i]=Cb, | |||
[a]="exception specification of \'...\' is a Microsoft extension", | |||
[b]=l, | |||
[c]="exception specification of \'\\.\\.\\.\' is a Microsoft extension", | |||
[ | [d]=Ec, | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{F,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"]={ | ["ext_embedded_directive"]={ | ||
[ | [j]={"embedded-directive",o}, | ||
[i]="embedded-directive", | |||
[a]="embedding a directive within macro arguments has undefined behavior", | |||
[b]=l, | |||
[c]="embedding a directive within macro arguments has undefined behavior", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wembedded\\-directive[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_empty_character"]={ | ||
[ | [j]={"invalid-pp-token"}, | ||
[i]="invalid-pp-token", | |||
[a]="empty character constant", | |||
[b]=l, | |||
[ | [c]="empty character constant", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Winvalid\\-pp\\-token[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"608c0b65d785",1340869916,"Add warning flag -Winvalid-pp-token for preprocessing-tokens which have\nundefined behaviour, and mov...","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"}, | ||
[ | [g]={{T,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_empty_fnmacro_arg"]={ | ||
[ | [j]={Q,o}, | ||
[i]=Q, | |||
[a]="empty macro arguments are a C99 feature", | |||
[b]=l, | |||
[c]="empty macro arguments are a C99 feature", | |||
[ | [d]=zb, | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_empty_struct_union"]={ | ||
[ | [j]={E,Ac,o}, | ||
[i]=Ac, | |||
[a]="empty %select{struct|union}0 is a GNU extension", | |||
[b]=l, | |||
[c]="empty (?:struct|union) is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-empty\\-struct[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_empty_translation_unit"]={ | ||
[ | [j]={"empty-translation-unit",o}, | ||
[i]="empty-translation-unit", | |||
[a]="ISO C requires a translation unit to contain at least one declaration", | |||
[b]=l, | |||
[c]="ISO C requires a translation unit to contain at least one declaration", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wempty\\-translation\\-unit[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"ccf43ca05cb1",1339003521,"Add pedantic warning -Wempty-translation-unit (C11 6.9p1).\n\nIn standard C since C89, a \'translation-...","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"}, | ||
[ | [g]={{ub,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_enum_base_in_type_specifier"]={ | ||
[ | [j]={"elaborated-enum-base"}, | ||
[i]="elaborated-enum-base", | |||
[a]="non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration%select{|; missing list of enumerators?}0", | |||
[b]=K, | |||
[ | [c]="non\\-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration(?:|; missing list of enumerators\\?)", | ||
[ | [d]=" \\[[^\\]]*\\-Welaborated\\-enum\\-base[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"c90e19810743",1588991058,"Fix parsing of enum-base to follow C++11 rules.\n\nPreviously we implemented non-standard disambiguati...","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."}, | ||
[ | [g]={{B,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_enum_friend"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="befriending enumeration type %0 is a C++11 extension", | |||
[b]=l, | |||
[ | [c]="befriending enumeration type (.*?) is a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:\n - When instantiating a friend type template, per...","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"}, | ||
[ | [g]={{t,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_enum_too_large"]={ | ||
[ | [j]={"enum-too-large"}, | ||
[i]="enum-too-large", | |||
[a]="enumeration values exceed range of largest integer", | |||
[b]=l, | |||
[ | [c]="enumeration values exceed range of largest integer", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wenum\\-too\\-large[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"faf156ad158b",1394060098,"Tests for DR370-380.\n\nAlso promote a couple of Warnings on ill-formed code found by this testing to\n...","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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/enum.c"]={"clang/test/Sema/enum.c:17:6: warning: enumeration values exceed range of largest integer [-Wenum-too-large]"} | ["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"]={ | ["ext_enum_value_not_int"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="ISO C restricts enumerator values to range of \'int\' (%0 is too %select{small|large}1)", | |||
[b]=l, | |||
[c]="ISO C restricts enumerator values to range of \'int\' \\((.*?) is too (?:small|large)\\)", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_enumerator_increment_too_large"]={ | ||
[ | [j]={"enum-too-large"}, | ||
[i]="enum-too-large", | |||
[a]="incremented enumerator value %0 is not representable in the largest integer type", | |||
[b]=l, | |||
[ | [c]="incremented enumerator value (.*?) is not representable in the largest integer type", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wenum\\-too\\-large[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"faf156ad158b",1394060098,"Tests for DR370-380.\n\nAlso promote a couple of Warnings on ill-formed code found by this testing to\n...","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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_enumerator_list_comma_c"]={ | ||
[ | [j]={Q,o}, | ||
[i]=Q, | |||
[a]="commas at the end of enumerator lists are a C99-specific feature", | |||
[b]=l, | |||
[c]="commas at the end of enumerator lists are a C99\\-specific feature", | |||
[ | [d]=zb, | ||
[ | [e]=q, | ||
[ | [f]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace\nscope to -Wc++11-exten...","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"}, | ||
[ | [g]={{B,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"]={ | ["ext_enumerator_list_comma_cxx"]={ | ||
[ | [j]={L,y,o}, | ||
[i]=y, | |||
[a]="commas at the end of enumerator lists are a C++11 extension", | |||
[b]=l, | |||
[c]="commas at the end of enumerator lists are a C\\+\\+11 extension", | |||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace\nscope to -Wc++11-exten...","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"}, | ||
[ | [g]={{B,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_enumerator_too_large"]={ | ||
[ | [j]={A,"microsoft-enum-value",o}, | ||
[i]="microsoft-enum-value", | |||
[a]="enumerator value is not representable in the underlying type %0", | |||
[b]=l, | |||
[c]="enumerator value is not representable in the underlying type (.*?)", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-enum\\-value[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"a310806ae57f",1287414073,"Microsoft enum extensions. 2 things will change on -fms-extensions:\n1. enum underlying type is int b...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_equals_this_lambda_capture_cxx20"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="explicit capture of \'this\' with a capture default of \'=\' is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="explicit capture of \'this\' with a capture default of \'\\=\' is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]="Lambda Issue", | ||
[ | [f]={"8194a3e975e5",1503114187,"[c++2a] Implement P0409R2 - Allow lambda capture [=,this] (by hamzasood)\n\nThis patch, 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"}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_equivalent_internal_linkage_decl_in_modules"]={ | ||
[ | [j]={"modules-ambiguous-internal-linkage"}, | ||
[i]="modules-ambiguous-internal-linkage", | |||
[a]="ambiguous use of internal linkage declaration %0 defined in multiple modules", | |||
[b]=l, | |||
[ | [c]="ambiguous use of internal linkage declaration (.*?) defined in multiple modules", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmodules\\-ambiguous\\-internal\\-linkage[^\\]]*\\]", | ||
[ | [e]=Qc, | ||
[ | [f]={"2dbe4043e8f5",1446665192,"[modules] Generalize the workaround for multiple ambiguous definitions of\ninternal linkage entities ...","[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"}, | ||
[ | [g]={{Db,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_excess_initializers"]={ | ||
[ | [j]={Ib}, | ||
[i]=Ib, | |||
[a]="excess elements in %select{array|vector|scalar|union|struct}0 initializer", | |||
[b]=l, | |||
[ | [c]="excess elements in (?:array|vector|scalar|union|struct) initializer", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wexcess\\-initializers[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{N,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_excess_initializers_for_sizeless_type"]={ | ||
[ | [j]={Ib}, | ||
[i]=Ib, | |||
[a]="excess elements in initializer for indivisible sizeless type %0", | |||
[b]=l, | |||
[ | [c]="excess elements in initializer for indivisible sizeless type (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wexcess\\-initializers[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Jc,1576908663,Cc,Dc}, | ||
[ | [g]={{N,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_excess_initializers_in_char_array_initializer"]={ | ||
[ | [j]={Ib}, | ||
[i]=Ib, | |||
[a]="excess elements in char array initializer", | |||
[b]=l, | |||
[ | [c]="excess elements in char array initializer", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wexcess\\-initializers[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{N,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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]"} | ||
} | } | ||
Line 5,504: | Line 4,389: | ||
["ext_expected_semi_decl_list"]={ | ["ext_expected_semi_decl_list"]={ | ||
[a]="expected \';\' at end of declaration list", | [a]="expected \';\' at end of declaration list", | ||
[ | [b]=l, | ||
[ | [c]="expected \';\' at end of declaration list", | ||
[d]=Fb, | |||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{B,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);"}}, | ||
[h]={ | |||
[Mb]={"clang/test/Parser/declarators.c:76:8: warning: expected \';\' at end of declaration list"} | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_explicit_bool"]={ | ["ext_explicit_bool"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="explicit(bool) is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="explicit\\(bool\\) is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=q, | ||
[ | [f]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\n...","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"}, | ||
[ | [g]={{B,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_explicit_conversion_functions"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="explicit conversion functions are a C++11 extension", | |||
[b]=l, | |||
[ | [c]="explicit conversion functions are a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"0bf8a492fd75",1318970984,"-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.\n\nllvm-svn: 142419","-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.\n\nllvm-svn: 142419"}, | ||
[ | [g]={{t,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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_explicit_instantiation_duplicate"]={ | ||
[ | [j]={A,W}, | ||
[i]=W, | |||
[a]="duplicate explicit instantiation of %0 ignored as a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="duplicate explicit instantiation of (.*?) ignored as a Microsoft extension", | ||
[ | [d]=Bb, | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{z,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_explicit_instantiation_without_qualified_id"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="qualifier in explicit instantiation of %q0 requires a template-id (a typedef is not permitted)", | |||
[b]=l, | |||
[c]="qualifier in explicit instantiation of (.*?) requires a template\\-id \\(a typedef is not permitted\\)", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={"010815a20b7a",1276705607,"Downgrade the error when using a typedef in the nested-name-specifier\nof an explicit instantiation t...","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"}, | ||
[ | [g]={{z,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();"},{z,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();"},{z,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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]"} | ||
} | } | ||
Line 5,588: | Line 4,457: | ||
["ext_explicit_specialization_storage_class"]={ | ["ext_explicit_specialization_storage_class"]={ | ||
[a]="explicit specialization cannot have a storage class", | [a]="explicit specialization cannot have a storage class", | ||
[ | [b]=l, | ||
[ | [c]="explicit specialization cannot have a storage class", | ||
[d]=Fb, | |||
[ | [e]=k, | ||
[ | [f]={"c976f01d3f9e",1308282095,"Downgrade the error complaining about presence of a storage class\nspecifier on an explicit specializ...","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"}, | ||
[ | [g]={{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());"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["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"} | ["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"]={ | ["ext_expr_not_ice"]={ | ||
[ | [j]={E,dc,o}, | ||
[i]=dc, | |||
[a]="expression is not an %select{integer|integral}0 constant expression; folding it to a constant is a GNU extension", | |||
[b]=l, | |||
[c]="expression is not an (?:integer|integral) constant expression; folding it to a constant is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-folding\\-constant[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{r,17861,"Sema::SemaDiagnosticBuilder Sema::VerifyICEDiagnoser::diagnoseFold(Sema &S, SourceLocation Loc) { return S.Diag(Loc, diag::ext_expr_not_ice) << S.LangOpts.CPlusPlus; }"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_extern_template"]={ | ||
[ | [j]={L,y,o}, | ||
[i]=y, | |||
[a]="extern templates are a C++11 extension", | |||
[b]=l, | |||
[c]="extern templates are a C\\+\\+11 extension", | |||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"f411196d15a9",1319135758,"\'extern template\' is a C++11 feature. Add an Extension for C++98 (this matches\ngcc\'s behaviour), and...","\'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"}, | ||
[ | [g]={{ub,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_extra_semi"]={ | ||
[ | [j]={"extra-semi",o}, | ||
[i]="extra-semi", | |||
[a]="extra \';\' %select{outside of a function|inside a %1|inside instance variable list|after member function definition}0", | |||
[b]=l, | |||
[c]="extra \';\' (?:outside of a function|inside a (.*?)|inside instance variable list|after member function definition)", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wextra\\-semi[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"2f7dc46a5868",1337195099,"Move the warnings for extra semi-colons under -Wextra-semi. Also, added\na warning for an extra semi...","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"}, | ||
[ | [g]={{ub,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));"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/objc-quirks.m"]={"clang/test/Parser/objc-quirks.m:9:2: warning: extra \';\' outside of a function [-Wextra-semi]"} | ["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"]={ | ["ext_extra_semi_cxx11"]={ | ||
[ | [j]={L,y,"c++11-extra-semi","extra-semi",o}, | ||
[i]="c++11-extra-semi", | |||
[a]="extra \';\' outside of a function is a C++11 extension", | |||
[b]=l, | |||
[c]="extra \';\' outside of a function is a C\\+\\+11 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-extra\\-semi[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"87f5dc53b23e",1343022325,"Add diagnostics for comma at end of enum and for extra semicolon at namespace\nscope to -Wc++11-exten...","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"}, | ||
[ | [g]={{ub,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));"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_flexible_array_empty_aggregate_gnu"]={ | ||
[ | [j]={E,Ac,o}, | ||
[i]=Ac, | |||
[a]="flexible array member %0 in otherwise empty %select{struct|interface|union|class|enum}1 is a GNU extension", | |||
[b]=l, | |||
[c]="flexible array member (.*?) in otherwise empty (?:struct|interface|union|class|enum) is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-empty\\-struct[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays.\nIt will accept flexible array in union and also as...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_flexible_array_empty_aggregate_ms"]={ | ||
[ | [j]={A,"microsoft-flexible-array",o}, | ||
[i]="microsoft-flexible-array", | |||
[a]="flexible array member %0 in otherwise empty %select{struct|interface|union|class|enum}1 is a Microsoft extension", | |||
[b]=l, | |||
[c]="flexible array member (.*?) in otherwise empty (?:struct|interface|union|class|enum) is a Microsoft extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-flexible\\-array[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays.\nIt will accept flexible array in union and also as...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_flexible_array_in_array"]={ | ||
[ | [j]={"flexible-array-extensions",o}, | ||
[i]="flexible-array-extensions", | |||
[a]="%0 may not be used as an array element due to flexible array member", | |||
[b]=l, | |||
[c]="(.*?) may not be used as an array element due to flexible array member", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wflexible\\-array\\-extensions[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{M,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_flexible_array_in_struct"]={ | ||
[ | [j]={"flexible-array-extensions",o}, | ||
[i]="flexible-array-extensions", | |||
[a]="%0 may not be nested in a struct due to flexible array member", | |||
[b]=l, | |||
[c]="(.*?) may not be nested in a struct due to flexible array member", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wflexible\\-array\\-extensions[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_flexible_array_init"]={ | ||
[ | [j]={E,"gnu-flexible-array-initializer",o}, | ||
[i]="gnu-flexible-array-initializer", | |||
[a]="flexible array initialization is a GNU extension", | |||
[b]=l, | |||
[c]="flexible array initialization is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-flexible\\-array\\-initializer[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"07d8e3a50047",1237509176,"Allow flexible array initializers that are not surrounded by\nbraces. We now build the appropriate fu...","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"}, | ||
[ | [g]={{N,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;"},{N,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;"},{N,2125,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n // ...\n return FlexArrayDiag != diag::ext_flexible_array_init;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_flexible_array_union_gnu"]={ | ||
[ | [j]={E,"gnu-flexible-array-union-member",o}, | ||
[i]="gnu-flexible-array-union-member", | |||
[a]="flexible array member %0 in a union is a GNU extension", | |||
[b]=l, | |||
[c]="flexible array member (.*?) in a union is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-flexible\\-array\\-union\\-member[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays.\nIt will accept flexible array in union and also as...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_flexible_array_union_ms"]={ | ||
[ | [j]={A,"microsoft-flexible-array",o}, | ||
[i]="microsoft-flexible-array", | |||
[a]="flexible array member %0 in a union is a Microsoft extension", | |||
[b]=l, | |||
[c]="flexible array member (.*?) in a union is a Microsoft extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-flexible\\-array[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"7e25a95600fe",1299528244,"g++ is more permissive regarding flexible arrays.\nIt will accept flexible array in union and also as...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_fold_expression"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="pack fold expression is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="pack fold expression is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"0f0af19b0581",1415423236,"[c++1z] N4295: fold-expressions.\n\nThis is a new form of expression of the form:\n\n (expr op ... op e...","[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"}, | ||
[ | [g]={{nb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_for_range"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="range-based for loop is a C++11 extension", | |||
[b]=l, | |||
[ | [c]="range\\-based for loop is a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"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"}, | ||
[ | [g]={{sb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_for_range_begin_end_types_differ"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="\'begin\' and \'end\' returning different types (%0 and %1) is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="\'begin\' and \'end\' returning different types \\((.*?) and (.*?)\\) is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=k, | ||
[ | [f]={"01694c340db8",1458470020,"P0184R0: Allow types of \'begin\' and \'end\' expressions in range-based for loops to differ.\n\nllvm-svn:...","P0184R0: Allow types of \'begin\' and \'end\' expressions in range-based for loops to differ.\n\nllvm-svn: 263895"}, | ||
[ | [g]={{Gb,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_for_range_init_stmt"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="range-based for loop initialization statements are a C++20 extension", | |||
[b]=l, | |||
[ | [c]="range\\-based for loop initialization statements are a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=q, | ||
[ | [f]={"8baa50013c86",1538160249,"[cxx2a] P0614R1: Support init-statements in range-based for loops.\n\nWe don\'t yet support this for th...","[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"}, | ||
[ | [g]={{sb,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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_forward_ref_enum"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="ISO C forbids forward references to \'enum\' types", | |||
[b]=l, | |||
[c]="ISO C forbids forward references to \'enum\' types", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_forward_ref_enum_def"]={ | ||
[ | [j]={E,"gnu-redeclared-enum",o}, | ||
[i]="gnu-redeclared-enum", | |||
[a]="redeclaration of already-defined enum %0 is a GNU extension", | |||
[b]=l, | |||
[c]="redeclaration of already\\-defined enum (.*?) is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-redeclared\\-enum[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"c9ea2d5a672b",1277216795,"In C++, allow a declaration of an enum to follow a definition of that\nenum as a GNU extension.\n\nllvm...","In C++, allow a declaration of an enum to follow a definition of that\nenum as a GNU extension.\n\nllvm-svn: 106540"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_found_in_dependent_base"]={ | ||
[ | [j]={A,W}, | ||
[i]=W, | |||
[a]="use of member %0 found via unqualified lookup into dependent bases of class templates is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="use of member (.*?) found via unqualified lookup into dependent bases of class templates is a Microsoft extension", | ||
[ | [d]=Bb, | ||
[ | [e]=k, | ||
[ | [f]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to ...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_found_later_in_class"]={ | ||
[ | [j]={A,W}, | ||
[i]=W, | |||
[a]="use of member %0 before its declaration is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="use of member (.*?) before its declaration is a Microsoft extension", | ||
[ | [d]=Bb, | ||
[ | [e]=k, | ||
[ | [f]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to ...","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"}, | ||
[ | [g]={{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"]={ | ["ext_freestanding_complex"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="complex numbers are an extension in a freestanding C99 implementation", | |||
[b]=l, | |||
[c]="complex numbers are an extension in a freestanding C99 implementation", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{M,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_friend_tag_redecl_outside_namespace"]={ | ||
[ | [j]={A,"microsoft-unqualified-friend"}, | ||
[i]="microsoft-unqualified-friend", | |||
[a]="unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier", | |||
[b]=l, | |||
[ | [c]="unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-unqualified\\-friend[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"0902a51bafc7",1405035892,"MSVC compat: Allow lookup of friend types in enclosing namespaces\n\nThe relevant portion of C++ stand...","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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_generalized_initializer_lists"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="generalized initializer lists are a C++11 extension", | |||
[b]=l, | |||
[ | [c]="generalized initializer lists are a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"e9e27d95db1d",1299885044,"Implement a hack intended to allow Clang to parse libstdc++ 4.5\'s\nheaders, which use C++0x generaliz...","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"}, | ||
[ | [g]={{sb,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_generic_with_type_arg"]={ | ||
[ | [j]={"generic-type-extension",o}, | ||
[i]="generic-type-extension", | |||
[a]="passing a type argument as the first operand to \'_Generic\' is a Clang extension", | |||
[b]=l, | |||
[c]="passing a type argument as the first operand to \'_Generic\' is a Clang extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgeneric\\-type\\-extension[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"ef9ec4bbcca2",1677810915,"[OpenMP] Add the `ompx_attribute` clause for target directives\n\nCUDA and HIP have kernel attributes ...","[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"}, | ||
[ | [g]={{nb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_address_of_label"]={ | ||
[ | [j]={E,"gnu-label-as-value",o}, | ||
[i]="gnu-label-as-value", | |||
[a]="use of GNU address-of-label extension", | |||
[b]=l, | |||
[c]="use of GNU address\\-of\\-label extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-label\\-as\\-value[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{nb,1462,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::ampamp: { // unary-expression: \'&&\' identifier\n // ...\n Diag(AmpAmpLoc, diag::ext_gnu_address_of_label);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_anonymous_struct"]={ | ||
[ | [j]={E,"gnu-anonymous-struct",o}, | ||
[i]="gnu-anonymous-struct", | |||
[a]="anonymous structs are a GNU extension", | |||
[b]=l, | |||
[c]="anonymous structs are a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-anonymous\\-struct[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"b64a1fa65ca1",1328284024,"Don\'t warn about anonymous struct/union in C11.\n\nAlso, in C, call this a C11 extension rather than a...","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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_array_range"]={ | ||
[ | [j]={E,wc,o}, | ||
[i]=wc, | |||
[a]="use of GNU array range extension", | |||
[b]=l, | |||
[c]="use of GNU array range extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-designator[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{Sc,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"]={ | ["ext_gnu_case_range"]={ | ||
[ | [j]={E,"gnu-case-range",o}, | ||
[i]="gnu-case-range", | |||
[a]="use of GNU case range extension", | |||
[b]=l, | |||
[c]="use of GNU case range extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-case\\-range[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{sb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/gnu-flags.c"]={"clang/test/Sema/gnu-flags.c:50:11: warning: use of GNU case range extension [-Wgnu-case-range]"} | ["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"]={ | ["ext_gnu_conditional_expr"]={ | ||
[ | [j]={E,"gnu-conditional-omitted-operand",o}, | ||
[i]="gnu-conditional-omitted-operand", | |||
[a]="use of GNU ?: conditional expression extension, omitting middle operand", | |||
[b]=l, | |||
[c]="use of GNU \\?\\: conditional expression extension, omitting middle operand", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-conditional\\-omitted\\-operand[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{nb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_indirect_goto"]={ | ||
[ | [j]={E,"gnu-label-as-value",o}, | ||
[i]="gnu-label-as-value", | |||
[a]="use of GNU indirect-goto extension", | |||
[b]=l, | |||
[c]="use of GNU indirect\\-goto extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-label\\-as\\-value[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{sb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_missing_equal_designator"]={ | ||
[ | [j]={E,wc}, | ||
[i]=wc, | |||
[a]="use of GNU \'missing =\' extension in designator", | |||
[b]=l, | |||
[ | [c]="use of GNU \'missing \\=\' extension in designator", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-designator[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{Sc,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);"},{Sc,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(), \"= \");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/designator.c"]={"clang/test/Parser/designator.c:4:6: warning: use of GNU \'missing =\' extension in designator [-Wgnu-designator]"} | ["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"]={ | ["ext_gnu_old_style_field_designator"]={ | ||
[ | [j]={E,wc}, | ||
[i]=wc, | |||
[a]="use of GNU old-style field designator extension", | |||
[b]=l, | |||
[ | [c]="use of GNU old\\-style field designator extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-designator[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{Sc,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_ptr_func_arith"]={ | ||
[ | [j]={E,xc,o,Wb}, | ||
[i]=xc, | |||
[a]="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]=l, | |||
[c]="arithmetic on(?: a|) pointer(?:|s) to(?: the|) function type(?:|s) (.*?)(?:| and (.*?)) is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-pointer\\-arith[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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 */"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_statement_expr"]={ | ||
[ | [j]={E,"gnu-statement-expression",o}, | ||
[i]="gnu-statement-expression", | |||
[a]="use of GNU statement expression extension", | |||
[b]=l, | |||
[c]="use of GNU statement expression extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-statement\\-expression[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{nb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_statement_expr_macro"]={ | ||
[ | [j]={E,"gnu-statement-expression","gnu-statement-expression-from-macro-expansion",o}, | ||
[i]="gnu-statement-expression-from-macro-expansion", | |||
[a]="use of GNU statement expression extension from macro expansion", | |||
[b]=l, | |||
[c]="use of GNU statement expression extension from macro expansion", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-statement\\-expression\\-from\\-macro\\-expansion[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"7689c7fc9e08",1653629944,"Create specialization of -Wgnu-statement-expression for expressions found in macros.\n\n-Wgnu-statemen...","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"}, | ||
[ | [g]={{nb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_subscript_void_type"]={ | ||
[ | [j]={E,xc,o,Wb}, | ||
[i]=xc, | |||
[a]="subscript of a pointer to void is a GNU extension", | |||
[b]=l, | |||
[c]="subscript of a pointer to void is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-pointer\\-arith[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"4cc3f296a907",1309192347,"Cleanup a fixme by using a specific diagnostic for subscripting\na pointer to void.\n\nllvm-svn: 133912","Cleanup a fixme by using a specific diagnostic for subscripting\na pointer to void.\n\nllvm-svn: 133912"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_gnu_void_ptr"]={ | ||
[ | [j]={E,xc,o,Wb}, | ||
[i]=xc, | |||
[a]="arithmetic on%select{ a|}0 pointer%select{|s}0 to void is a GNU extension", | |||
[b]=l, | |||
[c]="arithmetic on(?: a|) pointer(?:|s) to void is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-pointer\\-arith[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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(); }"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_goto_into_protected_scope"]={ | ||
[ | [j]={A,"microsoft-goto"}, | ||
[i]="microsoft-goto", | |||
[a]="jump from this goto statement to its label is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="jump from this goto statement to its label is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-goto[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_hex_constant_invalid"]={ | ||
[ | [j]={Q,o}, | ||
[i]=Q, | |||
[a]="hexadecimal floating constants are a C99 feature", | |||
[b]=l, | |||
[c]="hexadecimal floating constants are a C99 feature", | |||
[ | [d]=zb, | ||
[ | [e]=u, | ||
[ | [f]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17.\n\nllvm-svn: 262753","Update diagnostics now that hexadecimal literals look likely to be part of C++17.\n\nllvm-svn: 262753"}, | ||
[ | [g]={{X,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_hex_literal_invalid"]={ | ||
[ | [j]={G,ab,o}, | ||
[i]=G, | |||
[a]="hexadecimal floating literals are a C++17 feature", | |||
[b]=l, | |||
[c]="hexadecimal floating literals are a C\\+\\+17 feature", | |||
[ | [d]=bb, | ||
[ | [e]=u, | ||
[ | [f]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17.\n\nllvm-svn: 262753","Update diagnostics now that hexadecimal literals look likely to be part of C++17.\n\nllvm-svn: 262753"}, | ||
[ | [g]={{X,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_hlsl_access_specifiers"]={ | ||
[ | [j]={"hlsl-extensions"}, | ||
[i]="hlsl-extensions", | |||
[a]="access specifiers are a clang HLSL extension", | |||
[b]=l, | |||
[ | [c]="access specifiers are a clang HLSL extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Whlsl\\-extensions[^\\]]*\\]", | ||
[ | [e]=m, | ||
[ | [f]={"0d6b574b8717",1651158800,"[HLSL] Adjust access specifier behavior\n\nHLSL doesn\'t support access specifiers. This change has two...","[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"}, | ||
[ | [g]={{F,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);"},{F,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ident_list_in_param"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="type-less parameter names in function declaration", | |||
[b]=l, | |||
[c]="type\\-less parameter names in function declaration", | |||
[ | [d]=R, | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{B,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"]={ | ["ext_imaginary_constant"]={ | ||
[ | [j]={E,"gnu-imaginary-constant",o}, | ||
[i]="gnu-imaginary-constant", | |||
[a]="imaginary constants are a GNU extension", | |||
[b]=l, | |||
[c]="imaginary constants are a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-imaginary\\-constant[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/exprs.c"]={"clang/test/Sema/exprs.c:43:10: warning: imaginary constants are a GNU extension [-Wgnu-imaginary-constant]"} | ["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"]={ | ["ext_implicit_exception_spec_mismatch"]={ | ||
[ | [j]={"implicit-exception-spec-mismatch"}, | ||
[i]="implicit-exception-spec-mismatch", | |||
[a]="function previously declared with an %select{explicit|implicit}0 exception specification redeclared with an %select{implicit|explicit}0 exception specification", | |||
[b]=l, | |||
[ | [c]="function previously declared with an (?:explicit|implicit) exception specification redeclared with an (?:implicit|explicit) exception specification", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wimplicit\\-exception\\-spec\\-mismatch[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"66f3ac9d2197",1350721611,"Rework implementation of DR1492: Apply the resolution to operator delete too,\nsince it also has an i...","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"}, | ||
[ | [g]={{xb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_implicit_function_decl_c99"]={ | ||
[ | [j]={cb,mb,Ic,rc,kb}, | ||
[i]=rc, | |||
[a]="call to undeclared function %0; ISO C99 and later do not support implicit function declarations", | |||
[b]=K, | |||
[ | [c]="call to undeclared function (.*?); ISO C99 and later do not support implicit function declarations", | ||
[ | [d]=" \\[[^\\]]*\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/cla...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_implicit_lib_function_decl"]={ | ||
[ | [j]={cb,mb,Ic,rc,kb}, | ||
[i]=rc, | |||
[a]="implicitly declaring library function \'%0\' with type %1", | |||
[b]=l, | |||
[ | [c]="implicitly declaring library function \'(.*?)\' with type (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_implicit_lib_function_decl_c99"]={ | ||
[ | [j]={cb,mb,Ic,rc,kb}, | ||
[i]=rc, | |||
[a]="call to undeclared library function \'%0\' with type %1; ISO C99 and later do not support implicit function declarations", | |||
[b]=K, | |||
[ | [c]="call to undeclared library function \'(.*?)\' with type (.*?); ISO C99 and later do not support implicit function declarations", | ||
[ | [d]=" \\[[^\\]]*\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/cla...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_implicit_typename"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="missing \'typename\' prior to dependent type name %0%1; implicit \'typename\' is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="missing \'typename\' prior to dependent type name (.*?)(.*?); implicit \'typename\' is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{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 \");"},{z,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 \");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_in_class_initializer_float_type"]={ | ||
[ | [j]={E,"gnu-static-float-init","static-float-init"}, | ||
[i]="gnu-static-float-init", | |||
[a]="in-class initializer for static data member of type %0 is a GNU extension", | |||
[b]=l, | |||
[ | [c]="in\\-class initializer for static data member of type (.*?) is a GNU extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-static\\-float\\-init[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"db76892e72e4",1284160882,"Support in-class initialization of static const floating-point data members.\n\nllvm-svn: 113663","Support in-class initialization of static const floating-point data members.\n\nllvm-svn: 113663"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_in_class_initializer_float_type_cxx11"]={ | ||
[ | [j]={"static-float-init"}, | ||
[i]="static-float-init", | |||
[a]="in-class initializer for static data member of type %0 requires \'constexpr\' specifier", | |||
[b]=K, | |||
[ | [c]="in\\-class initializer for static data member of type (.*?) requires \'constexpr\' specifier", | ||
[ | [d]=" \\[[^\\]]*\\-Wstatic\\-float\\-init[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"cf656385ea2d",1359087736,"Sync \'in class initialization of static const double\' extension up with GCC,\nand split it out of -Wg...","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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_in_class_initializer_non_constant"]={ | ||
[ | [j]={E,dc,o}, | ||
[i]=dc, | |||
[a]="in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension", | |||
[b]=l, | |||
[c]="in\\-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-folding\\-constant[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"9925ec8bf446",1308030389,"fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member\nas an extension.\n\nllv...","fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member\nas an extension.\n\nllvm-svn: 132980"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_incomplete_in_exception_spec"]={ | ||
[ | [j]={A,Cb}, | ||
[i]=Cb, | |||
[a]="%select{|pointer to |reference to }0incomplete type %1 is not allowed in exception specification", | |||
[b]=l, | |||
[ | [c]="(?:|pointer to |reference to )incomplete type (.*?) is not allowed in exception specification", | ||
[ | [d]=Ec, | ||
[ | [e]=k, | ||
[ | [f]={"b2b0da4ad08d",1465583081,"[-fms-extensions] Permit incomplete types in dynamic exception specifications\n\nMicrosoft headers, co...","[-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"}, | ||
[ | [g]={{xb,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_increment_bool"]={ | ||
[ | [j]={"increment-bool"}, | ||
[i]="increment-bool", | |||
[a]="ISO C++17 does not allow incrementing expression of type bool", | |||
[b]=K, | |||
[ | [c]="ISO C\\+\\+17 does not allow incrementing expression of type bool", | ||
[ | [d]=" \\[[^\\]]*\\-Wincrement\\-bool[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"4a0cd893257d",1448504197,"P0002R1: increment on expressions of type bool is no longer allowed in C++1z.\n\nllvm-svn: 254122","P0002R1: increment on expressions of type bool is no longer allowed in C++1z.\n\nllvm-svn: 254122"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_init_capture"]={ | ||
[ | [j]={db,Eb}, | ||
[i]=db, | |||
[a]="initialized lambda captures are a C++14 extension", | |||
[b]=l, | |||
[ | [c]="initialized lambda captures are a C\\+\\+14 extension", | ||
[ | [d]=Ob, | ||
[ | [e]="Lambda Issue", | ||
[ | [f]={"5b013f505068",1380346707,"Add compat/extension warnings for init captures.\n\nllvm-svn: 191609","Add compat/extension warnings for init captures.\n\nllvm-svn: 191609"}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_init_capture_pack"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="initialized lambda pack captures are a C++20 extension", | |||
[b]=l, | |||
[ | [c]="initialized lambda pack captures are a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]="Lambda Issue", | ||
[ | [f]={"b2997f579a8b",1558469450,"[c++20] P0780R2: Support pack-expansion of init-captures.\n\nThis permits an init-capture to introduce...","[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"}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_init_from_predefined"]={ | ||
[ | [j]={A,"microsoft-init-from-predefined"}, | ||
[i]="microsoft-init-from-predefined", | |||
[a]="initializing an array from a \'%0\' predefined identifier is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="initializing an array from a \'(.*?)\' predefined identifier is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-init\\-from\\-predefined[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{N,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_init_list_constant_narrowing"]={ | ||
[ | [j]={mc,"c++0x-narrowing",Qb,Xb,Kb,"narrowing"}, | ||
[i]=Kb, | |||
[a]="constant expression evaluates to %0 which cannot be narrowed to type %1", | |||
[b]=K, | |||
[ | [c]="constant expression evaluates to (.*?) which cannot be narrowed to type (.*?)", | ||
[ | [d]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow 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"}, | ||
[ | [g]={{N,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_init_list_type_narrowing"]={ | ||
[ | [j]={mc,"c++0x-narrowing",Qb,Xb,Kb,"narrowing"}, | ||
[i]=Kb, | |||
[a]="type %0 cannot be narrowed to %1 in initializer list", | |||
[b]=K, | |||
[ | [c]="type (.*?) cannot be narrowed to (.*?) in initializer list", | ||
[ | [d]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow 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"}, | ||
[ | [g]={{N,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_init_list_variable_narrowing"]={ | ||
[ | [j]={mc,"c++0x-narrowing",Qb,Xb,Kb,"narrowing"}, | ||
[i]=Kb, | |||
[a]="non-constant-expression cannot be narrowed from type %0 to %1 in initializer list", | |||
[b]=K, | |||
[ | [c]="non\\-constant\\-expression cannot be narrowed from type (.*?) to (.*?) in initializer list", | ||
[ | [d]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow 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"}, | ||
[ | [g]={{N,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_init_statement"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="\'%select{if|switch}0\' initialization statements are a C++17 extension", | |||
[b]=l, | |||
[ | [c]="\'(?:if|switch)\' initialization statements are a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"fccb5128b201",1476822436,"Add missing warning for use of C++1z init-statements in C++14 and before.\n\nllvm-svn: 284530","Add missing warning for use of C++1z init-statements in C++14 and before.\n\nllvm-svn: 284530"}, | ||
[ | [g]={{rb,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); };"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_initializer_overrides"]={ | ||
[ | [j]={m,cb,"extra","initializer-overrides","override-init"}, | ||
[i]="initializer-overrides", | |||
[a]="initializer %select{partially |}0overrides prior initialization of this subobject", | |||
[b]=l, | |||
[ | [c]="initializer (?:partially |)overrides prior initialization of this subobject", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Winitializer\\-overrides[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Yb,1567205575,Zb,cc}, | ||
[ | [g]={{N,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"]={ | ["ext_initializer_string_for_char_array_too_long"]={ | ||
[ | [j]={Ib}, | ||
[i]=Ib, | |||
[a]="initializer-string for char array is too long", | |||
[b]=l, | |||
[ | [c]="initializer\\-string for char array is too long", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wexcess\\-initializers[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{N,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGen/globalinit.c"]={"clang/test/CodeGen/globalinit.c:20:19: warning: initializer-string for char array is too long [-Wexcess-initializers]"} | ["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"]={ | ["ext_initializer_union_overrides"]={ | ||
[ | [j]={m,cb,"extra","initializer-overrides","override-init"}, | ||
[i]="initializer-overrides", | |||
[a]="initializer %select{partially |}0overrides prior initialization of this subobject", | |||
[b]=K, | |||
[ | [c]="initializer (?:partially |)overrides prior initialization of this subobject", | ||
[ | [d]=" \\[[^\\]]*\\-Winitializer\\-overrides[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{N,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_inline_namespace"]={ | ||
[ | [j]={L,y,"c++11-inline-namespace"}, | ||
[i]="c++11-inline-namespace", | |||
[a]="inline namespaces are a C++11 feature", | |||
[b]=l, | |||
[ | [c]="inline namespaces are a C\\+\\+11 feature", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-inline\\-namespace[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"5a5f2c76b6f7",1283215005,"Enable inline namespaces in C++03 as an extension.\n\nllvm-svn: 112566","Enable inline namespaces in C++03 as an extension.\n\nllvm-svn: 112566"}, | ||
[ | [g]={{F,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_inline_nested_namespace_definition"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="inline nested namespace definition is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="inline nested namespace definition is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=q, | ||
[ | [f]={"53f391dcb323",1542043188,"Implement P1094R2 (nested inline namespaces)\n\nAs approved for the Working Paper in San Diego, suppor...","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"}, | ||
[ | [g]={{F,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);"},{F,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_inline_variable"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="inline variables are a C++17 extension", | |||
[b]=l, | |||
[ | [c]="inline variables are a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=k, | ||
[ | [f]={"62f19e700d31",1466813756,"Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a\nvariable weak discardable...","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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_integer_complement_complex"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="ISO C does not support \'~\' for complex conjugation of %0", | |||
[b]=l, | |||
[c]="ISO C does not support \'~\' for complex conjugation of (.*?)", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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"]={ | ["ext_integer_complex"]={ | ||
[ | [j]={E,"gnu-complex-integer",o}, | ||
[i]="gnu-complex-integer", | |||
[a]="complex integer types are a GNU extension", | |||
[b]=l, | |||
[c]="complex integer types are a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-complex\\-integer[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{hc,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_integer_increment_complex"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="ISO C does not support \'++\'/\'--\' on complex integer type %0", | |||
[b]=l, | |||
[c]="ISO C does not support \'\\+\\+\'\\/\'\\-\\-\' on complex integer type (.*?)", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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"]={ | ["ext_integer_literal_too_large_for_signed"]={ | ||
[ | [j]={"implicitly-unsigned-literal"}, | ||
[i]="implicitly-unsigned-literal", | |||
[a]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", | |||
[b]=l, | |||
[ | [c]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wimplicitly\\-unsigned\\-literal[^\\]]*\\]", | ||
[ | [e]=m, | ||
[ | [f]={"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"}, | ||
[ | [g]={{fc,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_internal_in_extern_inline"]={ | ||
[ | [j]={"static-in-inline"}, | ||
[i]="static-in-inline", | |||
[a]="static %select{function|variable}0 %1 is used in an inline function with external linkage", | |||
[b]=l, | |||
[ | [c]="static (?:function|variable) (.*?) is used in an inline function with external linkage", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wstatic\\-in\\-inline[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"edff0200115c",1340041798,"Allow internal decls in inline functions if the function is in the main file.\n\nThis handles the very...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_internal_in_extern_inline_quiet"]={ | ||
[ | [j]={o,"static-in-inline"}, | ||
[i]="static-in-inline", | |||
[a]="static %select{function|variable}0 %1 is used in an inline function with external linkage", | |||
[b]=l, | |||
[c]="static (?:function|variable) (.*?) is used in an inline function with external linkage", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wstatic\\-in\\-inline[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{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"]={ | ["ext_keyword_as_ident"]={ | ||
[ | [j]={"keyword-compat"}, | ||
[i]="keyword-compat", | |||
[a]="keyword \'%0\' will be made available as an identifier %select{here|for the remainder of the translation unit}1", | |||
[b]=l, | |||
[ | [c]="keyword \'(.*?)\' will be made available as an identifier (?:here|for the remainder of the translation unit)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wkeyword\\-compat[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"47642d2b7ea1",1386051181,"Emit an extension warning when changing system header tokens\n\nclang converts keywords to identifiers...","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"}, | ||
[ | [g]={{nb,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;"},{rb,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;"},{ub,1915,"bool Parser::TryKeywordIdentFallback(bool DisableKeyword) {\n // ...\n Diag(Tok, diag::ext_keyword_as_ident) << PP.getSpelling(Tok) << DisableKeyword;"},{sb,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_lambda_missing_parens"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="lambda without a parameter clause is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="lambda without a parameter clause is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{rb,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(), \"() \");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_lambda_template_parameter_list"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="explicit template parameter list for lambdas is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="explicit template parameter list for lambdas is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=q, | ||
[ | [f]={"8205a814a691",1556966986,"[c++20] Implement P0428R2 - Familiar template syntax for generic lambdas\n\nDifferential Revision: htt...","[c++20] Implement P0428R2 - Familiar template syntax for generic lambdas\n\nDifferential Revision: https://reviews.llvm.org/D36527\n\nllvm-svn: 359967"}, | ||
[ | [g]={{rb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_line_comment"]={ | ||
[ | [j]={cb,mb,ac,"comments",kb,o}, | ||
[i]=ac, | |||
[a]="// comments are not allowed in this language", | |||
[b]=l, | |||
[c]="\\/\\/ comments are not allowed in this language", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wcomment[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/\n\nllvm-svn: 167690","s/BCPLComment/LineComment/\n\nllvm-svn: 167690"}, | ||
[ | [g]={{T,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:12:1: error: // comments are not allowed in this language [-Werror,-Wcomment]"} | ["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"]={ | ["ext_main_returns_nonint"]={ | ||
[ | [j]={"main-return-type"}, | ||
[i]="main-return-type", | |||
[a]="return type of \'main\' is not \'int\'", | |||
[b]=l, | |||
[ | [c]="return type of \'main\' is not \'int\'", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmain\\-return\\-type[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"5ed3caf2e364",1329249052,"Warn about non-int main() results in GNU C mode instead of erroring.\n\nBased on a patch by Vasiliy Ko...","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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/gnu89.c"]={"clang/test/Sema/gnu89.c:5:1: warning: return type of \'main\' is not \'int\' [-Wmain-return-type]"} | ["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"]={ | ["ext_main_used"]={ | ||
[ | [j]={tc,o}, | ||
[i]=tc, | |||
[a]="ISO C++ does not allow \'main\' to be used by a program", | |||
[b]=l, | |||
[c]="ISO C\\+\\+ does not allow \'main\' to be used by a program", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"b63b6ee9a00e",1390354999,"Enforce restrictions that \'main\' is not allowed to be deleted, or to be used by\nthe program, in C++....","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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_many_braces_around_init"]={ | ||
[ | [j]={"many-braces-around-scalar-init"}, | ||
[i]="many-braces-around-scalar-init", | |||
[a]="too many braces around %select{scalar |}0initializer", | |||
[b]=l, | |||
[ | [c]="too many braces around (?:scalar |)initializer", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmany\\-braces\\-around\\-scalar\\-init[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Jc,1576908663,Cc,Dc}, | ||
[ | [g]={{N,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_mathematical_notation"]={ | ||
[ | [j]={"mathematical-notation-identifier-extension"}, | ||
[i]="mathematical-notation-identifier-extension", | |||
[a]="mathematical notation character <U+%0> in an identifier is a Clang extension", | |||
[b]=l, | |||
[ | [c]="mathematical notation character \\<U\\+(.*?)\\> in an identifier is a Clang extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmathematical\\-notation\\-identifier\\-extension[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{T,1556,"static void diagnoseExtensionInIdentifier(DiagnosticsEngine &Diags, uint32_t C, CharSourceRange Range) {\n // ...\n Diags.Report(Range.getBegin(), diag::ext_mathematical_notation) << codepointAsHexString(C) << Range;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_member_redeclared"]={ | ||
[ | [j]={E,"redeclared-class-member"}, | ||
[i]="redeclared-class-member", | |||
[a]="class member cannot be redeclared", | |||
[b]=l, | |||
[ | [c]="class member cannot be redeclared", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wredeclared\\-class\\-member[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"55890bfaa6c2",1370922683,"Implement DR85: Redeclaration of member is forbidden\n\nDisallow the existence of a declaration of a m...","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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/access.cpp"]={"clang/test/SemaCXX/access.cpp:32:11: warning: class member cannot be redeclared [-Wredeclared-class-member]"} | ["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"]={ | ["ext_mismatched_exception_spec"]={ | ||
[ | [j]={A,Cb}, | ||
[i]=Cb, | |||
[a]="exception specification in declaration does not match previous declaration", | |||
[b]=l, | |||
[ | [c]="exception specification in declaration does not match previous declaration", | ||
[ | [d]=Ec, | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{xb,314,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat) {\n DiagID = diag::ext_mismatched_exception_spec;"},{xb,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_mismatched_exception_spec_explicit_instantiation"]={ | ||
[ | [j]={A,Cb}, | ||
[i]=Cb, | |||
[a]="exception specification in explicit instantiation does not match instantiated one", | |||
[b]=l, | |||
[ | [c]="exception specification in explicit instantiation does not match instantiated one", | ||
[ | [d]=Ec, | ||
[ | [e]=k, | ||
[ | [f]={"73983918c45b",1415268650,"Fix for exception specification mismatch in explicit instantiation.\nAccording to C++ standard if an ...","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"}, | ||
[ | [g]={{z,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"]={ | ["ext_missing_exception_specification"]={ | ||
[ | [j]={"missing-exception-spec"}, | ||
[i]="missing-exception-spec", | |||
[a]="%0 is missing exception specification \'%1\'", | |||
[b]=l, | |||
[ | [c]="(.*?) is missing exception specification \'(.*?)\'", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmissing\\-exception\\-spec[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"a91de375f278",1443574130,"Promote a warning on ill-formed code (redeclaration missing an exception\nspecification) to an error....","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"}, | ||
[ | [g]={{xb,401,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n DiagID = diag::ext_missing_exception_specification;"},{xb,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;"},{xb,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_missing_type_specifier"]={ | ||
[ | [j]={cb,mb,Ic,"implicit-int",kb}, | ||
[i]="implicit-int", | |||
[a]="type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int", | |||
[b]=K, | |||
[ | [c]="type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int", | ||
[ | [d]=" \\[[^\\]]*\\-Wimplicit\\-int[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"aef810900a7a",1244031721,"Minor cleanup for implicit int warnings.\n\nllvm-svn: 72770","Minor cleanup for implicit int warnings.\n\nllvm-svn: 72770"}, | ||
[ | [g]={{M,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\");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_missing_varargs_arg"]={ | ||
[ | [j]={E,"gnu-zero-variadic-macro-arguments",o}, | ||
[i]="gnu-zero-variadic-macro-arguments", | |||
[a]="must specify at least one argument for \'...\' parameter of variadic macro", | |||
[b]=l, | |||
[c]="must specify at least one argument for \'\\.\\.\\.\' parameter of variadic macro", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-variadic\\-macro\\-arguments[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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]"} | ||
} | } | ||
Line 7,062: | Line 5,635: | ||
["ext_missing_whitespace_after_macro_name"]={ | ["ext_missing_whitespace_after_macro_name"]={ | ||
[a]="whitespace required after macro name", | [a]="whitespace required after macro name", | ||
[ | [b]=l, | ||
[ | [c]="whitespace required after macro name", | ||
[d]=Fb, | |||
[ | [e]=u, | ||
[ | [f]={"2425bcb49ae4",1240021405,"enforce requirements imposed by C90 6.8 TC1, fixing PR3919.\n\nllvm-svn: 69415","enforce requirements imposed by C90 6.8 TC1, fixing PR3919.\n\nllvm-svn: 69415"}, | ||
[ | [g]={{P,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);"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/c90.c"]={"clang/test/Preprocessor/c90.c:7:12: warning: whitespace required after macro name"} | ["clang/test/Preprocessor/c90.c"]={"clang/test/Preprocessor/c90.c:7:12: warning: whitespace required after macro name"} | ||
} | } | ||
}, | }, | ||
["ext_mixed_decls_code"]={ | ["ext_mixed_decls_code"]={ | ||
[ | [j]={"declaration-after-statement",o}, | ||
[i]="declaration-after-statement", | |||
[a]="mixing declarations and code is a C99 extension", | |||
[b]=l, | |||
[c]="mixing declarations and code is a C99 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wdeclaration\\-after\\-statement[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{Gb,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;"}}, | ||
[ | [h]={ | ||
[ | [nc]={"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"]={ | ["ext_module_import_in_extern_c"]={ | ||
[ | [j]={"module-import-in-extern-c"}, | ||
[i]="module-import-in-extern-c", | |||
[a]="import of C++ module \'%0\' appears within extern \"C\" language linkage specification", | |||
[b]=K, | |||
[ | [c]="import of C\\+\\+ module \'(.*?)\' appears within extern \"C\" language linkage specification", | ||
[ | [d]=" \\[[^\\]]*\\-Wmodule\\-import\\-in\\-extern\\-c[^\\]]*\\]", | ||
[ | [e]=Qc, | ||
[ | [f]={"e69bdd10ead6",1444696780,"[modules] Allow the error on importing a C++ module within an extern \"C\"\ncontext (but otherwise at t...","[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"}, | ||
[ | [g]={{"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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_module_import_not_at_top_level_noop"]={ | ||
[ | [j]={"modules-import-nested-redundant"}, | ||
[i]="modules-import-nested-redundant", | |||
[a]="redundant #include of module \'%0\' appears within %1", | |||
[b]=K, | |||
[ | [c]="redundant \\#include of module \'(.*?)\' appears within (.*?)", | ||
[ | [d]=" \\[[^\\]]*\\-Wmodules\\-import\\-nested\\-redundant[^\\]]*\\]", | ||
[ | [e]=Qc, | ||
[ | [f]={"752ada870d7b",1447803121,"[modules] When a #include is mapped to a module import and appears somewhere\nother than the top leve...","[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"}, | ||
[ | [g]={{"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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_abstract_keyword"]={ | ||
[ | [j]={A,"microsoft-abstract"}, | ||
[i]="microsoft-abstract", | |||
[a]="\'abstract\' keyword is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="\'abstract\' keyword is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-abstract[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{F,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);"},{F,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);"}}, | ||
[ | [h]={ | ||
[ | [Nc]={"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"]={ | ["ext_ms_ambiguous_direct_base"]={ | ||
[ | [j]={"microsoft-inaccessible-base"}, | ||
[i]="microsoft-inaccessible-base", | |||
[a]="accessing inaccessible direct base %0 of %1 is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="accessing inaccessible direct base (.*?) of (.*?) is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-inaccessible\\-base[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"2e87a21c7cac",1509144521,"[MS] Allow access to ambiguous, inaccessible direct bases\n\nSummary:\nClang typically warns that in th...","[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"}, | ||
[ | [g]={{t,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_anonymous_record"]={ | ||
[ | [j]={A,"microsoft-anon-tag"}, | ||
[i]="microsoft-anon-tag", | |||
[a]="anonymous %select{structs|unions}0 are a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="anonymous (?:structs|unions) are a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-anon\\-tag[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"8f0ed914902f",1407742194,"Sema: Handle declspecs without declarators in records properly in C mode\n\nWe had two bugs:\n- We woul...","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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_c_enum_fixed_underlying_type"]={ | ||
[ | [j]={A,"microsoft-fixed-enum",o}, | ||
[i]="microsoft-fixed-enum", | |||
[a]="enumeration types with a fixed underlying type are a Microsoft extension", | |||
[b]=l, | |||
[c]="enumeration types with a fixed underlying type are a Microsoft extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-fixed\\-enum[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"6f11db137034",1538166298,"Support enums with a fixed underlying type in all language modes.\n\nPreviously we supported these in ...","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"}, | ||
[ | [g]={{B,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_cast_fn_obj"]={ | ||
[ | [j]={A,"microsoft-cast"}, | ||
[i]="microsoft-cast", | |||
[a]="static_cast between pointer-to-function and pointer-to-object is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="static_cast between pointer\\-to\\-function and pointer\\-to\\-object is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-cast[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"85bd1206796d",1433283312,"[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr\n\nThe MSVC 2013 and 2015 implem...","[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"}, | ||
[ | [g]={{wb,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_delayed_template_argument"]={ | ||
[ | [j]={A,W}, | ||
[i]=W, | |||
[a]="using the undeclared type %0 as a default template argument is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="using the undeclared type (.*?) as a default template argument is a Microsoft extension", | ||
[ | [d]=Bb, | ||
[ | [e]=k, | ||
[ | [f]={"df6e4a06e42b",1402094196,"Delay lookup of simple default template arguments under -fms-compatibility\n\nMSVC delays parsing of d...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_deref_template_argument"]={ | ||
[ | [j]={A,W}, | ||
[i]=W, | |||
[a]="non-type template argument containing a dereference operation is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="non\\-type template argument containing a dereference operation is a Microsoft extension", | ||
[ | [d]=Bb, | ||
[ | [e]=k, | ||
[ | [f]={"da45a0fa6f72",1377236539,"arc commit didn\'t add this because it wasn\'t in the patch...\n\nllvm-svn: 189088","arc commit didn\'t add this because it wasn\'t in the patch...\n\nllvm-svn: 189088"}, | ||
[ | [g]={{z,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();"}}, | ||
[ | [h]={ | ||
[ | [gc]={"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"]={ | ["ext_ms_explicit_constructor_call"]={ | ||
[ | [j]={A,"microsoft-explicit-constructor-call"}, | ||
[i]="microsoft-explicit-constructor-call", | |||
[a]="explicit constructor calls are a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="explicit constructor calls are a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-explicit\\-constructor\\-call[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"64225794119e",1295327079,"Add support for explicit constructor calls in Microsoft mode.\nFor example: \n\nclass A{ \npublic:\n A& ...","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"}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | [gc]={"clang/test/Parser/MicrosoftExtensions.cpp:180:25: warning: explicit constructor calls are a Microsoft extension [-Wmicrosoft-explicit-constructor-call]"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_ms_forward_ref_enum"]={ | ["ext_ms_forward_ref_enum"]={ | ||
[ | [j]={A,"microsoft-enum-forward-reference"}, | ||
[i]="microsoft-enum-forward-reference", | |||
[a]="forward references to \'enum\' types are a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="forward references to \'enum\' types are a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-enum\\-forward\\-reference[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"488b4a7d943b",1284268015,"Add basic support for Microsoft enum forward declaration. \nAssigning an underlying integral type to ...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_impcast_fn_obj"]={ | ||
[ | [j]={A,"microsoft-cast"}, | ||
[i]="microsoft-cast", | |||
[a]="implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="implicit conversion between pointer\\-to\\-function and pointer\\-to\\-object is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-cast[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"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"}, | ||
[ | [g]={{Db,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_reserved_user_defined_literal"]={ | ||
[ | [j]={"reserved-user-defined-literal"}, | ||
[i]="reserved-user-defined-literal", | |||
[a]="invalid suffix on literal; C++11 requires a space between literal and identifier", | |||
[b]=l, | |||
[ | [c]="invalid suffix on literal; C\\+\\+11 requires a space between literal and identifier", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wreserved\\-user\\-defined\\-literal[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"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"}, | ||
[ | [g]={{T,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"]={ | ["ext_ms_sealed_keyword"]={ | ||
[ | [j]={A,"microsoft-sealed"}, | ||
[i]="microsoft-sealed", | |||
[a]="\'sealed\' keyword is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="\'sealed\' keyword is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-sealed[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"a543308ce556",1382056411,"[-fms-extensions] Permit \'override\' in C++98 and \'sealed\' as a synonym for \'final\'\n\nSummary: Some MS...","[-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"}, | ||
[ | [g]={{F,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);"},{F,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);"}}, | ||
[ | [h]={ | ||
[ | [Nc]={"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"]={ | ["ext_ms_static_assert"]={ | ||
[ | [j]={A,"microsoft-static-assert"}, | ||
[i]="microsoft-static-assert", | |||
[a]="use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="use of \'static_assert\' without inclusion of \\<assert\\.h\\> is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-static\\-assert[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{F,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\");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_template_spec_redecl_out_of_scope"]={ | ||
[ | [j]={A,W}, | ||
[i]=W, | |||
[a]="%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", | |||
[b]=l, | |||
[ | [c]="(?: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", | ||
[ | [d]=Bb, | ||
[ | [e]=k, | ||
[ | [f]={"0068cb249965",1426836106,"[MSVC] Explicit specializations can be declared in any namespace (fix for http://llvm.org/PR13738)\n\n...","[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"}, | ||
[ | [g]={{z,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_template_type_arg_missing_typename"]={ | ||
[ | [j]={A,W}, | ||
[i]=W, | |||
[a]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", | ||
[ | [d]=Bb, | ||
[ | [e]=k, | ||
[ | [f]={"377c1592f8d3",1402442988,"Recover from missing typenames on template args for MSVC compatibility\n\nWhile matching a non-type te...","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"}, | ||
[ | [g]={{z,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 \");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ms_using_declaration_inaccessible"]={ | ||
[ | [j]={A,"microsoft-using-decl"}, | ||
[i]="microsoft-using-decl", | |||
[a]="using declaration referring to inaccessible member \'%0\' (which refers to accessible member \'%1\') is a Microsoft compatibility extension", | |||
[b]=l, | |||
[ | [c]="using declaration referring to inaccessible member \'(.*?)\' \\(which refers to accessible member \'(.*?)\'\\) is a Microsoft compatibility extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-using\\-decl[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"e434590bd90d",1325195853,"Change the diagnostics which said \'accepted as an extension\' to instead say\n\'is an extension\'. The f...","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"}, | ||
[ | [g]={{yc,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_multi_line_line_comment"]={ | ||
[ | [j]={cb,mb,ac,"comments",kb,o}, | ||
[i]=ac, | |||
[a]="multi-line // comment", | |||
[b]=l, | |||
[c]="multi\\-line \\/\\/ comment", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wcomment[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/\n\nllvm-svn: 167690","s/BCPLComment/LineComment/\n\nllvm-svn: 167690"}, | ||
[ | [g]={{T,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"]={ | ["ext_multi_using_declaration"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="use of multiple declarators in a single using declaration is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="use of multiple declarators in a single using declaration is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"6f1daa4660ed",1481849928,"[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration.\n\nllvm-svn: 289905","[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration.\n\nllvm-svn: 289905"}, | ||
[ | [g]={{F,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_mutable_reference"]={ | ||
[ | [j]={A,"microsoft-mutable-reference"}, | ||
[i]="microsoft-mutable-reference", | |||
[a]="\'mutable\' on a reference type is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="\'mutable\' on a reference type is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-mutable\\-reference[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"8f01bb983c2a",1423025132,"[MSVC2012] Allow \'mutable\' references\nSome standard header files from MSVC2012 use \'mutable\' on refe...","[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"}, | ||
[ | [g]={{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) {"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_named_variadic_macro"]={ | ||
[ | [j]={o,zc}, | ||
[i]=zc, | |||
[a]="named variadic macros are a GNU extension", | |||
[b]=l, | |||
[c]="named variadic macros are a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,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"]={ | ["ext_nested_name_member_ref_lookup_ambiguous"]={ | ||
[ | [j]={"ambiguous-member-template"}, | ||
[i]="ambiguous-member-template", | |||
[a]="lookup of %0 in member access expression is ambiguous; using member of %1", | |||
[b]=l, | |||
[ | [c]="lookup of (.*?) in member access expression is ambiguous; using member of (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wambiguous\\-member\\-template[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"2f96e9f5c90d",1275701997,"Add an extension to avoid an error when a global template has the same name as\na member template, an...","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"}, | ||
[ | [g]={{z,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_nested_name_spec_is_enum"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="use of enumeration in a nested name specifier is a C++11 extension", | |||
[b]=l, | |||
[ | [c]="use of enumeration in a nested name specifier is a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"25a8afa9579e",1421611475,"Handle unscoped enumeration in nested name specifier.\n\nIf an unscoped enum is used as a nested name ...","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"}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_nested_namespace_definition"]={ | ||
[a]="nested namespace definition is a C++17 extension; define each namespace separately | [j]={G,ab}, | ||
[ | [i]=G, | ||
[a]="nested namespace definition is a C++17 extension; define each namespace separately", | |||
[b]=l, | |||
[c]="nested namespace definition is a C\\+\\+17 extension; define each namespace separately", | |||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"13307f5f2429",1415425054,"[c++1z] Implement nested-namespace-definitions.\n\nThis allows \'namespace A::B { ... }\' as a shorthand...","[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"}, | ||
[g]={{F,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);"},{F,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);"}}, | |||
[h]={ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_nested_pointer_qualifier_mismatch"]={ | ||
[ | [j]={Fc,"incompatible-pointer-types-discards-qualifiers"}, | ||
[i]="incompatible-pointer-types-discards-qualifiers", | |||
[a]="%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]=l, | |||
[ | [c]="(?:(?: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", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types\\-discards\\-qualifiers[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"b98dade25bc9",1257804997,"Changed error for nested type qualifier mismatch to\nwarning, to match gcc. It used to be warning, so...","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"}, | ||
[ | [g]={{wb,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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]"} | ||
} | } | ||
Line 7,531: | Line 6,016: | ||
["ext_new_paren_array_nonconst"]={ | ["ext_new_paren_array_nonconst"]={ | ||
[a]="when type is in parentheses, array cannot have dynamic size", | [a]="when type is in parentheses, array cannot have dynamic size", | ||
[ | [b]=l, | ||
[ | [c]="when type is in parentheses, array cannot have dynamic size", | ||
[d]=Fb, | |||
[ | [e]=k, | ||
[ | [f]={"f2753b3b4efb",1279036472,"Downgrade the \"when type is in parentheses, array cannot have dynamic\nsize\" error for code like \n\n ...","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"}, | ||
[ | [g]={{O,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());"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["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"} | ["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"]={ | ["ext_no_declarators"]={ | ||
[ | [j]={vc}, | ||
[i]=vc, | |||
[a]="declaration does not declare anything", | |||
[b]=l, | |||
[ | [c]="declaration does not declare anything", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"f19ac0ede900",1270762403,"Downgrade the \"declaration does not declare anything\" error to a\nwarning. It\'s not harmful to have s...","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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | [Mb]={"clang/test/Parser/declarators.c:116:3: warning: declaration does not declare anything [-Wmissing-declarations]"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_no_named_members_in_struct_union"]={ | ["ext_no_named_members_in_struct_union"]={ | ||
[ | [j]={E,Ac,o}, | ||
[i]=Ac, | |||
[a]="%select{struct|union}0 without named members is a GNU extension", | |||
[b]=l, | |||
[c]="(?:struct|union) without named members is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-empty\\-struct[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"89578fd43981",1370698198,"Recognition of empty structures and unions is moved to semantic stage\n\nDifferential Revision: http:/...","Recognition of empty structures and unions is moved to semantic stage\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D586\n\nllvm-svn: 183609"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | [Mb]={"clang/test/Parser/declarators.c:114:1: warning: struct without named members is a GNU extension [-Wgnu-empty-struct]"} | ||
[ | |||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_no_newline_eof"]={ | ["ext_no_newline_eof"]={ | ||
[ | [j]={"newline-eof",o}, | ||
[i]="newline-eof", | |||
[a]="no newline at end of file", | |||
[b]=l, | |||
[c]="no newline at end of file", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wnewline\\-eof[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{T,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"]={ | ["ext_non_c_like_anon_struct_in_typedef"]={ | ||
[ | [j]={"non-c-typedef-for-linkage"}, | ||
[i]="non-c-typedef-for-linkage", | |||
[a]="anonymous non-C-compatible type given name for linkage purposes by %select{typedef|alias}0 declaration; add a tag name here", | |||
[b]=l, | |||
[ | [c]="anonymous non\\-C\\-compatible type given name for linkage purposes by (?:typedef|alias) declaration; add a tag name here", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wnon\\-c\\-typedef\\-for\\-linkage[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Oc,1576809732,Rc,Lc}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_nonclass_type_friend"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="non-class friend type %0 is a C++11 extension", | |||
[b]=l, | |||
[ | [c]="non\\-class friend type (.*?) is a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:\n - When instantiating a friend type template, per...","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"}, | ||
[ | [g]={{t,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_nonstandard_escape"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="use of non-standard escape character \'\\%0\'", | |||
[b]=l, | |||
[c]="use of non\\-standard escape character \'\\\\(.*?)\'", | |||
[ | [d]=R, | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{X,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\";"},{X,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\";"},{X,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_nonstatic_member_init"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="default member initializer for non-static data member is a C++11 extension", | |||
[b]=l, | |||
[ | [c]="default member initializer for non\\-static data member is a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"bffe88027cc2",1318650917,"Rename an ExtWarn to ext_ for consistency.\n\nllvm-svn: 142049","Rename an ExtWarn to ext_ for consistency.\n\nllvm-svn: 142049"}, | ||
[ | [g]={{F,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_noreturn_main"]={ | ||
[ | [j]={tc}, | ||
[i]=tc, | |||
[a]="\'main\' is not allowed to be declared _Noreturn", | |||
[b]=l, | |||
[ | [c]="\'main\' is not allowed to be declared _Noreturn", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"0015f0987792",1358460971,"Parsing support for C11\'s _Noreturn keyword. No semantics yet.\n\nllvm-svn: 172761","Parsing support for C11\'s _Noreturn keyword. No semantics yet.\n\nllvm-svn: 172761"}, | ||
[ | [g]={{p,12085,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (DS.isNoreturnSpecified()) {\n // ...\n Diag(NoreturnLoc, diag::ext_noreturn_main);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:27:1: warning: \'main\' is not allowed to be declared _Noreturn [-Wmain]"} | ["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"]={ | ["ext_ns_enum_attribute"]={ | ||
[ | [j]={G,ab,o}, | ||
[i]=G, | |||
[a]="attributes on %select{a namespace|an enumerator}0 declaration are a C++17 extension", | |||
[b]=l, | |||
[c]="attributes on (?:a namespace|an enumerator) declaration are a C\\+\\+17 extension", | |||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"40e202f7d996",1507942584,"Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature.\n\nllvm-svn: ...","Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature.\n\nllvm-svn: 315784"}, | ||
[ | [g]={{B,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*/;"},{F,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*/;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_nullability"]={ | ||
[ | [j]={"nullability-extension",o}, | ||
[i]="nullability-extension", | |||
[a]="type nullability specifier %0 is a Clang extension", | |||
[b]=l, | |||
[c]="type nullability specifier (.*?) is a Clang extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wnullability\\-extension[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"261a89b0f70b",1434736265,"Introduce type nullability specifiers for C/C++.\n\nIntroduces the type specifiers __nonnull, __nullab...","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"}, | ||
[ | [g]={{B,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Parser/nullability.c"]={"clang/test/Parser/nullability.c:3:1: warning: type nullability specifier \'_Nonnull\' is a Clang extension [-Wnullability-extension]"} | ["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"]={ | ["ext_offsetof_non_pod_type"]={ | ||
[ | [j]={"invalid-offsetof"}, | ||
[i]="invalid-offsetof", | |||
[a]="offset of on non-POD type %0", | |||
[b]=l, | |||
[ | [c]="offset of on non\\-POD type (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Winvalid\\-offsetof[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_offsetof_non_standardlayout_type"]={ | ||
[ | [j]={"invalid-offsetof"}, | ||
[i]="invalid-offsetof", | |||
[a]="offset of on non-standard-layout type %0", | |||
[b]=l, | |||
[ | [c]="offset of on non\\-standard\\-layout type (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Winvalid\\-offsetof[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_old_implicitly_unsigned_long_cxx"]={ | ||
[ | [j]={mc,Qb,Xb}, | ||
[i]=Qb, | |||
[a]="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]=l, | |||
[ | [c]="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", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-compat[^\\]]*\\]", | ||
[ | [e]=m, | ||
[ | [f]={"13234ae40db3",1433800799,"Consider unsigned long for non-u/U decimal literals (C90/C++03)\n\nSummary:\nThis modifies Clang to ref...","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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_omp_attributes"]={ | ||
[ | [j]={"openmp","openmp-51-extensions"}, | ||
[i]="openmp-51-extensions", | |||
[a]="specifying OpenMP directives with [[]] is an OpenMP 5.1 extension", | |||
[b]=l, | |||
[ | [c]="specifying OpenMP directives with \\[\\[\\]\\] is an OpenMP 5\\.1 extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-51\\-extensions[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{F,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_omp_loop_not_canonical_init"]={ | ||
[ | [j]={"openmp","openmp-loop-form"}, | ||
[i]="openmp-loop-form", | |||
[a]="initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\')", | |||
[b]=l, | |||
[ | [c]="initialization clause of OpenMP for loop is not in canonical form \\(\'var \\= init\' or \'T var \\= init\'\\)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-loop\\-form[^\\]]*\\]", | ||
[ | [e]="OpenMP Issue", | ||
[ | [f]={"a8e9d2eccc6e",1401790607,"[OPENMP] Loop canonical form analysis (Sema)\n\nThis patch implements semantic analysis to make sure t...","[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"}, | ||
[ | [g]={{Bc,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_on_off_switch_syntax"]={ | ||
[ | [j]={cb,mb,kb,"pragmas",sc}, | ||
[i]=sc, | |||
[a]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", | |||
[b]=l, | |||
[ | [c]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"3bffa5293303",1297647744,"Make LexOnOffSwitch a Preprocessor member function\n\nllvm-svn: 125473","Make LexOnOffSwitch a Preprocessor member function\n\nllvm-svn: 125473"}, | ||
[ | [g]={{jb,974,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::ext_on_off_switch_syntax);"},{jb,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_opencl_double_without_pragma"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported", | |||
[b]=l, | |||
[c]="Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={lc,1615397021,kc,jc}, | ||
[ | [g]={{M,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_opencl_ext_vector_type_rgba_selector"]={ | ||
[ | [j]={"opencl-unsupported-rgba"}, | ||
[i]="opencl-unsupported-rgba", | |||
[a]="vector component name \'%0\' is a feature from OpenCL version 3.0 onwards", | |||
[b]=l, | |||
[ | [c]="vector component name \'(.*?)\' is a feature from OpenCL version 3\\.0 onwards", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wopencl\\-unsupported\\-rgba[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"98eaa62e369d",1469213383,"Add .rgba syntax extension to ext_vector_type types\n\nSummary:\nThis patch enables .rgba accessors to ...","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"}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_operator_new_delete_declared_inline"]={ | ||
[ | [j]={"inline-new-delete"}, | ||
[i]="inline-new-delete", | |||
[a]="replacement function %0 cannot be declared \'inline\'", | |||
[b]=l, | |||
[ | [c]="replacement function (.*?) cannot be declared \'inline\'", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Winline\\-new\\-delete[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"13dfdc88a9a2",1384562858,"Downgrade the Error on an \'inline\' operator new or delete to an ExtWarn. Some\nprojects are relying o...","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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_operator_overload_static"]={ | ||
[ | [j]={Z,vb}, | ||
[i]=Z, | |||
[a]="declaring overloaded %0 as \'static\' is a C++23 extension", | |||
[b]=l, | |||
[ | [c]="declaring overloaded (.*?) as \'static\' is a C\\+\\+23 extension", | ||
[ | [d]=Ab, | ||
[ | [e]=k, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{t,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_out_of_line_declaration"]={ | ||
[ | [j]={"out-of-line-declaration"}, | ||
[i]="out-of-line-declaration", | |||
[a]="out-of-line declaration of a member must be a definition", | |||
[b]=K, | |||
[ | [c]="out\\-of\\-line declaration of a member must be a definition", | ||
[ | [d]=" \\[[^\\]]*\\-Wout\\-of\\-line\\-declaration[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"9339605c3545",1279254748,"Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.\n\nllvm-svn: 108505","Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.\n\nllvm-svn: 108505"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_out_of_line_qualified_id_type_names_constructor"]={ | ||
[ | [j]={"injected-class-name"}, | ||
[i]="injected-class-name", | |||
[a]="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]=l, | |||
[ | [c]="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", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Winjected\\-class\\-name[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"74f02347ca16",1484859613,"PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).\n\nUnder this defect resolutio...","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"}, | ||
[ | [g]={{z,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*/"},{z,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*/"},{z,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*/"},{z,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*/;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_override_control_keyword"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="\'%0\' keyword is a C++11 extension", | |||
[b]=l, | |||
[ | [c]="\'(.*?)\' keyword is a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"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"}, | ||
[ | [g]={{F,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);"},{F,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_override_exception_spec"]={ | ||
[ | [j]={A,Cb}, | ||
[i]=Cb, | |||
[a]="exception specification of overriding function is more lax than base version", | |||
[b]=l, | |||
[ | [c]="exception specification of overriding function is more lax than base version", | ||
[ | [d]=Ec, | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{xb,992,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_override_exception_spec;"},{xb,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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ovl_ambiguous_oper_binary_reversed"]={ | ||
[ | [j]={"ambiguous-reversed-operator"}, | ||
[i]="ambiguous-reversed-operator", | |||
[a]="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", | |||
[b]=l, | |||
[ | [c]="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|)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wambiguous\\-reversed\\-operator[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Vb,1567434909,Rb,Sb}, | ||
[ | [g]={{Db,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ovl_rewrite_equalequal_not_bool"]={ | ||
[ | [j]={"rewrite-not-bool"}, | ||
[i]="rewrite-not-bool", | |||
[a]="ISO C++20 requires return type of selected \'operator==\' function for rewritten \'%1\' comparison to be \'bool\', not %0", | |||
[b]=l, | |||
[ | [c]="ISO C\\+\\+20 requires return type of selected \'operator\\=\\=\' function for rewritten \'(.*?)\' comparison to be \'bool\', not (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wrewrite\\-not\\-bool[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Jc,1576908663,Cc,Dc}, | ||
[ | [g]={{Db,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_param_default_argument_redefinition"]={ | ||
[ | [j]={A,"microsoft-default-arg-redefinition"}, | ||
[i]="microsoft-default-arg-redefinition", | |||
[a]="redefinition of default argument", | |||
[b]=l, | |||
[ | [c]="redefinition of default argument", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-default\\-arg\\-redefinition[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{t,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;"}}, | ||
[ | [h]={ | ||
[ | [Nc]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:202:19: warning: redefinition of default argument [-Wmicrosoft-default-arg-redefinition]"} | ||
[ | |||
[ | |||
[ | |||
} | } | ||
}, | }, | ||
["ext_param_not_declared"]={ | ["ext_param_not_declared"]={ | ||
[ | [j]={cb,mb,Ic,"implicit-int",kb}, | ||
[i]="implicit-int", | |||
[a]="parameter %0 was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int", | |||
[b]=K, | |||
[ | [c]="parameter (.*?) was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int", | ||
[ | [d]=" \\[[^\\]]*\\-Wimplicit\\-int[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_param_promoted_not_compatible_with_prototype"]={ | ||
[ | [j]={"knr-promoted-parameter"}, | ||
[i]="knr-promoted-parameter", | |||
[a]="%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]=l, | |||
[ | [c]="(?: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", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wknr\\-promoted\\-parameter[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_parameter_name_omitted_c2x"]={ | ||
[ | [j]={lb}, | ||
[i]=lb, | |||
[a]="omitting the parameter name in a function definition is a C2x extension", | |||
[b]=l, | |||
[ | [c]="omitting the parameter name in a function definition is a C2x extension", | ||
[ | [d]=Ub, | ||
[ | [e]=k, | ||
[ | [f]={Jc,1576908663,Cc,Dc}, | ||
[ | [g]={{U,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_partial_spec_not_more_specialized_than_primary"]={ | ||
[ | [j]={"invalid-partial-specialization"}, | ||
[i]="invalid-partial-specialization", | |||
[a]="%select{class|variable}0 template partial specialization is not more specialized than the primary template", | |||
[b]=K, | |||
[ | [c]="(?:class|variable) template partial specialization is not more specialized than the primary template", | ||
[ | [d]=" \\[[^\\]]*\\-Winvalid\\-partial\\-specialization[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"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"}, | ||
[ | [g]={{z,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_partial_specs_not_deducible"]={ | ||
[ | [j]={"unusable-partial-specialization"}, | ||
[i]="unusable-partial-specialization", | |||
[a]="%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]=K, | |||
[ | [c]="(?:class|variable) template partial specialization contains (?:a template parameter|template parameters) that cannot be deduced; this partial specialization will never be used", | ||
[ | [d]=" \\[[^\\]]*\\-Wunusable\\-partial\\-specialization[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"57aae07b4a31",1482892645,"DR1315: a non-type template argument in a partial specialization is permitted\nto make reference to t...","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"}, | ||
[ | [g]={{z,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_paste_comma"]={ | ||
[ | [j]={E,"gnu-zero-variadic-macro-arguments",o}, | ||
[i]="gnu-zero-variadic-macro-arguments", | |||
[a]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", | |||
[b]=l, | |||
[c]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-variadic\\-macro\\-arguments[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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]"} | ||
} | } | ||
Line 8,111: | Line 6,487: | ||
["ext_plain_complex"]={ | ["ext_plain_complex"]={ | ||
[a]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", | [a]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", | ||
[ | [b]=l, | ||
[ | [c]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", | ||
[d]=Fb, | |||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{hc,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\");"}}, | ||
[h]={ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pointer_to_const_ref_member_on_rvalue"]={ | ||
[ | [j]={D,V,o}, | ||
[i]=D, | |||
[a]="invoking a pointer to a \'const &\' member function on an rvalue is a C++20 extension", | |||
[b]=l, | |||
[c]="invoking a pointer to a \'const &\' member function on an rvalue is a C\\+\\+20 extension", | |||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={"2592327dae05",1503625675,"[c++2a] P0704R1: Allow pointers to const& member functions to be called on rvalues.\n\nPatch by Blitz ...","[c++2a] P0704R1: Allow pointers to const& member functions to be called on rvalues.\n\nPatch by Blitz Rakete!\n\nllvm-svn: 311744"}, | ||
[ | [g]={{O,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pp_bad_paste_ms"]={ | ||
[ | [j]={"invalid-token-paste"}, | ||
[i]="invalid-token-paste", | |||
[a]="pasting formed \'%0\', an invalid preprocessing token", | |||
[b]=K, | |||
[ | [c]="pasting formed \'(.*?)\', an invalid preprocessing token", | ||
[ | [d]=" \\[[^\\]]*\\-Winvalid\\-token\\-paste[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"7b1573451eac",1392684350,"Fix a non-error diagnostic that had an err_ name. Also move it from Warning to\nExtWarn, since it\'s a...","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"}, | ||
[ | [g]={{"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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pp_bad_vaargs_use"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", | |||
[b]=l, | |||
[c]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", | |||
[ | [d]=R, | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pp_bad_vaopt_use"]={ | ||
[ | [j]={zc}, | ||
[i]=zc, | |||
[a]="__VA_OPT__ can only appear in the expansion of a variadic macro", | |||
[b]=l, | |||
[ | [c]="__VA_OPT__ can only appear in the expansion of a variadic macro", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)\n\nThis patch implements an ext...","[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"}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pp_comma_expr"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="comma operator in operand of #if", | |||
[b]=l, | |||
[c]="comma operator in operand of \\#if", | |||
[ | [d]=R, | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{fc,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"]={ | ["ext_pp_extra_tokens_at_eol"]={ | ||
[ | [j]={"endif-labels","extra-tokens"}, | ||
[ | [i]="extra-tokens", | ||
[ | [a]="extra tokens at end of #%0 directive", | ||
[b]=l, | |||
[c]="extra tokens at end of \\#(.*?) directive", | |||
[d]=" \\[(?:\\-Werror,)?\\-Wextra\\-tokens[^\\]]*\\]", | |||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{"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\";"},{P,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;"},{jb,818,"void Preprocessor::HandlePragmaModuleBuild(Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{jb,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\";"},{jb,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\";"},{jb,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\";"},{jb,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\";"},{jb,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\";"},{jb,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\";"},{jb,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\";"},{jb,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\";"},{jb,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\";"},{jb,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\";"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:28:7: warning: extra tokens at end of #else directive [-Wextra-tokens]"} | ["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"]={ | ["ext_pp_gnu_line_directive"]={ | ||
[ | [j]={E,"gnu-line-marker",o}, | ||
[i]="gnu-line-marker", | |||
[a]="this style of line directive is a GNU extension", | |||
[b]=l, | |||
[c]="this style of line directive is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-line\\-marker[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{P,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);"},{P,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pp_ident_directive"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="#ident is a language extension", | |||
[b]=l, | |||
[c]="\\#ident is a language extension", | |||
[ | [d]=R, | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,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"]={ | ["ext_pp_import_directive"]={ | ||
[ | [j]={"import-preprocessor-directive-pedantic",o}, | ||
[i]="import-preprocessor-directive-pedantic", | |||
[a]="#import is a language extension", | |||
[b]=l, | |||
[c]="\\#import is a language extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wimport\\-preprocessor\\-directive\\-pedantic[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,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"]={ | ["ext_pp_include_next_directive"]={ | ||
[ | [j]={E,"gnu-include-next",o}, | ||
[i]="gnu-include-next", | |||
[a]="#include_next is a language extension", | |||
[b]=l, | |||
[c]="\\#include_next is a language extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-include\\-next[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,2592,"/// HandleIncludeNextDirective - Implements \\#include_next.\n///\nvoid Preprocessor::HandleIncludeNextDirective(SourceLocation HashLoc, Token &IncludeNextTok) {\n Diag(IncludeNextTok, diag::ext_pp_include_next_directive);"}} | ||
[ | |||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["ext_pp_include_search_ms"]={ | ["ext_pp_include_search_ms"]={ | ||
[ | [j]={A,"microsoft-include","msvc-include"}, | ||
[i]="microsoft-include", | |||
[a]="#include resolved using non-portable Microsoft search rules as: %0", | |||
[b]=l, | |||
[ | [c]="\\#include resolved using non\\-portable Microsoft search rules as\\: (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-include[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"0fafd34a6e7a",1388173576,"Implement MSVC header search algorithm in MicrosoftMode.\nFollows algorithm described here: http://ms...","Implement MSVC header search algorithm in MicrosoftMode.\nFollows algorithm described here: http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx\n\nllvm-svn: 198082"}, | ||
[ | [g]={{"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)) {"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pp_line_too_big"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="C requires #line number to be less than %0, allowed as extension", | |||
[b]=l, | |||
[c]="C requires \\#line number to be less than (.*?), allowed as extension", | |||
[ | [d]=R, | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pp_line_zero"]={ | ||
[ | [j]={E,"gnu-zero-line-directive",o}, | ||
[i]="gnu-zero-line-directive", | |||
[a]="#line directive with zero argument is a GNU extension", | |||
[b]=l, | |||
[c]="\\#line directive with zero argument is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-line\\-directive[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"0638c15a52d3",1340745560,"preprocessing: gcc supports #line 0. So, treat this\nas a gcc supported extension with usual treatmen...","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"}, | ||
[ | [g]={{P,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pp_macro_redef"]={ | ||
[ | [j]={"macro-redefined","pedantic-macros"}, | ||
[i]="macro-redefined", | |||
[a]="%0 macro redefined", | |||
[b]=l, | |||
[ | [c]="(.*?) macro redefined", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmacro\\-redefined[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/pragma-pushpop-macro.c"]={"clang/test/Preprocessor/pragma-pushpop-macro.c:17:9: warning: \'Y\' macro redefined [-Wmacro-redefined]"} | ["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"]={ | ["ext_pp_opencl_variadic_macros"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="variadic macros are a Clang extension in OpenCL", | |||
[b]=l, | |||
[c]="variadic macros are a Clang extension in OpenCL", | |||
[ | [d]=R, | ||
[ | [e]=u, | ||
[ | [f]={"545652b96485",1553599357,"[OpenCL] Allow variadic macros as Clang feature.\n\nllvm-svn: 356987","[OpenCL] Allow variadic macros as Clang feature.\n\nllvm-svn: 356987"}, | ||
[ | [g]={{P,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pp_operator_used_as_macro_name"]={ | ||
[ | [j]={A,"microsoft-cpp-macro",o}, | ||
[i]="microsoft-cpp-macro", | |||
[a]="C++ operator %0 (aka %1) used as a macro name", | |||
[b]=l, | |||
[c]="C\\+\\+ operator (.*?) \\(aka (.*?)\\) used as a macro name", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-cpp\\-macro[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"e03e9e15f2a6",1401553942,"Preprocessor: make C++ operator names as macro identifiers a compatible extension\n\nWith recent chang...","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"}, | ||
[ | [g]={{P,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();"}}, | ||
[ | [h]={ | ||
[ | [gc]={"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"]={ | ["ext_pp_redef_builtin_macro"]={ | ||
[ | [j]={"builtin-macro-redefined","pedantic-macros"}, | ||
[i]="builtin-macro-redefined", | |||
[a]="redefining builtin macro", | |||
[b]=l, | |||
[ | [c]="redefining builtin macro", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-macro\\-redefined[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,\ncontinue parsing the direct...","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"}, | ||
[ | [g]={{P,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:9:9: warning: redefining builtin macro [-Wbuiltin-macro-redefined]"} | ["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"]={ | ["ext_pp_undef_builtin_macro"]={ | ||
[ | [j]={"builtin-macro-redefined","pedantic-macros"}, | ||
[i]="builtin-macro-redefined", | |||
[a]="undefining builtin macro", | |||
[b]=l, | |||
[ | [c]="undefining builtin macro", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-macro\\-redefined[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,\ncontinue parsing the direct...","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"}, | ||
[ | [g]={{P,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:18:8: warning: undefining builtin macro [-Wbuiltin-macro-redefined]"} | ["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"]={ | ["ext_pp_warning_directive"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="#warning is a %select{C2x|C++23}0 extension", | |||
[b]=l, | |||
[c]="\\#warning is a (?:C2x|C\\+\\+23) extension", | |||
[ | [d]=R, | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,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;"},{P,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:61:2: warning: #warning is a C++23 extension [-Wpedantic]"} | ["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"]={ | ["ext_pragma_syntax_eod"]={ | ||
[ | [j]={cb,mb,kb,"pragmas",sc}, | ||
[i]=sc, | |||
[a]="expected end of directive in pragma", | |||
[b]=l, | |||
[ | [c]="expected end of directive in pragma", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"2f1e36bfd0c1",1298860671,"Rename tok::eom to tok::eod.\n\nThe previous name was inaccurate as this token in fact appears at\nthe ...","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"}, | ||
[ | [g]={{jb,992,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n // ...\n if (Tok.isNot(tok::eod))\n Diag(Tok, diag::ext_pragma_syntax_eod);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/pragma_unknown.c"]={"clang/test/Preprocessor/pragma_unknown.c:29:34: warning: expected end of directive in pragma [-Wunknown-pragmas]"} | ["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"]={ | ["ext_predef_outside_function"]={ | ||
[ | [j]={"predefined-identifier-outside-function"}, | ||
[i]="predefined-identifier-outside-function", | |||
[a]="predefined identifier is only valid inside function", | |||
[b]=l, | |||
[ | [c]="predefined identifier is only valid inside function", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wpredefined\\-identifier\\-outside\\-function[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{r,3641,"ExprResult Sema::BuildPredefinedExpr(SourceLocation Loc, PredefinedExpr::IdentKind IK) {\n // ...\n if (!currentDecl) {\n Diag(Loc, diag::ext_predef_outside_function);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pseudo_dtor_on_void"]={ | ||
[ | [j]={A,"microsoft-void-pseudo-dtor"}, | ||
[i]="microsoft-void-pseudo-dtor", | |||
[a]="pseudo-destructors on type void are a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="pseudo\\-destructors on type void are a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-void\\-pseudo\\-dtor[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"5882927d7a1f",1327297857,"In microsoft mode, downgrade pseudo-destructors on void from error to warning.\n\nThis matches cl.exe\'...","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"}, | ||
[ | [g]={{O,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_pure_function_definition"]={ | ||
[ | [j]={A,"microsoft-pure-definition"}, | ||
[i]="microsoft-pure-definition", | |||
[a]="function definition with pure-specifier is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="function definition with pure\\-specifier is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-pure\\-definition[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | [gc]={"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"]={ | ["ext_qualified_dtor_named_in_lexical_scope"]={ | ||
[ | [j]={ic}, | ||
[i]=ic, | |||
[a]="qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup", | |||
[b]=l, | |||
[ | [c]="qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wdtor\\-name[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Oc,1576809732,Rc,Lc}, | ||
[ | [g]={{O,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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_redefinition_of_typedef"]={ | ||
[ | [j]={"typedef-redefinition"}, | ||
[i]="typedef-redefinition", | |||
[a]="redefinition of typedef %0 is a C11 feature", | |||
[b]=l, | |||
[ | [c]="redefinition of typedef (.*?) is a C11 feature", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wtypedef\\-redefinition[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_ref_qualifier"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="reference qualifiers on functions are a C++11 extension", | |||
[b]=l, | |||
[ | [c]="reference qualifiers on functions are a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"a52713096d31",1296074132,"Improve the extension warning for the use of ref-qualifiers, to\ndistinguish them from rvalue referen...","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"}, | ||
[ | [g]={{B,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_register_storage_class"]={ | ||
[ | [j]={"register"}, | ||
[i]="register", | |||
[a]="ISO C++17 does not allow \'register\' storage class specifier", | |||
[b]=K, | |||
[ | [c]="ISO C\\+\\+17 does not allow \'register\' storage class specifier", | ||
[ | [d]=" \\[[^\\]]*\\-Wregister[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"291027692fe7",1448487261,"P0001R1: \'register\' storage class specifier is no longer permitted in C++1z.\n\nWe will still allow it...","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"}, | ||
[ | [g]={{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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_reserved_user_defined_literal"]={ | ||
[ | [j]={"reserved-user-defined-literal"}, | ||
[i]="reserved-user-defined-literal", | |||
[a]="invalid suffix on literal; C++11 requires a space between literal and identifier", | |||
[b]=K, | |||
[ | [c]="invalid suffix on literal; C\\+\\+11 requires a space between literal and identifier", | ||
[ | [d]=" \\[[^\\]]*\\-Wreserved\\-user\\-defined\\-literal[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"0df56f4a9000",1331174361,"Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix not\nstarting with an und...","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"}, | ||
[ | [g]={{T,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), \" \");"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_retained_language_linkage"]={ | ||
[ | [j]={o,"retained-language-linkage"}, | ||
[i]="retained-language-linkage", | |||
[a]="friend function %0 retaining previous language linkage is an extension", | |||
[b]=l, | |||
[c]="friend function (.*?) retaining previous language linkage is an extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wretained\\-language\\-linkage[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"dd551fc3ae9d",1382482381,"Retain previous language linkage of friend function declarations\n\nWith this extension, friend functi...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_return_has_expr"]={ | ||
[ | [j]={cb,mb,kb,"return-type"}, | ||
[i]="return-type", | |||
[a]="%select{void function|void method|constructor|destructor}1 %0 should not return a value", | |||
[b]=K, | |||
[ | [c]="(?:void function|void method|constructor|destructor) (.*?) should not return a value", | ||
[ | [d]=" \\[[^\\]]*\\-Wreturn\\-type[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{Gb,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_return_has_void_expr"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="void %select{function|method|block}1 %0 should not return void expression", | |||
[b]=l, | |||
[c]="void (?:function|method|block) (.*?) should not return void expression", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{Gb,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;"},{Gb,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;"},{Gb,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) {"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/block-return.c"]={"clang/test/Sema/block-return.c:137:5: warning: void block literal should not return void expression [-Wpedantic]"} | ["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"]={ | ["ext_return_missing_expr"]={ | ||
[ | [j]={cb,mb,kb,"return-type"}, | ||
[i]="return-type", | |||
[a]="non-void %select{function|method}1 %0 should return a value", | |||
[b]=K, | |||
[ | [c]="non\\-void (?:function|method) (.*?) should return a value", | ||
[ | [d]=" \\[[^\\]]*\\-Wreturn\\-type[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{Gb,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"]={ | ["ext_rvalue_reference"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="rvalue references are a C++11 extension", | |||
[b]=l, | |||
[ | [c]="rvalue references are a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"0098499f7d8d",1295921852,"Downgrade the error about rvalue references to an extension warning\nand turn on __has_feature(cxx_rv...","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"}, | ||
[ | [g]={{B,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_rvalue_to_reference_access_ctor"]={ | ||
[ | [j]={"bind-to-temporary-copy",o}, | ||
[i]="bind-to-temporary-copy", | |||
[a]="C++98 requires an accessible copy constructor for class %2 when binding a reference to a temporary; was %select{private|protected}0", | |||
[b]=l, | |||
[c]="C\\+\\+98 requires an accessible copy constructor for class (.*?) when binding a reference to a temporary; was (?:private|protected)", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wbind\\-to\\-temporary\\-copy[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy\nconstructor into an extension ...","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"}, | ||
[ | [g]={{yc,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_rvalue_to_reference_temp_copy_no_viable"]={ | ||
[ | [j]={"bind-to-temporary-copy",o}, | ||
[i]="bind-to-temporary-copy", | |||
[a]="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", | |||
[b]=l, | |||
[c]="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", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wbind\\-to\\-temporary\\-copy[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy\nconstructor into an extension ...","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"}, | ||
[ | [g]={{N,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_scoped_enum"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="scoped enumerations are a C++11 extension", | |||
[b]=l, | |||
[ | [c]="scoped enumerations are a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"d0d87b597259",1366685256,"Warn that scoped enumerations are a C++11 extenstion when compiling in\nC++98 mode. This improves on...","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"}, | ||
[ | [g]={{B,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_sizeof_alignof_function_type"]={ | ||
[ | [j]={o,Wb}, | ||
[i]=Wb, | |||
[a]="invalid application of \'%0\' to a function type", | |||
[b]=l, | |||
[c]="invalid application of \'(.*?)\' to a function type", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wpointer\\-arith[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode.\n\nllvm-svn: 177354","Diagnose uses of \'alignof\' on functions in -pedantic mode.\n\nllvm-svn: 177354"}, | ||
[ | [g]={{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"]={ | ["ext_sizeof_alignof_void_type"]={ | ||
[ | [j]={o,Wb}, | ||
[i]=Wb, | |||
[a]="invalid application of \'%0\' to a void type", | |||
[b]=l, | |||
[c]="invalid application of \'(.*?)\' to a void type", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wpointer\\-arith[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode.\n\nllvm-svn: 177354","Diagnose uses of \'alignof\' on functions in -pedantic mode.\n\nllvm-svn: 177354"}, | ||
[ | [g]={{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"]={ | ["ext_standalone_specifier"]={ | ||
[ | [j]={vc}, | ||
[i]=vc, | |||
[a]="\'%0\' is not permitted on a declaration of a type", | |||
[b]=l, | |||
[ | [c]="\'(.*?)\' is not permitted on a declaration of a type", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_star_this_lambda_capture_cxx17"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="capture of \'*this\' by copy is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="capture of \'\\*this\' by copy is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]="Lambda Issue", | ||
[ | [f]={"dc6b596ebbd3",1458552337,"[Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)\n\nImplement lambda capture ...","[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"}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_static_data_member_in_union"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="static data member %0 in union is a C++11 extension", | |||
[b]=l, | |||
[ | [c]="static data member (.*?) in union is a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"429737556135",1329424882,"C++11 allows unions to have static data members. Remove the corresponding\nrestriction and add some t...","C++11 allows unions to have static data members. Remove the corresponding\nrestriction and add some tests.\n\nllvm-svn: 150721"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_static_non_static"]={ | ||
[ | [j]={A,"microsoft-redeclare-static",o}, | ||
[i]="microsoft-redeclare-static", | |||
[a]="redeclaring non-static %0 as static is a Microsoft extension", | |||
[b]=l, | |||
[c]="redeclaring non\\-static (.*?) as static is a Microsoft extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-redeclare\\-static[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"5b63fa02b2fa",1403133985,"Sema: Static redeclaration after extern declarations is a Microsoft Extension\n\nCL permits static red...","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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | [Nc]={"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"]={ | ["ext_static_out_of_line"]={ | ||
[ | [j]={A,W}, | ||
[i]=W, | |||
[a]="\'static\' can only be specified inside the class definition", | |||
[b]=l, | |||
[ | [c]="\'static\' can only be specified inside the class definition", | ||
[ | [d]=Bb, | ||
[ | [e]=k, | ||
[ | [f]={"3e7fda229d3f",1548435702,"Allow \'static\' storage specifier on an out-of-line member function template\ndeclaration in MSVCCompa...","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"}, | ||
[ | [g]={{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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_stdc_pragma_ignored"]={ | ||
[ | [j]={cb,mb,kb,"pragmas",sc}, | ||
[i]=sc, | |||
[a]="unknown pragma in STDC namespace", | |||
[b]=l, | |||
[ | [c]="unknown pragma in STDC namespace", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"a0b1f76d1022",1240176337,"reject invalid stuff in the STDC namespace.\n\nllvm-svn: 69551","reject invalid stuff in the STDC namespace.\n\nllvm-svn: 69551"}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_string_literal_operator_template"]={ | ||
[ | [j]={E,"gnu-string-literal-operator-template"}, | ||
[i]="gnu-string-literal-operator-template", | |||
[a]="string literal operator templates are a GNU extension", | |||
[b]=l, | |||
[ | [c]="string literal operator templates are a GNU extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-string\\-literal\\-operator\\-template[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"b8b41d3ea444",1381175878,"Add support for WG21 N3599 (literal operator template for strings) as a GNU\nextension. The GCC folks...","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"}, | ||
[ | [g]={{t,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_string_too_long"]={ | ||
[ | [j]={"overlength-strings",o}, | ||
[i]="overlength-strings", | |||
[a]="string literal of length %0 exceeds maximum length %1 that %select{C90|ISO C99|C++}2 compilers are required to support", | |||
[b]=l, | |||
[c]="string literal of length (.*?) exceeds maximum length (.*?) that (?:C90|ISO C99|C\\+\\+) compilers are required to support", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Woverlength\\-strings[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"b37b46e488a3",1279636400,"Complain when string literals are too long for the active language\nstandard\'s minimum requirements.\n...","Complain when string literals are too long for the active language\nstandard\'s minimum requirements.\n\nllvm-svn: 108837"}, | ||
[ | [g]={{X,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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_subscript_non_lvalue"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="ISO C90 does not allow subscripting non-lvalue array", | |||
[b]=l, | |||
[c]="ISO C90 does not allow subscripting non\\-lvalue array", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={"ab2784f2c16e",1240703214,"Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.\n\nI wasn\'t originally going to use ...","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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | [nc]={"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"]={ | ["ext_subscript_overload"]={ | ||
[ | [j]={mc,Qb,Xb,Xb,"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"}, | ||
[i]="pre-c++23-compat", | |||
[a]="overloaded %0 with %select{no|a defaulted|more than one}1 parameter is a C++23 extension", | |||
[b]=l, | |||
[c]="overloaded (.*?) with (?:no|a defaulted|more than one) parameter is a C\\+\\+23 extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wpre\\-c\\+\\+23\\-compat[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables i...","[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"}, | ||
[ | [g]={{t,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();"},{t,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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]"} | ||
} | } | ||
Line 8,943: | Line 7,150: | ||
["ext_template_arg_extra_parens"]={ | ["ext_template_arg_extra_parens"]={ | ||
[a]="address non-type template argument cannot be surrounded by parentheses", | [a]="address non-type template argument cannot be surrounded by parentheses", | ||
[ | [b]=l, | ||
[ | [c]="address non\\-type template argument cannot be surrounded by parentheses", | ||
[d]=Fb, | |||
[e]=k, | |||
[f]={"6a0c4097f142",1284358018,"Parentheses around address non-type template argument is demoted to an extension warning.\n\nllvm-svn:...","Parentheses around address non-type template argument is demoted to an extension warning.\n\nllvm-svn: 113739"}, | |||
[ | [g]={{z,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();"},{z,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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"} | ["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"]={ | ["ext_template_arg_local_type"]={ | ||
[ | [j]={"local-type-template-args"}, | ||
[i]="local-type-template-args", | |||
[a]="template argument uses local type %0", | |||
[b]=l, | |||
[ | [c]="template argument uses local type (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wlocal\\-type\\-template\\-args[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,\nbut this makes them wor...","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"}, | ||
[ | [g]={{z,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_template_arg_object_internal"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="non-type template argument referring to %select{function|object}0 %1 with internal linkage is a C++11 extension", | |||
[b]=l, | |||
[ | [c]="non\\-type template argument referring to (?:function|object) (.*?) with internal linkage is a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"9380e0ea236a",1333573890,"Implement C++11 [temp.arg.nontype]\'s permission to use the address of an object\nor function with int...","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"}, | ||
[ | [g]={{z,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_template_arg_unnamed_type"]={ | ||
[ | [j]={"unnamed-type-template-args"}, | ||
[i]="unnamed-type-template-args", | |||
[a]="template argument uses unnamed type", | |||
[b]=l, | |||
[ | [c]="template argument uses unnamed type", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wunnamed\\-type\\-template\\-args[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,\nbut this makes them wor...","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"}, | ||
[ | [g]={{z,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_template_outside_of_template"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="\'template\' keyword outside of a template", | |||
[b]=l, | |||
[ | [c]="\'template\' keyword outside of a template", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'\ndisambiguation keywords outside of te...","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"}, | ||
[ | [g]={{z,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_template_param_shadow"]={ | ||
[ | [j]={A,W,"microsoft-template-shadow"}, | ||
[i]="microsoft-template-shadow", | |||
[a]="declaration of %0 shadows template parameter", | |||
[b]=l, | |||
[ | [c]="declaration of (.*?) shadows template parameter", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-template\\-shadow[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={Vb,1567434909,Rb,Sb}, | ||
[ | [g]={{z,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_template_parameter_default_in_function_template"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="default template arguments for a function template are a C++11 extension", | |||
[b]=l, | |||
[ | [c]="default template arguments for a function template are a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"8b481d8ac2af",1296791842,"When a function template\'s template parameter has a default argument,\nit\'s okay for the following te...","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"}, | ||
[ | [g]={{z,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_template_template_param_typename"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="template template parameter using \'typename\' is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="template template parameter using \'typename\' is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"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"}, | ||
[ | [g]={{"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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_thread_before"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="\'__thread\' before \'%0\'", | |||
[b]=l, | |||
[c]="\'__thread\' before \'(.*?)\'", | |||
[ | [d]=R, | ||
[ | [e]=q, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{B,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\";"},{B,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\";"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_token_used"]={ | ||
[ | [j]={"language-extension-token",o}, | ||
[i]="language-extension-token", | |||
[a]="extension used", | |||
[b]=l, | |||
[c]="extension used", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wlanguage\\-extension\\-token[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{"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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/extension-warning.c"]={"clang/test/Preprocessor/extension-warning.c:9:1: warning: extension used [-Wlanguage-extension-token]"} | ["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"]={ | ["ext_type_defined_in_offsetof"]={ | ||
[ | [j]={E,"gnu-offsetof-extensions",o}, | ||
[i]="gnu-offsetof-extensions", | |||
[a]="defining a type within \'%select{__builtin_offsetof|offsetof}0\' is a Clang extension", | |||
[b]=l, | |||
[c]="defining a type within \'(?:__builtin_offsetof|offsetof)\' is a Clang extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-offsetof\\-extensions[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={I,1625925174,J,H}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_addrof_temporary"]={ | ||
[ | [j]={"address-of-temporary"}, | ||
[i]="address-of-temporary", | |||
[a]="taking the address of a temporary object of type %0", | |||
[b]=K, | |||
[ | [c]="taking the address of a temporary object of type (.*?)", | ||
[ | [d]=" \\[[^\\]]*\\-Waddress\\-of\\-temporary[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"c084bd288815",1359771285,"PR15132: Replace \"address expression must be an lvalue or a function\ndesignator\" diagnostic with mor...","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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_addrof_void"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="ISO C forbids taking the address of an expression of type \'void\'", | |||
[b]=l, | |||
[c]="ISO C forbids taking the address of an expression of type \'void\'", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={"b8c4fd8cfd27",1241390165,"PR2524: downgrade taking address of expression of type \'void\' to an \nextension warning.\n\nllvm-svn: 7...","PR2524: downgrade taking address of expression of type \'void\' to an \nextension warning.\n\nllvm-svn: 70805"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_base_super"]={ | ||
[ | [j]={"super-class-method-mismatch"}, | ||
[i]="super-class-method-mismatch", | |||
[a]="method parameter type %diff{$ does not match super class method parameter type $|does not match super class method parameter type}0,1", | |||
[b]=l, | |||
[c]="method parameter type (?:(.*?) does not match super class method parameter type (.*?)|does not match super class method parameter type)", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wsuper\\-class\\-method\\-mismatch[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"10ff786e1eb8",1249348036,"Compare matching selectors in current and\nsuper class(s) and warn on any parameter\ntype mismatch if ...","Compare matching selectors in current and\nsuper class(s) and warn on any parameter\ntype mismatch if potentially unsafe. \n\nllvm-svn: 78029"}, | ||
[ | [g]={{hb,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_cast_nonscalar"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="C99 forbids casting nonscalar type %0 to the same type", | |||
[b]=l, | |||
[c]="C99 forbids casting nonscalar type (.*?) to the same type", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{wb,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"]={ | ["ext_typecheck_cast_to_union"]={ | ||
[ | [j]={E,"gnu-union-cast",o}, | ||
[i]="gnu-union-cast", | |||
[a]="cast to union type is a GNU extension", | |||
[b]=l, | |||
[c]="cast to union type is a GNU extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-union\\-cast[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{wb,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_compare_complete_incomplete_pointers"]={ | ||
[ | [j]={Lb,o}, | ||
[i]=Lb, | |||
[a]="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]=l, | |||
[c]="pointer comparisons before C11 need to be between two complete or two incomplete types; (.*?) is (?:|in)complete and (.*?) is (?:|in)complete", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wc11\\-extensions[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the n...","[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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_comparison_of_distinct_pointers"]={ | ||
[ | [j]={"compare-distinct-pointer-types"}, | ||
[i]="compare-distinct-pointer-types", | |||
[a]="comparison of distinct pointer types%diff{ ($ and $)|}0,1", | |||
[b]=l, | |||
[ | [c]="comparison of distinct pointer types(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wcompare\\-distinct\\-pointer\\-types[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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(); }"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_comparison_of_fptr_to_void"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="equality comparison between function pointer and void pointer (%0 and %1)", | |||
[b]=l, | |||
[c]="equality comparison between function pointer and void pointer \\((.*?) and (.*?)\\)", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={"16c209610c8b",1250987267,"Catch a few more cases of illegal comparisons.\n\nllvm-svn: 79793","Catch a few more cases of illegal comparisons.\n\nllvm-svn: 79793"}, | ||
[ | [g]={{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(); }"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_comparison_of_pointer_integer"]={ | ||
[ | [j]={"pointer-integer-compare"}, | ||
[i]="pointer-integer-compare", | |||
[a]="comparison between pointer and integer (%0 and %1)", | |||
[b]=l, | |||
[ | [c]="comparison between pointer and integer \\((.*?) and (.*?)\\)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wpointer\\-integer\\-compare[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_cond_incompatible_operands"]={ | ||
[a | [a]="incompatible operand types (%0 and %1)", | ||
[b]=l, | |||
[c]="incompatible operand types \\((.*?) and (.*?)\\)", | |||
[d]=Fb, | |||
[ | [e]=k, | ||
[ | [f]={"1b821b4fc583",1241666054,"Improve semantic checking for blocks. Radar 6441502\n\nllvm-svn: 71145","Improve semantic checking for blocks. Radar 6441502\n\nllvm-svn: 71145"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:78:16: warning: incompatible operand types (\'id<P1>\' and \'A *\')"} | ["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"]={ | ["ext_typecheck_cond_incompatible_pointers"]={ | ||
[ | [j]={"pointer-type-mismatch"}, | ||
[i]="pointer-type-mismatch", | |||
[a]="pointer type mismatch%diff{ ($ and $)|}0,1", | |||
[b]=l, | |||
[ | [c]="pointer type mismatch(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wpointer\\-type\\-mismatch[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_cond_one_void"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="C99 forbids conditional expressions with only one void side", | |||
[b]=l, | |||
[c]="C99 forbids conditional expressions with only one void side", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_cond_pointer_integer_mismatch"]={ | ||
[ | [j]={"conditional-type-mismatch"}, | ||
[i]="conditional-type-mismatch", | |||
[a]="pointer/integer type mismatch in conditional expression%diff{ ($ and $)|}0,1", | |||
[b]=l, | |||
[ | [c]="pointer\\/integer type mismatch in conditional expression(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wconditional\\-type\\-mismatch[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={fb,1405733957,gb,eb}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_convert_discards_qualifiers"]={ | ||
[ | [j]={Fc,"incompatible-pointer-types-discards-qualifiers"}, | ||
[i]="incompatible-pointer-types-discards-qualifiers", | |||
[a]="%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]=l, | |||
[ | [c]="(?:(?: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", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types\\-discards\\-qualifiers[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{U,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_convert_incompatible_function_pointer"]={ | ||
[ | [j]={"incompatible-function-pointer-types",Fc}, | ||
[i]="incompatible-function-pointer-types", | |||
[a]="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]=K, | |||
[ | [c]="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 &)", | ||
[ | [d]=" \\[[^\\]]*\\-Wincompatible\\-function\\-pointer\\-types[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"d9b7dfe4a4df",1468874226,"[Sema] Create a separate group for incompatible function pointer warning\n\nGive incompatible function...","[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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_convert_incompatible_pointer"]={ | ||
[ | [j]={Fc}, | ||
[i]=Fc, | |||
[a]="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]=l, | |||
[ | [c]="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 &)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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;"},{O,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;"},{O,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;"}}, | ||
[ | [h]={ | ||
[ | [Mb]={"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"]={ | ["ext_typecheck_convert_incompatible_pointer_sign"]={ | ||
[ | [j]={"pointer-sign"}, | ||
[i]="pointer-sign", | |||
[a]="%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", | |||
[b]=l, | |||
[ | [c]="(?:(?: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)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wpointer\\-sign[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"80160bd483b3",1237766384,"Partial implementation of PR3342: break out pointer sign \nincompatibilities in assignments from othe...","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"}, | ||
[ | [g]={{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) {"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_convert_int_pointer"]={ | ||
[ | [j]={"conversion","int-conversion","int-conversions","non-gcc"}, | ||
[i]="int-conversion", | |||
[a]="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]=K, | |||
[ | [c]="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 &)", | ||
[ | [d]=" \\[[^\\]]*\\-Wint\\-conversion[^\\]]*\\]", | ||
[ | [e]="Value Conversion Issue", | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_convert_pointer_int"]={ | ||
[ | [j]={"conversion","int-conversion","int-conversions","non-gcc"}, | ||
[i]="int-conversion", | |||
[a]="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]=K, | |||
[ | [c]="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 &)", | ||
[ | [d]=" \\[[^\\]]*\\-Wint\\-conversion[^\\]]*\\]", | ||
[ | [e]="Value Conversion Issue", | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_convert_pointer_void_func"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="%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]=l, | |||
[c]="(?:(?: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", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_decl_incomplete_type"]={ | ||
[ | [j]={"tentative-definition-incomplete-type"}, | ||
[i]="tentative-definition-incomplete-type", | |||
[a]="tentative definition of variable with internal linkage has incomplete non-array type %0", | |||
[b]=l, | |||
[ | [c]="tentative definition of variable with internal linkage has incomplete non\\-array type (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wtentative\\-definition\\-incomplete\\-type[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"47d2859b3e27",1248115619,"Improve GCC compatibility by allowing static tentative definitions of\nincomplete type (with a warnin...","Improve GCC compatibility by allowing static tentative definitions of\nincomplete type (with a warning), from Enea Zaffanella!\n\nllvm-svn: 76451"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_indirection_through_void_pointer"]={ | ||
[ | [j]={"void-ptr-dereference"}, | ||
[i]="void-ptr-dereference", | |||
[a]="ISO C does not allow indirection on operand of type %0", | |||
[b]=l, | |||
[ | [c]="ISO C does not allow indirection on operand of type (.*?)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wvoid\\-ptr\\-dereference[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"80877c228d01",1399499607,"Add an Extension warning for applying unary * to an operand of type \'void*\' in\nC++. This seems like ...","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"}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_ordered_comparison_of_function_pointers"]={ | ||
[ | [j]={"ordered-compare-function-pointers"}, | ||
[i]="ordered-compare-function-pointers", | |||
[a]="ordered comparison of function pointers (%0 and %1)", | |||
[b]=l, | |||
[ | [c]="ordered comparison of function pointers \\((.*?) and (.*?)\\)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wordered\\-compare\\-function\\-pointers[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by\nDavid Majnemer!\n\nllvm-svn: 74513","Implement PR4175, catching some questionable comparisons. Patch by\nDavid Majnemer!\n\nllvm-svn: 74513"}, | ||
[ | [g]={{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"]={ | ["ext_typecheck_ordered_comparison_of_pointer_and_zero"]={ | ||
[ | [j]={o}, | ||
[i]=o, | |||
[a]="ordered comparison between pointer and zero (%0 and %1) is an extension", | |||
[b]=l, | |||
[c]="ordered comparison between pointer and zero \\((.*?) and (.*?)\\) is an extension", | |||
[ | [d]=R, | ||
[ | [e]=k, | ||
[ | [f]={"d99bd52c7395",1250985824,"Eli points out that we really must diagnose \"void* > 0\" as an extension. \nExplicitly add it as an E...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typecheck_ordered_comparison_of_pointer_integer"]={ | ||
[a | [a]="ordered comparison between pointer and integer (%0 and %1)", | ||
[b]=l, | |||
[c]="ordered comparison between pointer and integer \\((.*?) and (.*?)\\)", | |||
[d]=Fb, | |||
[ | [e]=k, | ||
[ | [f]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by\nDavid Majnemer!\n\nllvm-svn: 74513","Implement PR4175, catching some questionable comparisons. Patch by\nDavid Majnemer!\n\nllvm-svn: 74513"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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 *\')"} | ["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"]={ | ["ext_typecheck_zero_array_size"]={ | ||
[ | [j]={E,o,"zero-length-array"}, | ||
[i]="zero-length-array", | |||
[a]="zero size arrays are an extension", | |||
[b]=l, | |||
[c]="zero size arrays are an extension", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wzero\\-length\\-array[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{N,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);"},{M,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:3:24: warning: zero size arrays are an extension [-Wzero-length-array]"} | ["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"]={ | ["ext_typedef_without_a_name"]={ | ||
[ | [j]={vc}, | ||
[i]=vc, | |||
[a]="typedef requires a name", | |||
[b]=l, | |||
[ | [c]="typedef requires a name", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typename_missing"]={ | ||
[ | [j]={"typename-missing"}, | ||
[i]="typename-missing", | |||
[a]="missing \'typename\' prior to dependent type name \'%0%1\'", | |||
[b]=l, | |||
[ | [c]="missing \'typename\' prior to dependent type name \'(.*?)(.*?)\'", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wtypename\\-missing[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"32506ed8be37",1402614228,"Recover from missing \'typename\' in sizeof(T::InnerType)\n\nSummary:\n\'sizeof\' is a UnaryExprOrTypeTrait...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_typename_outside_of_template"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="\'typename\' occurs outside of a template", | |||
[b]=l, | |||
[ | [c]="\'typename\' occurs outside of a template", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'\ndisambiguation keywords outside of te...","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"}, | ||
[ | [g]={{z,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);"},{z,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_undeclared_unqual_id_with_dependent_base"]={ | ||
[a]="use of undeclared identifier | [j]={A,W}, | ||
[ | [i]=W, | ||
[ | [a]="use of undeclared identifier %0; unqualified lookup into dependent bases of class template %1 is a Microsoft extension", | ||
[b]=l, | |||
[ | [c]="use of undeclared identifier (.*?); unqualified lookup into dependent bases of class template (.*?) is a Microsoft extension", | ||
[e]= | [d]=Bb, | ||
[f]= | [e]=k, | ||
[f]={"10ca24c63162",1402444888,"Allow lookup into dependent bases in more places under -fms-compatibility\n\nWe currently allow unqual...","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"}, | |||
[g]={{"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);"}}, | |||
[h]={ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_undefined_internal_type"]={ | ||
[ | [j]={o,"undefined-internal-type"}, | ||
[i]="undefined-internal-type", | |||
[a]="ISO C++ requires a definition in this translation unit for %select{function|variable}0 %q1 because its type does not have linkage", | |||
[b]=l, | |||
[c]="ISO C\\+\\+ requires a definition in this translation unit for (?:function|variable) (.*?) because its type does not have linkage", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wundefined\\-internal\\-type[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"405e2dbf3767",1505892120,"Implement C++ [basic.link]p8.\n\nIf a function or variable has a type with no linkage (and is not exte...","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"}, | ||
[ | [g]={{"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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_unelaborated_friend_type"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="unelaborated friend declaration is a C++11 extension; specify \'%select{struct|interface|union|class|enum}0\' to befriend %1", | |||
[b]=l, | |||
[ | [c]="unelaborated friend declaration is a C\\+\\+11 extension; specify \'(?:struct|interface|union|class|enum)\' to befriend (.*?)", | ||
[ | [d]=S, | ||
[ | [e]=k, | ||
[ | [f]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:\n - When instantiating a friend type template, per...","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"}, | ||
[ | [g]={{t,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_unicode_whitespace"]={ | ||
[ | [j]={"unicode-whitespace"}, | ||
[i]="unicode-whitespace", | |||
[a]="treating Unicode character as whitespace", | |||
[b]=l, | |||
[ | [c]="treating Unicode character as whitespace", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wunicode\\-whitespace[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"7f43dddae066",1359060646,"Handle universal character names and Unicode characters outside of literals.\n\nThis is a missing piec...","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"}, | ||
[ | [g]={{T,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_union_member_of_reference_type"]={ | ||
[ | [j]={A,"microsoft-union-member-reference"}, | ||
[i]="microsoft-union-member-reference", | |||
[a]="union member %0 has reference type %1, which is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="union member (.*?) has reference type (.*?), which is a Microsoft extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-union\\-member\\-reference[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"ed0ae1d70bf8",1369930800,"Microsoft has a language extension which allows union members to be\nreferences. What\'s more, they u...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_unknown_escape"]={ | ||
[ | [j]={"unknown-escape-sequence"}, | ||
[i]="unknown-escape-sequence", | |||
[a]="unknown escape sequence \'\\%0\'", | |||
[b]=l, | |||
[ | [c]="unknown escape sequence \'\\\\(.*?)\'", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wunknown\\-escape\\-sequence[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{X,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);"},{X,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_unqualified_base_class"]={ | ||
[ | [j]={A,W}, | ||
[i]=W, | |||
[a]="unqualified base initializer of class templates is a Microsoft extension", | |||
[b]=l, | |||
[ | [c]="unqualified base initializer of class templates is a Microsoft extension", | ||
[ | [d]=Bb, | ||
[ | [e]=k, | ||
[ | [f]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/cla...","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"}, | ||
[ | [g]={{t,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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_unterminated_char_or_string"]={ | ||
[ | [j]={"invalid-pp-token"}, | ||
[i]="invalid-pp-token", | |||
[a]="missing terminating %select{\'|\'\"\'}0 character", | |||
[b]=l, | |||
[ | [c]="missing terminating (?:\'|\'\"\') character", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Winvalid\\-pp\\-token[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={"7f5ff2175f68",1447466995,"Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119","Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119"}, | ||
[ | [g]={{T,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;"},{T,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaHLSL/cb_error.hlsl"]={"clang/test/SemaHLSL/cb_error.hlsl:40:11: warning: missing terminating \' character [-Winvalid-pp-token]"} | ["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"]={ | ["ext_use_out_of_scope_declaration"]={ | ||
[ | [j]={"out-of-scope-function"}, | ||
[i]="out-of-scope-function", | |||
[a]="use of out-of-scope declaration of %0%select{| whose type is not compatible with that of an implicit declaration}1", | |||
[b]=l, | |||
[ | [c]="use of out\\-of\\-scope declaration of (.*?)(?:| whose type is not compatible with that of an implicit declaration)", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wout\\-of\\-scope\\-function[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"9bfa970a4009",1507081762,"PR34822: Fix a collection of related bugs with our handling of C89 implicit function declarations.\n\n...","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"}, | ||
[ | [g]={{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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_using_attribute_ns"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="default scope specifier for attributes is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="default scope specifier for attributes is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"b7d7a046d8e0",1466770512,"Using for attributes voted into C++17.\n\nllvm-svn: 273666","Using for attributes voted into C++17.\n\nllvm-svn: 273666"}, | ||
[ | [g]={{F,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"]={ | ["ext_using_decl_scoped_enumerator"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="using declaration naming a scoped enumerator is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="using declaration naming a scoped enumerator is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=k, | ||
[ | [f]={lc,1615397021,kc,jc}, | ||
[ | [g]={{t,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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_using_declaration_pack"]={ | ||
[ | [j]={G,ab}, | ||
[i]=G, | |||
[a]="pack expansion of using declaration is a C++17 extension", | |||
[b]=l, | |||
[ | [c]="pack expansion of using declaration is a C\\+\\+17 extension", | ||
[ | [d]=bb, | ||
[ | [e]=q, | ||
[ | [f]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations.\n\nThis change introduces UsingPackDecl...","[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"}, | ||
[ | [g]={{F,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"]={ | ["ext_using_enum_declaration"]={ | ||
[ | [j]={D,V}, | ||
[i]=D, | |||
[a]="using enum declaration is a C++20 extension", | |||
[b]=l, | |||
[ | [c]="using enum declaration is a C\\+\\+20 extension", | ||
[ | [d]=Y, | ||
[ | [e]=q, | ||
[ | [f]={qb,1612659633,ob,pb}, | ||
[ | [g]={{F,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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]"} | ||
} | } | ||
Line 9,840: | Line 7,874: | ||
["ext_using_undefined_std"]={ | ["ext_using_undefined_std"]={ | ||
[a]="using directive refers to implicitly-defined namespace \'std\'", | [a]="using directive refers to implicitly-defined namespace \'std\'", | ||
[ | [b]=l, | ||
[ | [c]="using directive refers to implicitly\\-defined namespace \'std\'", | ||
[d]=Fb, | |||
[ | [e]=k, | ||
[ | [f]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace\n\"std\", with a warning, to impro...","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"}, | ||
[g]={{t,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);"}}, | |||
[h]={ | |||
[ | |||
[ | |||
["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\'"} | ["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"]={ | ["ext_variable_sized_type_in_struct"]={ | ||
[ | [j]={E,"gnu-variable-sized-type-not-at-end"}, | ||
[i]="gnu-variable-sized-type-not-at-end", | |||
[a]="field %0 with variable sized type %1 not at the end of a struct or class is a GNU extension", | |||
[b]=l, | |||
[ | [c]="field (.*?) with variable sized type (.*?) not at the end of a struct or class is a GNU extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-variable\\-sized\\-type\\-not\\-at\\-end[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={C,1237025389,s,s}, | ||
[ | [g]={{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();"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_variable_template"]={ | ||
[ | [j]={db,Eb}, | ||
[i]=db, | |||
[a]="variable templates are a C++14 extension", | |||
[b]=l, | |||
[ | [c]="variable templates are a C\\+\\+14 extension", | ||
[ | [d]=Ob, | ||
[ | [e]=k, | ||
[ | [f]={"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"}, | ||
[ | [g]={{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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_variadic_macro"]={ | ||
[ | [j]={o,zc}, | ||
[i]=zc, | |||
[a]="variadic macros are a C99 feature", | |||
[b]=l, | |||
[c]="variadic macros are a C99 feature", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", | ||
[ | [e]=u, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{P,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_variadic_main"]={ | ||
[ | [j]={tc}, | ||
[i]=tc, | |||
[a]="\'main\' is not allowed to be declared variadic", | |||
[b]=l, | |||
[ | [c]="\'main\' is not allowed to be declared variadic", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"1710cc994ecd",1429805562,"Diagnose variadic main() as an extension; addresses PR17905.\n\nllvm-svn: 235605","Diagnose variadic main() as an extension; addresses PR17905.\n\nllvm-svn: 235605"}, | ||
[ | [g]={{p,12162,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (FTP->isVariadic()) {\n Diag(FD->getLocation(), diag::ext_variadic_main);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:33:5: warning: \'main\' is not allowed to be declared variadic [-Wmain]"} | ["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"]={ | ["ext_variadic_templates"]={ | ||
[ | [j]={L,y}, | ||
[i]=y, | |||
[a]="variadic templates are a C++11 extension", | |||
[b]=l, | |||
[ | [c]="variadic templates are a C\\+\\+11 extension", | ||
[ | [d]=S, | ||
[ | [e]=q, | ||
[ | [f]={"b25d8c3af4a9",1295474355,"Downgrade the \"variadic templates are a C++0x feature\" error to an\nExtWarn. We want variadic templat...","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"}, | ||
[ | [g]={{"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);"},{M,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_vla"]={ | ||
[ | [j]={E,o,"vla","vla-extension"}, | ||
[i]="vla-extension", | |||
[a]="variable length arrays are a C99 feature", | |||
[b]=l, | |||
[c]="variable length arrays are a C99 feature", | |||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wvla\\-extension[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={w,1236199783,v,x}, | ||
[ | [g]={{M,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_vla_folded_to_constant"]={ | ||
[ | [j]={E,dc}, | ||
[i]=dc, | |||
[a]="variable length array folded to constant array as an extension", | |||
[b]=l, | |||
[ | [c]="variable length array folded to constant array as an extension", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgnu\\-folding\\-constant[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"f35de48c9058",1308033490,"when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant\nas...","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"}, | ||
[ | [g]={{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);"},{M,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); }"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_warn_duplicate_declspec"]={ | ||
[ | [j]={"duplicate-decl-specifier"}, | ||
[i]="duplicate-decl-specifier", | |||
[a]="duplicate \'%0\' declaration specifier", | |||
[b]=l, | |||
[ | [c]="duplicate \'(.*?)\' declaration specifier", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wduplicate\\-decl\\-specifier[^\\]]*\\]", | ||
[ | [e]=m, | ||
[ | [f]={"150ca5309e7c",1538608169,"[SEMA] split ExtWarn dupl-decl-spec\'s into Extension and ExtWarn\n\nSummary:\nFor types deduced from ty...","[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"}, | ||
[ | [g]={{B,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)"},{hc,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;"},{hc,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;"},{hc,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"]={ | ["ext_warn_gnu_final"]={ | ||
[ | [j]={qc}, | ||
[i]=qc, | |||
[a]="__final is a GNU extension, consider using C++11 final", | |||
[b]=l, | |||
[ | [c]="__final is a GNU extension, consider using C\\+\\+11 final", | ||
[ | [d]=" \\[(?:\\-Werror,)?\\-Wgcc\\-compat[^\\]]*\\]", | ||
[ | [e]=q, | ||
[ | [f]={"276055bb2f4a",1469788968,"[GCC] Support for __final specifier\n\nAs reported in bug 28473, GCC supports \"final\" functionality in...","[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"}, | ||
[ | [g]={{F,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);"},{F,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);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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"]={ | ["ext_wchar_t_sign_spec"]={ | ||
[ | [j]={"signed-unsigned-wchar"}, | ||
[i]="signed-unsigned-wchar", | |||
[a]="\'%0\' cannot be signed or unsigned", | |||
[b]=K, | |||
[ | [c]="\'(.*?)\' cannot be signed or unsigned", | ||
[ | [d]=" \\[[^\\]]*\\-Wsigned\\-unsigned\\-wchar[^\\]]*\\]", | ||
[ | [e]=k, | ||
[ | [f]={"e8b659fc1ff0",1564430446,"Give the \'signed/unsigned wchar_t\' extension a warning flag, and follow\nGCC 9 in promoting it to an ...","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"}, | ||
[ | [g]={{M,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());"},{M,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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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]"} | ["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]"} | ||
} | } | ||
Line 10,024: | Line 8,023: | ||
["fatal_too_many_errors"]={ | ["fatal_too_many_errors"]={ | ||
[a]="too many errors emitted, stopping now [-ferror-limit=]", | [a]="too many errors emitted, stopping now [-ferror-limit=]", | ||
[ | [b]="fatal error\\: ", | ||
[c]="too many errors emitted, stopping now \\[\\-ferror\\-limit\\=\\]", | |||
[d]=m, | |||
[e]=m, | |||
[ | [f]={"75a0393eb580",1270671718,"add capabilities to stop emitting errors after some limit.\nRight now the limit is 0 (aka disabled)\n\n...","add capabilities to stop emitting errors after some limit.\nRight now the limit is 0 (aka disabled)\n\nllvm-svn: 100684"}, | ||
[ | [g]={{Pc,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)"},{Pc,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);"},{Pc,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) {"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/concept-fatal-error.cpp"]={"fatal error: too many errors emitted, stopping now [-ferror-limit=]"} | ["clang/test/SemaCXX/concept-fatal-error.cpp"]={"fatal error: too many errors emitted, stopping now [-ferror-limit=]"} | ||
} | } | ||
}, | }, | ||
["note_access_constrained_by_path"]={ | ["note_access_constrained_by_path"]={ | ||
[a | [a]="constrained by %select{|implicitly }1%select{private|protected}0 inheritance here", | ||
[b]="note\\: ", | |||
[c]="constrained by (?:|implicitly )(?:private|protected) inheritance here", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"553c0796eedc",1264207592,"Implement elementary access control.\n\nllvm-svn: 94268","Implement elementary access control.\n\nllvm-svn: 94268"}, | ||
[ | [g]={{yc,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaCXX/microsoft-super.cpp"]={"clang/test/SemaCXX/microsoft-super.cpp:23:14: note: constrained by private inheritance here"} | ["clang/test/SemaCXX/microsoft-super.cpp"]={"clang/test/SemaCXX/microsoft-super.cpp:23:14: note: constrained by private inheritance here"} | ||
} | } | ||
}, | }, | ||
["note_access_natural"]={ | ["note_access_natural"]={ | ||
[a | [a]="%select{|implicitly }1declared %select{private|protected}0 here", | ||
[b]="note\\: ", | |||
[c]="(?:|implicitly )declared (?:private|protected) here", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"553c0796eedc",1264207592,"Implement elementary access control.\n\nllvm-svn: 94268","Implement elementary access control.\n\nllvm-svn: 94268"}, | ||
[ | [g]={{yc,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;"},{yc,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;"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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"} | ["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"]={ | ["note_access_protected_restricted_ctordtor"]={ | ||
[a | [a]="protected %select{constructor|destructor}0 can only be used to %select{construct|destroy}0 a base class subobject", | ||
[b]="note\\: ", | |||
[c]="protected (?:constructor|destructor) can only be used to (?:construct|destroy) a base class subobject", | |||
[d]=m, | |||
[ | [e]=k, | ||
[ | [f]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:\n - The [class.protected] restriction is non-tri...","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"}, | ||
[ | [g]={{yc,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());"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["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"} | ["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"} | ||
} | } | ||
} | } | ||
}; | }; |
edits