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=""; | ||
local b=" | local b="regex1"; | ||
local c=" | local c="commit"; | ||
local d=" | local d="category_hist"; | ||
local e=" | local e="regex2"; | ||
local f=" | local f="regex3"; | ||
local g=" | local g="hierarchical_hist"; | ||
local h=" | local h="message_hist"; | ||
local i=" | local i="id_hist"; | ||
local j="source"; | local j="source"; | ||
local k="(?:error|fatal error)\\: "; | local k="(?:error|fatal error)\\: "; | ||
Line 13: | Line 13: | ||
local m="Semantic Issue"; | local m="Semantic Issue"; | ||
local n="clang/lib/Sema/SemaExpr.cpp"; | local n="clang/lib/Sema/SemaExpr.cpp"; | ||
local o="clang/lib/Sema/SemaTemplate.cpp"; | local o="5.0"; | ||
local | local p="10.0"; | ||
local | local q="11.0"; | ||
local r="clang/lib/Sema/SemaTemplate.cpp"; | |||
local s="Update tablegen diagnostic files to be in sync with the def files."; | |||
local t="Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"; | |||
local u=" | local u="5a8987ca5113"; | ||
local v=" | local v="12.0"; | ||
local w=" | local w="clang/lib/Sema/SemaDecl.cpp"; | ||
local x="Parse Issue"; | local x="Parse Issue"; | ||
local y=" | local y="15.0"; | ||
local z="clang/lib/ | local z="clang/lib/Sema/SemaChecking.cpp"; | ||
local A=" | local A="6.0"; | ||
local B=" | local B="clang/lib/Parse/ParsePragma.cpp"; | ||
local C=" | local C="14.0"; | ||
local D=" | local D="9.0"; | ||
local E=" | local E="8.0"; | ||
local F=" | local F="13.0"; | ||
local G=" | local G="Lexical or Preprocessor Issue"; | ||
local H=" | local H="clang/lib/Sema/SemaDeclCXX.cpp"; | ||
local I="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 I="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 J=" | local J="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; | ||
local K=" | local K="b1c4d5507fad"; | ||
local L="clang/lib/Sema/SemaAttr.cpp"; | local L="clang/lib/Sema/SemaAttr.cpp"; | ||
local M="clang/lib/Lex/PPDirectives.cpp"; | local M="16.0"; | ||
local | local N="clang/lib/Lex/PPDirectives.cpp"; | ||
local | local O="7.0"; | ||
local | local P="clang/lib/Sema/SemaExprCXX.cpp"; | ||
local | local Q="clang/lib/Sema/SemaInit.cpp"; | ||
local | local R="clang/lib/Sema/SemaType.cpp"; | ||
local S="[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 T="clang | local T="[WebAssembly] Improve clang diagnostics for wasm attributes"; | ||
local U=" | local U="931fcd3ba011"; | ||
local V=" | local V="clang/lib/Sema/SemaExprMember.cpp"; | ||
local W="function"; | local W="function"; | ||
local X="clang/lib/Lex/Pragma.cpp"; | local X="clang/lib/Lex/Pragma.cpp"; | ||
local Y="clang/test/SemaSYCL/zero-length-arrays.cpp:9:3: error: zero-length arrays are not permitted in SYCL device code"; | local Y="clang/test/SemaSYCL/zero-length-arrays.cpp:9:3: error: zero-length arrays are not permitted in SYCL device code"; | ||
local Z | local Z="clang/lib/Sema/SemaStmt.cpp"; | ||
local ab="95f50964fbf5"; | |||
local bb="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 bb="Implement P2361 Unevaluated string literals"; | ||
local cb="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 db=" | local db="clang/lib/Sema/SemaDeclAttr.cpp"; | ||
local eb | local eb="Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attributes to\nmultiple declarations. An attribute must satisfy the following conditions to\nbe supported by the pragma:\n- It must have a subject list that\'s defined in the TableGen file.\n- It must be documented.\n- It must not be late parsed.\n- It must have a GNU/C++11 spelling.\n\nDifferential Revision: https://reviews.llvm.org/D30009\n\nllvm-svn: 300539"; | ||
local fb="Add #pragma clang attribute"; | |||
local gb=" | local gb="0a849f47d2f7"; | ||
local hb="clang/lib/Sema/SemaObjCProperty.cpp"; | local hb="clang/lib/Sema/SemaObjCProperty.cpp"; | ||
local ib="clang/lib/Parse/ParseDecl.cpp"; | local ib="11.1"; | ||
local | local jb="clang/lib/Parse/ParseDecl.cpp"; | ||
local kb="method"; | |||
local lb=" | local lb="14f6bfcb52e7"; | ||
local mb="[clang] Implement objc_non_runtime_protocol to remove protocol metadata"; | local mb="[clang] Implement objc_non_runtime_protocol to remove protocol metadata"; | ||
local nb=" | local nb="[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"; | ||
local ob=" | local ob="clang/test/Parser/pragma-attribute.cpp"; | ||
local pb=" | local pb="returning A from a function with result type B"; | ||
local qb="kernel function"; | local qb="kernel function"; | ||
local rb=" | local rb="block"; | ||
local sb=" | local sb="arguments to "; | ||
local tb="Mass-rename the handful of error_* diagnostics to err_*.\n\nllvm-svn: 288545"; | local tb="Mass-rename the handful of error_* diagnostics to err_*.\n\nllvm-svn: 288545"; | ||
local ub=" | local ub="execution configuration "; | ||
local vb=" | local vb="Mass-rename the handful of error_* diagnostics to err_*."; | ||
local wb=" | local wb="f881267db9a9"; | ||
local xb=" | local xb="passing A to parameter of type B"; | ||
local yb=" | local yb="passing to parameter of different type"; | ||
local zb=" | local zb="assigning to different types"; | ||
local Ab="converting A to type B"; | local Ab="returning from function with different return type"; | ||
local | local Bb="converting A to type B"; | ||
local | local Cb="converting between types"; | ||
local | local Db="initializing A with an expression of type B"; | ||
local Eb="initializing with expression of different type"; | |||
local Fb=" | local Fb="sending A to parameter of type B"; | ||
local Gb=" | local Gb="sending to parameter of different type"; | ||
local Hb=" | local Hb="casting A to type B"; | ||
local Ib=" | local Ib="casting between types"; | ||
local | local Jb="61d065e21ff3"; | ||
local | local Kb="clang/lib/Sema/SemaDeclObjC.cpp"; | ||
local | local Lb="Let clang atomic builtins fetch add/sub support floating point types"; | ||
local Mb="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"; | |||
local | local Nb="clang/lib/Parse/Parser.cpp"; | ||
local | local Ob=" B"; | ||
local | local Pb="clang/lib/Sema/SemaOverload.cpp"; | ||
local | local Qb="clang/lib/Parse/ParseDeclCXX.cpp"; | ||
local | local Rb="capturing value"; | ||
local Sb="initializing vector element"; | |||
local | local Tb="clang/test/Sema/fp-eval-pragma-with-float-double_t-1.c:28:15: error: cannot use type \'float_t\' within \'#pragma clang fp eval_method\'; type is set according to the default eval method for the translation unit"; | ||
local | local Ub="clang/test/Sema/fp-eval-pragma-with-float-double_t-1.c:30:16: error: cannot use type \'double_t\' within \'#pragma clang fp eval_method\'; type is set according to the default eval method for the translation unit"; | ||
local | local Vb="clang/lib/Parse/ParseExprCXX.cpp"; | ||
local | local Wb="assigning to A from B"; | ||
local | local Xb="copying variable"; | ||
local Yb="copying parameter"; | |||
local | local Zb="returning object"; | ||
local ac="clang/lib/Sema/SemaExprObjC.cpp"; | |||
local bc="allocating object"; | |||
local cc="copying temporary"; | |||
local dc="copying array element"; | |||
local ec="throwing object"; | |||
local fc="copying member subobject"; | |||
local gc="initializing base subobject"; | |||
local hc="739b410f1ff5"; | |||
local ic="7.1"; | |||
local jc="clang/lib/Sema/SemaCast.cpp"; | |||
local kc="s"; | |||
local | local lc="invalid"; | ||
local | local mc="class"; | ||
local | local nc="Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit"; | ||
local | local oc="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"; | ||
local | local pc="function template"; | ||
local | local qc="clang/lib/Sema/Sema.cpp"; | ||
local rc=" (A and B)"; | |||
local | local sc="<unused>"; | ||
local | local tc="class template"; | ||
local | local uc="\'"; | ||
local | local vc="6d485ff455ea"; | ||
local | local wc="Improve static checks for sprintf and __builtin___sprintf_chk"; | ||
local | local xc="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"; | ||
local | local yc="initializing statement expression result"; | ||
local | local zc=" option"; | ||
local | local Ac="clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp"; | ||
local | local Bc="missing"; | ||
local | local Cc="too few "; | ||
local | local Dc=" of type B"; | ||
local | local Ec="clang/lib/Lex/PPMacroExpansion.cpp"; | ||
local | local Fc="variable template"; | ||
local | local Gc="struct"; | ||
local Hc="Refactoring Invocation Issue"; | |||
local Ic="type alias"; | |||
local | local Jc="; dereference with *"; | ||
local | local Kc="; take the address with &"; | ||
local | local Lc="template"; | ||
local | local Mc="clang/test/Parser/cxx2a-concepts-requires-expr.cpp"; | ||
local | local Nc="union"; | ||
local | local Oc="clang/lib/Parse/ParseStmt.cpp"; | ||
local Pc="too many "; | |||
local Qc="; remove *"; | |||
local Rc="typedef"; | |||
local Sc="; remove &"; | |||
local Tc="__host__"; | |||
local Uc="__global__"; | |||
local Vc="3dbcea8b957a"; | |||
local Wc="volatile"; | |||
local Xc="__device__"; | |||
local Yc="__host__ __device__"; | |||
local Zc="Reland [clang] Check unsupported types in expressions"; | |||
local ad="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 bd="clang/lib/Basic/Targets.cpp"; | |||
local cd="clang/test/Preprocessor/line-directive.c"; | |||
local dd="clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"; | |||
local ed="clang/test/SemaCXX/exceptions.cpp"; | |||
local fd="[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"; | |||
local gd="[OPENMP]Fix PR49366: crash on VLAs in task untied regions."; | |||
local hd="f9c3310d32c6"; | |||
local id="lvalue"; | |||
local jd="sizeof"; | |||
local kd="clang/lib/Sema/SemaLambda.cpp"; | |||
local ld="Reimplement reference initialization (C++ [dcl.init.ref]) using the\nnew notion of an \"initialization sequence\", which encapsulates the\ncomputation of the initialization sequence along with diagnostic\ninformation and the capability to turn the computed sequence into an\nexpression. At present, I\'ve only switched one CheckReferenceInit\ncallers over to this new mechanism; more will follow.\n\nAside from (hopefully) being much more true to the standard, the\ndiagnostics provided by this reference-initialization code are a bit\nbetter than before. Some examples:\n\np5-var.cpp:54:12: error: non-const lvalue reference to type \'struct\nDerived\'\n cannot bind to a value of unrelated type \'struct Base\'\n Derived &dr2 = b; // expected-error{{non-const lvalue reference to\n ...\n ^ ~\np5-var.cpp:55:9: error: binding of reference to type \'struct Base\' to\na value of\n type \'struct Base const\' drops qualifiers\n Base &br3 = bc; // expected-error{{drops qualifiers}}\n ^ ~~\n\np5-var.cpp:57:15: error: ambiguous conversion from derived class\n \'struct Diamond\' to base class \'struct Base\':\n struct Diamond -> struct Derived -> struct Base\n struct Diamond -> struct Derived2 -> struct Base\n Base &br5 = diamond; // expected-error{{ambiguous conversion from\n ...\n ^~~~~~~\np5-var.cpp:59:9: error: non-const lvalue reference to type \'long\'\n cannot bind to\n a value of unrelated type \'int\'\n long &lr = i; // expected-error{{non-const lvalue reference to type\n ...\n ^ ~\n\np5-var.cpp:74:9: error: non-const lvalue reference to type \'struct\nBase\' cannot\n bind to a temporary of type \'struct Base\'\n Base &br1 = Base(); // expected-error{{non-const lvalue reference to\n ...\n ^ ~~~~~~\n\np5-var.cpp:102:9: error: non-const reference cannot bind to bit-field\n\'i\'\n int & ir1 = (ib.i); // expected-error{{non-const reference cannot\n ...\n ^ ~~~~~~\np5-var.cpp:98:7: note: bit-field is declared here\n int i : 17; // expected-note{{bit-field is declared here}}\n ^\n\nllvm-svn: 90992"; | |||
local md="f60dc3caa673"; | |||
local nd="[C++20][Modules] Adjust handling of exports of namespaces and using-decls."; | |||
local od="[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"; | |||
local pd="Reimplement reference initialization (C++ [dcl.init.ref]) using the"; | |||
local qd="alignof"; | |||
local rd="3e1e52782604"; | |||
local sd="clang/lib/Driver/ToolChains/Arch/ARM.cpp"; | |||
local td="interface"; | |||
local ud="enum"; | |||
local vd="Add #pragma clang module begin/end pragmas and generate them when preprocessing a module.\n\nThese pragmas are intended to simulate the effect of entering or leaving a file\nwith an associated module. This is not completely implemented yet: declarations\nbetween the pragmas will not be attributed to the correct module, but macro\nvisibility is already functional.\n\nModules named by #pragma clang module begin must already be known to clang (in\nsome module map that\'s either loaded or on the search path).\n\nllvm-svn: 302098"; | |||
local wd="d13863008b38"; | |||
local xd="clang/lib/Parse/ParseTemplate.cpp"; | |||
local yd="Add #pragma clang module begin/end pragmas and generate them when preprocessing a module."; | |||
return { | return { | ||
["err_pp_including_mainfile_in_preamble"]={ | ["err_pp_including_mainfile_in_preamble"]={ | ||
[ | [i]={{nil,D,"err_pp_including_mainfile_in_preamble"}}, | ||
[ | [h]={{nil,D,"main file cannot be included recursively when building a preamble"}}, | ||
[ | [g]={{nil,D,"main file cannot be included recursively when building a preamble"}}, | ||
[ | [b]=k, | ||
[ | [e]="main file cannot be included recursively when building a preamble", | ||
[ | [f]=a, | ||
[ | [d]={{nil,D,G}}, | ||
[ | [c]={"3c28a2dc6bdc",1557483935,"[Preamble] Stop circular inclusion of main file when building preamble","[Preamble] Stop circular inclusion of main file when building preamble\n\nIf a header file was processed for the second time, we could end up with a\nwrong conditional stack and skipped ranges:\n\nIn the particular example, if the header guard is evaluated the second time and\nit is decided to skip the conditional block, the corresponding \"#endif\" is\nnever seen since the preamble does not include it and we end up in the\nTok.is(tok::eof) case with a wrong conditional stack.\n\nDetect the circular inclusion, emit a diagnostic and stop processing the\ninclusion.\n\nllvm-svn: 360418"}, | ||
[j]={{ | [j]={{N,2371,"/// Handle either a #include-like directive or an import declaration that names\n/// a header file.\n///\n/// \\param HashLoc The location of the \'#\' token for an include, or\n/// SourceLocation() for an import declaration.\n/// \\param IncludeTok The include / include_next / import token.\n/// \\param FilenameTok The header-name token.\n/// \\param EndLoc The location at which any imported macros become visible.\n/// \\param LookupFrom For #include_next, the starting directory for the\n/// directory lookup.\n/// \\param LookupFromFile For #include_next, the starting file for the directory\n/// lookup.\nPreprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(SourceLocation HashLoc, Token &IncludeTok, Token &FilenameTok, SourceLocation EndLoc, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Check for circular inclusion of the main file.\n // We can\'t generate a consistent preamble with regard to the conditional\n // stack if the main file is included again as due to the preamble bounds\n // some directives (e.g. #endif of a header guard) will never be seen.\n // Since this will lead to confusing errors, avoid the inclusion.\n if (Action == Enter && File && PreambleConditionalStack.isRecording() && SourceMgr.isMainFile(File->getFileEntry())) {\n Diag(FilenameTok.getLocation(), diag::err_pp_including_mainfile_in_preamble);"}} | ||
}, | }, | ||
["err_pp_invalid_directive"]={ | ["err_pp_invalid_directive"]={ | ||
[ | [i]="err_pp_invalid_directive", | ||
[ | [h]={{nil,y,"invalid preprocessing directive%select{|, did you mean \'#%1\'?}0"},{C,nil,"invalid preprocessing directive"}}, | ||
[ | [g]={{nil,y,{"invalid preprocessing directive",{a,", did you mean \'#B\'?"}}},{C,nil,"invalid preprocessing directive"}}, | ||
[ | [b]=k, | ||
[ | [e]="invalid preprocessing directive(?:|, did you mean \'\\#(.*?)\'\\?)", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{N,1334,"/// 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 Diag(Result, diag::err_pp_invalid_directive) << 0;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/disabled-cond-diags2.c"]={"clang/test/Preprocessor/disabled-cond-diags2.c:14:2: error: invalid preprocessing directive"} | ["clang/test/Preprocessor/disabled-cond-diags2.c"]={"clang/test/Preprocessor/disabled-cond-diags2.c:14:2: error: invalid preprocessing directive"} | ||
Line 180: | Line 208: | ||
}, | }, | ||
["err_pp_invalid_poison"]={ | ["err_pp_invalid_poison"]={ | ||
[ | [i]="err_pp_invalid_poison", | ||
[h]="can only poison identifier tokens", | |||
[g]="can only poison identifier tokens", | |||
[b]=k, | |||
[e]="can only poison identifier tokens", | [e]="can only poison identifier tokens", | ||
[f | [f]=a, | ||
[d]=G, | |||
[c]={K,1236199783,J,I}, | |||
[ | |||
[ | |||
[j]={{X,461,"/// HandlePragmaPoison - Handle \\#pragma GCC poison. PoisonTok is the \'poison\'.\nvoid Preprocessor::HandlePragmaPoison() {\n // ...\n while (true) {\n // ...\n // Can only poison identifiers.\n if (Tok.isNot(tok::raw_identifier)) {\n Diag(Tok, diag::err_pp_invalid_poison);"}} | [j]={{X,461,"/// HandlePragmaPoison - Handle \\#pragma GCC poison. PoisonTok is the \'poison\'.\nvoid Preprocessor::HandlePragmaPoison() {\n // ...\n while (true) {\n // ...\n // Can only poison identifiers.\n if (Tok.isNot(tok::raw_identifier)) {\n Diag(Tok, diag::err_pp_invalid_poison);"}} | ||
}, | }, | ||
["err_pp_invalid_tok_in_arg_list"]={ | ["err_pp_invalid_tok_in_arg_list"]={ | ||
[ | [i]="err_pp_invalid_tok_in_arg_list", | ||
[h]="invalid token in macro parameter list", | |||
[g]="invalid token in macro parameter list", | |||
[b]=k, | |||
[e]="invalid token in macro parameter list", | [e]="invalid token in macro parameter list", | ||
[f | [f]=a, | ||
[d]=G, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{N,2707,"/// 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 if (!II) {\n // ...\n Diag(Tok, diag::err_pp_invalid_tok_in_arg_list);"}} | |||
[ | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_pp_invalid_udl"]={ | ["err_pp_invalid_udl"]={ | ||
[ | [i]="err_pp_invalid_udl", | ||
[ | [h]="%select{character|integer}0 literal with user-defined suffix cannot be used in preprocessor constant expression", | ||
[ | [g]={{nil,nil,{{"character","integer"}," literal with user-defined suffix cannot be used in preprocessor constant expression"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:character|integer) literal with user\\-defined suffix cannot be used in preprocessor constant expression", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={"39570d00201c",1331196332,"Add support for cooked forms of user-defined-integer-literal and","Add support for cooked forms of user-defined-integer-literal and\nuser-defined-floating-literal. Support for raw forms of these literals\nto follow.\n\nllvm-svn: 152302"}, | ||
[j]={{"clang/lib/Lex/PPExpressions.cpp",315,"/// 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 // Complain about, and drop, any ud-suffix.\n if (Literal.hasUDSuffix())\n PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*integer*/ 1;"},{"clang/lib/Lex/PPExpressions.cpp",380,"/// 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::char_constant: // \'x\'\n case tok::wide_char_constant: // L\'x\'\n case tok::utf8_char_constant: // u8\'x\'\n case tok::utf16_char_constant: // u\'x\'\n case tok::utf32_char_constant: { // U\'x\'\n // Complain about, and drop, any ud-suffix.\n if (PeekTok.hasUDSuffix())\n PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*character*/ 0;"}}, | [j]={{"clang/lib/Lex/PPExpressions.cpp",315,"/// 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 // Complain about, and drop, any ud-suffix.\n if (Literal.hasUDSuffix())\n PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*integer*/ 1;"},{"clang/lib/Lex/PPExpressions.cpp",380,"/// 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::char_constant: // \'x\'\n case tok::wide_char_constant: // L\'x\'\n case tok::utf8_char_constant: // u8\'x\'\n case tok::utf16_char_constant: // u\'x\'\n case tok::utf32_char_constant: { // U\'x\'\n // Complain about, and drop, any ud-suffix.\n if (PeekTok.hasUDSuffix())\n PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*character*/ 0;"}}, | ||
[l]={ | [l]={ | ||
Line 216: | Line 244: | ||
}, | }, | ||
["err_pp_line_digit_sequence"]={ | ["err_pp_line_digit_sequence"]={ | ||
[ | [i]="err_pp_line_digit_sequence", | ||
[ | [h]="%select{#line|GNU line marker}0 directive requires a simple digit sequence", | ||
[ | [g]={{nil,nil,{{"#line","GNU line marker"}," directive requires a simple digit sequence"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:\\#line|GNU line marker) directive requires a simple digit sequence", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={"d66f172ab1b6",1240079715,"more fun with line markers: the digit string is required to be interpreted","more fun with line markers: the digit string is required to be interpreted\nas decimal, even if it starts with 0. Also, since things like 0x1 are\ncompletely illegal, don\'t even bother using numericliteralparser for them.\n\nllvm-svn: 69454"}, | ||
[j]={{ | [j]={{N,1375,"/// GetLineValue - Convert a numeric token into an unsigned value, emitting\n/// Diagnostic DiagID if it is invalid, and returning the value in Val.\nstatic bool GetLineValue(Token &DigitTok, unsigned &Val, unsigned DiagID, Preprocessor &PP, bool IsGNULineDirective = false) {\n // ...\n for (unsigned i = 0; i != ActualLength; ++i) {\n // ...\n if (!isDigit(DigitTokBegin[i])) {\n PP.Diag(PP.AdvanceToTokenCharacter(DigitTok.getLocation(), i), diag::err_pp_line_digit_sequence) << IsGNULineDirective;"}}, | ||
[l]={ | [l]={ | ||
[ | [cd]={"foo:49:5: error: GNU line marker directive requires a simple digit sequence","foo.c:4:8: error: #line directive requires a simple digit sequence","foo.c:5:9: error: #line directive requires a simple digit sequence"} | ||
} | } | ||
}, | }, | ||
["err_pp_line_invalid_filename"]={ | ["err_pp_line_invalid_filename"]={ | ||
[ | [i]="err_pp_line_invalid_filename", | ||
[ | [h]="invalid filename for #line directive", | ||
[ | [g]="invalid filename for #line directive", | ||
[ | [b]=k, | ||
[ | [e]="invalid filename for \\#line directive", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{N,1436,"/// 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 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 Diag(StrTok, diag::err_pp_line_invalid_filename);"}}, | ||
[l]={ | [l]={ | ||
[ | [cd]={"clang/test/Preprocessor/line-directive.c:42:10: error: invalid filename for #line directive"} | ||
} | } | ||
}, | }, | ||
["err_pp_line_requires_integer"]={ | ["err_pp_line_requires_integer"]={ | ||
[ | [i]="err_pp_line_requires_integer", | ||
[ | [h]="#line directive requires a positive integer argument", | ||
[ | [g]="#line directive requires a positive integer argument", | ||
[ | [b]=k, | ||
[ | [e]="\\#line directive requires a positive integer argument", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{N,1411,"/// 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 (GetLineValue(DigitTok, LineNo, diag::err_pp_line_requires_integer, *this))"}}, | ||
[l]={ | [l]={ | ||
[ | [cd]={"clang/test/Preprocessor/line-directive.c:14:7: error: #line directive requires a positive integer argument"} | ||
} | } | ||
}, | }, | ||
["err_pp_linemarker_invalid_filename"]={ | ["err_pp_linemarker_invalid_filename"]={ | ||
[ | [i]="err_pp_linemarker_invalid_filename", | ||
[h]="invalid filename for line marker directive", | |||
[g]="invalid filename for line marker directive", | |||
[b]=k, | |||
[e]="invalid filename for line marker directive", | [e]="invalid filename for line marker directive", | ||
[f | [f]=a, | ||
[d]=G, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{N,1452,"/// 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 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 (Literal.Pascal) {\n Diag(StrTok, diag::err_pp_linemarker_invalid_filename);"},{N,1587,"/// 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 Diag(StrTok, diag::err_pp_linemarker_invalid_filename);"},{N,1603,"/// 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 (Literal.Pascal) {\n Diag(StrTok, diag::err_pp_linemarker_invalid_filename);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
[ | [cd]={"foo:44:6: error: invalid filename for line marker directive","foo:45:6: error: invalid filename for line marker directive"} | ||
} | } | ||
}, | }, | ||
["err_pp_linemarker_invalid_flag"]={ | ["err_pp_linemarker_invalid_flag"]={ | ||
[ | [i]="err_pp_linemarker_invalid_flag", | ||
[h]="invalid flag line marker directive", | |||
[g]="invalid flag line marker directive", | |||
[b]=k, | |||
[e]="invalid flag line marker directive", | [e]="invalid flag line marker directive", | ||
[f | [f]=a, | ||
[d]=G, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{N,1488,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (GetLineValue(FlagTok, FlagVal, diag::err_pp_linemarker_invalid_flag, PP))"},{N,1496,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (FlagVal == 1) {\n // ...\n if (GetLineValue(FlagTok, FlagVal, diag::err_pp_linemarker_invalid_flag, PP))"},{N,1522,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (FlagVal == 1) {\n // ...\n } else if (FlagVal == 2) {\n // ...\n if (GetLineValue(FlagTok, FlagVal, diag::err_pp_linemarker_invalid_flag, PP))"},{N,1528,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n // We must have 3 if there are still flags.\n if (FlagVal != 3) {\n PP.Diag(FlagTok, diag::err_pp_linemarker_invalid_flag);"},{N,1537,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (GetLineValue(FlagTok, FlagVal, diag::err_pp_linemarker_invalid_flag, PP))"},{N,1542,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n // We must have 4 if there is yet another flag.\n if (FlagVal != 4) {\n PP.Diag(FlagTok, diag::err_pp_linemarker_invalid_flag);"},{N,1553,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n PP.Diag(FlagTok, diag::err_pp_linemarker_invalid_flag);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
[ | [cd]={"foo:46:14: error: invalid flag line marker directive","foo:47:12: error: invalid flag line marker directive","foo:48:14: error: invalid flag line marker directive"} | ||
} | } | ||
}, | }, | ||
["err_pp_linemarker_invalid_pop"]={ | ["err_pp_linemarker_invalid_pop"]={ | ||
[ | [i]="err_pp_linemarker_invalid_pop", | ||
[ | [h]="invalid line marker flag \'2\': cannot pop empty include stack", | ||
[ | [g]="invalid line marker flag \'2\': cannot pop empty include stack", | ||
[ | [b]=k, | ||
[ | [e]="invalid line marker flag \'2\'\\: cannot pop empty include stack", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{N,1515,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (FlagVal == 1) {\n // ...\n } else if (FlagVal == 2) {\n // ...\n if (IncLoc.isInvalid() || SM.getDecomposedExpansionLoc(IncLoc).first != CurFileID) {\n PP.Diag(FlagTok, diag::err_pp_linemarker_invalid_pop);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/line-directive-system-headers.c"]={"foo:44:12: error: invalid line marker flag \'2\': cannot pop empty include stack","foo:44:12: error: invalid line marker flag \'2\': cannot pop empty include stack"} | ["clang/test/Preprocessor/line-directive-system-headers.c"]={"foo:44:12: error: invalid line marker flag \'2\': cannot pop empty include stack","foo:44:12: error: invalid line marker flag \'2\': cannot pop empty include stack"} | ||
Line 300: | Line 328: | ||
}, | }, | ||
["err_pp_linemarker_requires_integer"]={ | ["err_pp_linemarker_requires_integer"]={ | ||
[ | [i]="err_pp_linemarker_requires_integer", | ||
[h]="line marker directive requires a positive integer argument", | |||
[g]="line marker directive requires a positive integer argument", | |||
[b]=k, | |||
[e]="line marker directive requires a positive integer argument", | [e]="line marker directive requires a positive integer argument", | ||
[f]= | [f]=a, | ||
[ | [d]=G, | ||
[c]={K,1236199783,J,I}, | |||
[j]={{N,1569,"/// 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 (GetLineValue(DigitTok, LineNo, diag::err_pp_linemarker_requires_integer, *this, true))"}} | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_pp_macro_not_identifier"]={ | ["err_pp_macro_not_identifier"]={ | ||
[ | [i]="err_pp_macro_not_identifier", | ||
[h]="macro name must be an identifier", | |||
[g]="macro name must be an identifier", | |||
[b]=k, | |||
[e]="macro name must be an identifier", | [e]="macro name must be an identifier", | ||
[f | [f]=a, | ||
[d]=G, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{N,329,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // ...\n if (!II)\n return Diag(MacroNameTok, diag::err_pp_macro_not_identifier);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/ifdef-recover.c"]={"clang/test/Preprocessor/ifdef-recover.c:9:8: error: macro name must be an identifier","clang/test/Preprocessor/ifdef-recover.c:31:10: error: macro name must be an identifier"} | ["clang/test/Preprocessor/ifdef-recover.c"]={"clang/test/Preprocessor/ifdef-recover.c:9:8: error: macro name must be an identifier","clang/test/Preprocessor/ifdef-recover.c:31:10: error: macro name must be an identifier"} | ||
Line 325: | Line 353: | ||
}, | }, | ||
["err_pp_malformed_ident"]={ | ["err_pp_malformed_ident"]={ | ||
[ | [i]="err_pp_malformed_ident", | ||
[ | [h]="invalid #ident directive", | ||
[ | [g]="invalid #ident directive", | ||
[ | [b]=k, | ||
[ | [e]="invalid \\#ident directive", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{N,1674,"/// HandleIdentSCCSDirective - Handle a #ident/#sccs directive.\n///\nvoid Preprocessor::HandleIdentSCCSDirective(Token &Tok) {\n // ...\n // If the token kind isn\'t a string, it\'s a malformed directive.\n if (StrTok.isNot(tok::string_literal) && StrTok.isNot(tok::wide_string_literal)) {\n Diag(StrTok, diag::err_pp_malformed_ident);"}} | ||
}, | }, | ||
["err_pp_missing_lparen_in_vaopt_use"]={ | ["err_pp_missing_lparen_in_vaopt_use"]={ | ||
[ | [i]={{nil,A,"err_pp_missing_lparen_in_vaopt_use"}}, | ||
[ | [h]={{nil,A,"missing \'(\' following __VA_OPT__"}}, | ||
[ | [g]={{nil,A,"missing \'(\' following __VA_OPT__"}}, | ||
[ | [b]=k, | ||
[ | [e]="missing \'\\(\' following __VA_OPT__", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,G}}, | ||
[ | [c]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)","[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)\n\nThis patch implements an extension to the preprocessor:\n\n__VA_OPT__(contents) --> which expands into its contents if variadic arguments are supplied to the parent macro, or behaves as an empty token if none.\n\n - Currently this feature is only enabled for C++2a (this could be enabled, with some careful tweaks, for other dialects with the appropriate extension or compatibility warnings)\n\n - The patch was reviewed here: https://reviews.llvm.org/D35782 and asides from the above (and moving some of the definition and expansion recognition logic into the corresponding state machines), I believe I incorporated all of Richard\'s suggestions.\n\nA few technicalities (most of which were clarified through private correspondence between rsmith, hubert and thomas) are worth mentioning. Given:\n\n #define F(a,...) a #__VA_OPT__(a ## a) a ## __VA_OPT__(__VA_ARGS__)\n\n - The call F(,) Does not supply any tokens for the variadic arguments and hence VA_OPT behaves as a placeholder.\n - When expanding VA_OPT (for e.g. F(,1) token pasting occurs eagerly within its contents if the contents need to be stringified.\n - A hash or a hashhash prior to VA_OPT does not inhibit expansion of arguments if they are the first token within VA_OPT.\n - When a variadic argument is supplied, argument substitution occurs within the contents as does stringification - and these resulting tokens are inserted back into the macro expansions token stream just prior to the entire stream being rescanned and concatenated.\n\nSee wg21.link/P0306 for further details on the feature.\n\n\nAcknowledgment: This patch would have been poorer if not for Richard Smith\'s usual thoughtful analysis and feedback.\nllvm-svn: 315840"}, | ||
[j]={{ | [j]={{N,2916,"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.isNot(tok::l_paren)) {\n Diag(Tok, diag::err_pp_missing_lparen_in_vaopt_use);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:6:29: error: missing \'(\' following __VA_OPT__"} | ["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:6:29: error: missing \'(\' following __VA_OPT__"} | ||
Line 350: | Line 378: | ||
}, | }, | ||
["err_pp_missing_macro_name"]={ | ["err_pp_missing_macro_name"]={ | ||
[ | [i]="err_pp_missing_macro_name", | ||
[h]="macro name missing", | |||
[g]="macro name missing", | |||
[b]=k, | |||
[e]="macro name missing", | [e]="macro name missing", | ||
[f | [f]=a, | ||
[d]=G, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{N,325,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // Missing macro name?\n if (MacroNameTok.is(tok::eod))\n return Diag(MacroNameTok, diag::err_pp_missing_macro_name);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/ifdef-recover.c"]={"clang/test/Preprocessor/ifdef-recover.c:5:7: error: macro name missing","clang/test/Preprocessor/ifdef-recover.c:13:12: error: macro name missing","clang/test/Preprocessor/ifdef-recover.c:25:9: error: macro name missing"} | ["clang/test/Preprocessor/ifdef-recover.c"]={"clang/test/Preprocessor/ifdef-recover.c:5:7: error: macro name missing","clang/test/Preprocessor/ifdef-recover.c:13:12: error: macro name missing","clang/test/Preprocessor/ifdef-recover.c:25:9: error: macro name missing"} | ||
Line 364: | Line 392: | ||
}, | }, | ||
["err_pp_missing_rparen_in_macro_def"]={ | ["err_pp_missing_rparen_in_macro_def"]={ | ||
[ | [i]="err_pp_missing_rparen_in_macro_def", | ||
[ | [h]="missing \')\' in macro parameter list", | ||
[ | [g]="missing \')\' in macro parameter list", | ||
[ | [b]=k, | ||
[ | [e]="missing \'\\)\' in macro parameter list", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{N,2690,"/// 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 if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_pp_missing_rparen_in_macro_def);"},{N,2699,"/// 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::eod: // #define X(\n Diag(Tok, diag::err_pp_missing_rparen_in_macro_def);"},{N,2740,"/// 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 if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_pp_missing_rparen_in_macro_def);"}} | ||
}, | }, | ||
["err_pp_module_begin_no_module_map"]={ | ["err_pp_module_begin_no_module_map"]={ | ||
[ | [i]={{nil,o,"err_pp_module_begin_no_module_map"}}, | ||
[ | [h]={{nil,o,"no module map available for module %0"}}, | ||
[ | [g]={{nil,o,"no module map available for module A"}}, | ||
[ | [b]=k, | ||
[ | [e]="no module map available for module (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,G}}, | ||
[ | [c]={wd,1493857794,yd,vd}, | ||
[j]={{X,1758,"/// 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 (!M) {\n PP.Diag(ModuleName.front().second, diag::err_pp_module_begin_no_module_map) << Current;"}} | [j]={{X,1758,"/// 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 (!M) {\n PP.Diag(ModuleName.front().second, diag::err_pp_module_begin_no_module_map) << Current;"}} | ||
}, | }, | ||
["err_pp_module_begin_no_submodule"]={ | ["err_pp_module_begin_no_submodule"]={ | ||
[ | [i]={{nil,o,"err_pp_module_begin_no_submodule"}}, | ||
[ | [h]={{nil,o,"submodule %0.%1 not declared in module map"}}, | ||
[ | [g]={{nil,o,"submodule A.B not declared in module map"}}, | ||
[ | [b]=k, | ||
[ | [e]="submodule (.*?)\\.(.*?) not declared in module map", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,G}}, | ||
[ | [c]={wd,1493857794,yd,vd}, | ||
[j]={{X,1764,"/// 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 for (unsigned I = 1; I != ModuleName.size(); ++I) {\n // ...\n if (!NewM) {\n PP.Diag(ModuleName[I].second, diag::err_pp_module_begin_no_submodule) << M->getFullModuleName() << ModuleName[I].first;"}} | [j]={{X,1764,"/// 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 for (unsigned I = 1; I != ModuleName.size(); ++I) {\n // ...\n if (!NewM) {\n PP.Diag(ModuleName[I].second, diag::err_pp_module_begin_no_submodule) << M->getFullModuleName() << ModuleName[I].first;"}} | ||
}, | }, | ||
["err_pp_module_begin_without_module_end"]={ | ["err_pp_module_begin_without_module_end"]={ | ||
[ | [i]={{nil,o,"err_pp_module_begin_without_module_end"}}, | ||
[ | [h]={{nil,o,"no matching \'#pragma clang module end\' for this \'#pragma clang module begin\'"}}, | ||
[ | [g]={{nil,o,"no matching \'#pragma clang module end\' for this \'#pragma clang module begin\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="no matching \'\\#pragma clang module end\' for this \'\\#pragma clang module begin\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,G}}, | ||
[ | [c]={wd,1493857794,yd,vd}, | ||
[j]={{"clang/lib/Lex/PPLexerChange.cpp",353,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if ((LeavingSubmodule || IncludeMacroStack.empty()) && !BuildingSubmoduleStack.empty() && BuildingSubmoduleStack.back().IsPragma) {\n Diag(BuildingSubmoduleStack.back().ImportLoc, diag::err_pp_module_begin_without_module_end);"}}, | [j]={{"clang/lib/Lex/PPLexerChange.cpp",353,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if ((LeavingSubmodule || IncludeMacroStack.empty()) && !BuildingSubmoduleStack.empty() && BuildingSubmoduleStack.back().IsPragma) {\n Diag(BuildingSubmoduleStack.back().ImportLoc, diag::err_pp_module_begin_without_module_end);"}}, | ||
[l]={ | [l]={ | ||
Line 411: | Line 439: | ||
}, | }, | ||
["err_pp_module_begin_wrong_module"]={ | ["err_pp_module_begin_wrong_module"]={ | ||
[ | [i]={{nil,o,"err_pp_module_begin_wrong_module"}}, | ||
[ | [h]={{nil,o,"must specify \'-fmodule-name=%0\' to enter %select{|submodule of }1this module%select{ (current module is %3)|}2"}}, | ||
[ | [g]={{nil,o,{"must specify \'-fmodule-name=A\' to enter ",{a,"submodule of "},"this module",{" (current module is D)",a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="must specify \'\\-fmodule\\-name\\=(.*?)\' to enter (?:|submodule of )this module(?: \\(current module is (.*?)\\)|)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,G}}, | ||
[ | [c]={wd,1493857794,yd,vd}, | ||
[j]={{X,1746,"/// 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 (ModuleName.front().first->getName() != Current) {\n PP.Diag(ModuleName.front().second, diag::err_pp_module_begin_wrong_module) << ModuleName.front().first << (ModuleName.size() > 1) << Current.empty() << Current;"}} | [j]={{X,1746,"/// 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 (ModuleName.front().first->getName() != Current) {\n PP.Diag(ModuleName.front().second, diag::err_pp_module_begin_wrong_module) << ModuleName.front().first << (ModuleName.size() > 1) << Current.empty() << Current;"}} | ||
}, | }, | ||
["err_pp_module_build_missing_end"]={ | ["err_pp_module_build_missing_end"]={ | ||
[ | [i]={{nil,o,"err_pp_module_build_missing_end"}}, | ||
[ | [h]={{nil,o,"no matching \'#pragma clang module endbuild\' for this \'#pragma clang module build\'"}}, | ||
[ | [g]={{nil,o,"no matching \'#pragma clang module endbuild\' for this \'#pragma clang module build\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="no matching \'\\#pragma clang module endbuild\' for this \'\\#pragma clang module build\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,G}}, | ||
[ | [c]={"5d2ed489870c",1497036152,"Add #pragma clang module build/endbuild pragmas for performing a module build","Add #pragma clang module build/endbuild pragmas for performing a module build\nas part of a compilation.\n\nThis is intended for two purposes:\n\n1) Writing self-contained test cases for modules: we can now write a single\nsource file test that builds some number of module files on the side and\nimports them.\n\n2) Debugging / test case reduction. A single-source testcase is much more\namenable to reduction, compared to a VFS tarball or .pcm files.\n\nllvm-svn: 305101"}, | ||
[j]={{X,841,"void Preprocessor::HandlePragmaModuleBuild(Token &Tok) {\n // ...\n while (true) {\n // ...\n if (Tok.is(tok::eof)) {\n Diag(Loc, diag::err_pp_module_build_missing_end);"}}, | [j]={{X,841,"void Preprocessor::HandlePragmaModuleBuild(Token &Tok) {\n // ...\n while (true) {\n // ...\n if (Tok.is(tok::eof)) {\n Diag(Loc, diag::err_pp_module_build_missing_end);"}}, | ||
[l]={ | [l]={ | ||
Line 436: | Line 464: | ||
}, | }, | ||
["err_pp_module_end_without_module_begin"]={ | ["err_pp_module_end_without_module_begin"]={ | ||
[ | [i]={{nil,o,"err_pp_module_end_without_module_begin"}}, | ||
[ | [h]={{nil,o,"no matching \'#pragma clang module begin\' for this \'#pragma clang module end\'"}}, | ||
[ | [g]={{nil,o,"no matching \'#pragma clang module begin\' for this \'#pragma clang module end\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="no matching \'\\#pragma clang module begin\' for this \'\\#pragma clang module end\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,G}}, | ||
[ | [c]={wd,1493857794,yd,vd}, | ||
[j]={{X,1802,"/// 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 (M)\n // ...\n else\n PP.Diag(Loc, diag::err_pp_module_end_without_module_begin);"}}, | [j]={{X,1802,"/// 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 (M)\n // ...\n else\n PP.Diag(Loc, diag::err_pp_module_end_without_module_begin);"}}, | ||
[l]={ | [l]={ | ||
Line 450: | Line 478: | ||
}, | }, | ||
["err_pp_nested_paren"]={ | ["err_pp_nested_paren"]={ | ||
[ | [i]="err_pp_nested_paren", | ||
[ | [h]="nested parentheses not permitted in %0", | ||
[ | [g]="nested parentheses not permitted in A", | ||
[ | [b]=k, | ||
[ | [e]="nested parentheses not permitted in (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={"50b6ceff1f06",1459845407,"Consolidate and improve the handling of built-in feature-like macros","Consolidate and improve the handling of built-in feature-like macros\n\nSummary:\nThe parsing logic has been separated out from the macro implementation logic, leading to a number of improvements:\n\n* Gracefully handle unexpected/invalid tokens, too few, too many and nested parameters\n* Provide consistent behaviour between all built-in feature-like macros\n* Simplify the implementation of macro logic\n* Fix __is_identifier to correctly return \'0\' for non-identifiers\n\nReviewers: doug.gregor, rsmith\n\nSubscribers: rsmith, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D17149\n\nllvm-svn: 265381"}, | ||
[j]={{ | [j]={{Ec,1337,"/// 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::l_paren:\n // ...\n if (!SuppressDiagnostic) {\n PP.Diag(Tok.getLocation(), diag::err_pp_nested_paren) << II;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/feature_tests.c"]={"clang/test/Preprocessor/feature_tests.c:122:21: error: nested parentheses not permitted in \'__is_identifier\'"} | ["clang/test/Preprocessor/feature_tests.c"]={"clang/test/Preprocessor/feature_tests.c:122:21: error: nested parentheses not permitted in \'__is_identifier\'"} | ||
Line 464: | Line 492: | ||
}, | }, | ||
["err_pp_operator_used_as_macro_name"]={ | ["err_pp_operator_used_as_macro_name"]={ | ||
[ | [i]="err_pp_operator_used_as_macro_name", | ||
[ | [h]="C++ operator %0 (aka %1) used as a macro name", | ||
[ | [g]="C++ operator A (aka B) used as a macro name", | ||
[ | [b]=k, | ||
[ | [e]="C\\+\\+ operator (.*?) \\(aka (.*?)\\) used as a macro name", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{N,336,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // ...\n if (II->isCPlusPlusOperatorKeyword()) {\n // ...\n Diag(MacroNameTok, getLangOpts().MicrosoftExt ? diag::ext_pp_operator_used_as_macro_name : diag::err_pp_operator_used_as_macro_name) << II << MacroNameTok.getKind();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/cxx_oper_keyword.cpp"]={"clang/test/Preprocessor/cxx_oper_keyword.cpp:16:9: error: C++ operator \'and\' (aka \'&&\') used as a macro name","clang/test/Preprocessor/cxx_oper_keyword.cpp:21:13: error: C++ operator \'xor\' (aka \'^\') used as a macro name","clang/test/Preprocessor/cxx_oper_keyword.cpp:29:8: error: C++ operator \'and\' (aka \'&&\') used as a macro name"} | ["clang/test/Preprocessor/cxx_oper_keyword.cpp"]={"clang/test/Preprocessor/cxx_oper_keyword.cpp:16:9: error: C++ operator \'and\' (aka \'&&\') used as a macro name","clang/test/Preprocessor/cxx_oper_keyword.cpp:21:13: error: C++ operator \'xor\' (aka \'^\') used as a macro name","clang/test/Preprocessor/cxx_oper_keyword.cpp:29:8: error: C++ operator \'and\' (aka \'&&\') used as a macro name"} | ||
Line 478: | Line 506: | ||
}, | }, | ||
["err_pp_pragma_hdrstop_not_seen"]={ | ["err_pp_pragma_hdrstop_not_seen"]={ | ||
[ | [i]={{nil,E,"err_pp_pragma_hdrstop_not_seen"}}, | ||
[ | [h]={{nil,E,"#pragma hdrstop not seen while attempting to use precompiled header"}}, | ||
[ | [g]={{nil,E,"#pragma hdrstop not seen while attempting to use precompiled header"}}, | ||
[ | [b]="fatal error\\: ", | ||
[ | [e]="\\#pragma hdrstop not seen while attempting to use precompiled header", | ||
[ | [f]=a, | ||
[ | [d]={{nil,E,G}}, | ||
[ | [c]={"58df1affedc0",1536685844,"[clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop","[clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop\n\nWith clang-cl, when the user specifies /Yc or /Yu without a filename\nthe compiler uses a #pragma hdrstop in the main source file to\ndetermine the end of the PCH. If a header is specified with /Yc or\n/Yu #pragma hdrstop has no effect.\n\nThe optional #pragma hdrstop filename argument is not yet supported.\n\nDifferential Revision: https://reviews.llvm.org/D51391\n\nllvm-svn: 341963"}, | ||
[j]={{"clang/lib/Lex/Preprocessor.cpp",675,"/// Skip tokens until after the #include of the through header or\n/// until after a #pragma hdrstop is seen. Tokens in the predefines file\n/// and the main file may be skipped. If the end of the predefines file\n/// is reached, skipping continues into the main file. If the end of the\n/// main file is reached, it\'s a fatal error.\nvoid Preprocessor::SkipTokensWhileUsingPCH() {\n // ...\n if (ReachedMainFileEOF) {\n if (UsingPCHThroughHeader)\n // ...\n else if (!PPOpts->PCHWithHdrStopCreate)\n Diag(SourceLocation(), diag::err_pp_pragma_hdrstop_not_seen);"}} | [j]={{"clang/lib/Lex/Preprocessor.cpp",675,"/// Skip tokens until after the #include of the through header or\n/// until after a #pragma hdrstop is seen. Tokens in the predefines file\n/// and the main file may be skipped. If the end of the predefines file\n/// is reached, skipping continues into the main file. If the end of the\n/// main file is reached, it\'s a fatal error.\nvoid Preprocessor::SkipTokensWhileUsingPCH() {\n // ...\n if (ReachedMainFileEOF) {\n if (UsingPCHThroughHeader)\n // ...\n else if (!PPOpts->PCHWithHdrStopCreate)\n Diag(SourceLocation(), diag::err_pp_pragma_hdrstop_not_seen);"}} | ||
}, | }, | ||
["err_pp_pragma_unsafe_buffer_usage_syntax"]={ | ["err_pp_pragma_unsafe_buffer_usage_syntax"]={ | ||
[ | [i]="err_pp_pragma_unsafe_buffer_usage_syntax", | ||
[h]="Expected \'begin\' or \'end\'", | |||
[g]="Expected \'begin\' or \'end\'", | |||
[b]=k, | |||
[e]="Expected \'begin\' or \'end\'", | [e]="Expected \'begin\' or \'end\'", | ||
[f | [f]=a, | ||
[d]=G, | |||
[c]={ab,1625925174,bb,cb}, | |||
[ | |||
[ | |||
[j]={{X,1257,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok, diag::err_pp_pragma_unsafe_buffer_usage_syntax);"},{X,1271,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"begin\")) {\n // ...\n } else if (II->isStr(\"end\")) {\n // ...\n } else\n PP.Diag(Tok, diag::err_pp_pragma_unsafe_buffer_usage_syntax);"}}, | [j]={{X,1257,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok, diag::err_pp_pragma_unsafe_buffer_usage_syntax);"},{X,1271,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"begin\")) {\n // ...\n } else if (II->isStr(\"end\")) {\n // ...\n } else\n PP.Diag(Tok, diag::err_pp_pragma_unsafe_buffer_usage_syntax);"}}, | ||
[l]={ | [l]={ | ||
Line 503: | Line 531: | ||
}, | }, | ||
["err_pp_remainder_by_zero"]={ | ["err_pp_remainder_by_zero"]={ | ||
[ | [i]="err_pp_remainder_by_zero", | ||
[h]="remainder by zero in preprocessor expression", | |||
[g]="remainder by zero in preprocessor expression", | |||
[b]=k, | |||
[e]="remainder by zero in preprocessor expression", | [e]="remainder by zero in preprocessor expression", | ||
[f | [f]=a, | ||
[d]=G, | |||
[c]={K,1236199783,J,I}, | |||
[ | |||
[ | |||
[j]={{"clang/lib/Lex/PPExpressions.cpp",709,"/// 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::percent:\n if (RHS.Val != 0)\n // ...\n else if (ValueLive) {\n PP.Diag(OpLoc, diag::err_pp_remainder_by_zero) << LHS.getRange() << RHS.getRange();"}} | [j]={{"clang/lib/Lex/PPExpressions.cpp",709,"/// 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::percent:\n if (RHS.Val != 0)\n // ...\n else if (ValueLive) {\n PP.Diag(OpLoc, diag::err_pp_remainder_by_zero) << LHS.getRange() << RHS.getRange();"}} | ||
}, | }, | ||
["err_pp_stringize_not_parameter"]={ | ["err_pp_stringize_not_parameter"]={ | ||
[ | [i]="err_pp_stringize_not_parameter", | ||
[ | [h]="\'%select{#|#@}0\' is not followed by a macro parameter", | ||
[ | [g]={{nil,nil,{uc,{"#","#@"},"\' is not followed by a macro parameter"}}}, | ||
[ | [b]=k, | ||
[ | [e]="\'(?:\\#|\\#@)\' is not followed by a macro parameter", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{N,2999,"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 // Check for a valid macro arg identifier or __VA_OPT__.\n if (!VAOCtx.isVAOptToken(Tok) && (Tok.getIdentifierInfo() == nullptr || MI->getParameterNum(Tok.getIdentifierInfo()) == -1)) {\n // If this is assembler-with-cpp mode, we accept random gibberish after\n // the \'#\' because \'#\' is often a comment character. However, change\n // the kind of the token to tok::unknown so that the preprocessor isn\'t\n // confused.\n if (getLangOpts().AsmPreprocessor && Tok.isNot(tok::eod)) {\n // ...\n } else {\n Diag(Tok, diag::err_pp_stringize_not_parameter) << LastTok.is(tok::hashat);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/stringize_skipped.c"]={"clang/test/Preprocessor/stringize_skipped.c:5:20: error: \'#\' is not followed by a macro parameter"} | ["clang/test/Preprocessor/stringize_skipped.c"]={"clang/test/Preprocessor/stringize_skipped.c:5:20: error: \'#\' is not followed by a macro parameter"} | ||
Line 528: | Line 556: | ||
}, | }, | ||
["err_pp_through_header_not_found"]={ | ["err_pp_through_header_not_found"]={ | ||
[ | [i]={{nil,O,"err_pp_through_header_not_found"}}, | ||
[ | [h]={{nil,O,"\'%0\' required for precompiled header not found"}}, | ||
[ | [g]={{nil,O,"\'A\' required for precompiled header not found"}}, | ||
[ | [b]="fatal error\\: ", | ||
[ | [e]="\'(.*?)\' required for precompiled header not found", | ||
[ | [f]=a, | ||
[ | [d]={{nil,O,G}}, | ||
[ | [c]={"76675de15cfc",1530811333,"[clang-cl, PCH] Implement support for MS-style PCH through headers","[clang-cl, PCH] Implement support for MS-style PCH through headers\n\nImplement support for MS-style PCH through headers.\n\nThis enables support for /Yc and /Yu where the through header is either\non the command line or included in the source. It replaces the current\nsupport the requires the header also be specified with /FI.\n\nThis change adds a -cc1 option -pch-through-header that is used to either\nstart or stop compilation during PCH create or use.\n\nWhen creating a PCH, the compilation ends after compilation of the through\nheader.\n\nWhen using a PCH, tokens are skipped until after the through header is seen.\n\nPatch By: mikerice\nDifferential Revision: https://reviews.llvm.org/D46652\n\nllvm-svn: 336379"}, | ||
[j]={{"clang/lib/Lex/Preprocessor.cpp",587,"/// EnterMainSourceFile - Enter the specified FileID as the main source file,\n/// which implicitly adds the builtin defines etc.\nvoid Preprocessor::EnterMainSourceFile() {\n // ...\n if (!PPOpts->PCHThroughHeader.empty()) {\n // ...\n if (!File) {\n Diag(SourceLocation(), diag::err_pp_through_header_not_found) << PPOpts->PCHThroughHeader;"}} | [j]={{"clang/lib/Lex/Preprocessor.cpp",587,"/// EnterMainSourceFile - Enter the specified FileID as the main source file,\n/// which implicitly adds the builtin defines etc.\nvoid Preprocessor::EnterMainSourceFile() {\n // ...\n if (!PPOpts->PCHThroughHeader.empty()) {\n // ...\n if (!File) {\n Diag(SourceLocation(), diag::err_pp_through_header_not_found) << PPOpts->PCHThroughHeader;"}} | ||
}, | }, | ||
["err_pp_through_header_not_seen"]={ | ["err_pp_through_header_not_seen"]={ | ||
[ | [i]={{nil,O,"err_pp_through_header_not_seen"}}, | ||
[ | [h]={{nil,O,"#include of \'%0\' not seen while attempting to %select{create|use}1 precompiled header"}}, | ||
[ | [g]={{nil,O,{"#include of \'A\' not seen while attempting to ",{"create","use"}," precompiled header"}}}, | ||
[ | [b]="fatal error\\: ", | ||
[ | [e]="\\#include of \'(.*?)\' not seen while attempting to (?:create|use) precompiled header", | ||
[ | [f]=a, | ||
[ | [d]={{nil,O,G}}, | ||
[ | [c]={"76675de15cfc",1530811333,"[clang-cl, PCH] Implement support for MS-style PCH through headers","[clang-cl, PCH] Implement support for MS-style PCH through headers\n\nImplement support for MS-style PCH through headers.\n\nThis enables support for /Yc and /Yu where the through header is either\non the command line or included in the source. It replaces the current\nsupport the requires the header also be specified with /FI.\n\nThis change adds a -cc1 option -pch-through-header that is used to either\nstart or stop compilation during PCH create or use.\n\nWhen creating a PCH, the compilation ends after compilation of the through\nheader.\n\nWhen using a PCH, tokens are skipped until after the through header is seen.\n\nPatch By: mikerice\nDifferential Revision: https://reviews.llvm.org/D46652\n\nllvm-svn: 336379"}, | ||
[j]={{"clang/lib/Lex/PPLexerChange.cpp",566,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if (creatingPCHWithThroughHeader() && !LeavingPCHThroughHeader) {\n // ...\n Diag(CurLexer->getFileLoc(), diag::err_pp_through_header_not_seen) << PPOpts->PCHThroughHeader << 0;"},{"clang/lib/Lex/Preprocessor.cpp",672,"/// Skip tokens until after the #include of the through header or\n/// until after a #pragma hdrstop is seen. Tokens in the predefines file\n/// and the main file may be skipped. If the end of the predefines file\n/// is reached, skipping continues into the main file. If the end of the\n/// main file is reached, it\'s a fatal error.\nvoid Preprocessor::SkipTokensWhileUsingPCH() {\n // ...\n if (ReachedMainFileEOF) {\n if (UsingPCHThroughHeader)\n Diag(SourceLocation(), diag::err_pp_through_header_not_seen) << PPOpts->PCHThroughHeader << 1;"}} | [j]={{"clang/lib/Lex/PPLexerChange.cpp",566,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if (creatingPCHWithThroughHeader() && !LeavingPCHThroughHeader) {\n // ...\n Diag(CurLexer->getFileLoc(), diag::err_pp_through_header_not_seen) << PPOpts->PCHThroughHeader << 0;"},{"clang/lib/Lex/Preprocessor.cpp",672,"/// Skip tokens until after the #include of the through header or\n/// until after a #pragma hdrstop is seen. Tokens in the predefines file\n/// and the main file may be skipped. If the end of the predefines file\n/// is reached, skipping continues into the main file. If the end of the\n/// main file is reached, it\'s a fatal error.\nvoid Preprocessor::SkipTokensWhileUsingPCH() {\n // ...\n if (ReachedMainFileEOF) {\n if (UsingPCHThroughHeader)\n Diag(SourceLocation(), diag::err_pp_through_header_not_seen) << PPOpts->PCHThroughHeader << 1;"}} | ||
}, | }, | ||
["err_pp_unclosed_pragma_unsafe_buffer_usage"]={ | ["err_pp_unclosed_pragma_unsafe_buffer_usage"]={ | ||
[ | [i]="err_pp_unclosed_pragma_unsafe_buffer_usage", | ||
[ | [h]="\'#pragma unsafe_buffer_usage\' was not ended", | ||
[ | [g]="\'#pragma unsafe_buffer_usage\' was not ended", | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma unsafe_buffer_usage\' was not ended", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{"clang/lib/Lex/PPLexerChange.cpp",344,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if (IncludeMacroStack.empty() && isPPInSafeBufferOptOutRegion(UnclosedSafeBufferOptOutLoc)) {\n // ...\n Diag(UnclosedSafeBufferOptOutLoc, diag::err_pp_unclosed_pragma_unsafe_buffer_usage);"}}, | [j]={{"clang/lib/Lex/PPLexerChange.cpp",344,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if (IncludeMacroStack.empty() && isPPInSafeBufferOptOutRegion(UnclosedSafeBufferOptOutLoc)) {\n // ...\n Diag(UnclosedSafeBufferOptOutLoc, diag::err_pp_unclosed_pragma_unsafe_buffer_usage);"}}, | ||
[l]={ | [l]={ | ||
Line 564: | Line 592: | ||
}, | }, | ||
["err_pp_unmatched_end_begin_pragma_unsafe_buffer_usage"]={ | ["err_pp_unmatched_end_begin_pragma_unsafe_buffer_usage"]={ | ||
[ | [i]="err_pp_unmatched_end_begin_pragma_unsafe_buffer_usage", | ||
[ | [h]="not currently inside \'#pragma unsafe_buffer_usage\'", | ||
[ | [g]="not currently inside \'#pragma unsafe_buffer_usage\'", | ||
[ | [b]=k, | ||
[ | [e]="not currently inside \'\\#pragma unsafe_buffer_usage\'", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{X,1269,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"begin\")) {\n // ...\n } else if (II->isStr(\"end\")) {\n if (PP.enterOrExitSafeBufferOptOutRegion(false, Loc))\n PP.Diag(Loc, diag::err_pp_unmatched_end_begin_pragma_unsafe_buffer_usage);"}}, | [j]={{X,1269,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"begin\")) {\n // ...\n } else if (II->isStr(\"end\")) {\n if (PP.enterOrExitSafeBufferOptOutRegion(false, Loc))\n PP.Diag(Loc, diag::err_pp_unmatched_end_begin_pragma_unsafe_buffer_usage);"}}, | ||
[l]={ | [l]={ | ||
Line 578: | Line 606: | ||
}, | }, | ||
["err_pp_unmatched_end_of_arc_cf_code_audited"]={ | ["err_pp_unmatched_end_of_arc_cf_code_audited"]={ | ||
[ | [i]="err_pp_unmatched_end_of_arc_cf_code_audited", | ||
[ | [h]="not currently inside \'#pragma clang arc_cf_code_audited\'", | ||
[ | [g]="not currently inside \'#pragma clang arc_cf_code_audited\'", | ||
[ | [b]=k, | ||
[ | [e]="not currently inside \'\\#pragma clang arc_cf_code_audited\'", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={"32f5fe1467c4",1317359532,"Add explicit attributes to mark functions as having had their","Add explicit attributes to mark functions as having had their\nCoreFoundation object-transfer properties audited, and add a #pragma\nto cause them to be automatically applied to functions in a particular\nspan of code. This has to be implemented largely in the preprocessor\nbecause of the requirement that the region be entirely contained in\na single file; that\'s hard to impose from the parser without registering\nfor a ton of callbacks.\n\nllvm-svn: 140846"}, | ||
[j]={{X,1906,"/// 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 (IsBegin) {\n // ...\n } else {\n // Complain about attempts to leave an audit that doesn\'t exist.\n if (!BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_unmatched_end_of_arc_cf_code_audited);"}}, | [j]={{X,1906,"/// 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 (IsBegin) {\n // ...\n } else {\n // Complain about attempts to leave an audit that doesn\'t exist.\n if (!BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_unmatched_end_of_arc_cf_code_audited);"}}, | ||
[l]={ | [l]={ | ||
Line 592: | Line 620: | ||
}, | }, | ||
["err_pp_unmatched_end_of_assume_nonnull"]={ | ["err_pp_unmatched_end_of_assume_nonnull"]={ | ||
[ | [i]="err_pp_unmatched_end_of_assume_nonnull", | ||
[ | [h]="not currently inside \'#pragma clang assume_nonnull\'", | ||
[ | [g]="not currently inside \'#pragma clang assume_nonnull\'", | ||
[ | [b]=k, | ||
[ | [e]="not currently inside \'\\#pragma clang assume_nonnull\'", | ||
[ | [f]=a, | ||
[ | [d]="Nullability Issue", | ||
[ | [c]={"2a20bd1a9457",1434738357,"Introduced pragmas for audited nullability regions.","Introduced pragmas for audited nullability regions.\n\nIntroduce the clang pragmas \"assume_nonnull begin\" and \"assume_nonnull\nend\" in which we make default assumptions about the nullability of many\nunannotated pointers:\n\n - Single-level pointers are inferred to __nonnull\n - NSError** in a (function or method) parameter list is inferred to\n NSError * __nullable * __nullable.\n - CFErrorRef * in a (function or method) parameter list is inferred\n to CFErrorRef __nullable * __nullable.\n - Other multi-level pointers are never inferred to anything.\n\nImplements rdar://problem/19191042.\n\nllvm-svn: 240156"}, | ||
[j]={{X,1964,"/// 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 (IsBegin) {\n // ...\n } else {\n // Complain about attempts to leave an audit that doesn\'t exist.\n if (!BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_unmatched_end_of_assume_nonnull);"}} | [j]={{X,1964,"/// 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 (IsBegin) {\n // ...\n } else {\n // Complain about attempts to leave an audit that doesn\'t exist.\n if (!BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_unmatched_end_of_assume_nonnull);"}} | ||
}, | }, | ||
["err_pp_unterminated_conditional"]={ | ["err_pp_unterminated_conditional"]={ | ||
[ | [i]="err_pp_unterminated_conditional", | ||
[h]="unterminated conditional directive", | |||
[g]="unterminated conditional directive", | |||
[b]=k, | |||
[e]="unterminated conditional directive", | [e]="unterminated conditional directive", | ||
[f | [f]=a, | ||
[d]=G, | |||
[c]={K,1236199783,J,I}, | |||
[ | |||
[ | |||
[j]={{"clang/lib/Lex/Lexer.cpp",3037,"/// 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 // If we are in a #if directive, emit an error.\n while (!ConditionalStack.empty()) {\n if (PP->getCodeCompletionFileLoc() != FileLoc)\n PP->Diag(ConditionalStack.back().IfLoc, diag::err_pp_unterminated_conditional);"}}, | [j]={{"clang/lib/Lex/Lexer.cpp",3037,"/// 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 // If we are in a #if directive, emit an error.\n while (!ConditionalStack.empty()) {\n if (PP->getCodeCompletionFileLoc() != FileLoc)\n PP->Diag(ConditionalStack.back().IfLoc, diag::err_pp_unterminated_conditional);"}}, | ||
[l]={ | [l]={ | ||
Line 617: | Line 645: | ||
}, | }, | ||
["err_pp_used_poisoned_id"]={ | ["err_pp_used_poisoned_id"]={ | ||
[ | [i]="err_pp_used_poisoned_id", | ||
[h]="attempt to use a poisoned identifier", | |||
[g]="attempt to use a poisoned identifier", | |||
[b]=k, | |||
[e]="attempt to use a poisoned identifier", | [e]="attempt to use a poisoned identifier", | ||
[f]= | [f]=a, | ||
[ | [d]=G, | ||
[c]={K,1236199783,J,I}, | |||
[ | |||
[j]={{"clang/lib/Lex/Preprocessor.cpp",768,"void Preprocessor::HandlePoisonedIdentifier(Token &Identifier) {\n // ...\n if (it == PoisonReasons.end())\n Diag(Identifier, diag::err_pp_used_poisoned_id);"}}, | [j]={{"clang/lib/Lex/Preprocessor.cpp",768,"void Preprocessor::HandlePoisonedIdentifier(Token &Identifier) {\n // ...\n if (it == PoisonReasons.end())\n Diag(Identifier, diag::err_pp_used_poisoned_id);"}}, | ||
[l]={ | [l]={ | ||
Line 631: | Line 659: | ||
}, | }, | ||
["err_pp_vaopt_nested_use"]={ | ["err_pp_vaopt_nested_use"]={ | ||
[ | [i]={{nil,A,"err_pp_vaopt_nested_use"}}, | ||
[ | [h]={{nil,A,"__VA_OPT__ cannot be nested within its own replacement tokens"}}, | ||
[ | [g]={{nil,A,"__VA_OPT__ cannot be nested within its own replacement tokens"}}, | ||
[ | [b]=k, | ||
[ | [e]="__VA_OPT__ cannot be nested within its own replacement tokens", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,G}}, | ||
[ | [c]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)","[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)\n\nThis patch implements an extension to the preprocessor:\n\n__VA_OPT__(contents) --> which expands into its contents if variadic arguments are supplied to the parent macro, or behaves as an empty token if none.\n\n - Currently this feature is only enabled for C++2a (this could be enabled, with some careful tweaks, for other dialects with the appropriate extension or compatibility warnings)\n\n - The patch was reviewed here: https://reviews.llvm.org/D35782 and asides from the above (and moving some of the definition and expansion recognition logic into the corresponding state machines), I believe I incorporated all of Richard\'s suggestions.\n\nA few technicalities (most of which were clarified through private correspondence between rsmith, hubert and thomas) are worth mentioning. Given:\n\n #define F(a,...) a #__VA_OPT__(a ## a) a ## __VA_OPT__(__VA_ARGS__)\n\n - The call F(,) Does not supply any tokens for the variadic arguments and hence VA_OPT behaves as a placeholder.\n - When expanding VA_OPT (for e.g. F(,1) token pasting occurs eagerly within its contents if the contents need to be stringified.\n - A hash or a hashhash prior to VA_OPT does not inhibit expansion of arguments if they are the first token within VA_OPT.\n - When a variadic argument is supplied, argument substitution occurs within the contents as does stringification - and these resulting tokens are inserted back into the macro expansions token stream just prior to the entire stream being rescanned and concatenated.\n\nSee wg21.link/P0306 for further details on the feature.\n\n\nAcknowledgment: This patch would have been poorer if not for Richard Smith\'s usual thoughtful analysis and feedback.\nllvm-svn: 315840"}, | ||
[j]={{ | [j]={{N,2910,"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 // If we\'re already within a VAOPT, emit an error.\n if (VAOCtx.isInVAOpt()) {\n Diag(Tok, diag::err_pp_vaopt_nested_use);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:25:28: error: __VA_OPT__ cannot be nested within its own replacement tokens"} | ["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:25:28: error: __VA_OPT__ cannot be nested within its own replacement tokens"} | ||
Line 645: | Line 673: | ||
}, | }, | ||
["err_pp_visibility_non_macro"]={ | ["err_pp_visibility_non_macro"]={ | ||
[ | [i]="err_pp_visibility_non_macro", | ||
[ | [h]="no macro named %0", | ||
[ | [g]="no macro named A", | ||
[ | [b]=k, | ||
[ | [e]="no macro named (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={"ebf004990163",1318865549,"For modules, all macros that aren\'t include guards are implicitly","For modules, all macros that aren\'t include guards are implicitly\npublic. Add a __private_macro__ directive to hide a macro, similar to\nthe __module_private__ declaration specifier.\n\nllvm-svn: 142188"}, | ||
[j]={{ | [j]={{N,1715,"/// Handle a #public directive.\nvoid Preprocessor::HandleMacroPublicDirective(Token &Tok) {\n // ...\n // If the macro is not defined, this is an error.\n if (!MD) {\n Diag(MacroNameTok, diag::err_pp_visibility_non_macro) << II;"},{N,1742,"/// Handle a #private directive.\nvoid Preprocessor::HandleMacroPrivateDirective() {\n // ...\n // If the macro is not defined, this is an error.\n if (!MD) {\n Diag(MacroNameTok, diag::err_pp_visibility_non_macro) << II;"},{X,2026,"/// This handles parsing pragmas that take a macro name and optional message\nstatic IdentifierInfo *HandleMacroAnnotationPragma(Preprocessor &PP, Token &Tok, const char *Pragma, std::string &MessageString) {\n // ...\n if (!II->hasMacroDefinition()) {\n PP.Diag(Tok, diag::err_pp_visibility_non_macro) << II;"},{X,2114,"/// \"\\#pragma clang final(...)\"\n///\n/// The syntax is\n/// \\code\n/// #pragma clang final(MACRO_NAME)\n/// \\endcode\nstruct PragmaFinalHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (!II->hasMacroDefinition()) {\n PP.Diag(Tok, diag::err_pp_visibility_non_macro) << II;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Lexer/deprecate-macro.c"]={"clang/test/Lexer/deprecate-macro.c:10:26: error: no macro named \'foo\'","clang/test/Lexer/deprecate-macro.c:52:26: error: no macro named \'main\'"} | ["clang/test/Lexer/deprecate-macro.c"]={"clang/test/Lexer/deprecate-macro.c:10:26: error: no macro named \'foo\'","clang/test/Lexer/deprecate-macro.c:52:26: error: no macro named \'main\'"} | ||
Line 659: | Line 687: | ||
}, | }, | ||
["err_ppc_builtin_requires_abi"]={ | ["err_ppc_builtin_requires_abi"]={ | ||
[ | [i]={{nil,C,"err_ppc_builtin_requires_abi"}}, | ||
[ | [h]={{nil,C,"this builtin requires ABI -mabi=%0"}}, | ||
[ | [g]={{nil,C,"this builtin requires ABI -mabi=A"}}, | ||
[ | [b]=k, | ||
[ | [e]="this builtin requires ABI \\-mabi\\=(.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,C,m}}, | ||
[ | [c]={hd,1616787805,gd,fd}, | ||
[j]={{ | [j]={{z,4281,"bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case PPC::BI__builtin_pack_longdouble:\n if (&TI.getLongDoubleFormat() != &llvm::APFloat::PPCDoubleDouble())\n return Diag(TheCall->getBeginLoc(), diag::err_ppc_builtin_requires_abi) << \"ibmlongdouble\";"}} | ||
}, | }, | ||
["err_ppc_invalid_test_data_class_type"]={ | ["err_ppc_invalid_test_data_class_type"]={ | ||
[ | [i]={{nil,C,"err_ppc_invalid_test_data_class_type"}}, | ||
[ | [h]={{nil,M,"expected a \'float\', \'double\' or \'__float128\' for the first argument"},{y,C,"expected a \'float\' or \'double\' for the first argument"}}, | ||
[ | [g]={{nil,M,"expected a \'float\', \'double\' or \'__float128\' for the first argument"},{y,C,"expected a \'float\' or \'double\' for the first argument"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected a \'float\', \'double\' or \'__float128\' for the first argument", | ||
[ | [f]=a, | ||
[ | [d]={{nil,C,m}}, | ||
[ | [c]={Vc,1615397021,Zc,ad}, | ||
[j]={{ | [j]={{z,4361,"bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case PPC::BI__builtin_ppc_test_data_class: {\n // ...\n if (ArgType != QualType(Context.FloatTy) && ArgType != QualType(Context.DoubleTy) && ArgType != QualType(Context.Float128Ty))\n return Diag(TheCall->getBeginLoc(), diag::err_ppc_invalid_test_data_class_type);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-error.c:47:10: error: expected a \'float\', \'double\' or \'__float128\' for the first argument"} | ["clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-error.c:47:10: error: expected a \'float\', \'double\' or \'__float128\' for the first argument"} | ||
Line 684: | Line 712: | ||
}, | }, | ||
["err_ppc_invalid_use_mma_type"]={ | ["err_ppc_invalid_use_mma_type"]={ | ||
[ | [i]={{nil,v,"err_ppc_invalid_use_mma_type"}}, | ||
[ | [h]={{nil,v,"invalid use of PPC MMA type"}}, | ||
[ | [g]={{nil,v,"invalid use of PPC MMA type"}}, | ||
[ | [b]=k, | ||
[ | [e]="invalid use of PPC MMA type", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{ | [j]={{z,4410,"#include \"clang/Basic/PPCTypes.def\"\n ) {\n Diag(TypeLoc, diag::err_ppc_invalid_use_mma_type);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/ppc-pair-mma-types.c"]={"clang/test/Sema/ppc-pair-mma-types.c:17:31: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:22:37: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:27:28: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:33:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:35:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:38:12: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:40:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:44:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:45:21: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:48:6: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:55:17: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:112:31: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:117:37: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:122:28: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:128:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:130:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:133:12: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:135:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:139:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:140:21: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:143:6: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:149:17: error: invalid use of PPC MMA type"} | ["clang/test/Sema/ppc-pair-mma-types.c"]={"clang/test/Sema/ppc-pair-mma-types.c:17:31: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:22:37: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:27:28: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:33:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:35:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:38:12: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:40:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:44:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:45:21: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:48:6: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:55:17: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:112:31: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:117:37: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:122:28: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:128:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:130:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:133:12: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:135:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:139:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:140:21: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:143:6: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:149:17: error: invalid use of PPC MMA type"} | ||
Line 698: | Line 726: | ||
}, | }, | ||
["err_pragma_alloc_text_c_linkage"]={ | ["err_pragma_alloc_text_c_linkage"]={ | ||
[ | [i]={{nil,y,"err_pragma_alloc_text_c_linkage"}}, | ||
[ | [h]={{nil,y,"\'#pragma alloc_text\' is applicable only to functions with C linkage"}}, | ||
[ | [g]={{nil,y,"\'#pragma alloc_text\' is applicable only to functions with C linkage"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma alloc_text\' is applicable only to functions with C linkage", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,m}}, | ||
[ | [c]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, | ||
[j]={{L,816,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n // ...\n for (auto &Function : Functions) {\n // ...\n if (getLangOpts().CPlusPlus && !FD->isInExternCContext()) {\n Diag(Loc, diag::err_pragma_alloc_text_c_linkage);"}}, | [j]={{L,816,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n // ...\n for (auto &Function : Functions) {\n // ...\n if (getLangOpts().CPlusPlus && !FD->isInExternCContext()) {\n Diag(Loc, diag::err_pragma_alloc_text_c_linkage);"}}, | ||
[l]={ | [l]={ | ||
Line 712: | Line 740: | ||
}, | }, | ||
["err_pragma_alloc_text_not_function"]={ | ["err_pragma_alloc_text_not_function"]={ | ||
[ | [i]={{nil,y,"err_pragma_alloc_text_not_function"}}, | ||
[ | [h]={{nil,y,"\'#pragma alloc_text\' is applicable only to functions"}}, | ||
[ | [g]={{nil,y,"\'#pragma alloc_text\' is applicable only to functions"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma alloc_text\' is applicable only to functions", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,m}}, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{L,811,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n // ...\n for (auto &Function : Functions) {\n // ...\n if (!FD) {\n Diag(Loc, diag::err_pragma_alloc_text_not_function);"}}, | [j]={{L,811,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n // ...\n for (auto &Function : Functions) {\n // ...\n if (!FD) {\n Diag(Loc, diag::err_pragma_alloc_text_not_function);"}}, | ||
[l]={ | [l]={ | ||
Line 726: | Line 754: | ||
}, | }, | ||
["err_pragma_attr_attr_no_push"]={ | ["err_pragma_attr_attr_no_push"]={ | ||
[ | [i]={{nil,E,"err_pragma_attr_attr_no_push"}}, | ||
[ | [h]={{nil,E,"\'#pragma clang attribute\' attribute with no matching \'#pragma clang attribute push\'"}}, | ||
[ | [g]={{nil,E,"\'#pragma clang attribute\' attribute with no matching \'#pragma clang attribute push\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma clang attribute\' attribute with no matching \'\\#pragma clang attribute push\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,E,m}}, | ||
[ | [c]={"a7cc6b360fe9",1540780161,"Support for groups of attributes in #pragma clang attribute","Support for groups of attributes in #pragma clang attribute\n\nThis commit enables pushing an empty #pragma clang attribute push, then adding\nmultiple attributes to it, then popping them all with #pragma clang attribute\npop, just like #pragma clang diagnostic. We still support the current way of\nadding these, #pragma clang attribute push(__attribute__((...))), by treating it\nlike a combined push/attribute. This is needed to create macros like:\n\nDO_SOMETHING_BEGIN(attr1, attr2, attr3)\n// ...\nDO_SOMETHING_END\n\nrdar://45496947\n\nDifferential revision: https://reviews.llvm.org/D53621\n\nllvm-svn: 345486"}, | ||
[j]={{L,1066,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n if (PragmaAttributeStack.empty()) {\n Diag(PragmaLoc, diag::err_pragma_attr_attr_no_push);"}}, | [j]={{L,1066,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n if (PragmaAttributeStack.empty()) {\n Diag(PragmaLoc, diag::err_pragma_attr_attr_no_push);"}}, | ||
[l]={ | [l]={ | ||
Line 740: | Line 768: | ||
}, | }, | ||
["err_pragma_attribute_duplicate_subject"]={ | ["err_pragma_attribute_duplicate_subject"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_duplicate_subject"}}, | ||
[ | [h]={{nil,o,"duplicate attribute subject matcher \'%0\'"}}, | ||
[ | [g]={{nil,o,"duplicate attribute subject matcher \'A\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="duplicate attribute subject matcher \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1624,"bool Parser::ParsePragmaAttributeSubjectMatchRuleSet(attr::ParsedSubjectMatchRuleSet &SubjectMatchRules, SourceLocation &AnyLoc, SourceLocation &LastMatchRuleEndLoc) {\n // ...\n do {\n // ...\n if (isAbstractAttrMatcherRule(PrimaryRule)) {\n // ...\n } else if (Parens.consumeOpen()) {\n if (!SubjectMatchRules.insert(std::make_pair(PrimaryRule, SourceRange(RuleLoc, RuleLoc))).second)\n Diag(RuleLoc, diag::err_pragma_attribute_duplicate_subject) << Name << FixItHint::CreateRemoval(SourceRange(RuleLoc, Tok.is(tok::comma) ? Tok.getLocation() : RuleLoc));"},{B,1679,"bool Parser::ParsePragmaAttributeSubjectMatchRuleSet(attr::ParsedSubjectMatchRuleSet &SubjectMatchRules, SourceLocation &AnyLoc, SourceLocation &LastMatchRuleEndLoc) {\n // ...\n do {\n // ...\n if (!SubjectMatchRules.insert(std::make_pair(SubRule, SourceRange(RuleLoc, RuleEndLoc))).second) {\n Diag(RuleLoc, diag::err_pragma_attribute_duplicate_subject) << attr::getSubjectMatchRuleSpelling(SubRule) << FixItHint::CreateRemoval(SourceRange(RuleLoc, Tok.is(tok::comma) ? Tok.getLocation() : RuleEndLoc));"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:93:91: error: duplicate attribute subject matcher \'function\'","clang/test/Parser/pragma-attribute.cpp:94:91: error: duplicate attribute subject matcher \'function\'","clang/test/Parser/pragma-attribute.cpp:94:101: error: duplicate attribute subject matcher \'function\'","clang/test/Parser/pragma-attribute.cpp:95:97: error: duplicate attribute subject matcher \'function\'","clang/test/Parser/pragma-attribute.cpp:96:87: error: duplicate attribute subject matcher \'enum\'","clang/test/Parser/pragma-attribute.cpp:98:102: error: duplicate attribute subject matcher \'variable(is_global)\'","clang/test/Parser/pragma-attribute.cpp:99:112: error: duplicate attribute subject matcher \'variable(is_global)\'","clang/test/Parser/pragma-attribute.cpp:99:133: error: duplicate attribute subject matcher \'variable(is_global)\'","clang/test/Parser/pragma-attribute.cpp:100:113: error: duplicate attribute subject matcher \'variable(unless(is_parameter))\'","clang/test/Parser/pragma-attribute.cpp:101:113: error: duplicate attribute subject matcher \'variable(unless(is_parameter))\'","clang/test/Parser/pragma-attribute.cpp:101:151: error: duplicate attribute subject matcher \'variable(unless(is_parameter))\'"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_expected_attribute"]={ | ["err_pragma_attribute_expected_attribute"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_expected_attribute"}}, | ||
[ | [h]={{nil,o,"expected an attribute after \'(\'"}}, | ||
[ | [g]={{nil,o,"expected an attribute after \'(\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected an attribute after \'\\(\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,3931,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Parse the actual attribute.\n if ((Info->Action == PragmaAttributeInfo::Push && Tok.isNot(tok::eod)) || Info->Action == PragmaAttributeInfo::Attribute) {\n // ...\n if (AttributeTokens.empty()) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_expected_attribute);"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:109:85: error: expected an attribute after \'(\'","clang/test/Parser/pragma-attribute.cpp:111:31: error: expected an attribute after \'(\'"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_expected_attribute_name"]={ | ["err_pragma_attribute_expected_attribute_name"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_expected_attribute_name"}}, | ||
[ | [h]={{nil,o,"expected identifier that represents an attribute name"}}, | ||
[ | [g]={{nil,o,"expected identifier that represents an attribute name"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected identifier that represents an attribute name", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1847,"void Parser::HandlePragmaAttribute() {\n // ...\n if ((Tok.is(tok::l_square) && NextToken().is(tok::l_square)) || Tok.isRegularKeywordAttribute()) {\n // ...\n } else if (Tok.is(tok::kw___attribute)) {\n // ...\n // Parse the comma-separated list of attributes.\n do {\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_pragma_attribute_expected_attribute_name);"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:121:46: error: expected identifier that represents an attribute name","clang/test/Parser/pragma-attribute.cpp:171:45: error: expected identifier that represents an attribute name","clang/test/Parser/pragma-attribute.cpp:217:65: error: expected identifier that represents an attribute name"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_expected_attribute_syntax"]={ | ["err_pragma_attribute_expected_attribute_syntax"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_expected_attribute_syntax"}}, | ||
[ | [h]={{nil,o,"expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax"}}, | ||
[ | [g]={{nil,o,"expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected an attribute that is specified using the GNU, C\\+\\+11 or \'__declspec\' syntax", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1872,"void Parser::HandlePragmaAttribute() {\n // ...\n if ((Tok.is(tok::l_square) && NextToken().is(tok::l_square)) || Tok.isRegularKeywordAttribute()) {\n // ...\n } else if (Tok.is(tok::kw___attribute)) {\n // ...\n } else if (Tok.is(tok::kw___declspec)) {\n // ...\n } else {\n Diag(Tok, diag::err_pragma_attribute_expected_attribute_syntax);"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:176:31: error: expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax","clang/test/Parser/pragma-attribute.cpp:177:31: error: expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax","clang/test/Parser/pragma-attribute.cpp:178:31: error: expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax","clang/test/Parser/pragma-attribute.cpp:180:31: error: expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_expected_period"]={ | ["err_pragma_attribute_expected_period"]={ | ||
[ | [i]={{nil,E,"err_pragma_attribute_expected_period"}}, | ||
[ | [h]={{nil,E,"expected \'.\' after pragma attribute namespace %0"}}, | ||
[ | [g]={{nil,E,"expected \'.\' after pragma attribute namespace A"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected \'\\.\' after pragma attribute namespace (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,E,x}}, | ||
[ | [c]={"0876cae0d749",1545345124,"Add support for namespaces on #pragma clang attribute","Add support for namespaces on #pragma clang attribute\n\nNamespaces are introduced by adding an \"identifier.\" before a\npush/pop directive. Pop directives with namespaces can only pop a\nattribute group that was pushed with the same namespace. Push and pop\ndirectives that don\'t opt into namespaces have the same semantics.\n\nThis is necessary to prevent a pitfall of using multiple #pragma\nclang attribute directives spread out in a large file, particularly\nwhen macros are involved. It isn\'t easy to see which pop corripsonds\nto which push, so its easy to inadvertently pop the wrong group.\n\nDifferential revision: https://reviews.llvm.org/D55628\n\nllvm-svn: 349845"}, | ||
[j]={{ | [j]={{B,3866,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Parse the optional namespace followed by a period.\n if (Tok.is(tok::identifier)) {\n // ...\n if (!II->isStr(\"push\") && !II->isStr(\"pop\")) {\n // ...\n if (!Tok.is(tok::period)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_expected_period) << II;"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:105:110: error: expected \'.\' after pragma attribute namespace \'pushpop\'"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_expected_push_pop_paren"]={ | ["err_pragma_attribute_expected_push_pop_paren"]={ | ||
[ | [i]={{nil,E,"err_pragma_attribute_expected_push_pop_paren"}}, | ||
[ | [h]={{nil,E,"expected \'push\', \'pop\', or \'(\' after \'#pragma clang attribute\'"}}, | ||
[ | [g]={{nil,E,"expected \'push\', \'pop\', or \'(\' after \'#pragma clang attribute\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected \'push\', \'pop\', or \'\\(\' after \'\\#pragma clang attribute\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,E,x}}, | ||
[ | [c]={"a7cc6b360fe9",1540780161,"Support for groups of attributes in #pragma clang attribute","Support for groups of attributes in #pragma clang attribute\n\nThis commit enables pushing an empty #pragma clang attribute push, then adding\nmultiple attributes to it, then popping them all with #pragma clang attribute\npop, just like #pragma clang diagnostic. We still support the current way of\nadding these, #pragma clang attribute push(__attribute__((...))), by treating it\nlike a combined push/attribute. This is needed to create macros like:\n\nDO_SOMETHING_BEGIN(attr1, attr2, attr3)\n// ...\nDO_SOMETHING_END\n\nrdar://45496947\n\nDifferential revision: https://reviews.llvm.org/D53621\n\nllvm-svn: 345486"}, | ||
[j]={{ | [j]={{B,3876,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (!Tok.isOneOf(tok::identifier, tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_expected_push_pop_paren);"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:103:109: error: expected \'push\', \'pop\', or \'(\' after \'#pragma clang attribute\'","clang/test/Parser/pragma-attribute.cpp:104:25: error: expected \'push\', \'pop\', or \'(\' after \'#pragma clang attribute\'"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_expected_subject_identifier"]={ | ["err_pragma_attribute_expected_subject_identifier"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_expected_subject_identifier"}}, | ||
[ | [h]={{nil,o,"expected an identifier that corresponds to an attribute subject rule"}}, | ||
[ | [g]={{nil,o,"expected an identifier that corresponds to an attribute subject rule"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected an identifier that corresponds to an attribute subject rule", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1602,"bool Parser::ParsePragmaAttributeSubjectMatchRuleSet(attr::ParsedSubjectMatchRuleSet &SubjectMatchRules, SourceLocation &AnyLoc, SourceLocation &LastMatchRuleEndLoc) {\n // ...\n do {\n // ...\n if (Name.empty()) {\n Diag(Tok, diag::err_pragma_attribute_expected_subject_identifier);"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:44:76: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:47:90: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:50:76: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:52:81: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:53:80: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:54:91: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:208:71: error: expected an identifier that corresponds to an attribute subject rule"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_expected_subject_sub_identifier"]={ | ["err_pragma_attribute_expected_subject_sub_identifier"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_expected_subject_sub_identifier"}}, | ||
[ | [h]={{nil,o,"expected an identifier that corresponds to an attribute subject matcher sub-rule; \'%0\' matcher %select{does not support sub-rules|supports the following sub-rules: %2|}1"}}, | ||
[ | [g]={{nil,o,{"expected an identifier that corresponds to an attribute subject matcher sub-rule; \'A\' matcher ",{"does not support sub-rules","supports the following sub-rules: C",a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="expected an identifier that corresponds to an attribute subject matcher sub\\-rule; \'(.*?)\' matcher (?:does not support sub\\-rules|supports the following sub\\-rules\\: (.*?)|)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1565,"static void diagnoseExpectedAttributeSubjectSubRule(Parser &PRef, attr::SubjectMatchRule PrimaryRule, StringRef PrimaryRuleName, SourceLocation SubRuleLoc) {\n auto Diagnostic = PRef.Diag(SubRuleLoc, diag::err_pragma_attribute_expected_subject_sub_identifier) << PrimaryRuleName;"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:66:89: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:73:99: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:74:101: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'namespace\' matcher does not support sub-rules","clang/test/Parser/pragma-attribute.cpp:87:99: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:88:96: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'enum\' matcher does not support sub-rules"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_extra_tokens_after_attribute"]={ | ["err_pragma_attribute_extra_tokens_after_attribute"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_extra_tokens_after_attribute"}}, | ||
[ | [h]={{nil,o,"extra tokens after attribute in a \'#pragma clang attribute push\'"}}, | ||
[ | [g]={{nil,o,"extra tokens after attribute in a \'#pragma clang attribute push\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="extra tokens after attribute in a \'\\#pragma clang attribute push\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1957,"void Parser::HandlePragmaAttribute() {\n // ...\n // Tokens following an ill-formed attribute will remain in the token stream\n // and must be removed.\n if (Tok.isNot(tok::eof)) {\n Diag(Tok, diag::err_pragma_attribute_extra_tokens_after_attribute);"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:124:76: error: extra tokens after attribute in a \'#pragma clang attribute push\'"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_invalid_argument"]={ | ["err_pragma_attribute_invalid_argument"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_invalid_argument"}}, | ||
[ | [h]={{nil,o,"unexpected argument \'%0\' to \'#pragma clang attribute\'; expected \'push\' or \'pop\'"}}, | ||
[ | [g]={{nil,o,"unexpected argument \'A\' to \'#pragma clang attribute\'; expected \'push\' or \'pop\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="unexpected argument \'(.*?)\' to \'\\#pragma clang attribute\'; expected \'push\' or \'pop\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,3897,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Determine what action this pragma clang attribute represents.\n if (Tok.is(tok::l_paren)) {\n // ...\n } else {\n // ...\n if (II->isStr(\"push\"))\n // ...\n else if (II->isStr(\"pop\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_invalid_argument) << PP.getSpelling(Tok);"}} | ||
}, | }, | ||
["err_pragma_attribute_invalid_matchers"]={ | ["err_pragma_attribute_invalid_matchers"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_invalid_matchers"}}, | ||
[ | [h]={{nil,o,"attribute %0 can\'t be applied to %1"}}, | ||
[ | [g]={{nil,o,"attribute A can\'t be applied to B"}}, | ||
[ | [b]=k, | ||
[ | [e]="attribute (.*?) can\'t be applied to (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,m}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{L,1048,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n if (!Rules.empty()) {\n auto Diagnostic = Diag(PragmaLoc, diag::err_pragma_attribute_invalid_matchers) << Attribute;"}}, | [j]={{L,1048,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n if (!Rules.empty()) {\n auto Diagnostic = Diag(PragmaLoc, diag::err_pragma_attribute_invalid_matchers) << Attribute;"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:126:15: error: attribute \'objc_bridge_related\' can\'t be applied to \'function\'","clang/test/Parser/pragma-attribute.cpp:185:15: error: attribute \'uninitialized\' can\'t be applied to \'function\'","clang/test/Parser/pragma-attribute.cpp:187:15: error: attribute \'uninitialized\' can\'t be applied to \'variable\'","clang/test/Parser/pragma-attribute.cpp:189:15: error: attribute \'uninitialized\' can\'t be applied to \'variable(is_thread_local)\'","clang/test/Parser/pragma-attribute.cpp:191:15: error: attribute \'uninitialized\' can\'t be applied to \'variable(is_global)\'","clang/test/Parser/pragma-attribute.cpp:193:15: error: attribute \'uninitialized\' can\'t be applied to \'variable(is_parameter)\', and \'variable(unless(is_parameter))\'"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_invalid_subject_set_specifier"]={ | ["err_pragma_attribute_invalid_subject_set_specifier"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_invalid_subject_set_specifier"}}, | ||
[ | [h]={{nil,o,"expected attribute subject set specifier \'apply_to\'"}}, | ||
[ | [g]={{nil,o,"expected attribute subject set specifier \'apply_to\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected attribute subject set specifier \'apply_to\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1922,"void Parser::HandlePragmaAttribute() {\n // ...\n if (Tok.isNot(tok::identifier)) {\n createExpectedAttributeSubjectRulesTokenDiagnostic(diag::err_pragma_attribute_invalid_subject_set_specifier, Attrs, MissingAttributeSubjectRulesRecoveryPoint::ApplyTo, *this);"},{B,1930,"void Parser::HandlePragmaAttribute() {\n // ...\n if (!II->isStr(\"apply_to\")) {\n createExpectedAttributeSubjectRulesTokenDiagnostic(diag::err_pragma_attribute_invalid_subject_set_specifier, Attrs, MissingAttributeSubjectRulesRecoveryPoint::ApplyTo, *this);"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:27:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:28:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:29:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:30:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:31:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:32:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:33:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:34:64: error: expected attribute subject set specifier \'apply_to\'"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_matcher_negated_subrule_contradicts_subrule"]={ | ["err_pragma_attribute_matcher_negated_subrule_contradicts_subrule"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_matcher_negated_subrule_contradicts_subrule"}}, | ||
[ | [h]={{nil,o,"negated attribute subject matcher sub-rule \'%0\' contradicts sub-rule \'%1\'"}}, | ||
[ | [g]={{nil,o,"negated attribute subject matcher sub-rule \'A\' contradicts sub-rule \'B\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="negated attribute subject matcher sub\\-rule \'(.*?)\' contradicts sub\\-rule \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,m}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{L,1036,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n // Figure out which subject matching rules are valid.\n if (StrictSubjectMatchRuleSet.empty()) {\n // ...\n for (const auto &Rule : Rules) {\n // ...\n if (It != RulesToFirstSpecifiedNegatedSubRule.end() && It->second != Rule) {\n // ...\n Diag(It->second.second.getBegin(), diag::err_pragma_attribute_matcher_negated_subrule_contradicts_subrule) << attr::getSubjectMatchRuleSpelling(attr::SubjectMatchRule(It->second.first)) << attr::getSubjectMatchRuleSpelling(MatchRule) << Rule.second << FixItHint::CreateRemoval(replacementRangeForListElement(*this, It->second.second));"}}, | [j]={{L,1036,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n // Figure out which subject matching rules are valid.\n if (StrictSubjectMatchRuleSet.empty()) {\n // ...\n for (const auto &Rule : Rules) {\n // ...\n if (It != RulesToFirstSpecifiedNegatedSubRule.end() && It->second != Rule) {\n // ...\n Diag(It->second.second.getBegin(), diag::err_pragma_attribute_matcher_negated_subrule_contradicts_subrule) << attr::getSubjectMatchRuleSpelling(attr::SubjectMatchRule(It->second.first)) << attr::getSubjectMatchRuleSpelling(MatchRule) << Rule.second << FixItHint::CreateRemoval(replacementRangeForListElement(*this, It->second.second));"}}, | ||
[l]={ | [l]={ | ||
Line 919: | Line 947: | ||
}, | }, | ||
["err_pragma_attribute_matcher_subrule_contradicts_rule"]={ | ["err_pragma_attribute_matcher_subrule_contradicts_rule"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_matcher_subrule_contradicts_rule"}}, | ||
[ | [h]={{nil,o,"redundant attribute subject matcher sub-rule \'%0\'; \'%1\' already matches those declarations"}}, | ||
[ | [g]={{nil,o,"redundant attribute subject matcher sub-rule \'A\'; \'B\' already matches those declarations"}}, | ||
[ | [b]=k, | ||
[ | [e]="redundant attribute subject matcher sub\\-rule \'(.*?)\'; \'(.*?)\' already matches those declarations", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,m}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{L,953,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n // Figure out which subject matching rules are valid.\n if (StrictSubjectMatchRuleSet.empty()) {\n // ...\n for (const auto &Rule : Rules) {\n // ...\n if (It != Rules.end()) {\n // ...\n Diag(Rule.second.getBegin(), diag::err_pragma_attribute_matcher_subrule_contradicts_rule) << attr::getSubjectMatchRuleSpelling(MatchRule) << attr::getSubjectMatchRuleSpelling(*ParentRule) << It->second << FixItHint::CreateRemoval(replacementRangeForListElement(*this, Rule.second));"}}, | [j]={{L,953,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n // Figure out which subject matching rules are valid.\n if (StrictSubjectMatchRuleSet.empty()) {\n // ...\n for (const auto &Rule : Rules) {\n // ...\n if (It != Rules.end()) {\n // ...\n Diag(Rule.second.getBegin(), diag::err_pragma_attribute_matcher_subrule_contradicts_rule) << attr::getSubjectMatchRuleSpelling(MatchRule) << attr::getSubjectMatchRuleSpelling(*ParentRule) << It->second << FixItHint::CreateRemoval(replacementRangeForListElement(*this, Rule.second));"}}, | ||
[l]={ | [l]={ | ||
Line 933: | Line 961: | ||
}, | }, | ||
["err_pragma_attribute_namespace_on_attribute"]={ | ["err_pragma_attribute_namespace_on_attribute"]={ | ||
[ | [i]={{nil,E,"err_pragma_attribute_namespace_on_attribute"}}, | ||
[ | [h]={{nil,E,"namespace can only apply to \'push\' or \'pop\' directives"}}, | ||
[ | [g]={{nil,E,"namespace can only apply to \'push\' or \'pop\' directives"}}, | ||
[ | [b]=k, | ||
[ | [e]="namespace can only apply to \'push\' or \'pop\' directives", | ||
[ | [f]=a, | ||
[ | [d]={{nil,E,x}}, | ||
[ | [c]={"0876cae0d749",1545345124,"Add support for namespaces on #pragma clang attribute","Add support for namespaces on #pragma clang attribute\n\nNamespaces are introduced by adding an \"identifier.\" before a\npush/pop directive. Pop directives with namespaces can only pop a\nattribute group that was pushed with the same namespace. Push and pop\ndirectives that don\'t opt into namespaces have the same semantics.\n\nThis is necessary to prevent a pitfall of using multiple #pragma\nclang attribute directives spread out in a large file, particularly\nwhen macros are involved. It isn\'t easy to see which pop corripsonds\nto which push, so its easy to inadvertently pop the wrong group.\n\nDifferential revision: https://reviews.llvm.org/D55628\n\nllvm-svn: 349845"}, | ||
[j]={{ | [j]={{B,3884,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Determine what action this pragma clang attribute represents.\n if (Tok.is(tok::l_paren)) {\n if (Info->Namespace) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_namespace_on_attribute);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/pragma-attribute-namespace.c"]={"clang/test/Sema/pragma-attribute-namespace.c:25:31: error: namespace can only apply to \'push\' or \'pop\' directives"} | ["clang/test/Sema/pragma-attribute-namespace.c"]={"clang/test/Sema/pragma-attribute-namespace.c:25:31: error: namespace can only apply to \'push\' or \'pop\' directives"} | ||
Line 947: | Line 975: | ||
}, | }, | ||
["err_pragma_attribute_no_pop_eof"]={ | ["err_pragma_attribute_no_pop_eof"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_no_pop_eof"}}, | ||
[ | [h]={{nil,o,"unterminated \'#pragma clang attribute push\' at end of file"}}, | ||
[ | [g]={{nil,o,"unterminated \'#pragma clang attribute push\' at end of file"}}, | ||
[ | [b]=k, | ||
[ | [e]="unterminated \'\\#pragma clang attribute push\' at end of file", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,m}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{L,1149,"void Sema::DiagnoseUnterminatedPragmaAttribute() {\n // ...\n Diag(PragmaAttributeStack.back().Loc, diag::err_pragma_attribute_no_pop_eof);"}}, | [j]={{L,1149,"void Sema::DiagnoseUnterminatedPragmaAttribute() {\n // ...\n Diag(PragmaAttributeStack.back().Loc, diag::err_pragma_attribute_no_pop_eof);"}}, | ||
[l]={ | [l]={ | ||
Line 961: | Line 989: | ||
}, | }, | ||
["err_pragma_attribute_stack_mismatch"]={ | ["err_pragma_attribute_stack_mismatch"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_stack_mismatch"}}, | ||
[ | [h]={{nil,E,"\'#pragma clang attribute %select{%1.|}0pop\' with no matching \'#pragma clang attribute %select{%1.|}0push\'"},{ic,o,"\'#pragma clang attribute pop\' with no matching \'#pragma clang attribute push\'"}}, | ||
[ | [g]={{nil,E,{"\'#pragma clang attribute ",{"B.",a},"pop\' with no matching \'#pragma clang attribute ",{"B.",a},"push\'"}},{ic,o,"\'#pragma clang attribute pop\' with no matching \'#pragma clang attribute push\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma clang attribute (?:(.*?)\\.|)pop\' with no matching \'\\#pragma clang attribute (?:(.*?)\\.|)push\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,m}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{L,1081,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n if (PragmaAttributeStack.empty()) {\n Diag(PragmaLoc, diag::err_pragma_attribute_stack_mismatch) << 1;"},{L,1095,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n // ...\n if (Namespace)\n Diag(PragmaLoc, diag::err_pragma_attribute_stack_mismatch) << 0 << Namespace->getName();"},{L,1131,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n // ...\n if (Namespace)\n // ...\n else\n Diag(PragmaLoc, diag::err_pragma_attribute_stack_mismatch) << 1;"}}, | [j]={{L,1081,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n if (PragmaAttributeStack.empty()) {\n Diag(PragmaLoc, diag::err_pragma_attribute_stack_mismatch) << 1;"},{L,1095,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n // ...\n if (Namespace)\n Diag(PragmaLoc, diag::err_pragma_attribute_stack_mismatch) << 0 << Namespace->getName();"},{L,1131,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n // ...\n if (Namespace)\n // ...\n else\n Diag(PragmaLoc, diag::err_pragma_attribute_stack_mismatch) << 1;"}}, | ||
[l]={ | [l]={ | ||
Line 975: | Line 1,003: | ||
}, | }, | ||
["err_pragma_attribute_unknown_subject_rule"]={ | ["err_pragma_attribute_unknown_subject_rule"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_unknown_subject_rule"}}, | ||
[ | [h]={{nil,o,"unknown attribute subject rule \'%0\'"}}, | ||
[ | [g]={{nil,o,"unknown attribute subject rule \'A\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="unknown attribute subject rule \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1609,"bool Parser::ParsePragmaAttributeSubjectMatchRuleSet(attr::ParsedSubjectMatchRuleSet &SubjectMatchRules, SourceLocation &AnyLoc, SourceLocation &LastMatchRuleEndLoc) {\n // ...\n do {\n // ...\n if (!Rule.first) {\n Diag(Tok, diag::err_pragma_attribute_unknown_subject_rule) << Name;"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:56:81: error: unknown attribute subject rule \'diag\'","clang/test/Parser/pragma-attribute.cpp:57:81: error: unknown attribute subject rule \'a\'","clang/test/Parser/pragma-attribute.cpp:58:91: error: unknown attribute subject rule \'for\'","clang/test/Parser/pragma-attribute.cpp:59:81: error: unknown attribute subject rule \'function42\'"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_unknown_subject_sub_rule"]={ | ["err_pragma_attribute_unknown_subject_sub_rule"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_unknown_subject_sub_rule"}}, | ||
[ | [h]={{nil,o,"%select{invalid use of|unknown}2 attribute subject matcher sub-rule \'%0\'; \'%1\' matcher %select{does not support sub-rules|supports the following sub-rules: %3}2"}}, | ||
[ | [g]={{nil,o,{{"invalid use of","unknown"}," attribute subject matcher sub-rule \'A\'; \'B\' matcher ",{"does not support sub-rules","supports the following sub-rules: D"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:invalid use of|unknown) attribute subject matcher sub\\-rule \'(.*?)\'; \'(.*?)\' matcher (?:does not support sub\\-rules|supports the following sub\\-rules\\: (.*?))", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1578,"static void diagnoseUnknownAttributeSubjectSubRule(Parser &PRef, attr::SubjectMatchRule PrimaryRule, StringRef PrimaryRuleName, StringRef SubRuleName, SourceLocation SubRuleLoc) {\n auto Diagnostic = PRef.Diag(SubRuleLoc, diag::err_pragma_attribute_unknown_subject_sub_rule) << SubRuleName << PrimaryRuleName;"}}, | ||
[l]={ | [l]={ | ||
[ | [ob]={"clang/test/Parser/pragma-attribute.cpp:67:89: error: unknown attribute subject matcher sub-rule \'is\'; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:72:99: error: unknown attribute subject matcher sub-rule \'is\'; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:77:81: error: invalid use of attribute subject matcher sub-rule \'is_parameter\'; \'enum\' matcher does not support sub-rules","clang/test/Parser/pragma-attribute.cpp:78:85: error: invalid use of attribute subject matcher sub-rule \'is_parameter\'; \'enum\' matcher does not support sub-rules","clang/test/Parser/pragma-attribute.cpp:82:99: error: unknown attribute subject matcher sub-rule \'unless(is)\'; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:90:99: error: unknown attribute subject matcher sub-rule \'unless(is_global)\'; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:91:86: error: invalid use of attribute subject matcher sub-rule \'unless(is_parameter)\'; \'enum\' matcher does not support sub-rules"} | ||
} | } | ||
}, | }, | ||
["err_pragma_attribute_unsupported_attribute"]={ | ["err_pragma_attribute_unsupported_attribute"]={ | ||
[ | [i]={{nil,o,"err_pragma_attribute_unsupported_attribute"}}, | ||
[ | [h]={{nil,o,"attribute %0 is not supported by \'#pragma clang attribute\'"}}, | ||
[ | [g]={{nil,o,"attribute A is not supported by \'#pragma clang attribute\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="attribute (.*?) is not supported by \'\\#pragma clang attribute\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={gb,1492508507,fb,eb}, | ||
[j]={{ | [j]={{B,1903,"void Parser::HandlePragmaAttribute() {\n // ...\n for (const ParsedAttr &Attribute : Attrs) {\n if (!Attribute.isSupportedByPragmaAttribute()) {\n Diag(PragmaLoc, diag::err_pragma_attribute_unsupported_attribute) << Attribute;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-attribute-declspec.cpp"]={"clang/test/Parser/pragma-attribute-declspec.cpp:12:15: error: attribute \'align\' is not supported by \'#pragma clang attribute\'"} | ["clang/test/Parser/pragma-attribute-declspec.cpp"]={"clang/test/Parser/pragma-attribute-declspec.cpp:12:15: error: attribute \'align\' is not supported by \'#pragma clang attribute\'"} | ||
Line 1,017: | Line 1,045: | ||
}, | }, | ||
["err_pragma_cannot_end_force_cuda_host_device"]={ | ["err_pragma_cannot_end_force_cuda_host_device"]={ | ||
[ | [i]="err_pragma_cannot_end_force_cuda_host_device", | ||
[h]="force_cuda_host_device end pragma without matching force_cuda_host_device begin", | |||
[g]="force_cuda_host_device end pragma without matching force_cuda_host_device begin", | |||
[b]=k, | |||
[e]="force_cuda_host_device end pragma without matching force_cuda_host_device begin", | [e]="force_cuda_host_device end pragma without matching force_cuda_host_device begin", | ||
[f | [f]=a, | ||
[d]=x, | |||
[c]={"67a78a6cc021",1475964958,"[CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas.","[CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas.\n\nSummary:\nThese cause us to consider all functions in-between to be __host__\n__device__.\n\nYou can nest these pragmas; you just can\'t have more \'end\'s than\n\'begin\'s.\n\nReviewers: rsmith\n\nSubscribers: tra, jhen, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D24975\n\nllvm-svn: 283677"}, | |||
[j]={{B,3815,"void PragmaForceCUDAHostDeviceHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Info->isStr(\"begin\"))\n // ...\n else if (!Actions.PopForceCUDAHostDevice())\n PP.Diag(FirstTok.getLocation(), diag::err_pragma_cannot_end_force_cuda_host_device);"}} | |||
[ | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_pragma_clang_section_expected_equal"]={ | ["err_pragma_clang_section_expected_equal"]={ | ||
[ | [i]={{nil,o,"err_pragma_clang_section_expected_equal"}}, | ||
[ | [h]={{nil,p,"expected \'=\' following \'#pragma clang section %select{invalid|bss|data|rodata|text|relro}0\'"},{D,o,"expected \'=\' following \'#pragma clang section %select{invalid|bss|data|rodata|text}0\'"}}, | ||
[ | [g]={{nil,p,{"expected \'=\' following \'#pragma clang section ",{lc,"bss","data","rodata","text","relro"},uc}},{D,o,{"expected \'=\' following \'#pragma clang section ",{lc,"bss","data","rodata","text"},uc}}}, | ||
[ | [b]=k, | ||
[ | [e]="expected \'\\=\' following \'\\#pragma clang section (?:invalid|bss|data|rodata|text|relro)\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={"2a67c9ee39c3",1496657517,"Add support for #pragma clang section","Add support for #pragma clang section\n\nThis patch provides a means to specify section-names for global variables, \nfunctions and static variables, using #pragma directives. \nThis feature is only defined to work sensibly for ELF targets.\nOne can specify section names as:\n#pragma clang section bss=\"myBSS\" data=\"myData\" rodata=\"myRodata\" text=\"myText\"\nOne can \"unspecify\" a section name with empty string e.g.\n#pragma clang section bss=\"\" data=\"\" text=\"\" rodata=\"\"\n\nReviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner\nDifferential Revision: https://reviews.llvm.org/D33412\n\nllvm-svn: 304705"}, | ||
[j]={{ | [j]={{B,2230,"// #pragma clang section bss=\"abc\" data=\"\" rodata=\"def\" text=\"\" relro=\"\"\nvoid PragmaClangSectionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n while (Tok.isNot(tok::eod)) {\n // ...\n if (Tok.isNot(tok::equal)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_clang_section_expected_equal) << SecKind;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/pragma-clang-section.c"]={"clang/test/Sema/pragma-clang-section.c:13:27: error: expected \'=\' following \'#pragma clang section bss\'","clang/test/Sema/pragma-clang-section.c:14:28: error: expected \'=\' following \'#pragma clang section data\'","clang/test/Sema/pragma-clang-section.c:15:30: error: expected \'=\' following \'#pragma clang section rodata\'","clang/test/Sema/pragma-clang-section.c:16:28: error: expected \'=\' following \'#pragma clang section text\'","clang/test/Sema/pragma-clang-section.c:17:29: error: expected \'=\' following \'#pragma clang section relro\'"} | ["clang/test/Sema/pragma-clang-section.c"]={"clang/test/Sema/pragma-clang-section.c:13:27: error: expected \'=\' following \'#pragma clang section bss\'","clang/test/Sema/pragma-clang-section.c:14:28: error: expected \'=\' following \'#pragma clang section data\'","clang/test/Sema/pragma-clang-section.c:15:30: error: expected \'=\' following \'#pragma clang section rodata\'","clang/test/Sema/pragma-clang-section.c:16:28: error: expected \'=\' following \'#pragma clang section text\'","clang/test/Sema/pragma-clang-section.c:17:29: error: expected \'=\' following \'#pragma clang section relro\'"} | ||
Line 1,042: | Line 1,070: | ||
}, | }, | ||
["err_pragma_comment_malformed"]={ | ["err_pragma_comment_malformed"]={ | ||
[ | [i]="err_pragma_comment_malformed", | ||
[h]="pragma comment requires parenthesized identifier and optional string", | |||
[g]="pragma comment requires parenthesized identifier and optional string", | |||
[b]=k, | |||
[e]="pragma comment requires parenthesized identifier and optional string", | [e]="pragma comment requires parenthesized identifier and optional string", | ||
[f | [f]=a, | ||
[d]=x, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{B,3089,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(CommentLoc, diag::err_pragma_comment_malformed);"},{B,3096,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(CommentLoc, diag::err_pragma_comment_malformed);"},{B,3137,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_comment_malformed);"},{B,3143,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_comment_malformed);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/pragma_microsoft.c"]={"clang/test/Preprocessor/pragma_microsoft.c:9:31: error: pragma comment requires parenthesized identifier and optional string","clang/test/Preprocessor/pragma_microsoft.c:24:22: error: pragma comment requires parenthesized identifier and optional string"} | ["clang/test/Preprocessor/pragma_microsoft.c"]={"clang/test/Preprocessor/pragma_microsoft.c:9:31: error: pragma comment requires parenthesized identifier and optional string","clang/test/Preprocessor/pragma_microsoft.c:24:22: error: pragma comment requires parenthesized identifier and optional string"} | ||
Line 1,056: | Line 1,084: | ||
}, | }, | ||
["err_pragma_comment_unknown_kind"]={ | ["err_pragma_comment_unknown_kind"]={ | ||
[ | [i]="err_pragma_comment_unknown_kind", | ||
[h]="unknown kind of pragma comment", | |||
[g]="unknown kind of pragma comment", | |||
[b]=k, | |||
[e]="unknown kind of pragma comment", | [e]="unknown kind of pragma comment", | ||
[f | [f]=a, | ||
[d]=x, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{B,3111,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PCK_Unknown) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_comment_unknown_kind);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/pragma_microsoft.c"]={"clang/test/Preprocessor/pragma_microsoft.c:17:17: error: unknown kind of pragma comment"} | ["clang/test/Preprocessor/pragma_microsoft.c"]={"clang/test/Preprocessor/pragma_microsoft.c:17:17: error: unknown kind of pragma comment"} | ||
Line 1,070: | Line 1,098: | ||
}, | }, | ||
["err_pragma_detect_mismatch_malformed"]={ | ["err_pragma_detect_mismatch_malformed"]={ | ||
[ | [i]="err_pragma_detect_mismatch_malformed", | ||
[ | [h]="pragma detect_mismatch is malformed; it requires two comma-separated string literals", | ||
[ | [g]="pragma detect_mismatch is malformed; it requires two comma-separated string literals", | ||
[ | [b]=k, | ||
[ | [e]="pragma detect_mismatch is malformed; it requires two comma\\-separated string literals", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"5d041beb4e86",1370311634,"Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker co...","Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file.\n\nllvm-svn: 183178"}, | ||
[j]={{ | [j]={{B,3047,"/// Handle the Microsoft \\#pragma detect_mismatch extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma detect_mismatch(\"name\", \"value\")\n/// \\endcode\n/// Where \'name\' and \'value\' are quoted strings. The values are embedded in\n/// the object file and passed along to the linker. If the linker detects a\n/// mismatch in the object file\'s values for the given name, a LNK2038 error\n/// is emitted. See MSDN for more details.\nvoid PragmaDetectMismatchHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::comma)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_detect_mismatch_malformed);"},{B,3062,"/// Handle the Microsoft \\#pragma detect_mismatch extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma detect_mismatch(\"name\", \"value\")\n/// \\endcode\n/// Where \'name\' and \'value\' are quoted strings. The values are embedded in\n/// the object file and passed along to the linker. If the linker detects a\n/// mismatch in the object file\'s values for the given name, a LNK2038 error\n/// is emitted. See MSDN for more details.\nvoid PragmaDetectMismatchHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_detect_mismatch_malformed);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/pragma_microsoft.c"]={"clang/test/Preprocessor/pragma_microsoft.c:34:31: error: pragma detect_mismatch is malformed; it requires two comma-separated string literals"} | ["clang/test/Preprocessor/pragma_microsoft.c"]={"clang/test/Preprocessor/pragma_microsoft.c:34:31: error: pragma detect_mismatch is malformed; it requires two comma-separated string literals"} | ||
Line 1,084: | Line 1,112: | ||
}, | }, | ||
["err_pragma_expected_clang_section_name"]={ | ["err_pragma_expected_clang_section_name"]={ | ||
[ | [i]={{nil,o,"err_pragma_expected_clang_section_name"}}, | ||
[ | [h]={{nil,p,"expected one of [bss|data|rodata|text|relro] section kind in \'#pragma %0\'"},{D,o,"expected one of [bss|data|rodata|text] section kind in \'#pragma %0\'"}}, | ||
[ | [g]={{nil,p,"expected one of [bss|data|rodata|text|relro] section kind in \'#pragma A\'"},{D,o,"expected one of [bss|data|rodata|text] section kind in \'#pragma A\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected one of \\[bss\\|data\\|rodata\\|text\\|relro\\] section kind in \'\\#pragma (.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={"2a67c9ee39c3",1496657517,"Add support for #pragma clang section","Add support for #pragma clang section\n\nThis patch provides a means to specify section-names for global variables, \nfunctions and static variables, using #pragma directives. \nThis feature is only defined to work sensibly for ELF targets.\nOne can specify section names as:\n#pragma clang section bss=\"myBSS\" data=\"myData\" rodata=\"myRodata\" text=\"myText\"\nOne can \"unspecify\" a section name with empty string e.g.\n#pragma clang section bss=\"\" data=\"\" text=\"\" rodata=\"\"\n\nReviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner\nDifferential Revision: https://reviews.llvm.org/D33412\n\nllvm-svn: 304705"}, | ||
[j]={{ | [j]={{B,2207,"// #pragma clang section bss=\"abc\" data=\"\" rodata=\"def\" text=\"\" relro=\"\"\nvoid PragmaClangSectionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n while (Tok.isNot(tok::eod)) {\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_expected_clang_section_name) << \"clang section\";"},{B,2223,"// #pragma clang section bss=\"abc\" data=\"\" rodata=\"def\" text=\"\" relro=\"\"\nvoid PragmaClangSectionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n while (Tok.isNot(tok::eod)) {\n // ...\n if (SecType->isStr(\"bss\"))\n // ...\n else if (SecType->isStr(\"data\"))\n // ...\n else if (SecType->isStr(\"rodata\"))\n // ...\n else if (SecType->isStr(\"relro\"))\n // ...\n else if (SecType->isStr(\"text\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_expected_clang_section_name) << \"clang section\";"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/pragma-clang-section.c"]={"clang/test/Sema/pragma-clang-section.c:6:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:7:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:8:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:9:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:11:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:18:56: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'"} | ["clang/test/Sema/pragma-clang-section.c"]={"clang/test/Sema/pragma-clang-section.c:6:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:7:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:8:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:9:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:11:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:18:56: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'"} | ||
Line 1,098: | Line 1,126: | ||
}, | }, | ||
["err_pragma_expected_file_scope"]={ | ["err_pragma_expected_file_scope"]={ | ||
[ | [i]={{nil,y,"err_pragma_expected_file_scope"}}, | ||
[ | [h]={{nil,y,"\'#pragma %0\' can only appear at file scope"}}, | ||
[ | [g]={{nil,y,"\'#pragma A\' can only appear at file scope"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma (.*?)\' can only appear at file scope", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,m}}, | ||
[ | [c]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, | ||
[j]={{L,793,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n if (!CurContext->getRedeclContext()->isFileContext()) {\n Diag(PragmaLocation, diag::err_pragma_expected_file_scope) << \"alloc_text\";"},{L,1159,"void Sema::ActOnPragmaMSOptimize(SourceLocation Loc, bool IsOn) {\n if (!CurContext->getRedeclContext()->isFileContext()) {\n Diag(Loc, diag::err_pragma_expected_file_scope) << \"optimize\";"},{L,1260,"void Sema::ActOnPragmaMSFunction(SourceLocation Loc, const llvm::SmallVectorImpl<StringRef> &NoBuiltins) {\n if (!CurContext->getRedeclContext()->isFileContext()) {\n Diag(Loc, diag::err_pragma_expected_file_scope) << \"function\";"}}, | [j]={{L,793,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n if (!CurContext->getRedeclContext()->isFileContext()) {\n Diag(PragmaLocation, diag::err_pragma_expected_file_scope) << \"alloc_text\";"},{L,1159,"void Sema::ActOnPragmaMSOptimize(SourceLocation Loc, bool IsOn) {\n if (!CurContext->getRedeclContext()->isFileContext()) {\n Diag(Loc, diag::err_pragma_expected_file_scope) << \"optimize\";"},{L,1260,"void Sema::ActOnPragmaMSFunction(SourceLocation Loc, const llvm::SmallVectorImpl<StringRef> &NoBuiltins) {\n if (!CurContext->getRedeclContext()->isFileContext()) {\n Diag(Loc, diag::err_pragma_expected_file_scope) << \"function\";"}}, | ||
[l]={ | [l]={ | ||
Line 1,112: | Line 1,140: | ||
}, | }, | ||
["err_pragma_expected_integer"]={ | ["err_pragma_expected_integer"]={ | ||
[ | [i]={{nil,q,"err_pragma_expected_integer"}}, | ||
[ | [h]={{nil,q,"expected an integer argument in \'#pragma %0\'"}}, | ||
[ | [g]={{nil,q,"expected an integer argument in \'#pragma A\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected an integer argument in \'\\#pragma (.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,x}}, | ||
[ | [c]={hc,1570627358,nc,oc}, | ||
[j]={{ | [j]={{B,3983,"// Handle \'#pragma clang max_tokens 12345\'.\nvoid PragmaMaxTokensHereHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::numeric_constant) || !PP.parseSimpleIntegerLiteral(Tok, MaxTokens)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_expected_integer) << \"clang max_tokens_here\";"},{B,4015,"// Handle \'#pragma clang max_tokens_total 12345\'.\nvoid PragmaMaxTokensTotalHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::numeric_constant) || !PP.parseSimpleIntegerLiteral(Tok, MaxTokens)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_expected_integer) << \"clang max_tokens_total\";"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/max-tokens.cpp"]={"clang/test/Parser/max-tokens.cpp:8:31: error: expected an integer argument in \'#pragma clang max_tokens_here\'","clang/test/Parser/max-tokens.cpp:15:32: error: expected an integer argument in \'#pragma clang max_tokens_total\'"} | ["clang/test/Parser/max-tokens.cpp"]={"clang/test/Parser/max-tokens.cpp:8:31: error: expected an integer argument in \'#pragma clang max_tokens_here\'","clang/test/Parser/max-tokens.cpp:15:32: error: expected an integer argument in \'#pragma clang max_tokens_total\'"} | ||
Line 1,126: | Line 1,154: | ||
}, | }, | ||
["err_pragma_fc_except_requires_precise"]={ | ["err_pragma_fc_except_requires_precise"]={ | ||
[ | [i]={{nil,q,"err_pragma_fc_except_requires_precise"}}, | ||
[ | [h]={{nil,q,"\'#pragma float_control(except, on)\' is illegal when precise is disabled"}}, | ||
[ | [g]={{nil,q,"\'#pragma float_control(except, on)\' is illegal when precise is disabled"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma float_control\\(except, on\\)\' is illegal when precise is disabled", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{L,579,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_Except:\n if (!isPreciseFPEnabled())\n Diag(Loc, diag::err_pragma_fc_except_requires_precise);"}} | [j]={{L,579,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_Except:\n if (!isPreciseFPEnabled())\n Diag(Loc, diag::err_pragma_fc_except_requires_precise);"}} | ||
}, | }, | ||
["err_pragma_fc_noprecise_requires_noexcept"]={ | ["err_pragma_fc_noprecise_requires_noexcept"]={ | ||
[ | [i]={{nil,q,"err_pragma_fc_noprecise_requires_noexcept"}}, | ||
[ | [h]={{nil,q,"\'#pragma float_control(precise, off)\' is illegal when except is enabled"}}, | ||
[ | [g]={{nil,q,"\'#pragma float_control(precise, off)\' is illegal when except is enabled"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma float_control\\(precise, off\\)\' is illegal when except is enabled", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{L,570,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_NoPrecise:\n if (CurFPFeatures.getExceptionMode() == LangOptions::FPE_Strict)\n Diag(Loc, diag::err_pragma_fc_noprecise_requires_noexcept);"}}, | [j]={{L,570,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_NoPrecise:\n if (CurFPFeatures.getExceptionMode() == LangOptions::FPE_Strict)\n Diag(Loc, diag::err_pragma_fc_noprecise_requires_noexcept);"}}, | ||
[l]={ | [l]={ | ||
Line 1,151: | Line 1,179: | ||
}, | }, | ||
["err_pragma_fc_noprecise_requires_nofenv"]={ | ["err_pragma_fc_noprecise_requires_nofenv"]={ | ||
[ | [i]={{nil,q,"err_pragma_fc_noprecise_requires_nofenv"}}, | ||
[ | [h]={{nil,q,"\'#pragma float_control(precise, off)\' is illegal when fenv_access is enabled"}}, | ||
[ | [g]={{nil,q,"\'#pragma float_control(precise, off)\' is illegal when fenv_access is enabled"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma float_control\\(precise, off\\)\' is illegal when fenv_access is enabled", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{L,572,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_NoPrecise:\n if (CurFPFeatures.getExceptionMode() == LangOptions::FPE_Strict)\n // ...\n else if (CurFPFeatures.getAllowFEnvAccess())\n Diag(Loc, diag::err_pragma_fc_noprecise_requires_nofenv);"}} | [j]={{L,572,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_NoPrecise:\n if (CurFPFeatures.getExceptionMode() == LangOptions::FPE_Strict)\n // ...\n else if (CurFPFeatures.getAllowFEnvAccess())\n Diag(Loc, diag::err_pragma_fc_noprecise_requires_nofenv);"}} | ||
}, | }, | ||
["err_pragma_fc_pp_scope"]={ | ["err_pragma_fc_pp_scope"]={ | ||
[ | [i]={{nil,q,"err_pragma_fc_pp_scope"}}, | ||
[ | [h]={{nil,C,"\'#pragma float_control push/pop\' can only appear at file or namespace scope or within a language linkage specification"},{F,q,"\'#pragma float_control push/pop\' can only appear at file scope or namespace scope"}}, | ||
[ | [g]={{nil,C,"\'#pragma float_control push/pop\' can only appear at file or namespace scope or within a language linkage specification"},{F,q,"\'#pragma float_control push/pop\' can only appear at file scope or namespace scope"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma float_control push\\/pop\' can only appear at file or namespace scope or within a language linkage specification", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{L,558,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n if ((Action == PSK_Push_Set || Action == PSK_Push || Action == PSK_Pop) && !CurContext->getRedeclContext()->isFileContext()) {\n // ...\n Diag(Loc, diag::err_pragma_fc_pp_scope);"}}, | [j]={{L,558,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n if ((Action == PSK_Push_Set || Action == PSK_Push || Action == PSK_Pop) && !CurContext->getRedeclContext()->isFileContext()) {\n // ...\n Diag(Loc, diag::err_pragma_fc_pp_scope);"}}, | ||
[l]={ | [l]={ | ||
Line 1,176: | Line 1,204: | ||
}, | }, | ||
["err_pragma_fenv_requires_precise"]={ | ["err_pragma_fenv_requires_precise"]={ | ||
[ | [i]={{nil,q,"err_pragma_fenv_requires_precise"}}, | ||
[ | [h]={{nil,q,"\'#pragma STDC FENV_ACCESS ON\' is illegal when precise is disabled"}}, | ||
[ | [g]={{nil,q,"\'#pragma STDC FENV_ACCESS ON\' is illegal when precise is disabled"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma STDC FENV_ACCESS ON\' is illegal when precise is disabled", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{L,1360,"void Sema::ActOnPragmaFEnvAccess(SourceLocation Loc, bool IsEnabled) {\n // ...\n if (IsEnabled) {\n // Verify Microsoft restriction:\n // You can\'t enable fenv_access unless precise semantics are enabled.\n // Precise semantics can be enabled either by the float_control\n // pragma, or by using the /fp:precise or /fp:strict compiler options\n if (!isPreciseFPEnabled())\n Diag(Loc, diag::err_pragma_fenv_requires_precise);"}} | [j]={{L,1360,"void Sema::ActOnPragmaFEnvAccess(SourceLocation Loc, bool IsEnabled) {\n // ...\n if (IsEnabled) {\n // Verify Microsoft restriction:\n // You can\'t enable fenv_access unless precise semantics are enabled.\n // Precise semantics can be enabled either by the float_control\n // pragma, or by using the /fp:precise or /fp:strict compiler options\n if (!isPreciseFPEnabled())\n Diag(Loc, diag::err_pragma_fenv_requires_precise);"}} | ||
}, | }, | ||
["err_pragma_file_or_compound_scope"]={ | ["err_pragma_file_or_compound_scope"]={ | ||
[ | [i]={{nil,q,"err_pragma_file_or_compound_scope"}}, | ||
[ | [h]={{nil,q,"\'#pragma %0\' can only appear at file scope or at the start of a compound statement"}}, | ||
[ | [g]={{nil,q,"\'#pragma A\' can only appear at file scope or at the start of a compound statement"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\#pragma (.*?)\' can only appear at file scope or at the start of a compound statement", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,x}}, | ||
[ | [c]={"4f1e9a17e9d2",1587997559,"Add support for #pragma float_control","Add support for #pragma float_control\n\nReviewers: rjmccall, erichkeane, sepavloff\n\nDifferential Revision: https://reviews.llvm.org/D72841"}, | ||
[j]={{ | [j]={{Oc,422,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_fp_contract:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << \"fp_contract\";"},{Oc,429,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_fp:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << \"clang fp\";"},{Oc,437,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_fenv_access:\n case tok::annot_pragma_fenv_access_ms:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << (Kind == tok::annot_pragma_fenv_access ? \"STDC FENV_ACCESS\" : \"fenv_access\");"},{Oc,446,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_fenv_round:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << \"STDC FENV_ROUND\";"},{Oc,453,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_float_control:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << \"float_control\";"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-fp-contract.c"]={"clang/test/Parser/pragma-fp-contract.c:6:14: error: \'#pragma fp_contract\' can only appear at file scope or at the start of a compound statement","clang/test/Parser/pragma-fp-contract.c:31:15: error: \'#pragma clang fp\' can only appear at file scope or at the start of a compound statement"} | ["clang/test/Parser/pragma-fp-contract.c"]={"clang/test/Parser/pragma-fp-contract.c:6:14: error: \'#pragma fp_contract\' can only appear at file scope or at the start of a compound statement","clang/test/Parser/pragma-fp-contract.c:31:15: error: \'#pragma clang fp\' can only appear at file scope or at the start of a compound statement"} | ||
Line 1,201: | Line 1,229: | ||
}, | }, | ||
["err_pragma_float_control_malformed"]={ | ["err_pragma_float_control_malformed"]={ | ||
[ | [i]={{nil,q,"err_pragma_float_control_malformed"}}, | ||
[ | [h]={{nil,q,"pragma float_control is malformed; use \'float_control({push|pop})\' or \'float_control({precise|except}, {on|off} [,push])\'"}}, | ||
[ | [g]={{nil,q,"pragma float_control is malformed; use \'float_control({push|pop})\' or \'float_control({precise|except}, {on|off} [,push])\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="pragma float_control is malformed; use \'float_control\\(\\{push\\|pop\\}\\)\' or \'float_control\\(\\{precise\\|except\\}, \\{on\\|off\\} \\[,push\\]\\)\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,x}}, | ||
[ | [c]={"4f1e9a17e9d2",1587997559,"Add support for #pragma float_control","Add support for #pragma float_control\n\nReviewers: rjmccall, erichkeane, sepavloff\n\nDifferential Revision: https://reviews.llvm.org/D72841"}, | ||
[j]={{ | [j]={{B,2919,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{B,2934,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{B,2938,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{B,2948,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{B,2953,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (!Tok.isAnyIdentifier()) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{B,2968,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (PushOnOff == \"on\")\n // ...\n else if (PushOnOff == \"off\") {\n // ...\n } else if (PushOnOff == \"push\") {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{B,2975,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (!Tok.isAnyIdentifier()) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{B,2982,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (ExpectedPush == \"push\") {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{B,2988,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/fp-floatcontrol-syntax.cpp"]={"clang/test/Parser/fp-floatcontrol-syntax.cpp:37:39: error: pragma float_control is malformed; use \'float_control({push|pop})\' or \'float_control({precise|except}, {on|off} [,push])\'"} | ["clang/test/Parser/fp-floatcontrol-syntax.cpp"]={"clang/test/Parser/fp-floatcontrol-syntax.cpp:37:39: error: pragma float_control is malformed; use \'float_control({push|pop})\' or \'float_control({precise|except}, {on|off} [,push])\'"} | ||
Line 1,215: | Line 1,243: | ||
}, | }, | ||
["err_pragma_fp_invalid_argument"]={ | ["err_pragma_fp_invalid_argument"]={ | ||
[ | [i]={{nil,o,"err_pragma_fp_invalid_argument"}}, | ||
[ | [h]={{nil,y,"unexpected argument \'%0\' to \'#pragma clang fp %1\'; expected %select{\'fast\' or \'on\' or \'off\'|\'on\' or \'off\'|\'ignore\', \'maytrap\' or \'strict\'|\'source\', \'double\' or \'extended\'}2"},{C,v,"unexpected argument \'%0\' to \'#pragma clang fp %1\'; expected %select{\'fast\' or \'on\' or \'off\'|\'on\' or \'off\'|\'ignore\', \'maytrap\' or \'strict\'}2"},{ib,q,"unexpected argument \'%0\' to \'#pragma clang fp %1\'; %select{expected \'fast\' or \'on\' or \'off\'|expected \'on\' or \'off\'}2"},{p,o,"unexpected argument \'%0\' to \'#pragma clang fp %1\'; expected \'on\', \'fast\' or \'off\'"}}, | ||
[ | [g]={{nil,y,{"unexpected argument \'A\' to \'#pragma clang fp B\'; expected ",{"\'fast\' or \'on\' or \'off\'","\'on\' or \'off\'","\'ignore\', \'maytrap\' or \'strict\'","\'source\', \'double\' or \'extended\'"}}},{C,v,{"unexpected argument \'A\' to \'#pragma clang fp B\'; expected ",{"\'fast\' or \'on\' or \'off\'","\'on\' or \'off\'","\'ignore\', \'maytrap\' or \'strict\'"}}},{ib,q,{"unexpected argument \'A\' to \'#pragma clang fp B\'; ",{"expected \'fast\' or \'on\' or \'off\'","expected \'on\' or \'off\'"}}},{p,o,"unexpected argument \'A\' to \'#pragma clang fp B\'; expected \'on\', \'fast\' or \'off\'"}}, | ||
[b]=k, | |||
[e]="unexpected argument \'(.*?)\' to \'\\#pragma clang fp (.*?)\'; expected (?:\'fast\' or \'on\' or \'off\'|\'on\' or \'off\'|\'ignore\', \'maytrap\' or \'strict\'|\'source\', \'double\' or \'extended\')", | |||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={"60d3264d5fbe",1491340716,"Add #pragma clang fp","Add #pragma clang fp\n\nThis adds the new pragma and the first variant, contract(on/off/fast).\n\nThe pragma has the same block scope rules as STDC FP_CONTRACT, i.e. it can be\nplaced at the beginning of a compound statement or at file scope.\n\nSimilarly to STDC FP_CONTRACT there is no need to use attributes. First an\nannotate token is inserted with the parsed details of the pragma. Then the\nannotate token is parsed in the proper contexts and the Sema is updated with\nthe corresponding FPOptions using the shared ActOn function with STDC\nFP_CONTRACT.\n\nAfter this the FPOptions from the Sema is propagated into the AST expression\nnodes. There is no change here.\n\nI was going to add a \'default\' option besides \'on/off/fast\' similar to STDC\nFP_CONTRACT but then decided against it. I think that we\'d have to make option\nuppercase then to avoid using \'default\' the keyword. Also because of the\nscoped activation of pragma I am not sure there is really a need a for this.\n\nDifferential Revision: https://reviews.llvm.org/D31276\n\nllvm-svn: 299470"}, | ||
[j]={{ | [j]={{B,3248,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n // Don\'t diagnose if we have an eval_metod pragma with \"double\" kind.\n if (Tok.isNot(tok::identifier) && !isEvalMethodDouble) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << static_cast<int>(*FlagKind);"},{B,3264,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (FlagKind == TokFPAnnotValue::Contract) {\n // ...\n if (!AnnotValue->ContractValue) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << *FlagKind;"},{B,3276,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (FlagKind == TokFPAnnotValue::Contract) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Reassociate) {\n // ...\n if (!AnnotValue->ReassociateValue) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << *FlagKind;"},{B,3289,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (FlagKind == TokFPAnnotValue::Contract) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Reassociate) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Exceptions) {\n // ...\n if (!AnnotValue->ExceptionsValue) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << *FlagKind;"},{B,3302,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (FlagKind == TokFPAnnotValue::Contract) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Reassociate) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Exceptions) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::EvalMethod) {\n // ...\n if (!AnnotValue->EvalMethodValue) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << *FlagKind;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-fp-contract.c"]={"clang/test/Parser/pragma-fp-contract.c:38:30: error: unexpected argument \'fast\' to \'#pragma clang fp reassociate\'; expected \'on\' or \'off\'"} | ["clang/test/Parser/pragma-fp-contract.c"]={"clang/test/Parser/pragma-fp-contract.c:38:30: error: unexpected argument \'fast\' to \'#pragma clang fp reassociate\'; expected \'on\' or \'off\'"} | ||
Line 1,229: | Line 1,257: | ||
}, | }, | ||
["err_pragma_fp_invalid_option"]={ | ["err_pragma_fp_invalid_option"]={ | ||
[ | [i]={{nil,o,"err_pragma_fp_invalid_option"}}, | ||
[ | [h]={{nil,v,"%select{invalid|missing}0 option%select{ %1|}0; expected \'contract\', \'reassociate\' or \'exceptions\'"},{ib,q,"%select{invalid|missing}0 option%select{ %1|}0; expected \'contract\' or \'reassociate\'"},{p,o,"%select{invalid|missing}0 option%select{ %1|}0; expected contract"}}, | ||
[ | [g]={{nil,v,{{lc,Bc},zc,{Ob,a},"; expected \'contract\', \'reassociate\' or \'exceptions\'"}},{ib,q,{{lc,Bc},zc,{Ob,a},"; expected \'contract\' or \'reassociate\'"}},{p,o,{{lc,Bc},zc,{Ob,a},"; expected contract"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:invalid|missing) option(?: (.*?)|); expected \'contract\', \'reassociate\' or \'exceptions\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,x}}, | ||
[ | [c]={"60d3264d5fbe",1491340716,"Add #pragma clang fp","Add #pragma clang fp\n\nThis adds the new pragma and the first variant, contract(on/off/fast).\n\nThe pragma has the same block scope rules as STDC FP_CONTRACT, i.e. it can be\nplaced at the beginning of a compound statement or at file scope.\n\nSimilarly to STDC FP_CONTRACT there is no need to use attributes. First an\nannotate token is inserted with the parsed details of the pragma. Then the\nannotate token is parsed in the proper contexts and the Sema is updated with\nthe corresponding FPOptions using the shared ActOn function with STDC\nFP_CONTRACT.\n\nAfter this the FPOptions from the Sema is propagated into the AST expression\nnodes. There is no change here.\n\nI was going to add a \'default\' option besides \'on/off/fast\' similar to STDC\nFP_CONTRACT but then decided against it. I think that we\'d have to make option\nuppercase then to avoid using \'default\' the keyword. Also because of the\nscoped activation of pragma I am not sure there is really a need a for this.\n\nDifferential Revision: https://reviews.llvm.org/D31276\n\nllvm-svn: 299470"}, | ||
[j]={{ | [j]={{B,3213,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_option) << /*MissingOption=*/true << \"\";"},{B,3231,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (!FlagKind) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_option) << /*MissingOption=*/false << OptionInfo;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-fp.cpp"]={"clang/test/Parser/pragma-fp.cpp:5:17: error: missing option; expected \'contract\', \'reassociate\' or \'exceptions\'","clang/test/Parser/pragma-fp.cpp:12:18: error: invalid option \'blah\'; expected \'contract\', \'reassociate\' or \'exceptions\'"} | ["clang/test/Parser/pragma-fp.cpp"]={"clang/test/Parser/pragma-fp.cpp:5:17: error: missing option; expected \'contract\', \'reassociate\' or \'exceptions\'","clang/test/Parser/pragma-fp.cpp:12:18: error: invalid option \'blah\'; expected \'contract\', \'reassociate\' or \'exceptions\'"} | ||
Line 1,243: | Line 1,271: | ||
}, | }, | ||
["err_pragma_invalid_keyword"]={ | ["err_pragma_invalid_keyword"]={ | ||
[ | [i]="err_pragma_invalid_keyword", | ||
[ | [h]="invalid argument; expected \'enable\'%select{|, \'full\'}0%select{|, \'assume_safety\'}1 or \'disable\'", | ||
[ | [g]={{nil,nil,{"invalid argument; expected \'enable\'",{a,", \'full\'"},{a,", \'assume_safety\'"}," or \'disable\'"}}}, | ||
[ | [b]=k, | ||
[ | [e]="invalid argument; expected \'enable\'(?:|, \'full\')(?:|, \'assume_safety\') or \'disable\'", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"cab7ca3e2a64",1406753673,"Add a state variable to the loop hint attribute.","Add a state variable to the loop hint attribute.\n\nThis patch is necessary to support constant expressions which replaces the integer value in the loop hint attribute with an expression. The integer value was also storing the pragma’s state for options like vectorize(enable/disable) and the pragma unroll and nounroll directive. The state variable is introduced to hold the state of those options/pragmas. This moves the validation of the state (keywords) from SemaStmtAttr handler to the loop hint annotation token handler.\n\nReviewed by Aaron Ballman\n\nllvm-svn: 214333"}, | ||
[j]={{ | [j]={{B,1415,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n if (!Valid) {\n if (OptionPipelineDisabled) {\n // ...\n } else {\n Diag(Toks[0].getLocation(), diag::err_pragma_invalid_keyword) << /*FullKeyword=*/(OptionUnroll || OptionUnrollAndJam) << /*AssumeSafetyKeyword=*/AssumeSafetyArg;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-loop-safety.cpp"]={"clang/test/Parser/pragma-loop-safety.cpp:18:109: error: invalid argument; expected \'enable\', \'full\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:19:105: error: invalid argument; expected \'enable\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:21:121: error: invalid argument; expected \'enable\', \'assume_safety\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:22:122: error: invalid argument; expected \'enable\', \'assume_safety\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:23:109: error: invalid argument; expected \'enable\', \'full\' or \'disable\'"} | ["clang/test/Parser/pragma-loop-safety.cpp"]={"clang/test/Parser/pragma-loop-safety.cpp:18:109: error: invalid argument; expected \'enable\', \'full\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:19:105: error: invalid argument; expected \'enable\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:21:121: error: invalid argument; expected \'enable\', \'assume_safety\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:22:122: error: invalid argument; expected \'enable\', \'assume_safety\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:23:109: error: invalid argument; expected \'enable\', \'full\' or \'disable\'"} | ||
Line 1,257: | Line 1,285: | ||
}, | }, | ||
["err_pragma_loop_compatibility"]={ | ["err_pragma_loop_compatibility"]={ | ||
[ | [i]="err_pragma_loop_compatibility", | ||
[ | [h]="%select{incompatible|duplicate}0 directives \'%1\' and \'%2\'", | ||
[ | [g]={{nil,nil,{{"incompatible","duplicate"}," directives \'B\' and \'C\'"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:incompatible|duplicate) directives \'(.*?)\' and \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"b06b15aa28d0",1402058424,"Adding a new #pragma for the vectorize and interleave optimization hints.","Adding a new #pragma for the vectorize and interleave optimization hints.\n\nPatch thanks to Tyler Nowicki!\n\nllvm-svn: 210330"}, | ||
[j]={{"clang/lib/Sema/SemaStmtAttr.cpp",431,"static void CheckForIncompatibleAttributes(Sema &S, const SmallVectorImpl<const Attr *> &Attrs) {\n // ...\n for (const auto *I : Attrs) {\n // ...\n if (PrevAttr)\n // ...\n S.Diag(OptionLoc, diag::err_pragma_loop_compatibility) << /*Duplicate=*/true << PrevAttr->getDiagnosticName(Policy) << LH->getDiagnosticName(Policy);"},{"clang/lib/Sema/SemaStmtAttr.cpp",442,"static void CheckForIncompatibleAttributes(Sema &S, const SmallVectorImpl<const Attr *> &Attrs) {\n // ...\n for (const auto *I : Attrs) {\n // ...\n if (CategoryState.StateAttr && CategoryState.NumericAttr && (Category == Unroll || Category == UnrollAndJam || CategoryState.StateAttr->getState() == LoopHintAttr::Disable)) {\n // ...\n S.Diag(OptionLoc, diag::err_pragma_loop_compatibility) << /*Duplicate=*/false << CategoryState.StateAttr->getDiagnosticName(Policy) << CategoryState.NumericAttr->getDiagnosticName(Policy);"}}, | [j]={{"clang/lib/Sema/SemaStmtAttr.cpp",431,"static void CheckForIncompatibleAttributes(Sema &S, const SmallVectorImpl<const Attr *> &Attrs) {\n // ...\n for (const auto *I : Attrs) {\n // ...\n if (PrevAttr)\n // ...\n S.Diag(OptionLoc, diag::err_pragma_loop_compatibility) << /*Duplicate=*/true << PrevAttr->getDiagnosticName(Policy) << LH->getDiagnosticName(Policy);"},{"clang/lib/Sema/SemaStmtAttr.cpp",442,"static void CheckForIncompatibleAttributes(Sema &S, const SmallVectorImpl<const Attr *> &Attrs) {\n // ...\n for (const auto *I : Attrs) {\n // ...\n if (CategoryState.StateAttr && CategoryState.NumericAttr && (Category == Unroll || Category == UnrollAndJam || CategoryState.StateAttr->getState() == LoopHintAttr::Disable)) {\n // ...\n S.Diag(OptionLoc, diag::err_pragma_loop_compatibility) << /*Duplicate=*/false << CategoryState.StateAttr->getDiagnosticName(Policy) << CategoryState.NumericAttr->getDiagnosticName(Policy);"}}, | ||
[l]={ | [l]={ | ||
Line 1,271: | Line 1,299: | ||
}, | }, | ||
["err_pragma_loop_invalid_argument_type"]={ | ["err_pragma_loop_invalid_argument_type"]={ | ||
[ | [i]="err_pragma_loop_invalid_argument_type", | ||
[ | [h]="invalid argument of type %0; expected an integer type", | ||
[ | [g]="invalid argument of type A; expected an integer type", | ||
[ | [b]=k, | ||
[ | [e]="invalid argument of type (.*?); expected an integer type", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c724a83e2054",1413146767,"Allow constant expressions in pragma loop hints.","Allow constant expressions in pragma loop hints.\n\nPreviously loop hints such as #pragma loop vectorize_width(#) required a constant. This patch allows a constant expression to be used as well. Such as a non-type template parameter or an expression (2 * c + 1).\n\nReviewed by Richard Smith\n\nllvm-svn: 219589"}, | ||
[j]={{n,3826,"bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc) {\n // ...\n if (!QT->isIntegerType() || QT->isBooleanType() || QT->isCharType()) {\n Diag(E->getExprLoc(), diag::err_pragma_loop_invalid_argument_type) << QT;"}}, | [j]={{n,3826,"bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc) {\n // ...\n if (!QT->isIntegerType() || QT->isBooleanType() || QT->isCharType()) {\n Diag(E->getExprLoc(), diag::err_pragma_loop_invalid_argument_type) << QT;"}}, | ||
[l]={ | [l]={ | ||
Line 1,285: | Line 1,313: | ||
}, | }, | ||
["err_pragma_loop_invalid_argument_value"]={ | ["err_pragma_loop_invalid_argument_value"]={ | ||
[ | [i]="err_pragma_loop_invalid_argument_value", | ||
[ | [h]="%select{invalid value \'%0\'; must be positive|value \'%0\' is too large}1", | ||
[ | [g]={{nil,nil,{{"invalid value \'A\'; must be positive","value \'A\' is too large"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:invalid value \'(.*?)\'; must be positive|value \'(.*?)\' is too large)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c724a83e2054",1413146767,"Allow constant expressions in pragma loop hints.","Allow constant expressions in pragma loop hints.\n\nPreviously loop hints such as #pragma loop vectorize_width(#) required a constant. This patch allows a constant expression to be used as well. Such as a non-type template parameter or an expression (2 * c + 1).\n\nReviewed by Richard Smith\n\nllvm-svn: 219589"}, | ||
[j]={{n,3838,"bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc) {\n // ...\n if (!ValueIsPositive || ValueAPS.getActiveBits() > 31) {\n Diag(E->getExprLoc(), diag::err_pragma_loop_invalid_argument_value) << toString(ValueAPS, 10) << ValueIsPositive;"}}, | [j]={{n,3838,"bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc) {\n // ...\n if (!ValueIsPositive || ValueAPS.getActiveBits() > 31) {\n Diag(E->getExprLoc(), diag::err_pragma_loop_invalid_argument_value) << toString(ValueAPS, 10) << ValueIsPositive;"}}, | ||
[l]={ | [l]={ | ||
Line 1,299: | Line 1,327: | ||
}, | }, | ||
["err_pragma_loop_invalid_option"]={ | ["err_pragma_loop_invalid_option"]={ | ||
[ | [i]="err_pragma_loop_invalid_option", | ||
[ | [h]={{nil,p,"%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute"},{D,E,"%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, or distribute"},{ic,nil,"%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, or distribute"}}, | ||
[ | [g]={{nil,p,{{lc,Bc},zc,{Ob,a},"; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute"}},{D,E,{{lc,Bc},zc,{Ob,a},"; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, or distribute"}},{ic,nil,{{lc,Bc},zc,{Ob,a},"; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, or distribute"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:invalid|missing) option(?: (.*?)|); expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"b06b15aa28d0",1402058424,"Adding a new #pragma for the vectorize and interleave optimization hints.","Adding a new #pragma for the vectorize and interleave optimization hints.\n\nPatch thanks to Tyler Nowicki!\n\nllvm-svn: 210330"}, | ||
[j]={{ | [j]={{B,3515,"/// Handle the \\#pragma clang loop directive.\n/// #pragma clang \'loop\' loop-hints\n///\n/// loop-hints:\n/// loop-hint loop-hints[opt]\n///\n/// loop-hint:\n/// \'vectorize\' \'(\' loop-hint-keyword \')\'\n/// \'interleave\' \'(\' loop-hint-keyword \')\'\n/// \'unroll\' \'(\' unroll-hint-keyword \')\'\n/// \'vectorize_predicate\' \'(\' loop-hint-keyword \')\'\n/// \'vectorize_width\' \'(\' loop-hint-value \')\'\n/// \'interleave_count\' \'(\' loop-hint-value \')\'\n/// \'unroll_count\' \'(\' loop-hint-value \')\'\n/// \'pipeline\' \'(\' disable \')\'\n/// \'pipeline_initiation_interval\' \'(\' loop-hint-value \')\'\n///\n/// loop-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'assume_safety\'\n///\n/// unroll-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'full\'\n///\n/// loop-hint-value:\n/// constant-expression\n///\n/// Specifying vectorize(enable) or vectorize_width(_value_) instructs llvm to\n/// try vectorizing the instructions of the loop it precedes. Specifying\n/// interleave(enable) or interleave_count(_value_) instructs llvm to try\n/// interleaving multiple iterations of the loop it precedes. The width of the\n/// vector instructions is specified by vectorize_width() and the number of\n/// interleaved loop iterations is specified by interleave_count(). Specifying a\n/// value of 1 effectively disables vectorization/interleaving, even if it is\n/// possible and profitable, and 0 is invalid. The loop vectorizer currently\n/// only works on inner loops.\n///\n/// The unroll and unroll_count directives control the concatenation\n/// unroller. Specifying unroll(enable) instructs llvm to unroll the loop\n/// completely if the trip count is known at compile time and unroll partially\n/// if the trip count is not known. Specifying unroll(full) is similar to\n/// unroll(enable) but will unroll the loop only if the trip count is known at\n/// compile time. Specifying unroll(disable) disables unrolling for the\n/// loop. Specifying unroll_count(_value_) instructs llvm to try to unroll the\n/// loop the number of times indicated by the value.\nvoid PragmaLoopHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_loop_invalid_option) << /*MissingOption=*/true << \"\";"},{B,3537,"/// Handle the \\#pragma clang loop directive.\n/// #pragma clang \'loop\' loop-hints\n///\n/// loop-hints:\n/// loop-hint loop-hints[opt]\n///\n/// loop-hint:\n/// \'vectorize\' \'(\' loop-hint-keyword \')\'\n/// \'interleave\' \'(\' loop-hint-keyword \')\'\n/// \'unroll\' \'(\' unroll-hint-keyword \')\'\n/// \'vectorize_predicate\' \'(\' loop-hint-keyword \')\'\n/// \'vectorize_width\' \'(\' loop-hint-value \')\'\n/// \'interleave_count\' \'(\' loop-hint-value \')\'\n/// \'unroll_count\' \'(\' loop-hint-value \')\'\n/// \'pipeline\' \'(\' disable \')\'\n/// \'pipeline_initiation_interval\' \'(\' loop-hint-value \')\'\n///\n/// loop-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'assume_safety\'\n///\n/// unroll-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'full\'\n///\n/// loop-hint-value:\n/// constant-expression\n///\n/// Specifying vectorize(enable) or vectorize_width(_value_) instructs llvm to\n/// try vectorizing the instructions of the loop it precedes. Specifying\n/// interleave(enable) or interleave_count(_value_) instructs llvm to try\n/// interleaving multiple iterations of the loop it precedes. The width of the\n/// vector instructions is specified by vectorize_width() and the number of\n/// interleaved loop iterations is specified by interleave_count(). Specifying a\n/// value of 1 effectively disables vectorization/interleaving, even if it is\n/// possible and profitable, and 0 is invalid. The loop vectorizer currently\n/// only works on inner loops.\n///\n/// The unroll and unroll_count directives control the concatenation\n/// unroller. Specifying unroll(enable) instructs llvm to unroll the loop\n/// completely if the trip count is known at compile time and unroll partially\n/// if the trip count is not known. Specifying unroll(full) is similar to\n/// unroll(enable) but will unroll the loop only if the trip count is known at\n/// compile time. Specifying unroll(disable) disables unrolling for the\n/// loop. Specifying unroll_count(_value_) instructs llvm to try to unroll the\n/// loop the number of times indicated by the value.\nvoid PragmaLoopHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (!OptionValid) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_loop_invalid_option) << /*MissingOption=*/false << OptionInfo;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-unroll-and-jam.cpp"]={"clang/test/Parser/pragma-unroll-and-jam.cpp:70:242: error: invalid option \'unroll_and_jam\'; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute"} | ["clang/test/Parser/pragma-unroll-and-jam.cpp"]={"clang/test/Parser/pragma-unroll-and-jam.cpp:70:242: error: invalid option \'unroll_and_jam\'; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute"} | ||
Line 1,313: | Line 1,341: | ||
}, | }, | ||
["err_pragma_loop_invalid_vectorize_option"]={ | ["err_pragma_loop_invalid_vectorize_option"]={ | ||
[ | [i]={{nil,v,"err_pragma_loop_invalid_vectorize_option"}}, | ||
[ | [h]={{nil,v,"vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')"}}, | ||
[ | [g]={{nil,v,"vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')"}}, | ||
[ | [b]=k, | ||
[ | [e]="vectorize_width loop hint malformed; use vectorize_width\\(X, fixed\\) or vectorize_width\\(X, scalable\\) where X is an integer, or vectorize_width\\(\'fixed\' or \'scalable\'\\)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,x}}, | ||
[ | [c]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, | ||
[j]={{ | [j]={{B,1466,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n } else if (OptionInfo && OptionInfo->getName() == \"vectorize_width\") {\n // ...\n // Look for vectorize_width(fixed|scalable)\n if (IsScalableStr == \"scalable\" || IsScalableStr == \"fixed\") {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (IsScalableStr != \"scalable\" && IsScalableStr != \"fixed\") {\n Diag(Tok.getLocation(), diag::err_pragma_loop_invalid_vectorize_option);"}} | ||
}, | }, | ||
["err_pragma_loop_missing_argument"]={ | ["err_pragma_loop_missing_argument"]={ | ||
[ | [i]="err_pragma_loop_missing_argument", | ||
[ | [h]="missing argument; expected %select{an integer value|\'enable\'%select{|, \'full\'}1%select{|, \'assume_safety\'}2 or \'disable\'}0", | ||
[ | [g]={{nil,nil,{"missing argument; expected ",{"an integer value",{"\'enable\'",{a,", \'full\'"},{a,", \'assume_safety\'"}," or \'disable\'"}}}}}, | ||
[ | [b]=k, | ||
[ | [e]="missing argument; expected (?:an integer value|\'enable\'(?:|, \'full\')(?:|, \'assume_safety\') or \'disable\')", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"f637790102ea",1403202615,"Fix PR20069: bad loop pragma arguments crash FE","Fix PR20069: bad loop pragma arguments crash FE\n\nThis patch fixes a crash when handling malformed arguments to loop pragmas such\nas: \"#pragma clang loop vectorize(()\". Essentially any argument which is not an\nidentifier or constant resulted in a crash. This patch also changes a couple of\nthe error messages which weren\'t quite correct. New behavior with this patch vs\nold behavior:\n\n#pragma clang loop vectorize(1)\nOLD: error: missing keyword; expected \'enable\' or \'disable\'\nNEW: error: invalid argument; expected \'enable\' or \'disable\'\n\n#pragma clang loop vectorize()\nOLD: error: expected \')\'\nNEW: error: missing argument to loop pragma \'vectorize\'\n\n#pragma clang loop vectorize_width(bad)\nOLD: error: missing value; expected a positive integer value\nNEW: error: invalid argument; expected a positive integer value\n\n#pragma clang loop vectorize(bad)\nOLD: invalid keyword \'bad\'; expected \'enable\' or \'disable\'\nNEW: error: invalid argument; expected \'enable\' or \'disable\'\n\nhttp://reviews.llvm.org/D4197\n\nPatch by Mark Heffernan\n\nllvm-svn: 211292"}, | ||
[j]={{ | [j]={{B,1391,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Verify loop hint has an argument.\n if (Toks[0].is(tok::eof)) {\n // ...\n Diag(Toks[0].getLocation(), diag::err_pragma_loop_missing_argument) << /*StateArgument=*/StateOption << /*FullKeyword=*/(OptionUnroll || OptionUnrollAndJam) << /*AssumeSafetyKeyword=*/AssumeSafetyArg;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-unroll-and-jam.cpp"]={"clang/test/Parser/pragma-unroll-and-jam.cpp:31:94: error: missing argument; expected an integer value"} | ["clang/test/Parser/pragma-unroll-and-jam.cpp"]={"clang/test/Parser/pragma-unroll-and-jam.cpp:31:94: error: missing argument; expected an integer value"} | ||
Line 1,338: | Line 1,366: | ||
}, | }, | ||
["err_pragma_loop_precedes_nonloop"]={ | ["err_pragma_loop_precedes_nonloop"]={ | ||
[ | [i]="err_pragma_loop_precedes_nonloop", | ||
[ | [h]="expected a for, while, or do-while loop to follow \'%0\'", | ||
[ | [g]="expected a for, while, or do-while loop to follow \'A\'", | ||
[ | [b]=k, | ||
[ | [e]="expected a for, while, or do\\-while loop to follow \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"b06b15aa28d0",1402058424,"Adding a new #pragma for the vectorize and interleave optimization hints.","Adding a new #pragma for the vectorize and interleave optimization hints.\n\nPatch thanks to Tyler Nowicki!\n\nllvm-svn: 210330"}, | ||
[j]={{"clang/lib/Sema/SemaStmtAttr.cpp",91,"static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange) {\n // ...\n // This could be handled automatically by adding a Subjects definition in\n // Attr.td, but that would make the diagnostic behavior worse in this case\n // because the user spells this attribute as a pragma.\n if (!isa<DoStmt, ForStmt, CXXForRangeStmt, WhileStmt>(St)) {\n // ...\n S.Diag(St->getBeginLoc(), diag::err_pragma_loop_precedes_nonloop) << Pragma;"}}, | [j]={{"clang/lib/Sema/SemaStmtAttr.cpp",91,"static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange) {\n // ...\n // This could be handled automatically by adding a Subjects definition in\n // Attr.td, but that would make the diagnostic behavior worse in this case\n // because the user spells this attribute as a pragma.\n if (!isa<DoStmt, ForStmt, CXXForRangeStmt, WhileStmt>(St)) {\n // ...\n S.Diag(St->getBeginLoc(), diag::err_pragma_loop_precedes_nonloop) << Pragma;"}}, | ||
[l]={ | [l]={ | ||
Line 1,352: | Line 1,380: | ||
}, | }, | ||
["err_pragma_message_malformed"]={ | ["err_pragma_message_malformed"]={ | ||
[ | [i]="err_pragma_message_malformed", | ||
[ | [h]="pragma %select{message|warning|error}0 requires parenthesized string", | ||
[ | [g]={{nil,nil,{"pragma ",{"message","warning","error"}," requires parenthesized string"}}}, | ||
[ | [b]=k, | ||
[ | [e]="pragma (?:message|warning|error) requires parenthesized string", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={"30c924b3e874",1277572299,"Implement support for #pragma message, patch by Michael Spencer!","Implement support for #pragma message, patch by Michael Spencer!\n\nllvm-svn: 106950"}, | ||
[j]={{X,1653,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n default:\n PP.Diag(MessageLoc, diag::err_pragma_message_malformed) << Kind;"},{X,1664,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (ExpectClosingParen) {\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_message_malformed) << Kind;"},{X,1671,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_message_malformed) << Kind;"}}, | [j]={{X,1653,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n default:\n PP.Diag(MessageLoc, diag::err_pragma_message_malformed) << Kind;"},{X,1664,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (ExpectClosingParen) {\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_message_malformed) << Kind;"},{X,1671,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_message_malformed) << Kind;"}}, | ||
[l]={ | [l]={ | ||
Line 1,366: | Line 1,394: | ||
}, | }, | ||
["err_pragma_misplaced_in_decl"]={ | ["err_pragma_misplaced_in_decl"]={ | ||
[ | [i]={{nil,p,"err_pragma_misplaced_in_decl"}}, | ||
[ | [h]={{nil,p,"this pragma cannot appear in %0 declaration"}}, | ||
[ | [g]={{nil,p,"this pragma cannot appear in A declaration"}}, | ||
[ | [b]=k, | ||
[ | [e]="this pragma cannot appear in (.*?) declaration", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,x}}, | ||
[ | [c]={"037861b23092",1564913331,"[Parser] Emit descriptive diagnostic for misplaced pragma","[Parser] Emit descriptive diagnostic for misplaced pragma\n\nIf a class or struct or union declaration contains a pragma that\nis not valid in this context, compiler issues generic error like\n\"expected member name or \';\' after declaration specifiers\". With this\nchange the error tells that this pragma cannot appear in this declaration.\n\nDifferential Revision: https://reviews.llvm.org/D64932\n\nllvm-svn: 367779"}, | ||
[j]={{ | [j]={{jb,4671,"/// 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::isPragmaAnnotation(Tok.getKind())) {\n Diag(Tok.getLocation(), diag::err_pragma_misplaced_in_decl) << DeclSpec::getSpecifierName(TagType, Actions.getASTContext().getPrintingPolicy());"},{Qb,3421,"Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclarationWithPragmas(AccessSpecifier &AS, ParsedAttributes &AccessAttrs, DeclSpec::TST TagType, Decl *TagDecl) {\n // ...\n default:\n if (tok::isPragmaAnnotation(Tok.getKind())) {\n Diag(Tok.getLocation(), diag::err_pragma_misplaced_in_decl) << DeclSpec::getSpecifierName(TagType, Actions.getASTContext().getPrintingPolicy());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-fp-contract.c"]={"clang/test/Parser/pragma-fp-contract.c:16:14: error: this pragma cannot appear in struct declaration","clang/test/Parser/pragma-fp-contract.c:24:14: error: this pragma cannot appear in union declaration"} | ["clang/test/Parser/pragma-fp-contract.c"]={"clang/test/Parser/pragma-fp-contract.c:16:14: error: this pragma cannot appear in struct declaration","clang/test/Parser/pragma-fp-contract.c:24:14: error: this pragma cannot appear in union declaration"} | ||
Line 1,380: | Line 1,408: | ||
}, | }, | ||
["err_pragma_missing_argument"]={ | ["err_pragma_missing_argument"]={ | ||
[ | [i]="err_pragma_missing_argument", | ||
[ | [h]="missing argument to \'#pragma %0\'%select{|; expected %2}1", | ||
[ | [g]={{nil,nil,{"missing argument to \'#pragma A\'",{a,"; expected C"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="missing argument to \'\\#pragma (.*?)\'(?:|; expected (.*?))", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"bd26f5ea4d9c",1405966114,"Add support for \'#pragma unroll\'.","Add support for \'#pragma unroll\'.\n\nllvm-svn: 213574"}, | ||
[j]={{ | [j]={{B,3162,"// #pragma clang optimize off\n// #pragma clang optimize on\nvoid PragmaOptimizeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (Tok.is(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_missing_argument) << \"clang optimize\" << /*Expected=*/true << \"\'on\' or \'off\'\";"},{B,3974,"// Handle \'#pragma clang max_tokens 12345\'.\nvoid PragmaMaxTokensHereHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_missing_argument) << \"clang max_tokens_here\" << /*Expected=*/true << \"integer\";"},{B,4006,"// Handle \'#pragma clang max_tokens_total 12345\'.\nvoid PragmaMaxTokensTotalHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_missing_argument) << \"clang max_tokens_total\" << /*Expected=*/true << \"integer\";"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-optimize-diagnostics.cpp"]={"clang/test/Parser/pragma-optimize-diagnostics.cpp:14:114: error: missing argument to \'#pragma clang optimize\'; expected \'on\' or \'off\'"} | ["clang/test/Parser/pragma-optimize-diagnostics.cpp"]={"clang/test/Parser/pragma-optimize-diagnostics.cpp:14:114: error: missing argument to \'#pragma clang optimize\'; expected \'on\' or \'off\'"} | ||
Line 1,394: | Line 1,422: | ||
}, | }, | ||
["err_pragma_optimize_extra_argument"]={ | ["err_pragma_optimize_extra_argument"]={ | ||
[ | [i]="err_pragma_optimize_extra_argument", | ||
[ | [h]="unexpected extra argument \'%0\' to \'#pragma clang optimize\'", | ||
[ | [g]="unexpected extra argument \'A\' to \'#pragma clang optimize\'", | ||
[ | [b]=k, | ||
[ | [e]="unexpected extra argument \'(.*?)\' to \'\\#pragma clang optimize\'", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"13a0a38fe087",1400847205,"Implemented support for \"pragma clang optimize on/off\", based on attribute \'optnone\'.","Implemented support for \"pragma clang optimize on/off\", based on attribute \'optnone\'.\n\nThis patch implements support for selectively disabling optimizations on a\nrange of function definitions through a pragma. The implementation is that\nall function definitions in the range are decorated with attribute\n\'optnone\'.\n\n #pragma clang optimize off\n // All function definitions in here are decorated with \'optnone\'.\n #pragma clang optimize on\n // Compilation resumes as normal.\n\nllvm-svn: 209510"}, | ||
[j]={{ | [j]={{B,3184,"// #pragma clang optimize off\n// #pragma clang optimize on\nvoid PragmaOptimizeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_optimize_extra_argument) << PP.getSpelling(Tok);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-optimize-diagnostics.cpp"]={"clang/test/Parser/pragma-optimize-diagnostics.cpp:8:27: error: unexpected extra argument \'top\' to \'#pragma clang optimize\'"} | ["clang/test/Parser/pragma-optimize-diagnostics.cpp"]={"clang/test/Parser/pragma-optimize-diagnostics.cpp:8:27: error: unexpected extra argument \'top\' to \'#pragma clang optimize\'"} | ||
Line 1,408: | Line 1,436: | ||
}, | }, | ||
["err_pragma_optimize_invalid_argument"]={ | ["err_pragma_optimize_invalid_argument"]={ | ||
[ | [i]="err_pragma_optimize_invalid_argument", | ||
[ | [h]="unexpected argument \'%0\' to \'#pragma clang optimize\'; expected \'on\' or \'off\'", | ||
[ | [g]="unexpected argument \'A\' to \'#pragma clang optimize\'; expected \'on\' or \'off\'", | ||
[ | [b]=k, | ||
[ | [e]="unexpected argument \'(.*?)\' to \'\\#pragma clang optimize\'; expected \'on\' or \'off\'", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"13a0a38fe087",1400847205,"Implemented support for \"pragma clang optimize on/off\", based on attribute \'optnone\'.","Implemented support for \"pragma clang optimize on/off\", based on attribute \'optnone\'.\n\nThis patch implements support for selectively disabling optimizations on a\nrange of function definitions through a pragma. The implementation is that\nall function definitions in the range are decorated with attribute\n\'optnone\'.\n\n #pragma clang optimize off\n // All function definitions in here are decorated with \'optnone\'.\n #pragma clang optimize on\n // Compilation resumes as normal.\n\nllvm-svn: 209510"}, | ||
[j]={{ | [j]={{B,3167,"// #pragma clang optimize off\n// #pragma clang optimize on\nvoid PragmaOptimizeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_optimize_invalid_argument) << PP.getSpelling(Tok);"},{B,3177,"// #pragma clang optimize off\n// #pragma clang optimize on\nvoid PragmaOptimizeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (II->isStr(\"on\")) {\n // ...\n } else if (!II->isStr(\"off\")) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_optimize_invalid_argument) << PP.getSpelling(Tok);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-optimize-diagnostics.cpp"]={"clang/test/Parser/pragma-optimize-diagnostics.cpp:11:24: error: unexpected argument \'something_wrong\' to \'#pragma clang optimize\'; expected \'on\' or \'off\'"} | ["clang/test/Parser/pragma-optimize-diagnostics.cpp"]={"clang/test/Parser/pragma-optimize-diagnostics.cpp:11:24: error: unexpected argument \'something_wrong\' to \'#pragma clang optimize\'; expected \'on\' or \'off\'"} | ||
Line 1,422: | Line 1,450: | ||
}, | }, | ||
["err_pragma_options_align_mac68k_target_unsupported"]={ | ["err_pragma_options_align_mac68k_target_unsupported"]={ | ||
[ | [i]="err_pragma_options_align_mac68k_target_unsupported", | ||
[h]="mac68k alignment pragma is not supported on this target", | |||
[g]="mac68k alignment pragma is not supported on this target", | |||
[b]=k, | |||
[e]="mac68k alignment pragma is not supported on this target", | [e]="mac68k alignment pragma is not supported on this target", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"bd60652ace14",1274920516,"Sema: Reject \'#pragma options align=mac68k\' everywhere except i386-apple-darwin.","Sema: Reject \'#pragma options align=mac68k\' everywhere except i386-apple-darwin.\n\nllvm-svn: 104789"}, | |||
[ | |||
[ | |||
[j]={{L,246,"void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc) {\n // ...\n case POAK_Mac68k:\n // Check if the target supports this.\n if (!this->Context.getTargetInfo().hasAlignMac68kSupport()) {\n Diag(PragmaLoc, diag::err_pragma_options_align_mac68k_target_unsupported);"}}, | [j]={{L,246,"void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc) {\n // ...\n case POAK_Mac68k:\n // Check if the target supports this.\n if (!this->Context.getTargetInfo().hasAlignMac68kSupport()) {\n Diag(PragmaLoc, diag::err_pragma_options_align_mac68k_target_unsupported);"}}, | ||
[l]={ | [l]={ | ||
Line 1,436: | Line 1,464: | ||
}, | }, | ||
["err_pragma_pack_identifer_not_supported"]={ | ["err_pragma_pack_identifer_not_supported"]={ | ||
[ | [i]={{nil,v,"err_pragma_pack_identifer_not_supported"}}, | ||
[ | [h]={{nil,v,"specifying an identifier within `#pragma pack` is not supported on this target"}}, | ||
[ | [g]={{nil,v,"specifying an identifier within `#pragma pack` is not supported on this target"}}, | ||
[ | [b]=k, | ||
[ | [e]="specifying an identifier within `\\#pragma pack` is not supported on this target", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{L,328,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n // XL pragma pack does not support identifier syntax.\n if (IsXLPragma && !SlotLabel.empty()) {\n Diag(PragmaLoc, diag::err_pragma_pack_identifer_not_supported);"}}, | [j]={{L,328,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n // XL pragma pack does not support identifier syntax.\n if (IsXLPragma && !SlotLabel.empty()) {\n Diag(PragmaLoc, diag::err_pragma_pack_identifer_not_supported);"}}, | ||
[l]={ | [l]={ | ||
Line 1,450: | Line 1,478: | ||
}, | }, | ||
["err_pragma_pack_invalid_alignment"]={ | ["err_pragma_pack_invalid_alignment"]={ | ||
[ | [i]={{nil,v,"err_pragma_pack_invalid_alignment"}}, | ||
[ | [h]={{nil,v,"expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'"}}, | ||
[ | [g]={{nil,v,"expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected \\#pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{L,353,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n if (Alignment) {\n // ...\n if (IsXLPragma && *Val == 0) {\n // ...\n Diag(PragmaLoc, diag::err_pragma_pack_invalid_alignment);"}}, | [j]={{L,353,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n if (Alignment) {\n // ...\n if (IsXLPragma && *Val == 0) {\n // ...\n Diag(PragmaLoc, diag::err_pragma_pack_invalid_alignment);"}}, | ||
[l]={ | [l]={ | ||
Line 1,464: | Line 1,492: | ||
}, | }, | ||
["err_pragma_pipeline_invalid_keyword"]={ | ["err_pragma_pipeline_invalid_keyword"]={ | ||
[ | [i]={{nil,E,"err_pragma_pipeline_invalid_keyword"}}, | ||
[ | [h]={{nil,E,"invalid argument; expected \'disable\'"}}, | ||
[ | [g]={{nil,E,"invalid argument; expected \'disable\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="invalid argument; expected \'disable\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,E,x}}, | ||
[ | [c]={"9bdf515c744f",1546622400,"Add two new pragmas for controlling software pipelining optimizations.","Add two new pragmas for controlling software pipelining optimizations.\n\nThis patch adds #pragma clang loop pipeline and #pragma clang loop pipeline_initiation_interval for debugging or reducing compile time purposes. It is possible to disable SWP for concrete loops to save compilation time or to find bugs by not doing SWP to certain loops. It is possible to set value of initiation interval to concrete number to save compilation time by not doing extra pipeliner passes or to check created schedule for specific initiation interval.\n\nPatch by Alexey Lapshin.\n\nllvm-svn: 350414"}, | ||
[j]={{ | [j]={{B,1413,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n if (!Valid) {\n if (OptionPipelineDisabled) {\n Diag(Toks[0].getLocation(), diag::err_pragma_pipeline_invalid_keyword);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/pragma-pipeline.cpp"]={"clang/test/Parser/pragma-pipeline.cpp:20:91: error: invalid argument; expected \'disable\'","clang/test/Parser/pragma-pipeline.cpp:21:91: error: invalid argument; expected \'disable\'"} | ["clang/test/Parser/pragma-pipeline.cpp"]={"clang/test/Parser/pragma-pipeline.cpp:20:91: error: invalid argument; expected \'disable\'","clang/test/Parser/pragma-pipeline.cpp:21:91: error: invalid argument; expected \'disable\'"} | ||
Line 1,478: | Line 1,506: | ||
}, | }, | ||
["err_pragma_pointers_to_members_unknown_kind"]={ | ["err_pragma_pointers_to_members_unknown_kind"]={ | ||
[ | [i]="err_pragma_pointers_to_members_unknown_kind", | ||
[ | [h]="unexpected %0, expected to see one of %select{|\'best_case\', \'full_generality\', }1\'single_inheritance\', \'multiple_inheritance\', or \'virtual_inheritance\'", | ||
[ | [g]={{nil,nil,{"unexpected A, expected to see one of ",{a,"\'best_case\', \'full_generality\', "},"\'single_inheritance\', \'multiple_inheritance\', or \'virtual_inheritance\'"}}}, | ||
[ | [b]=k, | ||
[ | [e]="unexpected (.*?), expected to see one of (?:|\'best_case\', \'full_generality\', )\'single_inheritance\', \'multiple_inheritance\', or \'virtual_inheritance\'", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"4bb0980d9628",1392061815,"MS ABI: Add support for #pragma pointers_to_members","MS ABI: Add support for #pragma pointers_to_members\n\nIntroduce a notion of a \'current representation method\' for\npointers-to-members.\n\nWhen starting out, this is set to \'best case\' (representation method is\nchosen by examining the class, selecting the smallest representation\nthat would work given the class definition or lack thereof).\n\nThis pragma allows the translation unit to dictate exactly what\nrepresentation to use, similar to how the inheritance model keywords\noperate.\n\nN.B. PCH support is forthcoming.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2723\n\nllvm-svn: 201105"}, | ||
[j]={{ | [j]={{B,2705,"/// Handle \'#pragma pointers_to_members\'\n// The grammar for this pragma is as follows:\n//\n// <inheritance model> ::= (\'single\' | \'multiple\' | \'virtual\') \'_inheritance\'\n//\n// #pragma pointers_to_members \'(\' \'best_case\' \')\'\n// #pragma pointers_to_members \'(\' \'full_generality\' [\',\' inheritance-model] \')\'\n// #pragma pointers_to_members \'(\' inheritance-model \')\'\nvoid PragmaMSPointersToMembers::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Arg->isStr(\"best_case\")) {\n // ...\n } else {\n if (Arg->isStr(\"full_generality\")) {\n if (Tok.is(tok::comma)) {\n // ...\n if (!Arg) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_pointers_to_members_unknown_kind) << Tok.getKind() << /*OnlyInheritanceModels*/ 0;"},{B,2734,"/// Handle \'#pragma pointers_to_members\'\n// The grammar for this pragma is as follows:\n//\n// <inheritance model> ::= (\'single\' | \'multiple\' | \'virtual\') \'_inheritance\'\n//\n// #pragma pointers_to_members \'(\' \'best_case\' \')\'\n// #pragma pointers_to_members \'(\' \'full_generality\' [\',\' inheritance-model] \')\'\n// #pragma pointers_to_members \'(\' inheritance-model \')\'\nvoid PragmaMSPointersToMembers::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Arg->isStr(\"best_case\")) {\n // ...\n } else {\n // ...\n if (Arg) {\n if (Arg->isStr(\"single_inheritance\")) {\n // ...\n } else if (Arg->isStr(\"multiple_inheritance\")) {\n // ...\n } else if (Arg->isStr(\"virtual_inheritance\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_pointers_to_members_unknown_kind) << Arg << /*HasPointerDeclaration*/ 1;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/member-pointer-ms.cpp"]={"clang/test/SemaCXX/member-pointer-ms.cpp:292:35: error: unexpected \'single\', expected to see one of \'best_case\', \'full_generality\', \'single_inheritance\', \'multiple_inheritance\', or \'virtual_inheritance\'"} | ["clang/test/SemaCXX/member-pointer-ms.cpp"]={"clang/test/SemaCXX/member-pointer-ms.cpp:292:35: error: unexpected \'single\', expected to see one of \'best_case\', \'full_generality\', \'single_inheritance\', \'multiple_inheritance\', or \'virtual_inheritance\'"} | ||
Line 1,492: | Line 1,520: | ||
}, | }, | ||
["err_pragma_pop_visibility_mismatch"]={ | ["err_pragma_pop_visibility_mismatch"]={ | ||
[ | [i]="err_pragma_pop_visibility_mismatch", | ||
[ | [h]="#pragma visibility pop with no matching #pragma visibility push", | ||
[ | [g]="#pragma visibility pop with no matching #pragma visibility push", | ||
[ | [b]=k, | ||
[ | [e]="\\#pragma visibility pop with no matching \\#pragma visibility push", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"6d65d7b63d1c",1328138699,"Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".","Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".\n\nllvm-svn: 149559"}, | ||
[j]={{L,1370,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n if (!VisContext) {\n Diag(EndLoc, diag::err_pragma_pop_visibility_mismatch);"},{L,1381,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n // ...\n if (StartsWithPragma && IsNamespaceEnd) {\n // ...\n } else if (!StartsWithPragma && !IsNamespaceEnd) {\n Diag(EndLoc, diag::err_pragma_pop_visibility_mismatch);"}}, | [j]={{L,1370,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n if (!VisContext) {\n Diag(EndLoc, diag::err_pragma_pop_visibility_mismatch);"},{L,1381,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n // ...\n if (StartsWithPragma && IsNamespaceEnd) {\n // ...\n } else if (!StartsWithPragma && !IsNamespaceEnd) {\n Diag(EndLoc, diag::err_pragma_pop_visibility_mismatch);"}}, | ||
[l]={ | [l]={ | ||
Line 1,506: | Line 1,534: | ||
}, | }, | ||
["err_pragma_push_pop_macro_malformed"]={ | ["err_pragma_push_pop_macro_malformed"]={ | ||
[ | [i]="err_pragma_push_pop_macro_malformed", | ||
[ | [h]="pragma %0 requires a parenthesized string", | ||
[ | [g]="pragma A requires a parenthesized string", | ||
[ | [b]=k, | ||
[ | [e]="pragma (.*?) requires a parenthesized string", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={"c0a585d63c6c",1282060545,"Implement #pragma push_macro, patch by Francois Pichet!","Implement #pragma push_macro, patch by Francois Pichet!\n\nllvm-svn: 111234"}, | ||
[j]={{X,580,"/// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.\n/// Return the IdentifierInfo* associated with the macro to push or pop.\nIdentifierInfo *Preprocessor::ParsePragmaPushOrPopMacro(Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(PragmaTok.getLocation(), diag::err_pragma_push_pop_macro_malformed) << getSpelling(PragmaTok);"},{X,588,"/// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.\n/// Return the IdentifierInfo* associated with the macro to push or pop.\nIdentifierInfo *Preprocessor::ParsePragmaPushOrPopMacro(Token &Tok) {\n // ...\n if (Tok.isNot(tok::string_literal)) {\n Diag(PragmaTok.getLocation(), diag::err_pragma_push_pop_macro_malformed) << getSpelling(PragmaTok);"},{X,604,"/// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.\n/// Return the IdentifierInfo* associated with the macro to push or pop.\nIdentifierInfo *Preprocessor::ParsePragmaPushOrPopMacro(Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(PragmaTok.getLocation(), diag::err_pragma_push_pop_macro_malformed) << getSpelling(PragmaTok);"}} | [j]={{X,580,"/// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.\n/// Return the IdentifierInfo* associated with the macro to push or pop.\nIdentifierInfo *Preprocessor::ParsePragmaPushOrPopMacro(Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(PragmaTok.getLocation(), diag::err_pragma_push_pop_macro_malformed) << getSpelling(PragmaTok);"},{X,588,"/// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.\n/// Return the IdentifierInfo* associated with the macro to push or pop.\nIdentifierInfo *Preprocessor::ParsePragmaPushOrPopMacro(Token &Tok) {\n // ...\n if (Tok.isNot(tok::string_literal)) {\n Diag(PragmaTok.getLocation(), diag::err_pragma_push_pop_macro_malformed) << getSpelling(PragmaTok);"},{X,604,"/// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.\n/// Return the IdentifierInfo* associated with the macro to push or pop.\nIdentifierInfo *Preprocessor::ParsePragmaPushOrPopMacro(Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(PragmaTok.getLocation(), diag::err_pragma_push_pop_macro_malformed) << getSpelling(PragmaTok);"}} | ||
}, | }, | ||
["err_pragma_push_visibility_mismatch"]={ | ["err_pragma_push_visibility_mismatch"]={ | ||
[ | [i]="err_pragma_push_visibility_mismatch", | ||
[ | [h]="#pragma visibility push with no matching #pragma visibility pop", | ||
[ | [g]="#pragma visibility push with no matching #pragma visibility pop", | ||
[ | [b]=k, | ||
[ | [e]="\\#pragma visibility push with no matching \\#pragma visibility pop", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"6d65d7b63d1c",1328138699,"Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".","Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".\n\nllvm-svn: 149559"}, | ||
[j]={{L,1371,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n // ...\n if (StartsWithPragma && IsNamespaceEnd) {\n Diag(Back->second, diag::err_pragma_push_visibility_mismatch);"}}, | [j]={{L,1371,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n // ...\n if (StartsWithPragma && IsNamespaceEnd) {\n Diag(Back->second, diag::err_pragma_push_visibility_mismatch);"}}, | ||
[l]={ | [l]={ | ||
Line 1,531: | Line 1,559: | ||
}, | }, | ||
["err_pragma_section_invalid_for_target"]={ | ["err_pragma_section_invalid_for_target"]={ | ||
[ | [i]={{nil,F,"err_pragma_section_invalid_for_target"}}, | ||
[ | [h]={{nil,F,"argument to #pragma section is not valid for this target: %0"}}, | ||
[ | [g]={{nil,F,"argument to #pragma section is not valid for this target: A"}}, | ||
[ | [b]=k, | ||
[ | [e]="argument to \\#pragma section is not valid for this target\\: (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,F,m}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{L,309,"void Sema::ActOnPragmaClangSection(SourceLocation PragmaLoc, PragmaClangSectionAction Action, PragmaClangSectionKind SecKind, StringRef SecName) {\n // ...\n if (llvm::Error E = isValidSectionSpecifier(SecName)) {\n Diag(PragmaLoc, diag::err_pragma_section_invalid_for_target) << toString(std::move(E));"}}, | [j]={{L,309,"void Sema::ActOnPragmaClangSection(SourceLocation PragmaLoc, PragmaClangSectionAction Action, PragmaClangSectionKind SecKind, StringRef SecName) {\n // ...\n if (llvm::Error E = isValidSectionSpecifier(SecName)) {\n Diag(PragmaLoc, diag::err_pragma_section_invalid_for_target) << toString(std::move(E));"}}, | ||
[l]={ | [l]={ | ||
Line 1,545: | Line 1,573: | ||
}, | }, | ||
["err_preserve_enum_value_invalid"]={ | ["err_preserve_enum_value_invalid"]={ | ||
[ | [i]={{nil,v,"err_preserve_enum_value_invalid"}}, | ||
[ | [h]={{nil,v,"__builtin_preserve_enum_value argument %0 invalid"}}, | ||
[ | [g]={{nil,v,"__builtin_preserve_enum_value argument A invalid"}}, | ||
[ | [b]=k, | ||
[ | [e]="__builtin_preserve_enum_value argument (.*?) invalid", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,a}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{z,3540,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (BuiltinID == BPF::BI__builtin_preserve_field_info) {\n // ...\n } else if (BuiltinID == BPF::BI__builtin_preserve_type_info) {\n // ...\n } else if (BuiltinID == BPF::BI__builtin_preserve_enum_value) {\n if (!isValidBPFPreserveEnumValueArg(Arg)) {\n // ...\n kind = diag::err_preserve_enum_value_invalid;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:95:40: error: __builtin_preserve_enum_value argument 1 invalid","clang/test/Sema/builtins-bpf.c:99:40: error: __builtin_preserve_enum_value argument 1 invalid"} | ["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:95:40: error: __builtin_preserve_enum_value argument 1 invalid","clang/test/Sema/builtins-bpf.c:99:40: error: __builtin_preserve_enum_value argument 1 invalid"} | ||
Line 1,559: | Line 1,587: | ||
}, | }, | ||
["err_preserve_enum_value_not_const"]={ | ["err_preserve_enum_value_not_const"]={ | ||
[ | [i]={{nil,v,"err_preserve_enum_value_not_const"}}, | ||
[ | [h]={{nil,v,"__builtin_preserve_enum_value argument %0 not a constant"}}, | ||
[ | [g]={{nil,v,"__builtin_preserve_enum_value argument A not a constant"}}, | ||
[ | [b]=k, | ||
[ | [e]="__builtin_preserve_enum_value argument (.*?) not a constant", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,a}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{z,3518,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!Value) {\n if (BuiltinID == BPF::BI__builtin_preserve_field_info)\n // ...\n else if (BuiltinID == BPF::BI__builtin_btf_type_id)\n // ...\n else if (BuiltinID == BPF::BI__builtin_preserve_type_info)\n // ...\n else\n kind = diag::err_preserve_enum_value_not_const;"}} | ||
}, | }, | ||
["err_preserve_field_info_not_const"]={ | ["err_preserve_field_info_not_const"]={ | ||
[ | [i]={{nil,p,"err_preserve_field_info_not_const"}}, | ||
[ | [h]={{nil,p,"__builtin_preserve_field_info argument %0 not a constant"}}, | ||
[ | [g]={{nil,p,"__builtin_preserve_field_info argument A not a constant"}}, | ||
[ | [b]=k, | ||
[ | [e]="__builtin_preserve_field_info argument (.*?) not a constant", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,a}}, | ||
[ | [c]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, | ||
[j]={{ | [j]={{z,3512,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!Value) {\n if (BuiltinID == BPF::BI__builtin_preserve_field_info)\n kind = diag::err_preserve_field_info_not_const;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:64:48: error: __builtin_preserve_field_info argument 2 not a constant","clang/test/Sema/builtins-bpf.c:68:48: error: __builtin_preserve_field_info argument 2 not a constant"} | ["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:64:48: error: __builtin_preserve_field_info argument 2 not a constant","clang/test/Sema/builtins-bpf.c:68:48: error: __builtin_preserve_field_info argument 2 not a constant"} | ||
Line 1,584: | Line 1,612: | ||
}, | }, | ||
["err_preserve_field_info_not_field"]={ | ["err_preserve_field_info_not_field"]={ | ||
[ | [i]={{nil,p,"err_preserve_field_info_not_field"}}, | ||
[ | [h]={{nil,p,"__builtin_preserve_field_info argument %0 not a field access"}}, | ||
[ | [g]={{nil,p,"__builtin_preserve_field_info argument A not a field access"}}, | ||
[ | [b]=k, | ||
[ | [e]="__builtin_preserve_field_info argument (.*?) not a field access", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,a}}, | ||
[ | [c]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, | ||
[j]={{ | [j]={{z,3530,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (BuiltinID == BPF::BI__builtin_preserve_field_info) {\n if (!isValidBPFPreserveFieldInfoArg(Arg)) {\n // ...\n kind = diag::err_preserve_field_info_not_field;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:28:40: error: __builtin_preserve_field_info argument 1 not a field access","clang/test/Sema/builtins-bpf.c:32:40: error: __builtin_preserve_field_info argument 1 not a field access"} | ["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:28:40: error: __builtin_preserve_field_info argument 1 not a field access","clang/test/Sema/builtins-bpf.c:32:40: error: __builtin_preserve_field_info argument 1 not a field access"} | ||
Line 1,598: | Line 1,626: | ||
}, | }, | ||
["err_preserve_type_info_invalid"]={ | ["err_preserve_type_info_invalid"]={ | ||
[ | [i]={{nil,v,"err_preserve_type_info_invalid"}}, | ||
[ | [h]={{nil,v,"__builtin_preserve_type_info argument %0 invalid"}}, | ||
[ | [g]={{nil,v,"__builtin_preserve_type_info argument A invalid"}}, | ||
[ | [b]=k, | ||
[ | [e]="__builtin_preserve_type_info argument (.*?) invalid", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,a}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{z,3535,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (BuiltinID == BPF::BI__builtin_preserve_field_info) {\n // ...\n } else if (BuiltinID == BPF::BI__builtin_preserve_type_info) {\n if (!isValidBPFPreserveTypeInfoArg(Arg)) {\n // ...\n kind = diag::err_preserve_type_info_invalid;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:103:39: error: __builtin_preserve_type_info argument 1 invalid"} | ["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:103:39: error: __builtin_preserve_type_info argument 1 invalid"} | ||
Line 1,612: | Line 1,640: | ||
}, | }, | ||
["err_preserve_type_info_not_const"]={ | ["err_preserve_type_info_not_const"]={ | ||
[ | [i]={{nil,v,"err_preserve_type_info_not_const"}}, | ||
[ | [h]={{nil,v,"__builtin_preserve_type_info argument %0 not a constant"}}, | ||
[ | [g]={{nil,v,"__builtin_preserve_type_info argument A not a constant"}}, | ||
[ | [b]=k, | ||
[ | [e]="__builtin_preserve_type_info argument (.*?) not a constant", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,a}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{z,3516,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!Value) {\n if (BuiltinID == BPF::BI__builtin_preserve_field_info)\n // ...\n else if (BuiltinID == BPF::BI__builtin_btf_type_id)\n // ...\n else if (BuiltinID == BPF::BI__builtin_preserve_type_info)\n kind = diag::err_preserve_type_info_not_const;"}} | ||
}, | }, | ||
["err_private_ivar_access"]={ | ["err_private_ivar_access"]={ | ||
[ | [i]="err_private_ivar_access", | ||
[ | [h]="instance variable %0 is private", | ||
[ | [g]="instance variable A is private", | ||
[ | [b]=k, | ||
[ | [e]="instance variable (.*?) is private", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{n,2971,"/// The parser has read a name in, and Sema has detected that we\'re currently\n/// inside an ObjC method. Perform some additional checks and determine if we\n/// should form a reference to an ivar.\n///\n/// Ideally, most of this would be done by lookup, but there\'s\n/// actually quite a lot of extra work involved.\nDeclResult Sema::LookupIvarInObjCMethod(LookupResult &Lookup, Scope *S, IdentifierInfo *II) {\n // ...\n if (LookForIvars) {\n // ...\n if (IFace && (IV = IFace->lookupInstanceVariable(II, ClassDeclared))) {\n // ...\n // Diagnose the use of an ivar outside of the declaring class.\n if (IV->getAccessControl() == ObjCIvarDecl::Private && !declaresSameEntity(ClassDeclared, IFace) && !getLangOpts().DebuggerSupport)\n Diag(Loc, diag::err_private_ivar_access) << IV->getDeclName();"},{ | [j]={{n,2971,"/// The parser has read a name in, and Sema has detected that we\'re currently\n/// inside an ObjC method. Perform some additional checks and determine if we\n/// should form a reference to an ivar.\n///\n/// Ideally, most of this would be done by lookup, but there\'s\n/// actually quite a lot of extra work involved.\nDeclResult Sema::LookupIvarInObjCMethod(LookupResult &Lookup, Scope *S, IdentifierInfo *II) {\n // ...\n if (LookForIvars) {\n // ...\n if (IFace && (IV = IFace->lookupInstanceVariable(II, ClassDeclared))) {\n // ...\n // Diagnose the use of an ivar outside of the declaring class.\n if (IV->getAccessControl() == ObjCIvarDecl::Private && !declaresSameEntity(ClassDeclared, IFace) && !getLangOpts().DebuggerSupport)\n Diag(Loc, diag::err_private_ivar_access) << IV->getDeclName();"},{V,1445,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (IV->getAccessControl() != ObjCIvarDecl::Public && IV->getAccessControl() != ObjCIvarDecl::Package) {\n // ...\n if (!S.getLangOpts().DebuggerSupport) {\n if (IV->getAccessControl() == ObjCIvarDecl::Private) {\n if (!declaresSameEntity(ClassDeclared, IDecl) || !declaresSameEntity(ClassOfMethodDecl, ClassDeclared))\n S.Diag(MemberLoc, diag::err_private_ivar_access) << IV->getDeclName();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/synthesized-ivar.m"]={"clang/test/SemaObjC/synthesized-ivar.m:16:26: error: instance variable \'IP\' is private","clang/test/SemaObjC/synthesized-ivar.m:48:4: error: instance variable \'_PROP_INMAIN\' is private","clang/test/SemaObjC/synthesized-ivar.m:49:4: error: instance variable \'_PROP_INCLASSEXT\' is private","clang/test/SemaObjC/synthesized-ivar.m:50:11: error: instance variable \'private_ivar\' is private"} | ["clang/test/SemaObjC/synthesized-ivar.m"]={"clang/test/SemaObjC/synthesized-ivar.m:16:26: error: instance variable \'IP\' is private","clang/test/SemaObjC/synthesized-ivar.m:48:4: error: instance variable \'_PROP_INMAIN\' is private","clang/test/SemaObjC/synthesized-ivar.m:49:4: error: instance variable \'_PROP_INCLASSEXT\' is private","clang/test/SemaObjC/synthesized-ivar.m:50:11: error: instance variable \'private_ivar\' is private"} | ||
Line 1,637: | Line 1,665: | ||
}, | }, | ||
["err_private_module_fragment_expected_semi"]={ | ["err_private_module_fragment_expected_semi"]={ | ||
[ | [i]={{nil,D,"err_private_module_fragment_expected_semi"}}, | ||
[ | [h]={{nil,D,"expected \';\' after private module fragment declaration"}}, | ||
[ | [g]={{nil,D,"expected \';\' after private module fragment declaration"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected \';\' after private module fragment declaration", | ||
[ | [f]=a, | ||
[ | [d]={{nil,D,"Modules Issue"}}, | ||
[ | [c]={"d652bdd05f1c",1555229219,"[c++20] Parsing support for module-declarations, import-declarations,","[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"}, | ||
[j]={{ | [j]={{Nb,2438,"/// 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 // Parse a private-module-fragment, if present.\n if (getLangOpts().CPlusPlusModules && Tok.is(tok::colon) && NextToken().is(tok::kw_private)) {\n // ...\n ExpectAndConsumeSemi(diag::err_private_module_fragment_expected_semi);"}} | ||
}, | }, | ||
["err_private_module_fragment_not_module"]={ | ["err_private_module_fragment_not_module"]={ | ||
[ | [i]={{nil,D,"err_private_module_fragment_not_module"}}, | ||
[ | [h]={{nil,D,"private module fragment declaration with no preceding module declaration"}}, | ||
[ | [g]={{nil,D,"private module fragment declaration with no preceding module declaration"}}, | ||
[ | [b]=k, | ||
[ | [e]="private module fragment declaration with no preceding module declaration", | ||
[ | [f]=a, | ||
[ | [d]={{nil,D,"Modules Issue"}}, | ||
[ | [c]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, | ||
[j]={{"clang/lib/Sema/SemaModule.cpp",437,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::ModuleMapModule:\n case Module::ExplicitGlobalModuleFragment:\n case Module::ImplicitGlobalModuleFragment:\n case Module::ModulePartitionImplementation:\n case Module::ModulePartitionInterface:\n case Module::ModuleHeaderUnit:\n Diag(PrivateLoc, diag::err_private_module_fragment_not_module);"}}, | [j]={{"clang/lib/Sema/SemaModule.cpp",437,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::ModuleMapModule:\n case Module::ExplicitGlobalModuleFragment:\n case Module::ImplicitGlobalModuleFragment:\n case Module::ModulePartitionImplementation:\n case Module::ModulePartitionInterface:\n case Module::ModuleHeaderUnit:\n Diag(PrivateLoc, diag::err_private_module_fragment_not_module);"}}, | ||
[l]={ | [l]={ | ||
Line 1,662: | Line 1,690: | ||
}, | }, | ||
["err_private_module_fragment_not_module_interface"]={ | ["err_private_module_fragment_not_module_interface"]={ | ||
[ | [i]={{nil,D,"err_private_module_fragment_not_module_interface"}}, | ||
[ | [h]={{nil,D,"private module fragment in module implementation unit"}}, | ||
[ | [g]={{nil,D,"private module fragment in module implementation unit"}}, | ||
[ | [b]=k, | ||
[ | [e]="private module fragment in module implementation unit", | ||
[ | [f]=a, | ||
[ | [d]={{nil,D,"Modules Issue"}}, | ||
[ | [c]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, | ||
[j]={{"clang/lib/Sema/SemaModule.cpp",446,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::ModuleImplementationUnit:\n Diag(PrivateLoc, diag::err_private_module_fragment_not_module_interface);"}}, | [j]={{"clang/lib/Sema/SemaModule.cpp",446,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::ModuleImplementationUnit:\n Diag(PrivateLoc, diag::err_private_module_fragment_not_module_interface);"}}, | ||
[l]={ | [l]={ | ||
Line 1,676: | Line 1,704: | ||
}, | }, | ||
["err_private_module_fragment_redefined"]={ | ["err_private_module_fragment_redefined"]={ | ||
[ | [i]={{nil,D,"err_private_module_fragment_redefined"}}, | ||
[ | [h]={{nil,D,"private module fragment redefined"}}, | ||
[ | [g]={{nil,D,"private module fragment redefined"}}, | ||
[ | [b]=k, | ||
[ | [e]="private module fragment redefined", | ||
[ | [f]=a, | ||
[ | [d]={{nil,D,"Modules Issue"}}, | ||
[ | [c]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, | ||
[j]={{"clang/lib/Sema/SemaModule.cpp",441,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::PrivateModuleFragment:\n Diag(PrivateLoc, diag::err_private_module_fragment_redefined);"}}, | [j]={{"clang/lib/Sema/SemaModule.cpp",441,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::PrivateModuleFragment:\n Diag(PrivateLoc, diag::err_private_module_fragment_redefined);"}}, | ||
[l]={ | [l]={ | ||
Line 1,690: | Line 1,718: | ||
}, | }, | ||
["err_probability_not_constant_float"]={ | ["err_probability_not_constant_float"]={ | ||
[ | [i]={{nil,q,"err_probability_not_constant_float"}}, | ||
[ | [h]={{nil,q,"probability argument to __builtin_expect_with_probability must be constant floating-point expression"}}, | ||
[ | [g]={{nil,q,"probability argument to __builtin_expect_with_probability must be constant floating-point expression"}}, | ||
[ | [b]=k, | ||
[ | [e]="probability argument to __builtin_expect_with_probability must be constant floating\\-point expression", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,a}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{z,2441,"#include \"clang/Basic/Builtins.def\"\n // ...\n case Builtin::BI__builtin_expect_with_probability: {\n // ...\n if ((!ProbArg->EvaluateAsConstantExpr(Eval, Context)) || !Eval.Val.isFloat()) {\n Diag(ProbArg->getBeginLoc(), diag::err_probability_not_constant_float) << ProbArg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtin-expect-with-probability-avr.cpp"]={"clang/test/Sema/builtin-expect-with-probability-avr.cpp:8:55: error: probability argument to __builtin_expect_with_probability must be constant floating-point expression"} | ["clang/test/Sema/builtin-expect-with-probability-avr.cpp"]={"clang/test/Sema/builtin-expect-with-probability-avr.cpp:8:55: error: probability argument to __builtin_expect_with_probability must be constant floating-point expression"} | ||
Line 1,704: | Line 1,732: | ||
}, | }, | ||
["err_probability_out_of_range"]={ | ["err_probability_out_of_range"]={ | ||
[ | [i]={{nil,q,"err_probability_out_of_range"}}, | ||
[ | [h]={{nil,q,"probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]"}}, | ||
[ | [g]={{nil,q,"probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]"}}, | ||
[ | [b]=k, | ||
[ | [e]="probability argument to __builtin_expect_with_probability is outside the range \\[0\\.0, 1\\.0\\]", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,a}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{z,2453,"#include \"clang/Basic/Builtins.def\"\n // ...\n case Builtin::BI__builtin_expect_with_probability: {\n // ...\n if (!(Probability >= llvm::APFloat(0.0) && Probability <= llvm::APFloat(1.0))) {\n Diag(ProbArg->getBeginLoc(), diag::err_probability_out_of_range) << ProbArg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtin-expect-with-probability-avr.cpp"]={"clang/test/Sema/builtin-expect-with-probability-avr.cpp:6:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:7:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:10:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:11:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:13:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:14:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]"} | ["clang/test/Sema/builtin-expect-with-probability-avr.cpp"]={"clang/test/Sema/builtin-expect-with-probability-avr.cpp:6:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:7:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:10:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:11:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:13:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:14:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]"} | ||
Line 1,718: | Line 1,746: | ||
}, | }, | ||
["err_property_accessor_type"]={ | ["err_property_accessor_type"]={ | ||
[ | [i]="err_property_accessor_type", | ||
[ | [h]="type of property %0 (%1) does not match type of accessor %2 (%3)", | ||
[ | [g]="type of property A (B) does not match type of accessor C (D)", | ||
[ | [b]=k, | ||
[ | [e]="type of property (.*?) \\((.*?)\\) does not match type of accessor (.*?) \\((.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{hb,1727,"bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, ObjCMethodDecl *GetterMethod, SourceLocation Loc) {\n // ...\n if (!compat) {\n // ...\n if ((propertyObjCPtr = PropertyRValueType->getAs<ObjCObjectPointerType>()) && (getterObjCPtr = GetterType->getAs<ObjCObjectPointerType>()))\n // ...\n else if (CheckAssignmentConstraints(Loc, GetterType, PropertyRValueType) != Compatible) {\n Diag(Loc, diag::err_property_accessor_type) << property->getDeclName() << PropertyRValueType << GetterMethod->getSelector() << GetterType;"}}, | [j]={{hb,1727,"bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, ObjCMethodDecl *GetterMethod, SourceLocation Loc) {\n // ...\n if (!compat) {\n // ...\n if ((propertyObjCPtr = PropertyRValueType->getAs<ObjCObjectPointerType>()) && (getterObjCPtr = GetterType->getAs<ObjCObjectPointerType>()))\n // ...\n else if (CheckAssignmentConstraints(Loc, GetterType, PropertyRValueType) != Compatible) {\n Diag(Loc, diag::err_property_accessor_type) << property->getDeclName() << PropertyRValueType << GetterMethod->getSelector() << GetterType;"}}, | ||
[l]={ | [l]={ | ||
Line 1,732: | Line 1,760: | ||
}, | }, | ||
["err_property_found_suggest"]={ | ["err_property_found_suggest"]={ | ||
[ | [i]="err_property_found_suggest", | ||
[ | [h]="property %0 found on object of type %1; did you mean to access it with the \".\" operator?", | ||
[ | [g]="property A found on object of type B; did you mean to access it with the \".\" operator?", | ||
[ | [b]=k, | ||
[ | [e]="property (.*?) found on object of type (.*?); did you mean to access it with the \"\\.\" operator\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c297cd883641",1309219252,"Provide fix-it for \'.\' <-> \'->\' for Objective-C ivar/property access.","Provide fix-it for \'.\' <-> \'->\' for Objective-C ivar/property access.\n// rdar://7811841\n\nllvm-svn: 133970"}, | ||
[j]={{ | [j]={{V,1398,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (!IV) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), Sema::LookupMemberName, nullptr, nullptr, Validator, Sema::CTK_ErrorRecovery, IDecl)) {\n // ...\n } else {\n if (IsArrow && IDecl->FindPropertyDeclaration(Member, ObjCPropertyQueryKind::OBJC_PR_query_instance)) {\n S.Diag(MemberLoc, diag::err_property_found_suggest) << Member << BaseExpr.get()->getType() << FixItHint::CreateReplacement(OpLoc, \".\");"}}, | ||
[l]={ | [l]={ | ||
["clang/test/FixIt/fixit-objc.m"]={"clang/test/FixIt/fixit-objc.m:54:37: error: property \'y\' found on object of type \'Radar7861841 *\'; did you mean to access it with the \".\" operator?"} | ["clang/test/FixIt/fixit-objc.m"]={"clang/test/FixIt/fixit-objc.m:54:37: error: property \'y\' found on object of type \'Radar7861841 *\'; did you mean to access it with the \".\" operator?"} | ||
Line 1,746: | Line 1,774: | ||
}, | }, | ||
["err_property_function_in_objc_container"]={ | ["err_property_function_in_objc_container"]={ | ||
[ | [i]="err_property_function_in_objc_container", | ||
[ | [h]="use of Objective-C property in function nested in Objective-C container not supported, move function outside its container", | ||
[ | [g]="use of Objective-C property in function nested in Objective-C container not supported, move function outside its container", | ||
[ | [b]=k, | ||
[ | [e]="use of Objective\\-C property in function nested in Objective\\-C container not supported, move function outside its container", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"555132824a9e",1401300730,"Objective-C. Diagnose use of properties in functions nested in, ","Objective-C. Diagnose use of properties in functions nested in, \nnow deprecated, ObjC containers instead of crashing. \n// rdar://16859666\n\nllvm-svn: 209758"}, | ||
[j]={{"clang/lib/Sema/SemaPseudoObject.cpp",699,"void ObjCPropertyOpBuilder::DiagnoseUnsupportedPropertyUse() {\n if (S.getCurLexicalContext()->isObjCContainer() && S.getCurLexicalContext()->getDeclKind() != Decl::ObjCCategoryImpl && S.getCurLexicalContext()->getDeclKind() != Decl::ObjCImplementation) {\n if (ObjCPropertyDecl *prop = RefExpr->getExplicitProperty()) {\n S.Diag(RefExpr->getLocation(), diag::err_property_function_in_objc_container);"}}, | [j]={{"clang/lib/Sema/SemaPseudoObject.cpp",699,"void ObjCPropertyOpBuilder::DiagnoseUnsupportedPropertyUse() {\n if (S.getCurLexicalContext()->isObjCContainer() && S.getCurLexicalContext()->getDeclKind() != Decl::ObjCCategoryImpl && S.getCurLexicalContext()->getDeclKind() != Decl::ObjCImplementation) {\n if (ObjCPropertyDecl *prop = RefExpr->getExplicitProperty()) {\n S.Diag(RefExpr->getLocation(), diag::err_property_function_in_objc_container);"}}, | ||
[l]={ | [l]={ | ||
Line 1,760: | Line 1,788: | ||
}, | }, | ||
["err_property_implemented"]={ | ["err_property_implemented"]={ | ||
[ | [i]="err_property_implemented", | ||
[ | [h]="property %0 is already implemented", | ||
[ | [g]="property A is already implemented", | ||
[ | [b]=k, | ||
[ | [e]="property (.*?) is already implemented", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{hb,1569,"/// 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 (ObjCPropertyImplDecl *PPIDecl = IC->FindPropertyImplDecl(PropertyId, QueryKind)) {\n Diag(PropertyLoc, diag::err_property_implemented) << PropertyId;"},{hb,1608,"/// 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 } else {\n // ...\n if (ObjCPropertyImplDecl *PPIDecl = CatImplClass->FindPropertyImplDecl(PropertyId, QueryKind)) {\n Diag(PropertyDiagLoc, diag::err_property_implemented) << PropertyId;"}}, | [j]={{hb,1569,"/// 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 (ObjCPropertyImplDecl *PPIDecl = IC->FindPropertyImplDecl(PropertyId, QueryKind)) {\n Diag(PropertyLoc, diag::err_property_implemented) << PropertyId;"},{hb,1608,"/// 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 } else {\n // ...\n if (ObjCPropertyImplDecl *PPIDecl = CatImplClass->FindPropertyImplDecl(PropertyId, QueryKind)) {\n Diag(PropertyDiagLoc, diag::err_property_implemented) << PropertyId;"}}, | ||
[l]={ | [l]={ | ||
Line 1,774: | Line 1,802: | ||
}, | }, | ||
["err_property_is_variably_modified"]={ | ["err_property_is_variably_modified"]={ | ||
[ | [i]="err_property_is_variably_modified", | ||
[ | [h]="property %0 has a variably modified type", | ||
[ | [g]="property A has a variably modified type", | ||
[ | [b]=k, | ||
[ | [e]="property (.*?) has a variably modified type", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"5e77d76c953d",1366097310,"Basic support for Microsoft property declarations and","Basic support for Microsoft property declarations and\nreferences thereto.\n\nPatch by Tong Shen!\n\nllvm-svn: 179585"}, | ||
[j]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",1305,"Decl *TemplateDeclInstantiator::VisitMSPropertyDecl(MSPropertyDecl *D) {\n // ...\n if (DI->getType()->isVariablyModifiedType()) {\n SemaRef.Diag(D->getLocation(), diag::err_property_is_variably_modified) << D;"}} | [j]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",1305,"Decl *TemplateDeclInstantiator::VisitMSPropertyDecl(MSPropertyDecl *D) {\n // ...\n if (DI->getType()->isVariablyModifiedType()) {\n SemaRef.Diag(D->getLocation(), diag::err_property_is_variably_modified) << D;"}} | ||
}, | }, | ||
["err_property_ivar_type"]={ | ["err_property_ivar_type"]={ | ||
[ | [i]="err_property_ivar_type", | ||
[ | [h]="type of property %0 (%1) does not match type of instance variable %2 (%3)", | ||
[ | [g]="type of property A (B) does not match type of instance variable C (D)", | ||
[ | [b]=k, | ||
[ | [e]="type of property (.*?) \\((.*?)\\) does not match type of instance variable (.*?) \\((.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{hb,1376,"/// 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 if (!compat) {\n Diag(PropertyDiagLoc, diag::err_property_ivar_type) << property->getDeclName() << PropType << Ivar->getDeclName() << IvarType;"},{hb,1391,"/// 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 if (!compat) {\n // ...\n } else {\n // ...\n if (lhsType != rhsType && lhsType->isArithmeticType()) {\n Diag(PropertyDiagLoc, diag::err_property_ivar_type) << property->getDeclName() << PropType << Ivar->getDeclName() << IvarType;"}}, | [j]={{hb,1376,"/// 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 if (!compat) {\n Diag(PropertyDiagLoc, diag::err_property_ivar_type) << property->getDeclName() << PropType << Ivar->getDeclName() << IvarType;"},{hb,1391,"/// 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 if (!compat) {\n // ...\n } else {\n // ...\n if (lhsType != rhsType && lhsType->isArithmeticType()) {\n Diag(PropertyDiagLoc, diag::err_property_ivar_type) << property->getDeclName() << PropType << Ivar->getDeclName() << IvarType;"}}, | ||
[l]={ | [l]={ | ||
Line 1,799: | Line 1,827: | ||
}, | }, | ||
["err_property_method_unavailable"]={ | ["err_property_method_unavailable"]={ | ||
[ | [i]="err_property_method_unavailable", | ||
[ | [h]="property access is using %0 method which is unavailable", | ||
[ | [g]="property access is using A method which is unavailable", | ||
[ | [b]=k, | ||
[ | [e]="property access is using (.*?) method which is unavailable", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"89ea9610b306",1402939541,"Objective-C. Diagnose when property access is using declared","Objective-C. Diagnose when property access is using declared\nproperty accessor methods which have become deprecated\nor available. // rdar://15951801\n\nllvm-svn: 211039"}, | ||
[j]={{"clang/lib/Sema/SemaAvailability.cpp",448,"/// 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;"}}, | [j]={{"clang/lib/Sema/SemaAvailability.cpp",448,"/// 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;"}}, | ||
[l]={ | [l]={ | ||
Line 1,813: | Line 1,841: | ||
}, | }, | ||
["err_property_not_as_forward_class"]={ | ["err_property_not_as_forward_class"]={ | ||
[ | [i]="err_property_not_as_forward_class", | ||
[ | [h]="property %0 refers to an incomplete Objective-C class %1 (with no @interface available)", | ||
[ | [g]="property A refers to an incomplete Objective-C class B (with no @interface available)", | ||
[ | [b]=k, | ||
[ | [e]="property (.*?) refers to an incomplete Objective\\-C class (.*?) \\(with no @interface available\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"05d389f407d0",1297905974,"Improve diagnostics when property names an object type of","Improve diagnostics when property names an object type of\na forward class. // rdar://8851803\n\nllvm-svn: 125699"}, | ||
[j]={{ | [j]={{ac,2138,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n if (ObjCIvarDecl *Ivar = IFace->lookupInstanceVariable(Member, ClassDeclared)) {\n // ...\n if (const ObjCObjectPointerType *OBJPT = T->getAsObjCInterfacePointerType()) {\n if (RequireCompleteType(MemberLoc, OBJPT->getPointeeType(), diag::err_property_not_as_forward_class, MemberName, BaseExpr))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/property-missing.m"]={"clang/test/SemaObjC/property-missing.m:32:11: error: property \'someOtherObject\' refers to an incomplete Objective-C class \'SomeOtherClass\' (with no @interface available)"} | ["clang/test/SemaObjC/property-missing.m"]={"clang/test/SemaObjC/property-missing.m:32:11: error: property \'someOtherObject\' refers to an incomplete Objective-C class \'SomeOtherClass\' (with no @interface available)"} | ||
Line 1,827: | Line 1,855: | ||
}, | }, | ||
["err_property_not_found"]={ | ["err_property_not_found"]={ | ||
[ | [i]="err_property_not_found", | ||
[ | [h]="property %0 not found on object of type %1", | ||
[ | [g]="property A not found on object of type B", | ||
[ | [b]=k, | ||
[ | [e]="property (.*?) not found on object of type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{V,1549,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n if (!IsArrow && (OPT = BaseType->getAs<ObjCObjectPointerType>())) {\n // ...\n // id, with and without qualifiers.\n if (OT->isObjCId()) {\n // ...\n return ExprError(S.Diag(MemberLoc, diag::err_property_not_found) << MemberName << BaseType);"},{V,1604,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n if (!IsArrow && (OPT = BaseType->getAs<ObjCObjectPointerType>())) {\n // ...\n // \'Class\', unqualified only.\n if (OT->isObjCClass()) {\n // ...\n return ExprError(S.Diag(MemberLoc, diag::err_property_not_found) << MemberName << BaseType);"},{ac,2149,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n Diag(MemberLoc, diag::err_property_not_found) << MemberName << QualType(OPT, 0);"},{ac,2257,"ExprResult Sema::ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc) {\n // ...\n return ExprError(Diag(propertyNameLoc, diag::err_property_not_found) << &propertyName << Context.getObjCInterfaceType(IFace));"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:78:25: error: property \'x\' not found on object of type \'id\'"} | ["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:78:25: error: property \'x\' not found on object of type \'id\'"} | ||
Line 1,841: | Line 1,869: | ||
}, | }, | ||
["err_property_not_found_forward_class"]={ | ["err_property_not_found_forward_class"]={ | ||
[ | [i]="err_property_not_found_forward_class", | ||
[ | [h]="property %0 cannot be found in forward class object %1", | ||
[ | [g]="property A cannot be found in forward class object B", | ||
[ | [b]=k, | ||
[ | [e]="property (.*?) cannot be found in forward class object (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"7cabbe04ebdd",1292460988,"Improve diagnostics when property being looked up","Improve diagnostics when property being looked up\nin a forward @class object. // rdar://8774513\n\nllvm-svn: 121933"}, | ||
[j]={{ | [j]={{ac,1995,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n if (RequireCompleteType(MemberLoc, OPT->getPointeeType(), diag::err_property_not_found_forward_class, MemberName, BaseRange))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/property-9.m"]={"clang/test/SemaObjC/property-9.m:106:21: error: property \'path\' cannot be found in forward class object \'MDAInstance\'"} | ["clang/test/SemaObjC/property-9.m"]={"clang/test/SemaObjC/property-9.m:106:21: error: property \'path\' cannot be found in forward class object \'MDAInstance\'"} | ||
Line 1,855: | Line 1,883: | ||
}, | }, | ||
["err_property_not_found_suggest"]={ | ["err_property_not_found_suggest"]={ | ||
[ | [i]="err_property_not_found_suggest", | ||
[ | [h]="property %0 not found on object of type %1; did you mean %2?", | ||
[ | [g]="property A not found on object of type B; did you mean C?", | ||
[ | [b]=k, | ||
[ | [e]="property (.*?) not found on object of type (.*?); did you mean (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific","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"}, | ||
[j]={{ | [j]={{ac,2124,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(MemberName, MemberLoc), LookupOrdinaryName, nullptr, nullptr, CCC, CTK_ErrorRecovery, IFace, false, OPT)) {\n // ...\n if (TypoResult.isIdentifier() && TypoResult.getAsIdentifierInfo() == Member) {\n // ...\n } else {\n diagnoseTypo(Corrected, PDiag(diag::err_property_not_found_suggest) << MemberName << QualType(OPT, 0));"}}, | ||
[l]={ | [l]={ | ||
["clang/test/FixIt/typo.m"]={"clang/test/FixIt/typo.m:54:8: error: property \'hisprop\' not found on object of type \'B *\'; did you mean \'his_prop\'?","clang/test/FixIt/typo.m:55:8: error: property \'herprop\' not found on object of type \'B *\'; did you mean \'her_prop\'?","clang/test/FixIt/typo.m:56:8: error: property \'s_prop\' not found on object of type \'B *\'; did you mean \'sprop\'?","clang/test/FixIt/typo.m:81:5: error: property \'valu\' not found on object of type \'Collide *\'; did you mean \'value\'?"} | ["clang/test/FixIt/typo.m"]={"clang/test/FixIt/typo.m:54:8: error: property \'hisprop\' not found on object of type \'B *\'; did you mean \'his_prop\'?","clang/test/FixIt/typo.m:55:8: error: property \'herprop\' not found on object of type \'B *\'; did you mean \'her_prop\'?","clang/test/FixIt/typo.m:56:8: error: property \'s_prop\' not found on object of type \'B *\'; did you mean \'sprop\'?","clang/test/FixIt/typo.m:81:5: error: property \'valu\' not found on object of type \'Collide *\'; did you mean \'value\'?"} | ||
Line 1,869: | Line 1,897: | ||
}, | }, | ||
["err_property_setter_ambiguous_use"]={ | ["err_property_setter_ambiguous_use"]={ | ||
[ | [i]="err_property_setter_ambiguous_use", | ||
[ | [h]="synthesized properties %0 and %1 both claim setter %2 - use of this setter will cause unexpected behavior", | ||
[ | [g]="synthesized properties A and B both claim setter C - use of this setter will cause unexpected behavior", | ||
[ | [b]=k, | ||
[ | [e]="synthesized properties (.*?) and (.*?) both claim setter (.*?) \\- use of this setter will cause unexpected behavior", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{"clang/lib/Sema/SemaPseudoObject.cpp",675,"/// Try to find the most accurate setter declaration for the property\n/// reference.\n///\n/// \\return true if a setter was found, in which case Setter\nbool ObjCPropertyOpBuilder::findSetter(bool warn) {\n // ...\n // Do a normal method lookup first.\n if (ObjCMethodDecl *setter = LookupMethodInReceiverType(S, SetterSelector, RefExpr)) {\n if (setter->isPropertyAccessor() && warn)\n if (const ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(setter->getDeclContext())) {\n // ...\n if (ObjCPropertyDecl *prop1 = IFace->FindPropertyDeclaration(AltMember, prop->getQueryKind()))\n if (prop != prop1 && (prop1->getSetterMethodDecl() == setter)) {\n S.Diag(RefExpr->getExprLoc(), diag::err_property_setter_ambiguous_use) << prop << prop1 << setter->getSelector();"}}, | [j]={{"clang/lib/Sema/SemaPseudoObject.cpp",675,"/// Try to find the most accurate setter declaration for the property\n/// reference.\n///\n/// \\return true if a setter was found, in which case Setter\nbool ObjCPropertyOpBuilder::findSetter(bool warn) {\n // ...\n // Do a normal method lookup first.\n if (ObjCMethodDecl *setter = LookupMethodInReceiverType(S, SetterSelector, RefExpr)) {\n if (setter->isPropertyAccessor() && warn)\n if (const ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(setter->getDeclContext())) {\n // ...\n if (ObjCPropertyDecl *prop1 = IFace->FindPropertyDeclaration(AltMember, prop->getQueryKind()))\n if (prop != prop1 && (prop1->getSetterMethodDecl() == setter)) {\n S.Diag(RefExpr->getExprLoc(), diag::err_property_setter_ambiguous_use) << prop << prop1 << setter->getSelector();"}}, | ||
[l]={ | [l]={ | ||
Line 1,883: | Line 1,911: | ||
}, | }, | ||
["err_property_type"]={ | ["err_property_type"]={ | ||
[ | [i]="err_property_type", | ||
[ | [h]="property cannot have array or function type %0", | ||
[ | [g]="property cannot have array or function type A", | ||
[ | [b]=k, | ||
[ | [e]="property cannot have array or function type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{hb,638,"ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TInfo, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC) {\n // ...\n if (T->isArrayType() || T->isFunctionType()) {\n Diag(AtLoc, diag::err_property_type) << T;"}}, | [j]={{hb,638,"ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TInfo, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC) {\n // ...\n if (T->isArrayType() || T->isFunctionType()) {\n Diag(AtLoc, diag::err_property_type) << T;"}}, | ||
[l]={ | [l]={ | ||
Line 1,897: | Line 1,925: | ||
}, | }, | ||
["err_protected_ivar_access"]={ | ["err_protected_ivar_access"]={ | ||
[ | [i]="err_protected_ivar_access", | ||
[ | [h]="instance variable %0 is protected", | ||
[ | [g]="instance variable A is protected", | ||
[ | [b]=k, | ||
[ | [e]="instance variable (.*?) is protected", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{ | [j]={{V,1449,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (IV->getAccessControl() != ObjCIvarDecl::Public && IV->getAccessControl() != ObjCIvarDecl::Package) {\n // ...\n if (!S.getLangOpts().DebuggerSupport) {\n if (IV->getAccessControl() == ObjCIvarDecl::Private) {\n // ...\n } else if (!IDecl->isSuperClassOf(ClassOfMethodDecl))\n // ...\n S.Diag(MemberLoc, diag::err_protected_ivar_access) << IV->getDeclName();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/ivar-access-tests.m"]={"clang/test/SemaObjC/ivar-access-tests.m:65:17: error: instance variable \'protected\' is protected","clang/test/SemaObjC/ivar-access-tests.m:68:17: error: instance variable \'protected\' is protected","clang/test/SemaObjC/ivar-access-tests.m:77:15: error: instance variable \'protected\' is protected"} | ["clang/test/SemaObjC/ivar-access-tests.m"]={"clang/test/SemaObjC/ivar-access-tests.m:65:17: error: instance variable \'protected\' is protected","clang/test/SemaObjC/ivar-access-tests.m:68:17: error: instance variable \'protected\' is protected","clang/test/SemaObjC/ivar-access-tests.m:77:15: error: instance variable \'protected\' is protected"} | ||
Line 1,911: | Line 1,939: | ||
}, | }, | ||
["err_protocol_has_circular_dependency"]={ | ["err_protocol_has_circular_dependency"]={ | ||
[ | [i]="err_protocol_has_circular_dependency", | ||
[h]="protocol has circular dependency", | |||
[g]="protocol has circular dependency", | |||
[b]=k, | |||
[e]="protocol has circular dependency", | [e]="protocol has circular dependency", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{Kb,1205,"bool Sema::CheckForwardProtocolDeclarationForCircularDependency(IdentifierInfo *PName, SourceLocation &Ploc, SourceLocation PrevLoc, const ObjCList<ObjCProtocolDecl> &PList) {\n // ...\n for (ObjCList<ObjCProtocolDecl>::iterator I = PList.begin(), E = PList.end(); I != E; ++I) {\n if (ObjCProtocolDecl *PDecl = LookupProtocol((*I)->getIdentifier(), Ploc)) {\n if (PDecl->getIdentifier() == PName) {\n Diag(Ploc, diag::err_protocol_has_circular_dependency);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/protocols.m"]={"clang/test/SemaObjC/protocols.m:61:11: error: protocol has circular dependency"} | ["clang/test/SemaObjC/protocols.m"]={"clang/test/SemaObjC/protocols.m:61:11: error: protocol has circular dependency"} | ||
Line 1,925: | Line 1,953: | ||
}, | }, | ||
["err_protocol_property_mismatch"]={ | ["err_protocol_property_mismatch"]={ | ||
[ | [i]={{nil,o,"err_protocol_property_mismatch"}}, | ||
[ | [h]={{nil,o,"property %select{of type %1|with attribute \'%1\'|without attribute \'%1\'|with getter %1|with setter %1}0 was selected for synthesis"}}, | ||
[ | [g]={{nil,o,{"property ",{"of type B","with attribute \'B\'","without attribute \'B\'","with getter B","with setter B"}," was selected for synthesis"}}}, | ||
[ | [b]=k, | ||
[ | [e]="property (?:of type (.*?)|with attribute \'(.*?)\'|without attribute \'(.*?)\'|with getter (.*?)|with setter (.*?)) was selected for synthesis", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,m}}, | ||
[ | [c]={"50b2dd336e39",1499943982,"[ObjC] Pick a \'readwrite\' property when synthesizing ambiguous","[ObjC] Pick a \'readwrite\' property when synthesizing ambiguous\nproperty and check for incompatible attributes\n\nThis commit changes the way ambiguous property synthesis (i.e. when synthesizing\na property that\'s declared in multiple protocols) is performed. Previously,\nClang synthesized the first property that was found. This lead to problems when\nthe property was synthesized in a class that conformed to two protocols that\ndeclared that property and a second protocols had a \'readwrite\' declaration -\nthe setter was not synthesized so the class didn\'t really conform to the second\nprotocol and user\'s code would crash at runtime when they would try to set the\nproperty.\n\nThis commit ensures that a first readwrite property is selected. This is a\nsemantic change that changes users code in this manner:\n\n```\n@protocol P @property(readonly) int p; @end\n@protocol P2 @property(readwrite) id p; @end\n@interface I <P2> @end\n@implementation I\n@syntesize p; // Users previously got a warning here, and Clang synthesized\n // readonly \'int p\' here. Now Clang synthesizes readwrite \'id\' p..\n@end\n```\n\nTo ensure that this change is safe, the warning about incompatible types is\npromoted to an error when this kind of readonly/readwrite ambiguity is detected\nin the @implementation. This will ensure that previous code that had this subtle\nbug and ignored the warning now will fail to compile with an error, and users\nshould not get suprises at runtime once they resolve the error.\n\nThe commit also extends the ambiguity checker, and now it can detect conflicts\namong the different property attributes. An error diagnostic is used for\nconflicting attributes, to ensure that the user won\'t get \"suprises\" at runtime.\n\nProtocolPropertyMap is removed in favour of a a set + vector because the map\'s\norder of iteration is non-deterministic, so it couldn\'t be used to select the\nreadwrite property.\n\nrdar://31579994\n\nDifferential Revision: https://reviews.llvm.org/D35268\n\nllvm-svn: 307903"}, | ||
[j]={{hb,969,"/// SelectPropertyForSynthesisFromProtocols - Finds the most appropriate\n/// property declaration that should be synthesised in all of the inherited\n/// protocols. It also diagnoses properties declared in inherited protocols with\n/// mismatched types or attributes, since any of them can be candidate for\n/// synthesis.\nstatic ObjCPropertyDecl *SelectPropertyForSynthesisFromProtocols(Sema &S, SourceLocation AtLoc, ObjCInterfaceDecl *ClassDecl, ObjCPropertyDecl *Property) {\n // ...\n // Diagnose incompability.\n {\n // ...\n auto Diag = S.Diag(Property->getLocation(), Property != OriginalProperty || HasIncompatibleAttributes ? diag::err_protocol_property_mismatch : diag::warn_protocol_property_mismatch);"}}, | [j]={{hb,969,"/// SelectPropertyForSynthesisFromProtocols - Finds the most appropriate\n/// property declaration that should be synthesised in all of the inherited\n/// protocols. It also diagnoses properties declared in inherited protocols with\n/// mismatched types or attributes, since any of them can be candidate for\n/// synthesis.\nstatic ObjCPropertyDecl *SelectPropertyForSynthesisFromProtocols(Sema &S, SourceLocation AtLoc, ObjCInterfaceDecl *ClassDecl, ObjCPropertyDecl *Property) {\n // ...\n // Diagnose incompability.\n {\n // ...\n auto Diag = S.Diag(Property->getLocation(), Property != OriginalProperty || HasIncompatibleAttributes ? diag::err_protocol_property_mismatch : diag::warn_protocol_property_mismatch);"}}, | ||
[l]={ | [l]={ | ||
Line 1,939: | Line 1,967: | ||
}, | }, | ||
["err_pseudo_dtor_base_not_scalar"]={ | ["err_pseudo_dtor_base_not_scalar"]={ | ||
[ | [i]="err_pseudo_dtor_base_not_scalar", | ||
[ | [h]="object expression of non-scalar type %0 cannot be used in a pseudo-destructor expression", | ||
[ | [g]="object expression of non-scalar type A cannot be used in a pseudo-destructor expression", | ||
[ | [b]=k, | ||
[ | [e]="object expression of non\\-scalar type (.*?) cannot be used in a pseudo\\-destructor expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"ad8a336b4037",1252085800,"Implement AST, semantics, and CodeGen for C++ pseudo-destructor","Implement AST, semantics, and CodeGen for C++ pseudo-destructor\nexpressions, e.g.,\n\n p->~T()\n\nwhen p is a pointer to a scalar type. \n\nWe don\'t currently diagnose errors when pseudo-destructor expressions\nare used in any way other than by forming a call.\n\nllvm-svn: 81009"}, | ||
[j]={{ | [j]={{P,7770,"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 // ...\n else {\n Diag(OpLoc, diag::err_pseudo_dtor_base_not_scalar) << ObjectType << Base->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:34:6: error: object expression of non-scalar type \'void\' cannot be used in a pseudo-destructor expression","clang/test/SemaCXX/pseudo-destructors.cpp:195:19: error: object expression of non-scalar type \'void ()\' cannot be used in a pseudo-destructor expression"} | ["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:34:6: error: object expression of non-scalar type \'void\' cannot be used in a pseudo-destructor expression","clang/test/SemaCXX/pseudo-destructors.cpp:195:19: error: object expression of non-scalar type \'void ()\' cannot be used in a pseudo-destructor expression"} | ||
Line 1,953: | Line 1,981: | ||
}, | }, | ||
["err_pseudo_dtor_call_with_args"]={ | ["err_pseudo_dtor_call_with_args"]={ | ||
[ | [i]="err_pseudo_dtor_call_with_args", | ||
[ | [h]="call to pseudo-destructor cannot have any arguments", | ||
[ | [g]="call to pseudo-destructor cannot have any arguments", | ||
[ | [b]=k, | ||
[ | [e]="call to pseudo\\-destructor cannot have any arguments", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"ad8a336b4037",1252085800,"Implement AST, semantics, and CodeGen for C++ pseudo-destructor","Implement AST, semantics, and CodeGen for C++ pseudo-destructor\nexpressions, e.g.,\n\n p->~T()\n\nwhen p is a pointer to a scalar type. \n\nWe don\'t currently diagnose errors when pseudo-destructor expressions\nare used in any way other than by forming a call.\n\nllvm-svn: 81009"}, | ||
[j]={{n,7307,"/// BuildCallExpr - Handle a call to Fn with the specified array of arguments.\n/// This provides the location of the left/right parens and a list of comma\n/// locations.\nExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // If this is a pseudo-destructor expression, build the call immediately.\n if (isa<CXXPseudoDestructorExpr>(Fn)) {\n if (!ArgExprs.empty()) {\n // ...\n Diag(Fn->getBeginLoc(), diag::err_pseudo_dtor_call_with_args) << FixItHint::CreateRemoval(SourceRange(ArgExprs.front()->getBeginLoc(), ArgExprs.back()->getEndLoc()));"}}, | [j]={{n,7307,"/// BuildCallExpr - Handle a call to Fn with the specified array of arguments.\n/// This provides the location of the left/right parens and a list of comma\n/// locations.\nExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // If this is a pseudo-destructor expression, build the call immediately.\n if (isa<CXXPseudoDestructorExpr>(Fn)) {\n if (!ArgExprs.empty()) {\n // ...\n Diag(Fn->getBeginLoc(), diag::err_pseudo_dtor_call_with_args) << FixItHint::CreateRemoval(SourceRange(ArgExprs.front()->getBeginLoc(), ArgExprs.back()->getEndLoc()));"}}, | ||
[l]={ | [l]={ | ||
Line 1,967: | Line 1,995: | ||
}, | }, | ||
["err_pseudo_dtor_destructor_non_type"]={ | ["err_pseudo_dtor_destructor_non_type"]={ | ||
[ | [i]="err_pseudo_dtor_destructor_non_type", | ||
[ | [h]="%0 does not refer to a type name in pseudo-destructor expression; expected the name of type %1", | ||
[ | [g]="A does not refer to a type name in pseudo-destructor expression; expected the name of type B", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) does not refer to a type name in pseudo\\-destructor expression; expected the name of type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"0d5b0a1e5edb",1267046952,"ActOnPseudoDestructorExpr now performs all semantic analysis for","ActOnPseudoDestructorExpr now performs all semantic analysis for\npseudo-destructor expressions, and builds the CXXPseudoDestructorExpr\nnode directly. Currently, this only affects pseudo-destructor\nexpressions when they are parsed, but not after template\ninstantiation. That\'s coming next...\n\nImprove parsing of pseudo-destructor-names. When parsing the\nnested-name-specifier and we hit the sequence of tokens X :: ~, query\nthe actual module to determine whether X is a type-name (in which case\nthe X :: is part of the pseudo-destructor-name but not the\nnested-name-specifier) or not (in which case the X :: is part of the\nnested-name-specifier). \n\nllvm-svn: 97058"}, | ||
[j]={{ | [j]={{P,7920,"ExprResult Sema::ActOnPseudoDestructorExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName) {\n // ...\n if (SecondTypeName.getKind() == UnqualifiedIdKind::IK_Identifier) {\n // ...\n if (!T && ((SS.isSet() && !computeDeclContext(SS, false)) || (!SS.isSet() && ObjectType->isDependentType()))) {\n // ...\n } else if (!T) {\n Diag(SecondTypeName.StartLocation, diag::err_pseudo_dtor_destructor_non_type) << SecondTypeName.Identifier << ObjectType;"},{P,7972,"ExprResult Sema::ActOnPseudoDestructorExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName) {\n // ...\n if (FirstTypeName.getKind() == UnqualifiedIdKind::IK_TemplateId || FirstTypeName.Identifier) {\n if (FirstTypeName.getKind() == UnqualifiedIdKind::IK_Identifier) {\n // ...\n if (!T) {\n Diag(FirstTypeName.StartLocation, diag::err_pseudo_dtor_destructor_non_type) << FirstTypeName.Identifier << ObjectType;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Frontend/crash-diagnostic-renderer.cpp"]={"clang/test/Frontend/crash-diagnostic-renderer.cpp:13:23: error: \'b\' does not refer to a type name in pseudo-destructor expression; expected the name of type \'volatile long\'"} | ["clang/test/Frontend/crash-diagnostic-renderer.cpp"]={"clang/test/Frontend/crash-diagnostic-renderer.cpp:13:23: error: \'b\' does not refer to a type name in pseudo-destructor expression; expected the name of type \'volatile long\'"} | ||
Line 1,981: | Line 2,009: | ||
}, | }, | ||
["err_pseudo_dtor_type_mismatch"]={ | ["err_pseudo_dtor_type_mismatch"]={ | ||
[ | [i]="err_pseudo_dtor_type_mismatch", | ||
[ | [h]="the type of object expression %diff{($) does not match the type being destroyed ($)|does not match the type being destroyed}0,1 in pseudo-destructor expression", | ||
[ | [g]={{nil,nil,{"the type of object expression ",{"(A) does not match the type being destroyed (B)","does not match the type being destroyed"}," in pseudo-destructor expression"}}}, | ||
[ | [b]=k, | ||
[ | [e]="the type of object expression (?:\\((.*?)\\) does not match the type being destroyed \\((.*?)\\)|does not match the type being destroyed) in pseudo\\-destructor expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"ad8a336b4037",1252085800,"Implement AST, semantics, and CodeGen for C++ pseudo-destructor","Implement AST, semantics, and CodeGen for C++ pseudo-destructor\nexpressions, e.g.,\n\n p->~T()\n\nwhen p is a pointer to a scalar type. \n\nWe don\'t currently diagnose errors when pseudo-destructor expressions\nare used in any way other than by forming a call.\n\nllvm-svn: 81009"}, | ||
[j]={{ | [j]={{P,7805,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n // ...\n // C++ [expr.pseudo]p2:\n // [...] The cv-unqualified versions of the object type and of the type\n // designated by the pseudo-destructor-name shall be the same type.\n if (DestructedTypeInfo) {\n // ...\n if (!DestructedType->isDependentType() && !ObjectType->isDependentType()) {\n if (!Context.hasSameUnqualifiedType(DestructedType, ObjectType)) {\n // Detect dot pseudo destructor calls on pointer objects, e.g.:\n // Foo *foo;\n // foo.~Foo();\n if (OpKind == tok::period && ObjectType->isPointerType() && Context.hasSameUnqualifiedType(DestructedType, ObjectType->getPointeeType())) {\n // ...\n } else {\n Diag(DestructedTypeStart, diag::err_pseudo_dtor_type_mismatch) << ObjectType << DestructedType << Base->getSourceRange() << DestructedTypeInfo->getTypeLoc().getSourceRange();"},{P,7849,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n // ...\n // C++ [expr.pseudo]p2:\n // [...] Furthermore, the two type-names in a pseudo-destructor-name of the\n // form\n //\n // ::[opt] nested-name-specifier[opt] type-name :: ~ type-name\n //\n // shall designate the same scalar type.\n if (ScopeTypeInfo) {\n // ...\n if (!ScopeType->isDependentType() && !ObjectType->isDependentType() && !Context.hasSameUnqualifiedType(ScopeType, ObjectType)) {\n Diag(ScopeTypeInfo->getTypeLoc().getSourceRange().getBegin(), diag::err_pseudo_dtor_type_mismatch) << ObjectType << ScopeType << Base->getSourceRange() << ScopeTypeInfo->getTypeLoc().getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:32:7: error: the type of object expression (\'int\') does not match the type being destroyed (\'Bar\' (aka \'Foo\')) in pseudo-destructor expression","clang/test/SemaCXX/pseudo-destructors.cpp:51:16: error: the type of object expression (\'int\') does not match the type being destroyed (\'Double\' (aka \'double\')) in pseudo-destructor expression"} | ["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:32:7: error: the type of object expression (\'int\') does not match the type being destroyed (\'Bar\' (aka \'Foo\')) in pseudo-destructor expression","clang/test/SemaCXX/pseudo-destructors.cpp:51:16: error: the type of object expression (\'int\') does not match the type being destroyed (\'Double\' (aka \'double\')) in pseudo-destructor expression"} | ||
Line 1,995: | Line 2,023: | ||
}, | }, | ||
["err_pure_friend"]={ | ["err_pure_friend"]={ | ||
[ | [i]="err_pure_friend", | ||
[ | [h]="friend declaration cannot have a pure-specifier", | ||
[ | [g]="friend declaration cannot have a pure-specifier", | ||
[ | [b]=k, | ||
[ | [e]="friend declaration cannot have a pure\\-specifier", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"9ba0fec83e7f",1435627736,"Rework parsing of pure-specifiers. Perform the grammar matching and","Rework parsing of pure-specifiers. Perform the grammar matching and\ndisambiguation in the parser rather than trying to do it in Sema.\n\nllvm-svn: 241032"}, | ||
[j]={{ | [j]={{H,18148,"void Sema::ActOnPureSpecifier(Decl *D, SourceLocation ZeroLoc) {\n if (D->getFriendObjectKind())\n Diag(D->getLocation(), diag::err_pure_friend);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/virtuals.cpp"]={"clang/test/SemaCXX/virtuals.cpp:70:28: error: friend declaration cannot have a pure-specifier","clang/test/SemaCXX/virtuals.cpp:73:19: error: friend declaration cannot have a pure-specifier"} | ["clang/test/SemaCXX/virtuals.cpp"]={"clang/test/SemaCXX/virtuals.cpp:70:28: error: friend declaration cannot have a pure-specifier","clang/test/SemaCXX/virtuals.cpp:73:19: error: friend declaration cannot have a pure-specifier"} | ||
Line 2,009: | Line 2,037: | ||
}, | }, | ||
["err_qualified_catch_declarator"]={ | ["err_qualified_catch_declarator"]={ | ||
[ | [i]="err_qualified_catch_declarator", | ||
[h]="exception declarator cannot be qualified", | |||
[g]="exception declarator cannot be qualified", | |||
[b]=k, | |||
[e]="exception declarator cannot be qualified", | [e]="exception declarator cannot be qualified", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{H,16772,"/// ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch\n/// handler.\nDecl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) {\n // ...\n if (D.getCXXScopeSpec().isSet() && !Invalid) {\n Diag(D.getIdentifierLoc(), diag::err_qualified_catch_declarator) << D.getCXXScopeSpec().getRange();"}} | |||
[ | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_qualified_friend_def"]={ | ["err_qualified_friend_def"]={ | ||
[ | [i]="err_qualified_friend_def", | ||
[ | [h]="friend function definition cannot be qualified with \'%0\'", | ||
[ | [g]="friend function definition cannot be qualified with \'A\'", | ||
[ | [b]=k, | ||
[ | [e]="friend function definition cannot be qualified with \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"16e65616d64b",1318209119,"Implement the restrictions in C++ [class.friend]p6, which disallow","Implement the restrictions in C++ [class.friend]p6, which disallow\ndefining a friend function with a qualified name or in a local\nclass. Fixes PR9853. \n\nllvm-svn: 141524"}, | ||
[j]={{ | [j]={{H,17657,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n if ((SS.isInvalid() || !SS.isSet()) && (FunctionContainingLocalClass = cast<CXXRecordDecl>(CurContext)->isLocalClass())) {\n // ...\n } else if (SS.isInvalid() || !SS.isSet()) {\n // ...\n } else if (!SS.getScopeRep()->isDependent()) {\n // ...\n if (D.isFunctionDefinition()) {\n // ...\n SemaDiagnosticBuilder DB = Diag(SS.getRange().getBegin(), diag::err_qualified_friend_def);"},{H,17676,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n if ((SS.isInvalid() || !SS.isSet()) && (FunctionContainingLocalClass = cast<CXXRecordDecl>(CurContext)->isLocalClass())) {\n // ...\n } else if (SS.isInvalid() || !SS.isSet()) {\n // ...\n } else if (!SS.getScopeRep()->isDependent()) {\n // ...\n } else {\n if (D.isFunctionDefinition()) {\n // ...\n Diag(SS.getRange().getBegin(), diag::err_qualified_friend_def) << SS.getScopeRep();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/class.access/class.friend/p6.cpp"]={"clang/test/CXX/class.access/class.friend/p6.cpp:10:15: error: friend function definition cannot be qualified with \'::\'","clang/test/CXX/class.access/class.friend/p6.cpp:11:15: error: friend function definition cannot be qualified with \'X::\'","clang/test/CXX/class.access/class.friend/p6.cpp:15:15: error: friend function definition cannot be qualified with \'T::\'"} | ["clang/test/CXX/class.access/class.friend/p6.cpp"]={"clang/test/CXX/class.access/class.friend/p6.cpp:10:15: error: friend function definition cannot be qualified with \'::\'","clang/test/CXX/class.access/class.friend/p6.cpp:11:15: error: friend function definition cannot be qualified with \'X::\'","clang/test/CXX/class.access/class.friend/p6.cpp:15:15: error: friend function definition cannot be qualified with \'T::\'"} | ||
Line 2,034: | Line 2,062: | ||
}, | }, | ||
["err_qualified_friend_no_match"]={ | ["err_qualified_friend_no_match"]={ | ||
[ | [i]="err_qualified_friend_no_match", | ||
[ | [h]={{nil,E,"friend declaration of %0 does not match any declaration in %1"}}, | ||
[ | [g]={{nil,E,"friend declaration of A does not match any declaration in B"}}, | ||
[ | [b]=k, | ||
[ | [e]="friend declaration of (.*?) does not match any declaration in (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,E,m}}, | ||
[ | [c]={"8ce732b46f55",1546840846,"DR674, PR38883, PR40238: Qualified friend lookup should look for a","DR674, PR38883, PR40238: Qualified friend lookup should look for a\ntemplate specialization if there is no matching non-template function.\n\nThis exposed a couple of related bugs:\n - we would sometimes substitute into a friend template instead of a\n suitable non-friend declaration; this would now crash because we\'d\n decide the specialization of the friend is a redeclaration of itself\n - ADL failed to properly handle the case where an invisible local\n extern declaration redeclares an invisible friend\n\nBoth are fixed herein: in particular, we now never make invisible\nfriends or local extern declarations visible to name lookup unless\nthey are the only declaration of the entity. (We already mostly did\nthis for local extern declarations.)\n\nllvm-svn: 350505"}, | ||
[j]={{ | [j]={{w,8957,"/// Generate diagnostics for an invalid function redeclaration.\n///\n/// This routine handles generating the diagnostic messages for an invalid\n/// function redeclaration, including finding possible similar declarations\n/// or performing typo correction if there are no previous declarations with\n/// the same name.\n///\n/// Returns a NamedDecl iff typo correction was performed and substituting in\n/// the new declaration name does not cause new errors.\nstatic NamedDecl *DiagnoseInvalidRedeclaration(Sema &SemaRef, LookupResult &Previous, FunctionDecl *NewFD, ActOnFDArgs &ExtraArgs, bool IsLocalFriend, Scope *S) {\n // ...\n unsigned DiagMsg = IsLocalFriend ? diag::err_no_matching_local_friend : NewFD->getFriendObjectKind() ? diag::err_qualified_friend_no_match : diag::err_member_decl_does_not_match;"},{r,9482,"/// Perform semantic analysis for the given function template\n/// specialization.\n///\n/// This routine performs all of the semantic analysis required for an\n/// explicit function template specialization. On successful completion,\n/// the function declaration \\p FD will become a function template\n/// specialization.\n///\n/// \\param FD the function declaration, which will be updated to become a\n/// function template specialization.\n///\n/// \\param ExplicitTemplateArgs the explicitly-provided template arguments,\n/// if any. Note that this may be valid info even when 0 arguments are\n/// explicitly provided as in, e.g., \\c void sort<>(char*, char*);\n/// as it anyway contains info on the angle brackets locations.\n///\n/// \\param Previous the set of declarations that may be specialized by\n/// this function specialization.\n///\n/// \\param QualifiedFriend whether this is a lookup for a qualified friend\n/// declaration with no explicit template argument list that might be\n/// befriending a function template specialization.\nbool Sema::CheckFunctionTemplateSpecialization(FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous, bool QualifiedFriend) {\n // ...\n // For a qualified friend declaration (with no explicit marker to indicate\n // that a template specialization was intended), note all (template and\n // non-template) candidates.\n if (QualifiedFriend && Candidates.empty()) {\n Diag(FD->getLocation(), diag::err_qualified_friend_no_match) << FD->getDeclName() << FDLookupContext;"}} | ||
}, | }, | ||
["err_qualified_function_typeid"]={ | ["err_qualified_function_typeid"]={ | ||
[ | [i]={{nil,p,"err_qualified_function_typeid"}}, | ||
[ | [h]={{nil,p,"type operand %0 of \'typeid\' cannot have \'%1\' qualifier"}}, | ||
[ | [g]={{nil,p,"type operand A of \'typeid\' cannot have \'B\' qualifier"}}, | ||
[ | [b]=k, | ||
[ | [e]="type operand (.*?) of \'typeid\' cannot have \'(.*?)\' qualifier", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, | ||
[j]={{ | [j]={{R,2145,"bool Sema::CheckQualifiedFunctionForTypeId(QualType T, SourceLocation Loc) {\n // ...\n Diag(Loc, diag::err_qualified_function_typeid) << T << getFunctionQualifiersAsString(FPT);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/instantiate-expr-4.cpp"]={"clang/test/SemaTemplate/instantiate-expr-4.cpp:198:12: error: type operand \'void () const\' of \'typeid\' cannot have \'const\' qualifier","clang/test/SemaTemplate/instantiate-expr-4.cpp:198:12: error: type operand \'void () &\' of \'typeid\' cannot have \'&\' qualifier"} | ["clang/test/SemaTemplate/instantiate-expr-4.cpp"]={"clang/test/SemaTemplate/instantiate-expr-4.cpp:198:12: error: type operand \'void () const\' of \'typeid\' cannot have \'const\' qualifier","clang/test/SemaTemplate/instantiate-expr-4.cpp:198:12: error: type operand \'void () &\' of \'typeid\' cannot have \'&\' qualifier"} | ||
Line 2,059: | Line 2,087: | ||
}, | }, | ||
["err_qualified_member_nonclass"]={ | ["err_qualified_member_nonclass"]={ | ||
[ | [i]="err_qualified_member_nonclass", | ||
[ | [h]="qualified member access refers to a member in %0", | ||
[ | [g]="qualified member access refers to a member in A", | ||
[ | [b]=k, | ||
[ | [e]="qualified member access refers to a member in (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"0b3d95ae64a5",1255819074,"Fix a crash with qualified member access into a non-type, from Sean Hunt!","Fix a crash with qualified member access into a non-type, from Sean Hunt!\n\nllvm-svn: 84370"}, | ||
[j]={{ | [j]={{V,683,"static bool LookupMemberExprInRecord(Sema &SemaRef, LookupResult &R, Expr *BaseExpr, const RecordType *RTy, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, bool HasTemplateArgs, SourceLocation TemplateKWLoc, TypoExpr *&TE) {\n // ...\n if (SS.isSet()) {\n // ...\n if (!isa<TypeDecl>(DC)) {\n SemaRef.Diag(R.getNameLoc(), diag::err_qualified_member_nonclass) << DC << SS.getRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/member-expr.cpp"]={"clang/test/SemaCXX/member-expr.cpp:43:9: error: qualified member access refers to a member in the global namespace","clang/test/SemaCXX/member-expr.cpp:44:10: error: qualified member access refers to a member in namespace \'C\'"} | ["clang/test/SemaCXX/member-expr.cpp"]={"clang/test/SemaCXX/member-expr.cpp:43:9: error: qualified member access refers to a member in the global namespace","clang/test/SemaCXX/member-expr.cpp:44:10: error: qualified member access refers to a member in namespace \'C\'"} | ||
Line 2,073: | Line 2,101: | ||
}, | }, | ||
["err_qualified_member_of_unrelated"]={ | ["err_qualified_member_of_unrelated"]={ | ||
[ | [i]="err_qualified_member_of_unrelated", | ||
[ | [h]="%q0 is not a member of class %1", | ||
[ | [g]="A is not a member of class B", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) is not a member of class (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"1e67dd6b2f6a",1272332618,"Improve the diagnostic you get when making a qualified member access","Improve the diagnostic you get when making a qualified member access\nwith a qualifier referencing a different type.\n\nllvm-svn: 102409"}, | ||
[j]={{ | [j]={{V,540,"/// We know that the given qualified member reference points only to\n/// declarations which do not belong to the static type of the base\n/// expression. Diagnose the problem.\nstatic void DiagnoseQualifiedMemberReference(Sema &SemaRef, Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, NamedDecl *rep, const DeclarationNameInfo &nameInfo) {\n // ...\n SemaRef.Diag(nameInfo.getLoc(), diag::err_qualified_member_of_unrelated) << SS.getRange() << rep << BaseType;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp:33:34: error: \'PR10127::outer::middle::mfunc\' is not a member of class \'decltype(outer::middle::inner())\' (aka \'PR10127::outer::middle::inner\')"} | ["clang/test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp:33:34: error: \'PR10127::outer::middle::mfunc\' is not a member of class \'decltype(outer::middle::inner())\' (aka \'PR10127::outer::middle::inner\')"} | ||
Line 2,087: | Line 2,115: | ||
}, | }, | ||
["err_qualified_objc_access"]={ | ["err_qualified_objc_access"]={ | ||
[ | [i]="err_qualified_objc_access", | ||
[ | [h]="%select{property|instance variable}0 access cannot be qualified with \'%1\'", | ||
[ | [g]={{nil,nil,{{"property","instance variable"}," access cannot be qualified with \'B\'"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:property|instance variable) access cannot be qualified with \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"12340e5b1868",1318202569,"Diagnose attempts to qualify the name of an instance variable or","Diagnose attempts to qualify the name of an instance variable or\nproperty in an Objective-C++ member access expression. Fixes PR9759.\n\nllvm-svn: 141522"}, | ||
[j]={{ | [j]={{V,1331,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n if (!SS.isEmpty() && !SS.isInvalid()) {\n S.Diag(SS.getRange().getBegin(), diag::err_qualified_objc_access) << 1 << SS.getScopeRep() << FixItHint::CreateRemoval(SS.getRange());"},{V,1494,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n if (!IsArrow && (OPT = BaseType->getAs<ObjCObjectPointerType>())) {\n if (!SS.isEmpty() && !SS.isInvalid()) {\n S.Diag(SS.getRange().getBegin(), diag::err_qualified_objc_access) << 0 << SS.getScopeRep() << FixItHint::CreateRemoval(SS.getRange());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjCXX/propert-dot-error.mm"]={"clang/test/SemaObjCXX/propert-dot-error.mm:65:5: error: property access cannot be qualified with \'Forward::\'","clang/test/SemaObjCXX/propert-dot-error.mm:66:6: error: instance variable access cannot be qualified with \'Forward::\'"} | ["clang/test/SemaObjCXX/propert-dot-error.mm"]={"clang/test/SemaObjCXX/propert-dot-error.mm:65:5: error: property access cannot be qualified with \'Forward::\'","clang/test/SemaObjCXX/propert-dot-error.mm:66:6: error: instance variable access cannot be qualified with \'Forward::\'"} | ||
Line 2,101: | Line 2,129: | ||
}, | }, | ||
["err_qualified_objc_catch_parm"]={ | ["err_qualified_objc_catch_parm"]={ | ||
[ | [i]="err_qualified_objc_catch_parm", | ||
[h]="@catch parameter declarator cannot be qualified", | |||
[g]="@catch parameter declarator cannot be qualified", | |||
[b]=k, | |||
[e]="@catch parameter declarator cannot be qualified", | [e]="@catch parameter declarator cannot be qualified", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"f356419bf57b",1272303169,"Refactor Objective-C @catch parameter checking by detangling it from","Refactor Objective-C @catch parameter checking by detangling it from\nfunction-parameter checking and splitting it into the normal\nActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch\nparameter rather than the ill-fitting ParmVarDecl.\n\nllvm-svn: 102347"}, | |||
[j]={{Kb,5226,"Decl *Sema::ActOnObjCExceptionDecl(Scope *S, Declarator &D) {\n // ...\n // Parameter declarators cannot be qualified (C++ [dcl.meaning]p1).\n if (D.getCXXScopeSpec().isSet()) {\n Diag(D.getIdentifierLoc(), diag::err_qualified_objc_catch_parm) << D.getCXXScopeSpec().getRange();"}} | |||
[ | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_qualified_param_declarator"]={ | ["err_qualified_param_declarator"]={ | ||
[ | [i]="err_qualified_param_declarator", | ||
[h]="parameter declarator cannot be qualified", | |||
[g]="parameter declarator cannot be qualified", | |||
[b]=k, | |||
[e]="parameter declarator cannot be qualified", | [e]="parameter declarator cannot be qualified", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{w,14694,"/// Common checks for a parameter-declaration that should apply to both function\n/// parameters and non-type template parameters.\nvoid Sema::CheckFunctionOrTemplateParamDeclarator(Scope *S, Declarator &D) {\n // ...\n // Parameter declarators cannot be qualified (C++ [dcl.meaning]p1).\n if (D.getCXXScopeSpec().isSet()) {\n Diag(D.getIdentifierLoc(), diag::err_qualified_param_declarator) << D.getCXXScopeSpec().getRange();"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:73:17: error: parameter declarator cannot be qualified"} | ["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:73:17: error: parameter declarator cannot be qualified"} | ||
Line 2,126: | Line 2,154: | ||
}, | }, | ||
["err_qualified_typedef_declarator"]={ | ["err_qualified_typedef_declarator"]={ | ||
[ | [i]="err_qualified_typedef_declarator", | ||
[h]="typedef declarator cannot be qualified", | |||
[g]="typedef declarator cannot be qualified", | |||
[b]=k, | |||
[e]="typedef declarator cannot be qualified", | [e]="typedef declarator cannot be qualified", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{w,6661,"NamedDecl *Sema::ActOnTypedefDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous) {\n // Typedef declarators cannot be qualified (C++ [dcl.meaning]p1).\n if (D.getCXXScopeSpec().isSet()) {\n Diag(D.getIdentifierLoc(), diag::err_qualified_typedef_declarator) << D.getCXXScopeSpec().getRange();"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:101:18: error: typedef declarator cannot be qualified"} | ["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:101:18: error: typedef declarator cannot be qualified"} | ||
Line 2,140: | Line 2,168: | ||
}, | }, | ||
["err_range_on_array_parameter"]={ | ["err_range_on_array_parameter"]={ | ||
[ | [i]="err_range_on_array_parameter", | ||
[ | [h]="cannot build range expression with array function parameter %0 since parameter with array type %1 is treated as pointer type %2", | ||
[ | [g]="cannot build range expression with array function parameter A since parameter with array type B is treated as pointer type C", | ||
[ | [b]=k, | ||
[ | [e]="cannot build range expression with array function parameter (.*?) since parameter with array type (.*?) is treated as pointer type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"0825469126d7",1381529764,"Improve the error message for attempting to build a for range loop using a","Improve the error message for attempting to build a for range loop using a\nfunction parameter that has array type. Such a parameter will be treated as\na pointer type instead, resulting in a missing begin function error is a\nsuggestion to dereference the pointer. This provides a different,\nmore informative diagnostic as well as point to the parameter declaration.\n\nllvm-svn: 192512"}, | ||
[j]={{ | [j]={{Z,2926,"/// 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 (const ArrayType *UnqAT = RangeType->getAsArrayTypeUnsafe()) {\n // ...\n } else {\n // ...\n if (Kind == BFRK_Build && RangeStatus == FRS_NoViableFunction && BEFFailure == BEF_begin) {\n // If the range is being built from an array parameter, emit a\n // a diagnostic that it is being treated as a pointer.\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Range)) {\n if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (PointerTy->isPointerType() && ArrayTy->isArrayType()) {\n Diag(Range->getBeginLoc(), diag::err_range_on_array_parameter) << RangeLoc << PVD << ArrayTy << PointerTy;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/for-range-examples.cpp"]={"clang/test/SemaCXX/for-range-examples.cpp:198:19: error: cannot build range expression with array function parameter \'arr\' since parameter with array type \'int[]\' is treated as pointer type \'int *\'","clang/test/SemaCXX/for-range-examples.cpp:209:19: error: cannot build range expression with array function parameter \'arr\' since parameter with array type \'vector[]\' is treated as pointer type \'vector *\'"} | ["clang/test/SemaCXX/for-range-examples.cpp"]={"clang/test/SemaCXX/for-range-examples.cpp:198:19: error: cannot build range expression with array function parameter \'arr\' since parameter with array type \'int[]\' is treated as pointer type \'int *\'","clang/test/SemaCXX/for-range-examples.cpp:209:19: error: cannot build range expression with array function parameter \'arr\' since parameter with array type \'vector[]\' is treated as pointer type \'vector *\'"} | ||
Line 2,154: | Line 2,182: | ||
}, | }, | ||
["err_raw_delim_too_long"]={ | ["err_raw_delim_too_long"]={ | ||
[ | [i]="err_raw_delim_too_long", | ||
[ | [h]="raw string delimiter longer than 16 characters; use PREFIX( )PREFIX to delimit raw string", | ||
[ | [g]="raw string delimiter longer than 16 characters; use PREFIX( )PREFIX to delimit raw string", | ||
[ | [b]=k, | ||
[ | [e]="raw string delimiter longer than 16 characters; use PREFIX\\( \\)PREFIX to delimit raw string", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={"54edccafc5e3",1313035575,"Add support for C++0x raw string literals.","Add support for C++0x raw string literals.\n\nllvm-svn: 137298"}, | ||
[j]={{"clang/lib/Lex/Lexer.cpp",2158,"/// 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 // If the last character was not a \'(\', then we didn\'t lex a valid delimiter.\n if (CurPtr[PrefixLen] != \'(\') {\n if (!isLexingRawMode()) {\n // ...\n if (PrefixLen == 16) {\n Diag(PrefixEnd, diag::err_raw_delim_too_long);"}}, | [j]={{"clang/lib/Lex/Lexer.cpp",2158,"/// 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 // If the last character was not a \'(\', then we didn\'t lex a valid delimiter.\n if (CurPtr[PrefixLen] != \'(\') {\n if (!isLexingRawMode()) {\n // ...\n if (PrefixLen == 16) {\n Diag(PrefixEnd, diag::err_raw_delim_too_long);"}}, | ||
[l]={ | [l]={ | ||
Line 2,168: | Line 2,196: | ||
}, | }, | ||
["err_readonly_message_assignment"]={ | ["err_readonly_message_assignment"]={ | ||
[ | [i]="err_readonly_message_assignment", | ||
[ | [h]="assigning to \'readonly\' return result of an Objective-C message not allowed", | ||
[ | [g]="assigning to \'readonly\' return result of an Objective-C message not allowed", | ||
[ | [b]=k, | ||
[ | [e]="assigning to \'readonly\' return result of an Objective\\-C message not allowed", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{n,14373,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_InvalidMessageExpression:\n DiagID = diag::err_readonly_message_assignment;"}}, | [j]={{n,14373,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_InvalidMessageExpression:\n DiagID = diag::err_readonly_message_assignment;"}}, | ||
[l]={ | [l]={ | ||
Line 2,182: | Line 2,210: | ||
}, | }, | ||
["err_realimag_invalid_type"]={ | ["err_realimag_invalid_type"]={ | ||
[ | [i]="err_realimag_invalid_type", | ||
[ | [h]="invalid type %0 to %1 operator", | ||
[ | [g]="invalid type A to B operator", | ||
[ | [b]=k, | ||
[ | [e]="invalid type (.*?) to (.*?) operator", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,4914,"static QualType CheckRealImagOperand(Sema &S, ExprResult &V, SourceLocation Loc, bool IsReal) {\n // ...\n S.Diag(Loc, diag::err_realimag_invalid_type) << V.get()->getType() << (IsReal ? \"__real\" : \"__imag\");"}}, | [j]={{n,4914,"static QualType CheckRealImagOperand(Sema &S, ExprResult &V, SourceLocation Loc, bool IsReal) {\n // ...\n S.Diag(Loc, diag::err_realimag_invalid_type) << V.get()->getType() << (IsReal ? \"__real\" : \"__imag\");"}}, | ||
[l]={ | [l]={ | ||
Line 2,196: | Line 2,224: | ||
}, | }, | ||
["err_record_with_pointers_kernel_param"]={ | ["err_record_with_pointers_kernel_param"]={ | ||
[ | [i]="err_record_with_pointers_kernel_param", | ||
[ | [h]="%select{struct|union}0 kernel parameters may not contain pointers", | ||
[ | [g]={{nil,nil,{{Gc,Nc}," kernel parameters may not contain pointers"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:struct|union) kernel parameters may not contain pointers", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"efb38192b0b2",1374542616,"Error on more illegal kernel argument types for OpenCL","Error on more illegal kernel argument types for OpenCL\n\nbool, half, pointers and structs / unions containing any\nof these are not allowed. Does not yet reject size_t and\nrelated integer types that are also disallowed.\n\nllvm-svn: 186908"}, | ||
[j]={{ | [j]={{w,9578,"static void checkIsValidOpenCLKernelParameter(Sema &S, Declarator &D, ParmVarDecl *Param, llvm::SmallPtrSetImpl<const Type *> &ValidTypes) {\n // ...\n do {\n // ...\n for (const auto *FD : RD->fields()) {\n // ...\n // OpenCL v1.2 s6.9.p:\n // Arguments to kernel functions that are declared to be a struct or union\n // do not allow OpenCL objects to be passed as elements of the struct or\n // union. This restriction was lifted in OpenCL v2.0 with the introduction\n // of SVM.\n if (ParamType == PtrKernelParam || ParamType == PtrPtrKernelParam || ParamType == InvalidAddrSpacePtrKernelParam) {\n S.Diag(Param->getLocation(), diag::err_record_with_pointers_kernel_param) << PT->isUnionType() << PT;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaOpenCL/invalid-kernel-parameters.cl"]={"clang/test/SemaOpenCL/invalid-kernel-parameters.cl:98:44: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:105:39: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:119:43: error: union kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:130:56: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:147:78: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:207:85: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:207:106: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:213:44: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:219:50: error: struct kernel parameters may not contain pointers"} | ["clang/test/SemaOpenCL/invalid-kernel-parameters.cl"]={"clang/test/SemaOpenCL/invalid-kernel-parameters.cl:98:44: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:105:39: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:119:43: error: union kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:130:56: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:147:78: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:207:85: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:207:106: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:213:44: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:219:50: error: struct kernel parameters may not contain pointers"} | ||
Line 2,210: | Line 2,238: | ||
}, | }, | ||
["err_recursive_default_argument"]={ | ["err_recursive_default_argument"]={ | ||
[ | [i]="err_recursive_default_argument", | ||
[h]="recursive evaluation of default argument", | |||
[g]="recursive evaluation of default argument", | |||
[b]=k, | |||
[e]="recursive evaluation of default argument", | [e]="recursive evaluation of default argument", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"b82a9401dfb7",1465872956,"Detect recursive default argument definition","Detect recursive default argument definition\n\nIf definition of default function argument uses itself, clang crashed,\nbecause corresponding function parameter is not associated with the default\nargument yet. With this fix clang emits appropriate error message.\n\nThis change fixes PR28105.\n\nDifferential Revision: http://reviews.llvm.org/D21301\n\nllvm-svn: 272623"}, | |||
[ | |||
[ | |||
[j]={{n,6027,"bool Sema::CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *RewrittenInit, bool SkipImmediateInvocations) {\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n // If we\'ve already cleared out the location for the default argument,\n // that means we\'re parsing it right now.\n if (!UnparsedDefaultArgLocs.count(Param)) {\n Diag(Param->getBeginLoc(), diag::err_recursive_default_argument) << FD;"},{"clang/lib/Sema/SemaTemplateInstantiate.cpp",2966,"/// Substitute the given template arguments into the default argument.\nbool Sema::SubstDefaultArgument(SourceLocation Loc, ParmVarDecl *Param, const MultiLevelTemplateArgumentList &TemplateArgs, bool ForCallExpr) {\n // ...\n if (Inst.isAlreadyInstantiating()) {\n Diag(Param->getBeginLoc(), diag::err_recursive_default_argument) << FD;"}}, | [j]={{n,6027,"bool Sema::CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *RewrittenInit, bool SkipImmediateInvocations) {\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n // If we\'ve already cleared out the location for the default argument,\n // that means we\'re parsing it right now.\n if (!UnparsedDefaultArgLocs.count(Param)) {\n Diag(Param->getBeginLoc(), diag::err_recursive_default_argument) << FD;"},{"clang/lib/Sema/SemaTemplateInstantiate.cpp",2966,"/// Substitute the given template arguments into the default argument.\nbool Sema::SubstDefaultArgument(SourceLocation Loc, ParmVarDecl *Param, const MultiLevelTemplateArgumentList &TemplateArgs, bool ForCallExpr) {\n // ...\n if (Inst.isAlreadyInstantiating()) {\n Diag(Param->getBeginLoc(), diag::err_recursive_default_argument) << FD;"}}, | ||
[l]={ | [l]={ | ||
Line 2,224: | Line 2,252: | ||
}, | }, | ||
["err_recursive_superclass"]={ | ["err_recursive_superclass"]={ | ||
[ | [i]="err_recursive_superclass", | ||
[ | [h]="trying to recursively use %0 as superclass of %1", | ||
[ | [g]="trying to recursively use A as superclass of B", | ||
[ | [b]=k, | ||
[ | [e]="trying to recursively use (.*?) as superclass of (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"5582f231f2b2",1247177306,"don\'t crash if class is using itself as its super class.","don\'t crash if class is using itself as its super class.\n\nllvm-svn: 75178"}, | ||
[j]={{ | [j]={{Kb,570,"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 Diag(SuperLoc, diag::err_recursive_superclass) << SuperName << ClassName << SourceRange(AtInterfaceLoc, ClassLoc);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/undef-superclass-1.m"]={"clang/test/SemaObjC/undef-superclass-1.m:29:29: error: trying to recursively use \'RecursiveClass\' as superclass of \'RecursiveClass\'"} | ["clang/test/SemaObjC/undef-superclass-1.m"]={"clang/test/SemaObjC/undef-superclass-1.m:29:29: error: trying to recursively use \'RecursiveClass\' as superclass of \'RecursiveClass\'"} | ||
Line 2,238: | Line 2,266: | ||
}, | }, | ||
["err_redeclaration_different_type"]={ | ["err_redeclaration_different_type"]={ | ||
[ | [i]="err_redeclaration_different_type", | ||
[ | [h]="redeclaration of %0 with a different type%diff{: $ vs $|}1,2", | ||
[ | [g]={{nil,nil,{"redeclaration of A with a different type",{": B vs C",a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="redeclaration of (.*?) with a different type(?:\\: (.*?) vs (.*?)|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"38a50c0a1620",1436904529,"[Sema] Emit a better diagnostic when variable redeclarations disagree","[Sema] Emit a better diagnostic when variable redeclarations disagree\n\nWe referred to all declaration in definitions in our diagnostic messages\nwhich is can be inaccurate. Instead, classify the declaration and emit\nan appropriate diagnostic for the new declaration and an appropriate\nnote pointing to the old one.\n\nThis fixes PR24116.\n\nllvm-svn: 242190"}, | ||
[j]={{ | [j]={{w,4383,"static void diagnoseVarDeclTypeMismatch(Sema &S, VarDecl *New, VarDecl *Old) {\n // ...\n S.Diag(New->getLocation(), New->isThisDeclarationADefinition() ? diag::err_redefinition_different_type : diag::err_redeclaration_different_type) << New->getDeclName() << New->getType() << Old->getType();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:162:14: error: redeclaration of \'n_var\' with a different type: \'double\' vs \'int\'","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:214:24: error: redeclaration of \'arr\' with a different type: \'int[3]\' vs \'int[2]\'","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:149:14: error: redeclaration of \'arrX\' with a different type: \'int[4]\' vs \'int[3]\'"} | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:162:14: error: redeclaration of \'n_var\' with a different type: \'double\' vs \'int\'","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:214:24: error: redeclaration of \'arr\' with a different type: \'int[3]\' vs \'int[2]\'","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:149:14: error: redeclaration of \'arrX\' with a different type: \'int[4]\' vs \'int[3]\'"} | ||
Line 2,252: | Line 2,280: | ||
}, | }, | ||
["err_redeclaration_non_exported"]={ | ["err_redeclaration_non_exported"]={ | ||
[ | [i]={{nil,C,"err_redeclaration_non_exported"}}, | ||
[ | [h]={{nil,y,"cannot export redeclaration %0 here since the previous declaration %select{is not exported|has internal linkage|has module linkage}1"},{C,C,"cannot export redeclaration %0 here since the previous declaration is not exported"}}, | ||
[ | [g]={{nil,y,{"cannot export redeclaration A here since the previous declaration ",{"is not exported","has internal linkage","has module linkage"}}},{C,C,"cannot export redeclaration A here since the previous declaration is not exported"}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot export redeclaration (.*?) here since the previous declaration (?:is not exported|has internal linkage|has module linkage)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,C,m}}, | ||
[ | [c]={hd,1616787805,gd,fd}, | ||
[j]={{ | [j]={{w,1735,"// [module.interface]p6:\n// A redeclaration of an entity X is implicitly exported if X was introduced by\n// an exported declaration; otherwise it shall not be exported.\nbool Sema::CheckRedeclarationExported(NamedDecl *New, NamedDecl *Old) {\n // ...\n Diag(New->getLocation(), diag::err_redeclaration_non_exported) << New << S;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/module/module.interface/p6.cpp"]={"clang/test/CXX/module/module.interface/p6.cpp:12:15: error: cannot export redeclaration \'S\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:20:15: error: cannot export redeclaration \'X\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:23:15: error: cannot export redeclaration \'Z\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:32:15: error: cannot export redeclaration \'B\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:33:15: error: cannot export redeclaration \'C\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:40:8: error: cannot export redeclaration \'TemplS\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:46:8: error: cannot export redeclaration \'TemplS2\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:49:13: error: cannot export redeclaration \'baz\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:54:13: error: cannot export redeclaration \'bar\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:66:16: error: cannot export redeclaration \'f1\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:72:6: error: cannot export redeclaration \'TemplFunc\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:79:6: error: cannot export redeclaration \'TemplFunc2\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:85:9: error: cannot export redeclaration \'TemplFunc3\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:88:12: error: cannot export redeclaration \'var\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:93:3: error: cannot export redeclaration \'TemplVar\' here since the previous declaration has module linkage"} | ["clang/test/CXX/module/module.interface/p6.cpp"]={"clang/test/CXX/module/module.interface/p6.cpp:12:15: error: cannot export redeclaration \'S\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:20:15: error: cannot export redeclaration \'X\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:23:15: error: cannot export redeclaration \'Z\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:32:15: error: cannot export redeclaration \'B\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:33:15: error: cannot export redeclaration \'C\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:40:8: error: cannot export redeclaration \'TemplS\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:46:8: error: cannot export redeclaration \'TemplS2\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:49:13: error: cannot export redeclaration \'baz\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:54:13: error: cannot export redeclaration \'bar\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:66:16: error: cannot export redeclaration \'f1\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:72:6: error: cannot export redeclaration \'TemplFunc\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:79:6: error: cannot export redeclaration \'TemplFunc2\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:85:9: error: cannot export redeclaration \'TemplFunc3\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:88:12: error: cannot export redeclaration \'var\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:93:3: error: cannot export redeclaration \'TemplVar\' here since the previous declaration has module linkage"} | ||
Line 2,266: | Line 2,294: | ||
}, | }, | ||
["err_redefinition"]={ | ["err_redefinition"]={ | ||
[ | [i]="err_redefinition", | ||
[ | [h]="redefinition of %0", | ||
[ | [g]="redefinition of A", | ||
[ | [b]=k, | ||
[ | [e]="redefinition of (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{w,2719,"/// 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 if (getLangOpts().CPlusPlus) {\n // ...\n Diag(New->getLocation(), diag::err_redefinition) << New->getDeclName();"},{w,3042,"/// checkNewAttributesAfterDef - If we already have a definition, check that\n/// there are no new attributes in this declaration.\nstatic void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {\n // ...\n for (unsigned I = 0, E = NewAttributes.size(); I != E;) {\n // ...\n if (isa<AliasAttr>(NewAttribute) || isa<IFuncAttr>(NewAttribute)) {\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(New)) {\n // ...\n } else {\n // ...\n unsigned Diag = cast<VarDecl>(Def)->isThisDeclarationADefinition() == VarDecl::TentativeDefinition ? diag::err_alias_after_tentative : diag::err_redefinition;"},{w,3044,"/// checkNewAttributesAfterDef - If we already have a definition, check that\n/// there are no new attributes in this declaration.\nstatic void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {\n // ...\n for (unsigned I = 0, E = NewAttributes.size(); I != E;) {\n // ...\n if (isa<AliasAttr>(NewAttribute) || isa<IFuncAttr>(NewAttribute)) {\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(New)) {\n // ...\n } else {\n // ...\n if (Diag == diag::err_redefinition)"},{w,4683,"/// 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 // FIXME: The test for external storage here seems wrong? We still\n // need to check for mismatches.\n if (!New->hasExternalStorage() && !New->isFileVarDecl() &&\n // ...\n Diag(New->getLocation(), diag::err_redefinition) << New->getDeclName();"},{w,4837,"/// We\'ve just determined that \\p Old and \\p New both appear to be definitions\n/// of the same variable. Either diagnose or fix the problem.\nbool Sema::checkVarDeclRedefinition(VarDecl *Old, VarDecl *New) {\n if (!hasVisibleDefinition(Old) && (New->getFormalLinkage() == InternalLinkage || New->isInline() || isa<VarTemplateSpecializationDecl>(New) || New->getDescribedVarTemplate() || New->getNumTemplateParameterLists() || New->getDeclContext()->isDependentContext())) {\n // ...\n } else {\n Diag(New->getLocation(), diag::err_redefinition) << New;"},{w,15170,"void Sema::CheckForFunctionRedefinition(FunctionDecl *FD, const FunctionDecl *EffectiveDefinition, SkipBodyInfo *SkipBody) {\n // ...\n if (getLangOpts().GNUMode && Definition->isInlineSpecified() && Definition->getStorageClass() == SC_Extern)\n // ...\n else\n Diag(FD->getLocation(), diag::err_redefinition) << FD;"},{w,17369,"/// 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 if (!Invalid) {\n // ...\n // Diagnose attempts to redefine a tag.\n if (TUK == TUK_Definition) {\n if (NamedDecl *Def = PrevTagDecl->getDefinition()) {\n // ...\n if (SkipBody && !hasVisibleDefinition(Def, &Hidden)) {\n // ...\n } else if (!IsExplicitSpecializationAfterInstantiation) {\n // A redeclaration in function prototype scope in C isn\'t\n // visible elsewhere, so merely issue a warning.\n if (!getLangOpts().CPlusPlus && S->containedInPrototypeScope())\n // ...\n else\n Diag(NameLoc, diag::err_redefinition) << Name;"},{w,19504,"Decl *Sema::ActOnEnumConstant(Scope *S, Decl *theEnumDecl, Decl *lastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val) {\n // ...\n if (PrevDecl) {\n // ...\n if (!isa<TagDecl>(PrevDecl) && isDeclInScope(PrevDecl, CurContext, S)) {\n if (isa<EnumConstantDecl>(PrevDecl))\n // ...\n else\n Diag(IdLoc, diag::err_redefinition) << Id;"},{H,909,"NamedDecl *Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n // ...\n // Build the BindingDecls.\n for (auto &B : D.getDecompositionDeclarator().bindings()) {\n // ...\n if (!Previous.empty()) {\n // ...\n Diag(B.NameLoc, diag::err_redefinition) << B.Name;"},{H,12947,"/// 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 // C++03 [namespace.udecl]p8:\n // C++0x [namespace.udecl]p10:\n // A using-declaration is a declaration and can therefore be used\n // repeatedly where (and only where) multiple declarations are\n // allowed.\n //\n // That\'s in non-member contexts.\n if (!CurContext->getRedeclContext()->isRecord()) {\n // A dependent qualifier outside a class can only ever resolve to an\n // enumeration type. Therefore it conflicts with any other non-type\n // declaration in the same scope.\n // FIXME: How should we check for dependent type-type conflicts at block\n // scope?\n if (Qual->isDependent() && !HasTypenameKeyword) {\n for (auto *D : Prev) {\n if (!isa<TypeDecl>(D) && !isa<UsingDecl>(D) && !isa<UsingPackDecl>(D)) {\n // ...\n Diag(NameLoc, OldCouldBeEnumerator ? diag::err_redefinition : diag::err_redefinition_different_kind) << Prev.getLookupName();"},{H,13443,"Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (PrevR.isSingleResult()) {\n // ...\n if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) {\n // ...\n } else if (isVisible(PrevDecl)) {\n unsigned DiagID = isa<NamespaceDecl>(PrevDecl->getUnderlyingDecl()) ? diag::err_redefinition : diag::err_redefinition_different_kind;"},{H,16762,"/// ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch\n/// handler.\nDecl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) {\n // ...\n if (NamedDecl *PrevDecl = LookupSingleName(S, II, D.getIdentifierLoc(), LookupOrdinaryName, ForVisibleRedeclaration)) {\n // ...\n if (isDeclInScope(PrevDecl, CurContext, S)) {\n Diag(D.getIdentifierLoc(), diag::err_redefinition) << D.getIdentifier();"},{n,5565,"ExprResult Sema::ActOnOMPIteratorExpr(Scope *S, SourceLocation IteratorKwLoc, SourceLocation LLoc, SourceLocation RLoc, ArrayRef<OMPIteratorData> Data) {\n // ...\n for (const OMPIteratorData &D : Data) {\n // ...\n if (S) {\n // ...\n if (!Previous.empty()) {\n // ...\n Diag(D.DeclIdentLoc, diag::err_redefinition) << VD->getDeclName();"},{r,2028,"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 // Check for redefinition of this class template.\n if (TUK == TUK_Definition) {\n if (TagDecl *Def = PrevRecordDecl->getDefinition()) {\n // ...\n if (SkipBody && !hasVisibleDefinition(Def, &Hidden)) {\n // ...\n } else {\n Diag(NameLoc, diag::err_redefinition) << Name;"},{r,8904,"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 // Check that this isn\'t a redefinition of this specialization.\n if (TUK == TUK_Definition) {\n // ...\n if (Def && SkipBody && !hasVisibleDefinition(Def, &Hidden)) {\n // ...\n } else if (Def) {\n // ...\n Diag(TemplateNameLoc, diag::err_redefinition) << Specialization << Range;"},{r,9077,"void Sema::CheckConceptRedefinition(ConceptDecl *NewDecl, LookupResult &Previous, bool &AddToScope) {\n // ...\n if (hasReachableDefinition(OldConcept) && IsRedefinitionInModule(NewDecl, OldConcept)) {\n Diag(NewDecl->getLocation(), diag::err_redefinition) << NewDecl->getDeclName();"},{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",3838,"Decl *TemplateDeclInstantiator::VisitClassTemplateSpecializationDecl(ClassTemplateSpecializationDecl *D) {\n // ...\n // If PrevDecl was a definition and D is also a definition, diagnose.\n // This happens in cases like:\n //\n // template<typename T, typename U>\n // struct Outer {\n // template<typename X> struct Inner;\n // template<> struct Inner<T> {};\n // template<> struct Inner<U> {};\n // };\n //\n // Outer<int, int> outer; // error: the explicit specializations of Inner\n // // have the same signature.\n if (PrevDecl && PrevDecl->getDefinition() && D->isThisDeclarationADefinition()) {\n SemaRef.Diag(D->getLocation(), diag::err_redefinition) << PrevDecl;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:6:9: error: redefinition of \'binding_a\'"} | ["clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:6:9: error: redefinition of \'binding_a\'"} | ||
Line 2,280: | Line 2,308: | ||
}, | }, | ||
["err_redefinition_different_concept"]={ | ["err_redefinition_different_concept"]={ | ||
[ | [i]={{nil,y,"err_redefinition_different_concept"}}, | ||
[ | [h]={{nil,y,"redefinition of concept %0 with different template parameters or requirements"}}, | ||
[ | [g]={{nil,y,"redefinition of concept A with different template parameters or requirements"}}, | ||
[ | [b]=k, | ||
[ | [e]="redefinition of concept (.*?) with different template parameters or requirements", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,m}}, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{r,9069,"void Sema::CheckConceptRedefinition(ConceptDecl *NewDecl, LookupResult &Previous, bool &AddToScope) {\n // ...\n if (!IsSame) {\n Diag(NewDecl->getLocation(), diag::err_redefinition_different_concept) << NewDecl->getDeclName();"}} | ||
}, | }, | ||
["err_redefinition_different_kind"]={ | ["err_redefinition_different_kind"]={ | ||
[ | [i]="err_redefinition_different_kind", | ||
[ | [h]="redefinition of %0 as different kind of symbol", | ||
[ | [g]="redefinition of A as different kind of symbol", | ||
[ | [b]=k, | ||
[ | [e]="redefinition of (.*?) as different kind of symbol", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{w,2624,"/// 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 if (!Old) {\n Diag(New->getLocation(), diag::err_redefinition_different_kind) << New->getDeclName();"},{w,3661,"/// 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 // ...\n } else {\n Diag(New->getLocation(), diag::err_redefinition_different_kind) << New->getDeclName();"},{w,4557,"/// 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 if (!Old) {\n Diag(New->getLocation(), diag::err_redefinition_different_kind) << New->getDeclName();"},{w,17460,"/// 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 // ...\n } else {\n // Use a better diagnostic if an elaborated-type-specifier\n // found the wrong kind of type on the first\n // (non-redeclaration) lookup.\n if ((TUK == TUK_Reference || TUK == TUK_Friend) && !Previous.isForRedeclaration()) {\n // ...\n } else if (!isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // ...\n } else if (TUK == TUK_Reference || TUK == TUK_Friend) {\n // ...\n } else if (TypedefNameDecl *TND = dyn_cast<TypedefNameDecl>(PrevDecl)) {\n // ...\n } else {\n // ...\n Diag(NameLoc, diag::err_redefinition_different_kind) << Name;"},{H,11434,"/// ActOnStartNamespaceDef - This is called at the start of a namespace\n/// definition.\nDecl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *II, SourceLocation LBrace, const ParsedAttributesView &AttrList, UsingDirectiveDecl *&UD, bool IsNested) {\n // ...\n if (II) {\n // ...\n if (PrevNS) {\n // ...\n } else if (PrevDecl) {\n // ...\n Diag(Loc, diag::err_redefinition_different_kind) << II;"},{H,12948,"/// 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 // C++03 [namespace.udecl]p8:\n // C++0x [namespace.udecl]p10:\n // A using-declaration is a declaration and can therefore be used\n // repeatedly where (and only where) multiple declarations are\n // allowed.\n //\n // That\'s in non-member contexts.\n if (!CurContext->getRedeclContext()->isRecord()) {\n // A dependent qualifier outside a class can only ever resolve to an\n // enumeration type. Therefore it conflicts with any other non-type\n // declaration in the same scope.\n // FIXME: How should we check for dependent type-type conflicts at block\n // scope?\n if (Qual->isDependent() && !HasTypenameKeyword) {\n for (auto *D : Prev) {\n if (!isa<TypeDecl>(D) && !isa<UsingDecl>(D) && !isa<UsingPackDecl>(D)) {\n // ...\n Diag(NameLoc, OldCouldBeEnumerator ? diag::err_redefinition : diag::err_redefinition_different_kind) << Prev.getLookupName();"},{H,13317,"Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS, MultiTemplateParamsArg TemplateParamLists, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec) {\n // ...\n if (TemplateParamLists.size()) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (!OldDecl && !Invalid) {\n Diag(UsingLoc, diag::err_redefinition_different_kind) << Name.Identifier;"},{H,13444,"Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (PrevR.isSingleResult()) {\n // ...\n if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) {\n // ...\n } else if (isVisible(PrevDecl)) {\n unsigned DiagID = isa<NamespaceDecl>(PrevDecl->getUnderlyingDecl()) ? diag::err_redefinition : diag::err_redefinition_different_kind;"},{Kb,610,"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 (PrevDecl && !SuperClassDecl) {\n // ...\n // This handles the following case:\n //\n // typedef int SuperClass;\n // @interface MyClass : SuperClass {} @end\n //\n if (!SuperClassDecl) {\n Diag(SuperLoc, diag::err_redefinition_different_kind) << SuperName;"},{Kb,991,"ObjCInterfaceDecl *Sema::ActOnStartClassInterface(Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n Diag(ClassLoc, diag::err_redefinition_different_kind) << ClassName;"},{Kb,1993,"ObjCImplementationDecl *Sema::ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &Attrs) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n Diag(ClassLoc, diag::err_redefinition_different_kind) << ClassName;"},{Kb,2026,"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 Diag(SuperClassLoc, diag::err_redefinition_different_kind) << SuperClassname;"},{Kb,3082,"Sema::DeclGroupPtrTy Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef<ObjCTypeParamList *> TypeParamLists, unsigned NumElts) {\n // ...\n for (unsigned i = 0; i != NumElts; ++i) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n // ...\n if (!TDD || !TDD->getUnderlyingType()->isObjCObjectType()) {\n Diag(AtClassLoc, diag::err_redefinition_different_kind) << IdentList[i];"},{r,2042,"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 } else if (PrevDecl) {\n // ...\n Diag(NameLoc, diag::err_redefinition_different_kind) << Name;"},{r,9060,"void Sema::CheckConceptRedefinition(ConceptDecl *NewDecl, LookupResult &Previous, bool &AddToScope) {\n // ...\n if (!OldConcept) {\n // ...\n Diag(NewDecl->getLocation(), diag::err_redefinition_different_kind) << NewDecl->getDeclName();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:8:10: error: redefinition of \'binding_b\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:11:28: error: redefinition of \'vartemplate_a\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:13:10: error: redefinition of \'vartemplate_b\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:16:24: error: redefinition of \'aliastemplate_a\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:18:10: error: redefinition of \'aliastemplate_b\' as different kind of symbol"} | ["clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:8:10: error: redefinition of \'binding_b\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:11:28: error: redefinition of \'vartemplate_a\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:13:10: error: redefinition of \'vartemplate_b\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:16:24: error: redefinition of \'aliastemplate_a\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:18:10: error: redefinition of \'aliastemplate_b\' as different kind of symbol"} | ||
Line 2,305: | Line 2,333: | ||
}, | }, | ||
["err_redefinition_different_namespace_alias"]={ | ["err_redefinition_different_namespace_alias"]={ | ||
[ | [i]="err_redefinition_different_namespace_alias", | ||
[ | [h]="redefinition of %0 as an alias for a different namespace", | ||
[ | [g]="redefinition of A as an alias for a different namespace", | ||
[ | [b]=k, | ||
[ | [e]="redefinition of (.*?) as an alias for a different namespace", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"f463436d9c02",1409785882,"[modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes","[modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes\nmerging of namespace aliases across modules and improves source fidelity.\nIncidentally also fixes PR20816.\n\nllvm-svn: 217103"}, | ||
[j]={{ | [j]={{H,13435,"Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (PrevR.isSingleResult()) {\n // ...\n if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) {\n // We already have an alias with the same name that points to the same\n // namespace; check that it matches.\n if (AD->getNamespace()->Equals(getNamespaceDecl(ND))) {\n // ...\n } else if (isVisible(PrevDecl)) {\n Diag(AliasLoc, diag::err_redefinition_different_namespace_alias) << Alias;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/namespace-alias.cpp"]={"clang/test/SemaCXX/namespace-alias.cpp:43:13: error: redefinition of \'B\' as an alias for a different namespace"} | ["clang/test/SemaCXX/namespace-alias.cpp"]={"clang/test/SemaCXX/namespace-alias.cpp:43:13: error: redefinition of \'B\' as an alias for a different namespace"} | ||
Line 2,319: | Line 2,347: | ||
}, | }, | ||
["err_redefinition_different_type"]={ | ["err_redefinition_different_type"]={ | ||
[ | [i]="err_redefinition_different_type", | ||
[ | [h]="redefinition of %0 with a different type%diff{: $ vs $|}1,2", | ||
[ | [g]={{nil,nil,{"redefinition of A with a different type",{": B vs C",a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="redefinition of (.*?) with a different type(?:\\: (.*?) vs (.*?)|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{w,4382,"static void diagnoseVarDeclTypeMismatch(Sema &S, VarDecl *New, VarDecl *Old) {\n // ...\n S.Diag(New->getLocation(), New->isThisDeclarationADefinition() ? diag::err_redefinition_different_type : diag::err_redeclaration_different_type) << New->getDeclName() << New->getType() << Old->getType();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:173:9: error: redefinition of \'o_var\' with a different type: \'float\' vs \'int\'"} | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:173:9: error: redefinition of \'o_var\' with a different type: \'float\' vs \'int\'"} | ||
Line 2,333: | Line 2,361: | ||
}, | }, | ||
["err_redefinition_different_typedef"]={ | ["err_redefinition_different_typedef"]={ | ||
[ | [i]="err_redefinition_different_typedef", | ||
[ | [h]="%select{typedef|type alias|type alias template}0 redefinition with different types%diff{ ($ vs $)|}1,2", | ||
[ | [g]={{nil,nil,{{Rc,Ic,"type alias template"}," redefinition with different types",{" (B vs C)",a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:typedef|type alias|type alias template) redefinition with different types(?: \\((.*?) vs (.*?)\\)|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{w,2559,"bool Sema::isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New) {\n // ...\n if (OldType != NewType && !OldType->isDependentType() && !NewType->isDependentType() && !Context.hasSameType(OldType, NewType)) {\n // ...\n Diag(New->getLocation(), diag::err_redefinition_different_typedef) << Kind << NewType << OldType;"},{H,13343,"Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS, MultiTemplateParamsArg TemplateParamLists, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec) {\n // ...\n if (TemplateParamLists.size()) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (!Invalid && OldDecl && !OldDecl->isInvalidDecl()) {\n // ...\n if (!Invalid && !Context.hasSameType(OldTD->getUnderlyingType(), NewTD->getUnderlyingType())) {\n // ...\n Diag(NewTD->getLocation(), diag::err_redefinition_different_typedef) << 2 << NewTD->getUnderlyingType() << OldTD->getUnderlyingType();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/libstdcxx_common_type_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_common_type_hack.cpp:31:7: error: type alias redefinition with different types (\'decltype(true ? std::declval<int>() : std::declval<int>())\' (aka \'int &&\') vs \'int\')"} | ["clang/test/SemaCXX/libstdcxx_common_type_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_common_type_hack.cpp:31:7: error: type alias redefinition with different types (\'decltype(true ? std::declval<int>() : std::declval<int>())\' (aka \'int &&\') vs \'int\')"} | ||
Line 2,347: | Line 2,375: | ||
}, | }, | ||
["err_redefinition_extern_inline"]={ | ["err_redefinition_extern_inline"]={ | ||
[ | [i]="err_redefinition_extern_inline", | ||
[ | [h]="redefinition of a \'extern inline\' function %0 is not supported in %select{C99 mode|C++}1", | ||
[ | [g]={{nil,nil,{"redefinition of a \'extern inline\' function A is not supported in ",{"C99 mode","C++"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="redefinition of a \'extern inline\' function (.*?) is not supported in (?:C99 mode|C\\+\\+)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"a7d6e3d0f526",1283874661,"Provide a specific diagnostic when trying to redefine an \"extern","Provide a specific diagnostic when trying to redefine an \"extern\ninline\" function outside of GNU89 mode. Fixes\n<rdar://problem/6880464>.\n\nllvm-svn: 113204"}, | ||
[j]={{ | [j]={{w,15167,"void Sema::CheckForFunctionRedefinition(FunctionDecl *FD, const FunctionDecl *EffectiveDefinition, SkipBodyInfo *SkipBody) {\n // ...\n if (getLangOpts().GNUMode && Definition->isInlineSpecified() && Definition->getStorageClass() == SC_Extern)\n Diag(FD->getLocation(), diag::err_redefinition_extern_inline) << FD << getLangOpts().CPlusPlus;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/redefinition.c"]={"clang/test/Sema/redefinition.c:14:5: error: redefinition of a \'extern inline\' function \'g\' is not supported in C99 mode"} | ["clang/test/Sema/redefinition.c"]={"clang/test/Sema/redefinition.c:14:5: error: redefinition of a \'extern inline\' function \'g\' is not supported in C99 mode"} | ||
Line 2,361: | Line 2,389: | ||
}, | }, | ||
["err_redefinition_of_enumerator"]={ | ["err_redefinition_of_enumerator"]={ | ||
[ | [i]="err_redefinition_of_enumerator", | ||
[ | [h]="redefinition of enumerator %0", | ||
[ | [g]="redefinition of enumerator A", | ||
[ | [b]=k, | ||
[ | [e]="redefinition of enumerator (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{w,19502,"Decl *Sema::ActOnEnumConstant(Scope *S, Decl *theEnumDecl, Decl *lastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val) {\n // ...\n if (PrevDecl) {\n // ...\n if (!isa<TagDecl>(PrevDecl) && isDeclInScope(PrevDecl, CurContext, S)) {\n if (isa<EnumConstantDecl>(PrevDecl))\n Diag(IdLoc, diag::err_redefinition_of_enumerator) << Id;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/enum.c"]={"clang/test/Sema/enum.c:159:5: error: redefinition of enumerator \'PR15071_One\'"} | ["clang/test/Sema/enum.c"]={"clang/test/Sema/enum.c:159:5: error: redefinition of enumerator \'PR15071_One\'"} | ||
Line 2,375: | Line 2,403: | ||
}, | }, | ||
["err_redefinition_of_label"]={ | ["err_redefinition_of_label"]={ | ||
[ | [i]="err_redefinition_of_label", | ||
[ | [h]="redefinition of label %0", | ||
[ | [g]="redefinition of label A", | ||
[ | [b]=k, | ||
[ | [e]="redefinition of label (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{Z,559,"StmtResult Sema::ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt) {\n // If the label was multiply defined, reject it now.\n if (TheDecl->getStmt()) {\n Diag(IdentLoc, diag::err_redefinition_of_label) << TheDecl->getDeclName();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/goto.c"]={"clang/test/Parser/goto.c:26:3: error: redefinition of label \'l\'"} | ["clang/test/Parser/goto.c"]={"clang/test/Parser/goto.c:26:3: error: redefinition of label \'l\'"} | ||
Line 2,389: | Line 2,417: | ||
}, | }, | ||
["err_redefinition_variably_modified_typedef"]={ | ["err_redefinition_variably_modified_typedef"]={ | ||
[ | [i]="err_redefinition_variably_modified_typedef", | ||
[ | [h]="redefinition of %select{typedef|type alias}0 for variably-modified type %1", | ||
[ | [g]={{nil,nil,{"redefinition of ",{Rc,Ic}," for variably-modified type B"}}}, | ||
[ | [b]=k, | ||
[ | [e]="redefinition of (?:typedef|type alias) for variably\\-modified type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"aab36986ab66",1326321228,"Improve the diagnostic when trying to redefine a typedef with a","Improve the diagnostic when trying to redefine a typedef with a\nvariably-modified type.\n\nllvm-svn: 147973"}, | ||
[j]={{ | [j]={{w,2546,"bool Sema::isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New) {\n // ...\n if (NewType->isVariablyModifiedType()) {\n // ...\n Diag(New->getLocation(), diag::err_redefinition_variably_modified_typedef) << Kind << NewType;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/c11-typedef-redef.c"]={"clang/test/Sema/c11-typedef-redef.c:13:15: error: redefinition of typedef for variably-modified type \'int[N]\'","clang/test/Sema/c11-typedef-redef.c:17:16: error: redefinition of typedef for variably-modified type \'vla2\' (aka \'int[N]\')"} | ["clang/test/Sema/c11-typedef-redef.c"]={"clang/test/Sema/c11-typedef-redef.c:13:15: error: redefinition of typedef for variably-modified type \'int[N]\'","clang/test/Sema/c11-typedef-redef.c:17:16: error: redefinition of typedef for variably-modified type \'vla2\' (aka \'int[N]\')"} | ||
Line 2,403: | Line 2,431: | ||
}, | }, | ||
["err_ref_array_type"]={ | ["err_ref_array_type"]={ | ||
[ | [i]="err_ref_array_type", | ||
[h]="cannot refer to declaration with an array type inside block", | |||
[g]="cannot refer to declaration with an array type inside block", | |||
[b]=k, | |||
[e]="cannot refer to declaration with an array type inside block", | [e]="cannot refer to declaration with an array type inside block", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"8971a8653847",1262661036,"Disallow captured arrays in blocks as well. Radar 7438948.","Disallow captured arrays in blocks as well. Radar 7438948.\n\nllvm-svn: 92677"}, | |||
[ | |||
[ | |||
[j]={{n,19231,"// Returns true if the capture by block was successful.\nstatic bool captureInBlock(BlockScopeInfo *BSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool Nested, Sema &S, bool Invalid) {\n // ...\n // Blocks are not allowed to capture arrays, excepting OpenCL.\n // OpenCL v2.0 s1.12.5 (revision 40): arrays are captured by reference\n // (decayed to pointers).\n if (!Invalid && !S.getLangOpts().OpenCL && CaptureType->isArrayType()) {\n if (BuildAndDiagnose) {\n S.Diag(Loc, diag::err_ref_array_type);"}}, | [j]={{n,19231,"// Returns true if the capture by block was successful.\nstatic bool captureInBlock(BlockScopeInfo *BSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool Nested, Sema &S, bool Invalid) {\n // ...\n // Blocks are not allowed to capture arrays, excepting OpenCL.\n // OpenCL v2.0 s1.12.5 (revision 40): arrays are captured by reference\n // (decayed to pointers).\n if (!Invalid && !S.getLangOpts().OpenCL && CaptureType->isArrayType()) {\n if (BuildAndDiagnose) {\n S.Diag(Loc, diag::err_ref_array_type);"}}, | ||
[l]={ | [l]={ | ||
Line 2,417: | Line 2,445: | ||
}, | }, | ||
["err_ref_bad_target"]={ | ["err_ref_bad_target"]={ | ||
[ | [i]="err_ref_bad_target", | ||
[ | [h]={{nil,v,"reference to %select{__device__|__global__|__host__|__host__ __device__}0 %select{function|variable}1 %2 in %select{__device__|__global__|__host__|__host__ __device__}3 function"},{ib,nil,"reference to %select{__device__|__global__|__host__|__host__ __device__}0 function %1 in %select{__device__|__global__|__host__|__host__ __device__}2 function"}}, | ||
[ | [g]={{nil,v,{"reference to ",{Xc,Uc,Tc,Yc}," ",{W,"variable"}," C in ",{Xc,Uc,Tc,Yc}," function"}},{ib,nil,{"reference to ",{Xc,Uc,Tc,Yc}," function B in ",{Xc,Uc,Tc,Yc}," function"}}}, | ||
[ | [b]=k, | ||
[ | [e]="reference to (?:__device__|__global__|__host__|__host__ __device__) (?:function|variable) (.*?) in (?:__device__|__global__|__host__|__host__ __device__) function", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"7277fe8aed6e",1317599380,"CUDA: diagnose invalid calls across targets","CUDA: diagnose invalid calls across targets\n\nllvm-svn: 140978"}, | ||
[j]={{"clang/lib/Sema/SemaCUDA.cpp",835,"bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) {\n // ...\n SemaDiagnosticBuilder(DiagKind, Loc, diag::err_ref_bad_target, Caller, *this) << IdentifyCUDATarget(Callee) << /*function*/ 0 << Callee << IdentifyCUDATarget(Caller);"},{n,19015,"/// Directly mark a variable odr-used. Given a choice, prefer to use\n/// MarkVariableReferenced since it does additional checks and then\n/// calls MarkVarDeclODRUsed.\n/// If the variable must be captured:\n/// - if FunctionScopeIndexToStopAt is null, capture it in the CurContext\n/// - else capture it in the DeclContext that maps to the\n/// *FunctionScopeIndexToStopAt on the FunctionScopeInfo stack.\nstatic void MarkVarDeclODRUsed(ValueDecl *V, SourceLocation Loc, Sema &SemaRef, const unsigned *const FunctionScopeIndexToStopAt = nullptr) {\n // ...\n if (SemaRef.LangOpts.CUDA && Var->hasGlobalStorage()) {\n // ...\n if (VarTarget == Sema::CVT_Host && (UserTarget == Sema::CFT_Device || UserTarget == Sema::CFT_HostDevice || UserTarget == Sema::CFT_Global)) {\n // Diagnose ODR-use of host global variables in device functions.\n // Reference of device global variables in host functions is allowed\n // through shadow variables therefore it is not diagnosed.\n if (SemaRef.LangOpts.CUDAIsDevice) {\n SemaRef.targetDiag(Loc, diag::err_ref_bad_target) << /*host*/ 2 << /*variable*/ 1 << Var << UserTarget;"}}, | [j]={{"clang/lib/Sema/SemaCUDA.cpp",835,"bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) {\n // ...\n SemaDiagnosticBuilder(DiagKind, Loc, diag::err_ref_bad_target, Caller, *this) << IdentifyCUDATarget(Callee) << /*function*/ 0 << Callee << IdentifyCUDATarget(Caller);"},{n,19015,"/// Directly mark a variable odr-used. Given a choice, prefer to use\n/// MarkVariableReferenced since it does additional checks and then\n/// calls MarkVarDeclODRUsed.\n/// If the variable must be captured:\n/// - if FunctionScopeIndexToStopAt is null, capture it in the CurContext\n/// - else capture it in the DeclContext that maps to the\n/// *FunctionScopeIndexToStopAt on the FunctionScopeInfo stack.\nstatic void MarkVarDeclODRUsed(ValueDecl *V, SourceLocation Loc, Sema &SemaRef, const unsigned *const FunctionScopeIndexToStopAt = nullptr) {\n // ...\n if (SemaRef.LangOpts.CUDA && Var->hasGlobalStorage()) {\n // ...\n if (VarTarget == Sema::CVT_Host && (UserTarget == Sema::CFT_Device || UserTarget == Sema::CFT_HostDevice || UserTarget == Sema::CFT_Global)) {\n // Diagnose ODR-use of host global variables in device functions.\n // Reference of device global variables in host functions is allowed\n // through shadow variables therefore it is not diagnosed.\n if (SemaRef.LangOpts.CUDAIsDevice) {\n SemaRef.targetDiag(Loc, diag::err_ref_bad_target) << /*host*/ 2 << /*variable*/ 1 << Var << UserTarget;"}}, | ||
[l]={ | [l]={ | ||
Line 2,431: | Line 2,459: | ||
}, | }, | ||
["err_ref_bad_target_global_initializer"]={ | ["err_ref_bad_target_global_initializer"]={ | ||
[ | [i]="err_ref_bad_target_global_initializer", | ||
[ | [h]="reference to %select{__device__|__global__|__host__|__host__ __device__}0 function %1 in global initializer", | ||
[ | [g]={{nil,nil,{"reference to ",{Xc,Uc,Tc,Yc}," function B in global initializer"}}}, | ||
[ | [b]=k, | ||
[ | [e]="reference to (?:__device__|__global__|__host__|__host__ __device__) function (.*?) in global initializer", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c989c3e78475",1470791361,"[CUDA] Reject calls to __device__ functions from host variable global initializers.","[CUDA] Reject calls to __device__ functions from host variable global initializers.\n\nReviewers: tra\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D23335\n\nllvm-svn: 278196"}, | ||
[j]={{"clang/lib/Sema/SemaCUDA.cpp",639,"void Sema::checkAllowedCUDAInitializer(VarDecl *VD) {\n // ...\n if (IsDeviceOrConstantVar || IsSharedVar) {\n // ...\n } else {\n // ...\n if (InitFn) {\n // ...\n if (InitFnTarget != CFT_Host && InitFnTarget != CFT_HostDevice) {\n Diag(VD->getLocation(), diag::err_ref_bad_target_global_initializer) << InitFnTarget << InitFn;"}}, | [j]={{"clang/lib/Sema/SemaCUDA.cpp",639,"void Sema::checkAllowedCUDAInitializer(VarDecl *VD) {\n // ...\n if (IsDeviceOrConstantVar || IsSharedVar) {\n // ...\n } else {\n // ...\n if (InitFn) {\n // ...\n if (InitFnTarget != CFT_Host && InitFnTarget != CFT_HostDevice) {\n Diag(VD->getLocation(), diag::err_ref_bad_target_global_initializer) << InitFnTarget << InitFn;"}}, | ||
[l]={ | [l]={ | ||
Line 2,445: | Line 2,473: | ||
}, | }, | ||
["err_ref_flexarray_type"]={ | ["err_ref_flexarray_type"]={ | ||
[ | [i]="err_ref_flexarray_type", | ||
[h]="cannot refer to declaration of structure variable with flexible array member inside block", | |||
[g]="cannot refer to declaration of structure variable with flexible array member inside block", | |||
[b]=k, | |||
[e]="cannot refer to declaration of structure variable with flexible array member inside block", | [e]="cannot refer to declaration of structure variable with flexible array member inside block", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"a716a345276c",1357687071,"objectiveC blocks: It is impractical to capture ","objectiveC blocks: It is impractical to capture \nstruct variables with flexiable array members in\nblocks (and lambdas). Issue error instead of\ncrashing in IRGen. // rdar://12655829\n\nllvm-svn: 171912"}, | |||
[ | |||
[ | |||
[j]={{n,19177,"// 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 // Prohibit structs with flexible array members too.\n // We cannot capture what is in the tail end of the struct.\n if (const RecordType *VTTy = Var->getType()->getAs<RecordType>()) {\n if (VTTy->getDecl()->hasFlexibleArrayMember()) {\n if (Diagnose) {\n if (IsBlock)\n S.Diag(Loc, diag::err_ref_flexarray_type);"}}, | [j]={{n,19177,"// 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 // Prohibit structs with flexible array members too.\n // We cannot capture what is in the tail end of the struct.\n if (const RecordType *VTTy = Var->getType()->getAs<RecordType>()) {\n if (VTTy->getDecl()->hasFlexibleArrayMember()) {\n if (Diagnose) {\n if (IsBlock)\n S.Diag(Loc, diag::err_ref_flexarray_type);"}}, | ||
[l]={ | [l]={ | ||
Line 2,459: | Line 2,487: | ||
}, | }, | ||
["err_ref_init_ambiguous"]={ | ["err_ref_init_ambiguous"]={ | ||
[ | [i]="err_ref_init_ambiguous", | ||
[ | [h]="reference initialization of type %0 with initializer of type %1 is ambiguous", | ||
[ | [g]="reference initialization of type A with initializer of type B is ambiguous", | ||
[ | [b]=k, | ||
[ | [e]="reference initialization of type (.*?) with initializer of type (.*?) is ambiguous", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"31481d8b22a9",1255481563,"Handle ambiguity of reference initialization.","Handle ambiguity of reference initialization.\nRemoves a FIXME.\n\nllvm-svn: 84068"}, | ||
[j]={{ | [j]={{Q,9651,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitOverloadFailed:\n case FK_UserConversionOverloadFailed:\n // ...\n case OR_Ambiguous:\n FailedCandidateSet.NoteCandidates(PartialDiagnosticAt(Kind.getLocation(), Failure == FK_UserConversionOverloadFailed ? (S.PDiag(diag::err_typecheck_ambiguous_condition) << OnlyArg->getType() << DestType << Args[0]->getSourceRange()) : (S.PDiag(diag::err_ref_init_ambiguous) << DestType << OnlyArg->getType() << Args[0]->getSourceRange())), S, OCD_AmbiguousCandidates, Args);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/ref-init-ambiguous.cpp"]={"clang/test/SemaCXX/ref-init-ambiguous.cpp:17:13: error: reference initialization of type \'const E2 &\' with initializer of type \'C\' is ambiguous","clang/test/SemaCXX/ref-init-ambiguous.cpp:23:9: error: reference initialization of type \'const E2 &\' with initializer of type \'C\' is ambiguous","clang/test/SemaCXX/ref-init-ambiguous.cpp:25:12: error: reference initialization of type \'const E2 &\' with initializer of type \'C\' is ambiguous"} | ["clang/test/SemaCXX/ref-init-ambiguous.cpp"]={"clang/test/SemaCXX/ref-init-ambiguous.cpp:17:13: error: reference initialization of type \'const E2 &\' with initializer of type \'C\' is ambiguous","clang/test/SemaCXX/ref-init-ambiguous.cpp:23:9: error: reference initialization of type \'const E2 &\' with initializer of type \'C\' is ambiguous","clang/test/SemaCXX/ref-init-ambiguous.cpp:25:12: error: reference initialization of type \'const E2 &\' with initializer of type \'C\' is ambiguous"} | ||
Line 2,473: | Line 2,501: | ||
}, | }, | ||
["err_ref_non_value"]={ | ["err_ref_non_value"]={ | ||
[ | [i]="err_ref_non_value", | ||
[ | [h]="%0 does not refer to a value", | ||
[ | [g]="A does not refer to a value", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) does not refer to a value", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e7488b904ca9",1259686698,"Don\'t automatically assume that an id-expression refers to a","Don\'t automatically assume that an id-expression refers to a\nValueDecl, because that isn\'t always the case in ill-formed\ncode. Diagnose a common mistake (forgetting to provide a template\nargument list for a class template, PR5655) and dyn_cast so that we\nhandle the general problem of referring to a non-value declaration\ngracefully.\n\nllvm-svn: 90239"}, | ||
[j]={{n,3387,"/// Complete semantic analysis for a reference to the given declaration.\nExprResult Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D, NamedDecl *FoundD, const TemplateArgumentListInfo *TemplateArgs, bool AcceptInvalidDecl) {\n // ...\n // Make sure that we\'re referring to a value.\n if (!isa<ValueDecl, UnresolvedUsingIfExistsDecl>(D)) {\n Diag(Loc, diag::err_ref_non_value) << D << SS.getRange();"}}, | [j]={{n,3387,"/// Complete semantic analysis for a reference to the given declaration.\nExprResult Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D, NamedDecl *FoundD, const TemplateArgumentListInfo *TemplateArgs, bool AcceptInvalidDecl) {\n // ...\n // Make sure that we\'re referring to a value.\n if (!isa<ValueDecl, UnresolvedUsingIfExistsDecl>(D)) {\n Diag(Loc, diag::err_ref_non_value) << D << SS.getRange();"}}, | ||
[l]={ | [l]={ | ||
Line 2,487: | Line 2,515: | ||
}, | }, | ||
["err_ref_qualifier_comparison_operator"]={ | ["err_ref_qualifier_comparison_operator"]={ | ||
[ | [i]="err_ref_qualifier_comparison_operator", | ||
[ | [h]="ref-qualifier \'&&\' is not allowed on a defaulted comparison operator", | ||
[ | [g]="ref-qualifier \'&&\' is not allowed on a defaulted comparison operator", | ||
[ | [b]=k, | ||
[ | [e]="ref\\-qualifier \'&&\' is not allowed on a defaulted comparison operator", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{H,8708,"bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, DefaultedComparisonKind DCK) {\n // ...\n if (IsMethod) {\n // ...\n if (MD->getRefQualifier() == RQ_RValue) {\n Diag(MD->getLocation(), diag::err_ref_qualifier_comparison_operator);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/class/class.compare/class.compare.default/p1.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p1.cpp:18:8: error: ref-qualifier \'&&\' is not allowed on a defaulted comparison operator","clang/test/CXX/class/class.compare/class.compare.default/p1.cpp:202:10: error: ref-qualifier \'&&\' is not allowed on a defaulted comparison operator"} | ["clang/test/CXX/class/class.compare/class.compare.default/p1.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p1.cpp:18:8: error: ref-qualifier \'&&\' is not allowed on a defaulted comparison operator","clang/test/CXX/class/class.compare/class.compare.default/p1.cpp:202:10: error: ref-qualifier \'&&\' is not allowed on a defaulted comparison operator"} | ||
Line 2,501: | Line 2,529: | ||
}, | }, | ||
["err_ref_qualifier_constructor"]={ | ["err_ref_qualifier_constructor"]={ | ||
[ | [i]="err_ref_qualifier_constructor", | ||
[ | [h]="ref-qualifier \'%select{&&|&}0\' is not allowed on a constructor", | ||
[ | [g]={{nil,nil,{"ref-qualifier \'",{"&&","&"},"\' is not allowed on a constructor"}}}, | ||
[ | [b]=k, | ||
[ | [e]="ref\\-qualifier \'(?:&&|&)\' is not allowed on a constructor", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"db9d66424425",1296018118,"Rvalue references for *this: ","Rvalue references for *this: \n\n - Add ref-qualifiers to the type system; they are part of the\n canonical type. Print & profile ref-qualifiers\n - Translate the ref-qualifier from the Declarator chunk for\n functions to the function type. \n - Diagnose mis-uses of ref-qualifiers w.r.t. static member\n functions, free functions, constructors, destructors, etc.\n - Add serialization and deserialization of ref-qualifiers.\n\nllvm-svn: 124281"}, | ||
[j]={{ | [j]={{H,10747,"/// CheckConstructorDeclarator - Called by ActOnDeclarator to check\n/// the well-formedness of the constructor declarator @p D with type @p\n/// R. If there are any errors in the declarator, this routine will\n/// emit diagnostics and set the invalid bit to true. In any case, the type\n/// will be updated to reflect a well-formed type for the constructor and\n/// returned.\nQualType Sema::CheckConstructorDeclarator(Declarator &D, QualType R, StorageClass &SC) {\n // ...\n if (FTI.hasRefQualifier()) {\n Diag(FTI.getRefQualifierLoc(), diag::err_ref_qualifier_constructor) << FTI.RefQualifierIsLValueRef << FixItHint::CreateRemoval(FTI.getRefQualifierLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/special/class.ctor/p4-0x.cpp"]={"clang/test/CXX/special/class.ctor/p4-0x.cpp:5:7: error: ref-qualifier \'&\' is not allowed on a constructor","clang/test/CXX/special/class.ctor/p4-0x.cpp:6:10: error: ref-qualifier \'&&\' is not allowed on a constructor"} | ["clang/test/CXX/special/class.ctor/p4-0x.cpp"]={"clang/test/CXX/special/class.ctor/p4-0x.cpp:5:7: error: ref-qualifier \'&\' is not allowed on a constructor","clang/test/CXX/special/class.ctor/p4-0x.cpp:6:10: error: ref-qualifier \'&&\' is not allowed on a constructor"} | ||
Line 2,515: | Line 2,543: | ||
}, | }, | ||
["err_ref_qualifier_destructor"]={ | ["err_ref_qualifier_destructor"]={ | ||
[ | [i]="err_ref_qualifier_destructor", | ||
[ | [h]="ref-qualifier \'%select{&&|&}0\' is not allowed on a destructor", | ||
[ | [g]={{nil,nil,{"ref-qualifier \'",{"&&","&"},"\' is not allowed on a destructor"}}}, | ||
[ | [b]=k, | ||
[ | [e]="ref\\-qualifier \'(?:&&|&)\' is not allowed on a destructor", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"db9d66424425",1296018118,"Rvalue references for *this: ","Rvalue references for *this: \n\n - Add ref-qualifiers to the type system; they are part of the\n canonical type. Print & profile ref-qualifiers\n - Translate the ref-qualifier from the Declarator chunk for\n functions to the function type. \n - Diagnose mis-uses of ref-qualifiers w.r.t. static member\n functions, free functions, constructors, destructors, etc.\n - Add serialization and deserialization of ref-qualifiers.\n\nllvm-svn: 124281"}, | ||
[j]={{ | [j]={{H,10924,"/// 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 (FTI.hasRefQualifier()) {\n Diag(FTI.getRefQualifierLoc(), diag::err_ref_qualifier_destructor) << FTI.RefQualifierIsLValueRef << FixItHint::CreateRemoval(FTI.getRefQualifierLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/special/class.dtor/p2-0x.cpp"]={"clang/test/CXX/special/class.dtor/p2-0x.cpp:5:8: error: ref-qualifier \'&\' is not allowed on a destructor","clang/test/CXX/special/class.dtor/p2-0x.cpp:9:8: error: ref-qualifier \'&&\' is not allowed on a destructor"} | ["clang/test/CXX/special/class.dtor/p2-0x.cpp"]={"clang/test/CXX/special/class.dtor/p2-0x.cpp:5:8: error: ref-qualifier \'&\' is not allowed on a destructor","clang/test/CXX/special/class.dtor/p2-0x.cpp:9:8: error: ref-qualifier \'&&\' is not allowed on a destructor"} | ||
Line 2,529: | Line 2,557: | ||
}, | }, | ||
["err_ref_qualifier_overload"]={ | ["err_ref_qualifier_overload"]={ | ||
[ | [i]="err_ref_qualifier_overload", | ||
[ | [h]="cannot overload a member function %select{without a ref-qualifier|with ref-qualifier \'&\'|with ref-qualifier \'&&\'}0 with a member function %select{without a ref-qualifier|with ref-qualifier \'&\'|with ref-qualifier \'&&\'}1", | ||
[ | [g]={{nil,nil,{"cannot overload a member function ",{"without a ref-qualifier","with ref-qualifier \'&\'","with ref-qualifier \'&&\'"}," with a member function ",{"without a ref-qualifier","with ref-qualifier \'&\'","with ref-qualifier \'&&\'"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot overload a member function (?:without a ref\\-qualifier|with ref\\-qualifier \'&\'|with ref\\-qualifier \'&&\') with a member function (?:without a ref\\-qualifier|with ref\\-qualifier \'&\'|with ref\\-qualifier \'&&\')", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c83f9865a0da",1296076837,"Implement the restriction that a function with a ref-qualifier cannot","Implement the restriction that a function with a ref-qualifier cannot\noverload a function without a ref-qualifier (C++0x\n[over.load]p2). This, apparently, completes the implementation of\nrvalue references for *this.\n\nllvm-svn: 124321"}, | ||
[j]={{ | [j]={{Pb,1356,"bool Sema::IsOverload(FunctionDecl *New, FunctionDecl *Old, bool UseMemberUsingDeclRules, bool ConsiderCudaAttrs, bool ConsiderRequiresClauses) {\n // ...\n if (OldMethod && NewMethod && !OldMethod->isStatic() && !NewMethod->isStatic()) {\n if (OldMethod->getRefQualifier() != NewMethod->getRefQualifier()) {\n if (!UseMemberUsingDeclRules && (OldMethod->getRefQualifier() == RQ_None || NewMethod->getRefQualifier() == RQ_None)) {\n // ...\n Diag(NewMethod->getLocation(), diag::err_ref_qualifier_overload) << NewMethod->getRefQualifier() << OldMethod->getRefQualifier();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/over/over.load/p2-0x.cpp"]={"clang/test/CXX/over/over.load/p2-0x.cpp:15:8: error: cannot overload a member function without a ref-qualifier with a member function with ref-qualifier \'&\'","clang/test/CXX/over/over.load/p2-0x.cpp:21:29: error: cannot overload a member function without a ref-qualifier with a member function with ref-qualifier \'&\'","clang/test/CXX/over/over.load/p2-0x.cpp:24:8: error: cannot overload a member function with ref-qualifier \'&&\' with a member function without a ref-qualifier"} | ["clang/test/CXX/over/over.load/p2-0x.cpp"]={"clang/test/CXX/over/over.load/p2-0x.cpp:15:8: error: cannot overload a member function without a ref-qualifier with a member function with ref-qualifier \'&\'","clang/test/CXX/over/over.load/p2-0x.cpp:21:29: error: cannot overload a member function without a ref-qualifier with a member function with ref-qualifier \'&\'","clang/test/CXX/over/over.load/p2-0x.cpp:24:8: error: cannot overload a member function with ref-qualifier \'&&\' with a member function without a ref-qualifier"} | ||
Line 2,543: | Line 2,571: | ||
}, | }, | ||
["err_ref_vm_type"]={ | ["err_ref_vm_type"]={ | ||
[ | [i]="err_ref_vm_type", | ||
[h]="cannot refer to declaration with a variably modified type inside block", | |||
[g]="cannot refer to declaration with a variably modified type inside block", | |||
[b]=k, | |||
[e]="cannot refer to declaration with a variably modified type inside block", | [e]="cannot refer to declaration with a variably modified type inside block", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"7dafa0d04810",1262660195,"Disallow capturing vlas inside blocks.","Disallow capturing vlas inside blocks.\n\nllvm-svn: 92676"}, | |||
[ | |||
[j]={{n,19165,"// 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 // Prohibit variably-modified types in blocks; they\'re difficult to deal with.\n if (Var->getType()->isVariablyModifiedType() && IsBlock) {\n if (Diagnose) {\n S.Diag(Loc, diag::err_ref_vm_type);"}}, | [j]={{n,19165,"// 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 // Prohibit variably-modified types in blocks; they\'re difficult to deal with.\n if (Var->getType()->isVariablyModifiedType() && IsBlock) {\n if (Diagnose) {\n S.Diag(Loc, diag::err_ref_vm_type);"}}, | ||
[l]={ | [l]={ | ||
Line 2,557: | Line 2,585: | ||
}, | }, | ||
["err_refactor_code_outside_of_function"]={ | ["err_refactor_code_outside_of_function"]={ | ||
[ | [i]={{nil,A,"err_refactor_code_outside_of_function"}}, | ||
[ | [h]={{nil,A,"the selected code is not a part of a function\'s / method\'s body"}}, | ||
[ | [g]={{nil,A,"the selected code is not a part of a function\'s / method\'s body"}}, | ||
[ | [b]=k, | ||
[ | [e]="the selected code is not a part of a function\'s \\/ method\'s body", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,Hc}}, | ||
[ | [c]={"7fe441b20d2d",1508865525,"[refactor] Initial outline of implementation of \"extract function\" refactoring","[refactor] Initial outline of implementation of \"extract function\" refactoring\n\nThis commit adds an initial, skeleton outline of the \"extract function\"\nrefactoring. The extracted function doesn\'t capture variables / rewrite code\nyet, it just basically does a simple copy-paste.\nThe following initiation rules are specified:\n\n- extraction can only be done for executable code in a function/method/block.\n This means that you can\'t extract a global variable initialize into a function\n right now.\n- simple literals and references are not extractable.\n\nThis commit also adds support for full source ranges to clang-refactor\'s test\nmode.\n\nDifferential Revision: https://reviews.llvm.org/D38982\n\nllvm-svn: 316465"}, | ||
[j]={{"clang/lib/Tooling/Refactoring/Extract/Extract.cpp",79,"Expected<ExtractFunction> ExtractFunction::initiate(RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional<std::string> DeclName) {\n // We would like to extract code out of functions/methods/blocks.\n // Prohibit extraction from things like global variable / field\n // initializers and other top-level expressions.\n if (!Code.isInFunctionLikeBodyOfCode())\n return Context.createDiagnosticError(diag::err_refactor_code_outside_of_function);"}} | [j]={{"clang/lib/Tooling/Refactoring/Extract/Extract.cpp",79,"Expected<ExtractFunction> ExtractFunction::initiate(RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional<std::string> DeclName) {\n // We would like to extract code out of functions/methods/blocks.\n // Prohibit extraction from things like global variable / field\n // initializers and other top-level expressions.\n if (!Code.isInFunctionLikeBodyOfCode())\n return Context.createDiagnosticError(diag::err_refactor_code_outside_of_function);"}} | ||
}, | }, | ||
["err_refactor_extract_prohibited_expression"]={ | ["err_refactor_extract_prohibited_expression"]={ | ||
[ | [i]={{nil,A,"err_refactor_extract_prohibited_expression"}}, | ||
[ | [h]={{nil,A,"the selected expression can\'t be extracted"}}, | ||
[ | [g]={{nil,A,"the selected expression can\'t be extracted"}}, | ||
[ | [b]=k, | ||
[ | [e]="the selected expression can\'t be extracted", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,Hc}}, | ||
[ | [c]={"1e416fe23df4",1509495655,"[refactor][extract] prohibit extraction of ObjC property setters","[refactor][extract] prohibit extraction of ObjC property setters\n\nllvm-svn: 317056"}, | ||
[j]={{"clang/lib/Tooling/Refactoring/Extract/Extract.cpp",91,"Expected<ExtractFunction> ExtractFunction::initiate(RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional<std::string> DeclName) {\n // ...\n if (Code.size() == 1) {\n // ...\n // Property setters can\'t be extracted.\n if (const auto *PRE = dyn_cast<ObjCPropertyRefExpr>(Code[0])) {\n if (!PRE->isMessagingGetter())\n return Context.createDiagnosticError(diag::err_refactor_extract_prohibited_expression);"}} | [j]={{"clang/lib/Tooling/Refactoring/Extract/Extract.cpp",91,"Expected<ExtractFunction> ExtractFunction::initiate(RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional<std::string> DeclName) {\n // ...\n if (Code.size() == 1) {\n // ...\n // Property setters can\'t be extracted.\n if (const auto *PRE = dyn_cast<ObjCPropertyRefExpr>(Code[0])) {\n if (!PRE->isMessagingGetter())\n return Context.createDiagnosticError(diag::err_refactor_extract_prohibited_expression);"}} | ||
}, | }, | ||
["err_refactor_extract_simple_expression"]={ | ["err_refactor_extract_simple_expression"]={ | ||
[ | [i]={{nil,A,"err_refactor_extract_simple_expression"}}, | ||
[ | [h]={{nil,A,"the selected expression is too simple to extract"}}, | ||
[ | [g]={{nil,A,"the selected expression is too simple to extract"}}, | ||
[ | [b]=k, | ||
[ | [e]="the selected expression is too simple to extract", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,Hc}}, | ||
[ | [c]={"7fe441b20d2d",1508865525,"[refactor] Initial outline of implementation of \"extract function\" refactoring","[refactor] Initial outline of implementation of \"extract function\" refactoring\n\nThis commit adds an initial, skeleton outline of the \"extract function\"\nrefactoring. The extracted function doesn\'t capture variables / rewrite code\nyet, it just basically does a simple copy-paste.\nThe following initiation rules are specified:\n\n- extraction can only be done for executable code in a function/method/block.\n This means that you can\'t extract a global variable initialize into a function\n right now.\n- simple literals and references are not extractable.\n\nThis commit also adds support for full source ranges to clang-refactor\'s test\nmode.\n\nDifferential Revision: https://reviews.llvm.org/D38982\n\nllvm-svn: 316465"}, | ||
[j]={{"clang/lib/Tooling/Refactoring/Extract/Extract.cpp",85,"Expected<ExtractFunction> ExtractFunction::initiate(RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional<std::string> DeclName) {\n // ...\n if (Code.size() == 1) {\n // Avoid extraction of simple literals and references.\n if (isSimpleExpression(dyn_cast<Expr>(Code[0])))\n return Context.createDiagnosticError(diag::err_refactor_extract_simple_expression);"}} | [j]={{"clang/lib/Tooling/Refactoring/Extract/Extract.cpp",85,"Expected<ExtractFunction> ExtractFunction::initiate(RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional<std::string> DeclName) {\n // ...\n if (Code.size() == 1) {\n // Avoid extraction of simple literals and references.\n if (isSimpleExpression(dyn_cast<Expr>(Code[0])))\n return Context.createDiagnosticError(diag::err_refactor_extract_simple_expression);"}} | ||
}, | }, | ||
["err_refactor_no_selection"]={ | ["err_refactor_no_selection"]={ | ||
[ | [i]={{nil,A,"err_refactor_no_selection"}}, | ||
[ | [h]={{nil,A,"refactoring action can\'t be initiated without a selection"}}, | ||
[ | [g]={{nil,A,"refactoring action can\'t be initiated without a selection"}}, | ||
[ | [b]=k, | ||
[ | [e]="refactoring action can\'t be initiated without a selection", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,Hc}}, | ||
[ | [c]={"f5ca27cc3785",1508178506,"[refactor] allow the use of refactoring diagnostics","[refactor] allow the use of refactoring diagnostics\n\nThis commit allows the refactoring library to use its own set of\nrefactoring-specific diagnostics to reports things like initiation errors.\n\nDifferential Revision: https://reviews.llvm.org/D38772\n\nllvm-svn: 315924"}, | ||
[j]={{"clang/unittests/Tooling/RefactoringActionRulesTest.cpp",145,"TEST_F(RefactoringActionRulesTest, MyFirstRefactoringRule) {\n // ...\n // When one of the requirements is not satisfied, invoke should return a\n // valid error.\n {\n // ...\n EXPECT_EQ(DiagID, diag::err_refactor_no_selection);"}} | [j]={{"clang/unittests/Tooling/RefactoringActionRulesTest.cpp",145,"TEST_F(RefactoringActionRulesTest, MyFirstRefactoringRule) {\n // ...\n // When one of the requirements is not satisfied, invoke should return a\n // valid error.\n {\n // ...\n EXPECT_EQ(DiagID, diag::err_refactor_no_selection);"}} | ||
}, | }, | ||
["err_refactor_selection_invalid_ast"]={ | ["err_refactor_selection_invalid_ast"]={ | ||
[ | [i]={{nil,A,"err_refactor_selection_invalid_ast"}}, | ||
[ | [h]={{nil,A,"the provided selection does not overlap with the AST nodes of interest"}}, | ||
[ | [g]={{nil,A,"the provided selection does not overlap with the AST nodes of interest"}}, | ||
[ | [b]=k, | ||
[ | [e]="the provided selection does not overlap with the AST nodes of interest", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,Hc}}, | ||
[ | [c]={"7fe441b20d2d",1508865525,"[refactor] Initial outline of implementation of \"extract function\" refactoring","[refactor] Initial outline of implementation of \"extract function\" refactoring\n\nThis commit adds an initial, skeleton outline of the \"extract function\"\nrefactoring. The extracted function doesn\'t capture variables / rewrite code\nyet, it just basically does a simple copy-paste.\nThe following initiation rules are specified:\n\n- extraction can only be done for executable code in a function/method/block.\n This means that you can\'t extract a global variable initialize into a function\n right now.\n- simple literals and references are not extractable.\n\nThis commit also adds support for full source ranges to clang-refactor\'s test\nmode.\n\nDifferential Revision: https://reviews.llvm.org/D38982\n\nllvm-svn: 316465"}, | ||
[j]={{"clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp",29,"Expected<SelectedASTNode> ASTSelectionRequirement::evaluate(RefactoringRuleContext &Context) const {\n // ...\n if (!Selection)\n return Context.createDiagnosticError(Range->getBegin(), diag::err_refactor_selection_invalid_ast);"},{"clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp",48,"Expected<CodeRangeASTSelection> CodeRangeASTSelectionRequirement::evaluate(RefactoringRuleContext &Context) const {\n // ...\n if (!CodeRange)\n return Context.createDiagnosticError(Context.getSelectionRange().getBegin(), diag::err_refactor_selection_invalid_ast);"}} | [j]={{"clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp",29,"Expected<SelectedASTNode> ASTSelectionRequirement::evaluate(RefactoringRuleContext &Context) const {\n // ...\n if (!Selection)\n return Context.createDiagnosticError(Range->getBegin(), diag::err_refactor_selection_invalid_ast);"},{"clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp",48,"Expected<CodeRangeASTSelection> CodeRangeASTSelectionRequirement::evaluate(RefactoringRuleContext &Context) const {\n // ...\n if (!CodeRange)\n return Context.createDiagnosticError(Context.getSelectionRange().getBegin(), diag::err_refactor_selection_invalid_ast);"}} | ||
}, | }, | ||
["err_refactor_selection_no_symbol"]={ | ["err_refactor_selection_no_symbol"]={ | ||
[ | [i]={{nil,A,"err_refactor_selection_no_symbol"}}, | ||
[ | [h]={{nil,A,"there is no symbol at the given location"}}, | ||
[ | [g]={{nil,A,"there is no symbol at the given location"}}, | ||
[ | [b]=k, | ||
[ | [e]="there is no symbol at the given location", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,Hc}}, | ||
[ | [c]={"f5ca27cc3785",1508178506,"[refactor] allow the use of refactoring diagnostics","[refactor] allow the use of refactoring diagnostics\n\nThis commit allows the refactoring library to use its own set of\nrefactoring-specific diagnostics to reports things like initiation errors.\n\nDifferential Revision: https://reviews.llvm.org/D38772\n\nllvm-svn: 315924"}, | ||
[j]={{"clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp",73,"Expected<RenameOccurrences> RenameOccurrences::initiate(RefactoringRuleContext &Context, SourceRange SelectionRange, std::string NewName) {\n // ...\n if (!ND)\n return Context.createDiagnosticError(SelectionRange.getBegin(), diag::err_refactor_selection_no_symbol);"}} | [j]={{"clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp",73,"Expected<RenameOccurrences> RenameOccurrences::initiate(RefactoringRuleContext &Context, SourceRange SelectionRange, std::string NewName) {\n // ...\n if (!ND)\n return Context.createDiagnosticError(SelectionRange.getBegin(), diag::err_refactor_selection_no_symbol);"}} | ||
}, | }, | ||
["err_reference_bind_drops_quals"]={ | ["err_reference_bind_drops_quals"]={ | ||
[ | [i]="err_reference_bind_drops_quals", | ||
[ | [h]={{nil,p,"binding reference %diff{of type $ to value of type $|to value}0,1 %select{drops %3 qualifier%plural{1:|2:|4:|:s}4|changes address space|not permitted due to incompatible qualifiers}2"},{D,D,"binding reference %diff{of type $ to value of type $|to value}0,1 %select{drops %3 qualifier%plural{1:|2:|4:|:s}4|changes address space}2"},{E,nil,"binding value %diff{of type $ to reference to type $|to reference}0,1 drops %select{<<ERROR>>|\'const\'|\'restrict\'|\'const\' and \'restrict\'|\'volatile\'|\'const\' and \'volatile\'|\'restrict\' and \'volatile\'|\'const\', \'restrict\', and \'volatile\'}2 qualifier%plural{1:|2:|4:|:s}2"}}, | ||
[ | [g]={{nil,p,{"binding reference ",{"of type A to value of type B","to value"}," ",{{"drops D qualifier",{a,a,a,kc}},"changes address space","not permitted due to incompatible qualifiers"}}},{D,D,{"binding reference ",{"of type A to value of type B","to value"}," ",{{"drops D qualifier",{a,a,a,kc}},"changes address space"}}},{E,nil,{"binding value ",{"of type A to reference to type B","to reference"}," drops ",{"\'const\'","\'restrict\'","\'const\' and \'restrict\'","\'volatile\'","\'const\' and \'volatile\'","\'restrict\' and \'volatile\'","\'const\', \'restrict\', and \'volatile\'"}," qualifier",{a,a,a,kc}}}}, | ||
[ | [b]=k, | ||
[ | [e]="binding reference (?:of type (.*?) to value of type (.*?)|to value) (?:drops (.*?) qualifier(?:|||s)|changes address space|not permitted due to incompatible qualifiers)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={rd,1260399737,pd,ld}, | ||
[j]={{ | [j]={{Q,9756,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitDropsQualifiers: {\n // ...\n if (!NonRefType.getQualifiers().isAddressSpaceSupersetOf(SourceType.getQualifiers()))\n S.Diag(Kind.getLocation(), diag::err_reference_bind_drops_quals) << NonRefType << SourceType << 1 /*addr space*/"},{Q,9760,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitDropsQualifiers: {\n // ...\n if (!NonRefType.getQualifiers().isAddressSpaceSupersetOf(SourceType.getQualifiers()))\n // ...\n else if (DroppedQualifiers.hasQualifiers())\n S.Diag(Kind.getLocation(), diag::err_reference_bind_drops_quals) << NonRefType << SourceType << 0 /*cv quals*/"},{Q,9767,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitDropsQualifiers: {\n // ...\n if (!NonRefType.getQualifiers().isAddressSpaceSupersetOf(SourceType.getQualifiers()))\n // ...\n else if (DroppedQualifiers.hasQualifiers())\n // ...\n else\n // ...\n S.Diag(Kind.getLocation(), diag::err_reference_bind_drops_quals) << NonRefType << SourceType << 2 /*incompatible quals*/"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/builtins-arm.cpp"]={"clang/test/SemaCXX/builtins-arm.cpp:5:27: error: binding reference of type \'__builtin_va_list\' to value of type \'const __builtin_va_list\' drops \'const\' qualifier"} | ["clang/test/SemaCXX/builtins-arm.cpp"]={"clang/test/SemaCXX/builtins-arm.cpp:5:27: error: binding reference of type \'__builtin_va_list\' to value of type \'const __builtin_va_list\' drops \'const\' qualifier"} | ||
Line 2,637: | Line 2,665: | ||
}, | }, | ||
["err_reference_bind_failed"]={ | ["err_reference_bind_failed"]={ | ||
[ | [i]="err_reference_bind_failed", | ||
[ | [h]={{nil,D,"reference %diff{to %select{type|incomplete type}1 $ could not bind to an %select{rvalue|lvalue}2 of type $|could not bind to %select{rvalue|lvalue}2 of incompatible type}0,3"},{E,nil,"reference %diff{to type $ could not bind to an %select{rvalue|lvalue}1 of type $|could not bind to %select{rvalue|lvalue}1 of incompatible type}0,2"}}, | ||
[ | [g]={{nil,D,{"reference ",{{"to ",{"type","incomplete type"}," A could not bind to an ",{"rvalue",id}," of type D"},{"could not bind to ",{"rvalue",id}," of incompatible type"}}}},{E,nil,{"reference ",{{"to type A could not bind to an ",{"rvalue",id}," of type C"},{"could not bind to ",{"rvalue",id}," of incompatible type"}}}}}, | ||
[ | [b]=k, | ||
[ | [e]="reference (?:to (?:type|incomplete type) (.*?) could not bind to an (?:rvalue|lvalue) of type (.*?)|could not bind to (?:rvalue|lvalue) of incompatible type)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={rd,1260399737,pd,ld}, | ||
[j]={{ | [j]={{Q,9774,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitFailed:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_failed) << DestType.getNonReferenceType() << DestType.getNonReferenceType()->isIncompleteType() << OnlyArg->isLValue() << OnlyArg->getType() << Args[0]->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/expr/p13.cpp"]={"clang/test/CXX/expr/p13.cpp:28:12: error: reference to type \'const A\' (aka \'void (*const)() noexcept\') could not bind to an rvalue of type \'void (*)()\'"} | ["clang/test/CXX/expr/p13.cpp"]={"clang/test/CXX/expr/p13.cpp:28:12: error: reference to type \'const A\' (aka \'void (*const)() noexcept\') could not bind to an rvalue of type \'void (*)()\'"} | ||
Line 2,651: | Line 2,679: | ||
}, | }, | ||
["err_reference_bind_init_list"]={ | ["err_reference_bind_init_list"]={ | ||
[ | [i]="err_reference_bind_init_list", | ||
[ | [h]="reference to type %0 cannot bind to an initializer list", | ||
[ | [g]="reference to type A cannot bind to an initializer list", | ||
[ | [b]=k, | ||
[ | [e]="reference to type (.*?) cannot bind to an initializer list", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"51e77d5ab0a0",1260467815,"Move initialization via initializer list over to InitializationSequences.","Move initialization via initializer list over to InitializationSequences.\n\nllvm-svn: 91050"}, | ||
[j]={{ | [j]={{Q,9828,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceBindingToInitList:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_init_list) << DestType.getNonReferenceType() << Args[0]->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/cxx0x-initializer-references.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-references.cpp:141:16: error: reference to type \'const int\' cannot bind to an initializer list"} | ["clang/test/SemaCXX/cxx0x-initializer-references.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-references.cpp:141:16: error: reference to type \'const int\' cannot bind to an initializer list"} | ||
Line 2,665: | Line 2,693: | ||
}, | }, | ||
["err_reference_bind_temporary_addrspace"]={ | ["err_reference_bind_temporary_addrspace"]={ | ||
[ | [i]={{nil,D,"err_reference_bind_temporary_addrspace"}}, | ||
[ | [h]={{nil,D,"reference of type %0 cannot bind to a temporary object because of address space mismatch"}}, | ||
[ | [g]={{nil,D,"reference of type A cannot bind to a temporary object because of address space mismatch"}}, | ||
[ | [b]=k, | ||
[ | [e]="reference of type (.*?) cannot bind to a temporary object because of address space mismatch", | ||
[ | [f]=a, | ||
[ | [d]={{nil,D,m}}, | ||
[ | [c]={"5145b1e4421a",1559743414,"[Sema] Prevent binding incompatible addr space ref to temporaries","[Sema] Prevent binding incompatible addr space ref to temporaries\n\nReferences to arbitrary address spaces can\'t always be bound to\ntemporaries. This change extends the reference binding logic to\ncheck that the address space of a temporary can be implicitly\nconverted to the address space in a reference when temporary\nmaterialization is performed.\n\nDifferential Revision: https://reviews.llvm.org/D61318\n\nllvm-svn: 362604"}, | ||
[j]={{ | [j]={{Q,9744,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceAddrspaceMismatchTemporary:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_temporary_addrspace) << DestType << Args[0]->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaOpenCLCXX/address-space-references.clcpp"]={"clang/test/SemaOpenCLCXX/address-space-references.clcpp:4:10: error: reference of type \'const __global int &\' cannot bind to a temporary object because of address space mismatch"} | ["clang/test/SemaOpenCLCXX/address-space-references.clcpp"]={"clang/test/SemaOpenCLCXX/address-space-references.clcpp:4:10: error: reference of type \'const __global int &\' cannot bind to a temporary object because of address space mismatch"} | ||
Line 2,679: | Line 2,707: | ||
}, | }, | ||
["err_reference_bind_to_bitfield"]={ | ["err_reference_bind_to_bitfield"]={ | ||
[ | [i]="err_reference_bind_to_bitfield", | ||
[ | [h]="%select{non-const|volatile}0 reference cannot bind to bit-field%select{| %1}2", | ||
[ | [g]={{nil,nil,{{"non-const",Wc}," reference cannot bind to bit-field",{a,Ob}}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:non\\-const|volatile) reference cannot bind to bit\\-field(?:| (.*?))", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={rd,1260399737,pd,ld}, | ||
[j]={{ | [j]={{Q,9716,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_NonConstLValueReferenceBindingToBitfield: {\n // ...\n S.Diag(Kind.getLocation(), diag::err_reference_bind_to_bitfield) << DestType.isVolatileQualified() << (BitField ? BitField->getDeclName() : DeclarationName()) << (BitField != nullptr) << Args[0]->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjCXX/references.mm"]={"clang/test/SemaObjCXX/references.mm:74:13: error: non-const reference cannot bind to bit-field \'bf\'"} | ["clang/test/SemaObjCXX/references.mm"]={"clang/test/SemaObjCXX/references.mm:74:13: error: non-const reference cannot bind to bit-field \'bf\'"} | ||
Line 2,693: | Line 2,721: | ||
}, | }, | ||
["err_reference_bind_to_matrix_element"]={ | ["err_reference_bind_to_matrix_element"]={ | ||
[ | [i]={{nil,q,"err_reference_bind_to_matrix_element"}}, | ||
[ | [h]={{nil,q,"%select{non-const|volatile}0 reference cannot bind to matrix element"}}, | ||
[ | [g]={{nil,q,{{"non-const",Wc}," reference cannot bind to matrix element"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:non\\-const|volatile) reference cannot bind to matrix element", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{ | [j]={{Q,9733,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_NonConstLValueReferenceBindingToMatrixElement:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_to_matrix_element) << DestType.isVolatileQualified() << Args[0]->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/matrix-type-operators.cpp"]={"clang/test/SemaCXX/matrix-type-operators.cpp:236:10: error: non-const reference cannot bind to matrix element"} | ["clang/test/SemaCXX/matrix-type-operators.cpp"]={"clang/test/SemaCXX/matrix-type-operators.cpp:236:10: error: non-const reference cannot bind to matrix element"} | ||
Line 2,707: | Line 2,735: | ||
}, | }, | ||
["err_reference_bind_to_vector_element"]={ | ["err_reference_bind_to_vector_element"]={ | ||
[ | [i]="err_reference_bind_to_vector_element", | ||
[ | [h]="%select{non-const|volatile}0 reference cannot bind to vector element", | ||
[ | [g]={{nil,nil,{{"non-const",Wc}," reference cannot bind to vector element"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:non\\-const|volatile) reference cannot bind to vector element", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"8abde4b447db",1264958329,"Diagnose binding a non-const reference to a vector element.","Diagnose binding a non-const reference to a vector element.\n\nllvm-svn: 94963"}, | ||
[j]={{ | [j]={{Q,9727,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_NonConstLValueReferenceBindingToVectorElement:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_to_vector_element) << DestType.isVolatileQualified() << Args[0]->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/references.cpp"]={"clang/test/SemaCXX/references.cpp:149:8: error: non-const reference cannot bind to vector element","clang/test/SemaCXX/references.cpp:153:8: error: non-const reference cannot bind to vector element"} | ["clang/test/SemaCXX/references.cpp"]={"clang/test/SemaCXX/references.cpp:149:8: error: non-const reference cannot bind to vector element","clang/test/SemaCXX/references.cpp:153:8: error: non-const reference cannot bind to vector element"} | ||
Line 2,721: | Line 2,749: | ||
}, | }, | ||
["err_reference_capture_with_reference_default"]={ | ["err_reference_capture_with_reference_default"]={ | ||
[ | [i]="err_reference_capture_with_reference_default", | ||
[h]="\'&\' cannot precede a capture when the capture default is \'&\'", | |||
[g]="\'&\' cannot precede a capture when the capture default is \'&\'", | |||
[b]=k, | |||
[e]="\'&\' cannot precede a capture when the capture default is \'&\'", | [e]="\'&\' cannot precede a capture when the capture default is \'&\'", | ||
[f]= | [f]=a, | ||
[ | [d]="Lambda Issue", | ||
[c]={"44803326d4e8",1325898497,"Lambdas: semantic analysis of explicit captures.","Lambdas: semantic analysis of explicit captures.\n\nThis patch (and some of my other commits related to lambdas) is heavily based off of John Freeman\'s work-in-progress patches.\n\nllvm-svn: 147706"}, | |||
[j]={{kd,1117,"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 // ...\n } else {\n // ...\n // C++11 [expr.prim.lambda]p8:\n // If a lambda-capture includes a capture-default that is &, the\n // identifiers in the lambda-capture shall not be preceded by &.\n // If a lambda-capture includes a capture-default that is =, [...]\n // each identifier it contains shall be preceded by &.\n if (C->Kind == LCK_ByRef && Intro.Default == LCD_ByRef) {\n Diag(C->Loc, diag::err_reference_capture_with_reference_default) << FixItHint::CreateRemoval(SourceRange(getLocForEndOfToken(PrevCaptureLoc), C->Loc));"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp:13:16: error: \'&\' cannot precede a capture when the capture default is \'&\'","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp:25:14: error: \'&\' cannot precede a capture when the capture default is \'&\'"} | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp:13:16: error: \'&\' cannot precede a capture when the capture default is \'&\'","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp:25:14: error: \'&\' cannot precede a capture when the capture default is \'&\'"} | ||
Line 2,735: | Line 2,763: | ||
}, | }, | ||
["err_reference_has_multiple_inits"]={ | ["err_reference_has_multiple_inits"]={ | ||
[ | [i]="err_reference_has_multiple_inits", | ||
[h]="reference cannot be initialized with multiple values", | |||
[g]="reference cannot be initialized with multiple values", | |||
[b]=k, | |||
[e]="reference cannot be initialized with multiple values", | [e]="reference cannot be initialized with multiple values", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={rd,1260399737,pd,ld}, | |||
[j]={{Q,9569,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_TooManyInitsForReference:\n // FIXME: Customize for the initialized entity?\n if (Args.empty()) {\n // ...\n } else // FIXME: diagnostic below could be better!\n S.Diag(Kind.getLocation(), diag::err_reference_has_multiple_inits) << SourceRange(Args.front()->getBeginLoc(), Args.back()->getEndLoc());"}} | |||
[ | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_reference_pipe_type"]={ | ["err_reference_pipe_type"]={ | ||
[ | [i]="err_reference_pipe_type", | ||
[h]="pipes packet types cannot be of reference type", | |||
[g]="pipes packet types cannot be of reference type", | |||
[b]=k, | |||
[e]="pipes packet types cannot be of reference type", | [e]="pipes packet types cannot be of reference type", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"9c14e282112c",1452343997,"[OpenCL] Pipe type support","[OpenCL] Pipe type support\n\nSummary:\nSupport for OpenCL 2.0 pipe type.\nThis is a bug-fix version for bader\'s patch reviews.llvm.org/D14441\n\n\nReviewers: pekka.jaaskelainen, Anastasia\n\nSubscribers: bader, Anastasia, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D15603\n\nllvm-svn: 257254"}, | |||
[j]={{w,10746,"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 // OpenCL 2.0 pipe restrictions forbids pipe packet types to be non-value\n // types.\n if (getLangOpts().getOpenCLCompatibleVersion() >= 200) {\n if (const PipeType *PipeTy = PT->getAs<PipeType>()) {\n // ...\n if (ElemTy->isReferenceType() || ElemTy->isPointerType()) {\n Diag(Param->getTypeSpecStartLoc(), diag::err_reference_pipe_type);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl"]={"clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl:22:17: error: pipes packet types cannot be of reference type"} | ["clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl"]={"clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl:22:17: error: pipes packet types cannot be of reference type"} | ||
Line 2,760: | Line 2,788: | ||
}, | }, | ||
["err_reference_to_function_with_unsatisfied_constraints"]={ | ["err_reference_to_function_with_unsatisfied_constraints"]={ | ||
[ | [i]={{nil,p,"err_reference_to_function_with_unsatisfied_constraints"}}, | ||
[ | [h]={{nil,p,"invalid reference to function %0: constraints not satisfied"}}, | ||
[ | [g]={{nil,p,"invalid reference to function A: constraints not satisfied"}}, | ||
[ | [b]=k, | ||
[ | [e]="invalid reference to function (.*?)\\: constraints not satisfied", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.","Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on VectorTypes that acts as a\n\'select\' in C++ mode. This patch implements the support. Types are\nconverted as closely to GCC\'s behavior as possible, though in a few\nplaces consistency with our existing vector type support was preferred.\n\nNote that this implementation is different from the OpenCL version in a\nnumber of ways, so it unfortunately required a different implementation.\n\nFirst, the SEMA rules and promotion rules are significantly different.\n\nSecondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in\nthe range 0- VectorSize, for each element). In OpenCL, the condition is\nCOND[i] < 0 ? LHS[i]: RHS[i].\n\nIn the process of implementing this, it was also required to make the\nexpression COND ? LHS : RHS type dependent if COND is type dependent,\nsince the type is now dependent on the condition. For example:\n\n T ? 1 : 2;\n\nIs not typically type dependent, since the result can be deduced from\nthe operands. HOWEVER, if T is a VectorType now, it could change this\nto a \'select\' (basically a swizzle with a non-constant mask) with the 1\nand 2 being promoted to vectors themselves.\n\nWhile this is a change, it is NOT a standards incompatible change. Based\non my (and D. Gregor\'s, at the time of writing the code) reading of the\nstandard, the expression is supposed to be type dependent if ANY\nsub-expression is type dependent.\n\nDifferential Revision: https://reviews.llvm.org/D71463"}, | ||
[j]={{n,297,"/// 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 (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n // [expr.prim.id]p4\n // A program that refers explicitly or implicitly to a function with a\n // trailing requires-clause whose constraint-expression is not satisfied,\n // other than to declare it, is ill-formed. [...]\n //\n // See if this is a function with constraints that need to be satisfied.\n // Check this before deducing the return type, as it might instantiate the\n // definition.\n if (!SkipTrailingRequiresClause && FD->getTrailingRequiresClause()) {\n // ...\n if (!Satisfaction.IsSatisfied) {\n Diag(Loc, diag::err_reference_to_function_with_unsatisfied_constraints) << D;"}}, | [j]={{n,297,"/// 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 (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n // [expr.prim.id]p4\n // A program that refers explicitly or implicitly to a function with a\n // trailing requires-clause whose constraint-expression is not satisfied,\n // other than to declare it, is ill-formed. [...]\n //\n // See if this is a function with constraints that need to be satisfied.\n // Check this before deducing the return type, as it might instantiate the\n // definition.\n if (!SkipTrailingRequiresClause && FD->getTrailingRequiresClause()) {\n // ...\n if (!Satisfaction.IsSatisfied) {\n Diag(Loc, diag::err_reference_to_function_with_unsatisfied_constraints) << D;"}}, | ||
[l]={ | [l]={ | ||
Line 2,774: | Line 2,802: | ||
}, | }, | ||
["err_reference_to_local_in_enclosing_context"]={ | ["err_reference_to_local_in_enclosing_context"]={ | ||
[ | [i]="err_reference_to_local_in_enclosing_context", | ||
[ | [h]="reference to local %select{variable|binding}1 %0 declared in enclosing %select{%3|block literal|lambda expression|context}2", | ||
[ | [g]={{nil,nil,{"reference to local ",{"variable","binding"}," A declared in enclosing ",{"D","block literal","lambda expression","context"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="reference to local (?:variable|binding) (.*?) declared in enclosing (?:(.*?)|block literal|lambda expression|context)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"1879f1069b60",1471228463,"Disable lambda-capture of decomposition declaration bindings for now, until CWG","Disable lambda-capture of decomposition declaration bindings for now, until CWG\nagrees on how they\'re supposed to work.\n\nllvm-svn: 278648"}, | ||
[j]={{n,19081,"void diagnoseUncapturableValueReferenceOrBinding(Sema &S, SourceLocation loc, ValueDecl *var) {\n // ...\n S.Diag(loc, diag::err_reference_to_local_in_enclosing_context) << var << ValueKind << ContextKind << VarDC;"}}, | [j]={{n,19081,"void diagnoseUncapturableValueReferenceOrBinding(Sema &S, SourceLocation loc, ValueDecl *var) {\n // ...\n S.Diag(loc, diag::err_reference_to_local_in_enclosing_context) << var << ValueKind << ContextKind << VarDC;"}}, | ||
[l]={ | [l]={ | ||
Line 2,788: | Line 2,816: | ||
}, | }, | ||
["err_reference_to_void"]={ | ["err_reference_to_void"]={ | ||
[ | [i]="err_reference_to_void", | ||
[h]="cannot form a reference to \'void\'", | |||
[g]="cannot form a reference to \'void\'", | |||
[b]=k, | |||
[e]="cannot form a reference to \'void\'", | [e]="cannot form a reference to \'void\'", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={u,1237025389,s,t}, | |||
[j]={{R,2270,"/// 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 // C++ [dcl.ref]p1:\n // A declarator that specifies the type \"reference to cv void\"\n // is ill-formed.\n if (T->isVoidType()) {\n Diag(Loc, diag::err_reference_to_void);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/metafun-apply.cpp"]={"clang/test/SemaTemplate/metafun-apply.cpp:13:14: error: cannot form a reference to \'void\'"} | ["clang/test/SemaTemplate/metafun-apply.cpp"]={"clang/test/SemaTemplate/metafun-apply.cpp:13:14: error: cannot form a reference to \'void\'"} | ||
Line 2,802: | Line 2,830: | ||
}, | }, | ||
["err_reference_var_requires_init"]={ | ["err_reference_var_requires_init"]={ | ||
[ | [i]="err_reference_var_requires_init", | ||
[ | [h]="declaration of reference variable %0 requires an initializer", | ||
[ | [g]="declaration of reference variable A requires an initializer", | ||
[ | [b]=k, | ||
[ | [e]="declaration of reference variable (.*?) requires an initializer", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{w,13842,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n // Provide a specific diagnostic for uninitialized variable\n // definitions with reference type.\n if (Type->isReferenceType()) {\n Diag(Var->getLocation(), diag::err_reference_var_requires_init) << Var << SourceRange(Var->getLocation(), Var->getLocation());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/instantiate-member-template.cpp"]={"clang/test/SemaTemplate/instantiate-member-template.cpp:72:21: error: declaration of reference variable \'value\' requires an initializer"} | ["clang/test/SemaTemplate/instantiate-member-template.cpp"]={"clang/test/SemaTemplate/instantiate-member-template.cpp:72:21: error: declaration of reference variable \'value\' requires an initializer"} | ||
Line 2,816: | Line 2,844: | ||
}, | }, | ||
["err_reference_without_init"]={ | ["err_reference_without_init"]={ | ||
[ | [i]="err_reference_without_init", | ||
[ | [h]="reference to type %0 requires an initializer", | ||
[ | [g]="reference to type A requires an initializer", | ||
[ | [b]=k, | ||
[ | [e]="reference to type (.*?) requires an initializer", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"7ae2d7758f3f",1264929171,"Rework base and member initialization in constructors, with several","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"}, | ||
[j]={{ | [j]={{Q,9431,"/// Somewhere within T there is an uninitialized reference subobject.\n/// Dig it out and diagnose it.\nstatic bool DiagnoseUninitializedReference(Sema &S, SourceLocation Loc, QualType T) {\n if (T->isReferenceType()) {\n S.Diag(Loc, diag::err_reference_without_init) << T.getNonReferenceType();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjCXX/property-synthesis-error.mm"]={"clang/test/SemaObjCXX/property-synthesis-error.mm:94:47: error: reference to type \'int\' requires an initializer"} | ["clang/test/SemaObjCXX/property-synthesis-error.mm"]={"clang/test/SemaObjCXX/property-synthesis-error.mm:94:47: error: reference to type \'int\' requires an initializer"} | ||
Line 2,830: | Line 2,858: | ||
}, | }, | ||
["err_regparm_mismatch"]={ | ["err_regparm_mismatch"]={ | ||
[ | [i]="err_regparm_mismatch", | ||
[ | [h]="function declared with regparm(%0) attribute was previously declared %plural{0:without the regparm|:with the regparm(%1)}1 attribute", | ||
[ | [g]={{nil,nil,{"function declared with regparm(A) attribute was previously declared ",{"without the regparm","with the regparm(B)"}," attribute"}}}, | ||
[ | [b]=k, | ||
[ | [e]="function declared with regparm\\((.*?)\\) attribute was previously declared (?:without the regparm|with the regparm\\((.*?)\\)) attribute", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"77e274fbc67d",1276896625,"Merge the \"regparm\" attribute from a previous declaration of a","Merge the \"regparm\" attribute from a previous declaration of a\nfunction to redeclarations of that function. Fixes PR7025.\n\nllvm-svn: 106317"}, | ||
[j]={{ | [j]={{w,3831,"/// 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 // Merge regparm attribute.\n if (OldTypeInfo.getHasRegParm() != NewTypeInfo.getHasRegParm() || OldTypeInfo.getRegParm() != NewTypeInfo.getRegParm()) {\n if (NewTypeInfo.getHasRegParm()) {\n Diag(New->getLocation(), diag::err_regparm_mismatch) << NewType->getRegParmType() << OldType->getRegParmType();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/attr-regparm.c"]={"clang/test/Sema/attr-regparm.c:11:34: error: function declared with regparm(2) attribute was previously declared with the regparm(3) attribute","clang/test/Sema/attr-regparm.c:14:26: error: function declared with regparm(2) attribute was previously declared with the regparm(3) attribute"} | ["clang/test/Sema/attr-regparm.c"]={"clang/test/Sema/attr-regparm.c:11:34: error: function declared with regparm(2) attribute was previously declared with the regparm(3) attribute","clang/test/Sema/attr-regparm.c:14:26: error: function declared with regparm(2) attribute was previously declared with the regparm(3) attribute"} | ||
Line 2,844: | Line 2,872: | ||
}, | }, | ||
["err_relocatable_without_isysroot"]={ | ["err_relocatable_without_isysroot"]={ | ||
[ | [i]="err_relocatable_without_isysroot", | ||
[ | [h]="must specify system root with -isysroot when building a relocatable PCH file", | ||
[ | [g]="must specify system root with -isysroot when building a relocatable PCH file", | ||
[ | [b]=k, | ||
[ | [e]="must specify system root with \\-isysroot when building a relocatable PCH file", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"ea68af43e80d",1282067738,"Fix a typo in a diag name.","Fix a typo in a diag name.\n\nllvm-svn: 111257"}, | ||
[j]={{"clang/lib/Frontend/FrontendActions.cpp",156,"bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI, std::string &Sysroot) {\n // ...\n if (CI.getFrontendOpts().RelocatablePCH && Sysroot.empty()) {\n CI.getDiagnostics().Report(diag::err_relocatable_without_isysroot);"}} | [j]={{"clang/lib/Frontend/FrontendActions.cpp",156,"bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI, std::string &Sysroot) {\n // ...\n if (CI.getFrontendOpts().RelocatablePCH && Sysroot.empty()) {\n CI.getDiagnostics().Report(diag::err_relocatable_without_isysroot);"}} | ||
}, | }, | ||
["err_repeat_attribute"]={ | ["err_repeat_attribute"]={ | ||
[ | [i]="err_repeat_attribute", | ||
[ | [h]="%0 attribute cannot be repeated", | ||
[ | [g]="A attribute cannot be repeated", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) attribute cannot be repeated", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"54a025488774",1259122827,"Parse C++ member check attributes - base_check, hiding, and override.","Parse C++ member check attributes - base_check, hiding, and override.\nThe attributes are currently ignored.\n\nllvm-svn: 89837"}, | ||
[j]={{ | [j]={{db,2287,"// PS3 PPU-specific.\nstatic void handleVecReturnAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (VecReturnAttr *A = D->getAttr<VecReturnAttr>()) {\n S.Diag(AL.getLoc(), diag::err_repeat_attribute) << A;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/cxx-altivec.cpp"]={"clang/test/SemaCXX/cxx-altivec.cpp:5:45: error: \'vecreturn\' attribute cannot be repeated"} | ["clang/test/SemaCXX/cxx-altivec.cpp"]={"clang/test/SemaCXX/cxx-altivec.cpp:5:45: error: \'vecreturn\' attribute cannot be repeated"} | ||
Line 2,869: | Line 2,897: | ||
}, | }, | ||
["err_require_constant_init_failed"]={ | ["err_require_constant_init_failed"]={ | ||
[ | [i]="err_require_constant_init_failed", | ||
[h]="variable does not have a constant initializer", | |||
[g]="variable does not have a constant initializer", | |||
[b]=k, | |||
[e]="variable does not have a constant initializer", | [e]="variable does not have a constant initializer", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"92f8935e63f0",1472840729,"Implement __attribute__((require_constant_initialization)) for safe static initialization.","Implement __attribute__((require_constant_initialization)) for safe static initialization.\n\nSummary:\nThis attribute specifies expectations about the initialization of static and\nthread local variables. Specifically that the variable has a\n[constant initializer](http://en.cppreference.com/w/cpp/language/constant_initialization)\naccording to the rules of [basic.start.static]. Failure to meet this expectation\nwill result in an error.\n\nStatic objects with constant initializers avoid hard-to-find bugs caused by\nthe indeterminate order of dynamic initialization. They can also be safely\nused by other static constructors across translation units.\n\nThis attribute acts as a compile time assertion that the requirements\nfor constant initialization have been met. Since these requirements change\nbetween dialects and have subtle pitfalls it\'s important to fail fast instead\nof silently falling back on dynamic initialization.\n\n```c++\n // -std=c++14\n #define SAFE_STATIC __attribute__((require_constant_initialization)) static\n struct T {\n constexpr T(int) {}\n ~T();\n };\n SAFE_STATIC T x = {42}; // OK.\n SAFE_STATIC T y = 42; // error: variable does not have a constant initializer\n // copy initialization is not a constant expression on a non-literal type.\n```\nThis attribute can only be applied to objects with static or thread-local storage\nduration.\n\nReviewers: majnemer, rsmith, aaron.ballman\n\nSubscribers: jroelofs, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D23385\n\nllvm-svn: 280516"}, | |||
[j]={{w,14227,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n // Check whether the initializer is sufficiently constant.\n if (getLangOpts().CPlusPlus && !type->isDependentType() && Init && !Init->isValueDependent() && (GlobalStorage || var->isConstexpr() || var->mightBeUsableInConstantExpressions(Context))) {\n // ...\n if (HasConstInit) {\n // ...\n } else if (var->isConstexpr()) {\n // ...\n } else if (GlobalStorage && var->hasAttr<ConstInitAttr>()) {\n // ...\n Diag(var->getLocation(), diag::err_require_constant_init_failed) << Init->getSourceRange();"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp:6:23: error: variable does not have a constant initializer"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp:6:23: error: variable does not have a constant initializer"} | ||
Line 2,883: | Line 2,911: | ||
}, | }, | ||
["err_requires_clause_inside_parens"]={ | ["err_requires_clause_inside_parens"]={ | ||
[ | [i]={{nil,p,"err_requires_clause_inside_parens"}}, | ||
[ | [h]={{nil,p,"trailing requires clause should be placed outside parentheses"}}, | ||
[ | [g]={{nil,p,"trailing requires clause should be placed outside parentheses"}}, | ||
[ | [b]=k, | ||
[ | [e]="trailing requires clause should be placed outside parentheses", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,x}}, | ||
[ | [c]={hc,1570627358,nc,oc}, | ||
[j]={{ | [j]={{jb,6714,"PastIdentifier:\n // ...\n while (true) {\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (Tok.is(tok::l_square)) {\n // ...\n } else if (Tok.isRegularKeywordAttribute()) {\n // ...\n } else if (Tok.is(tok::kw_requires) && D.hasGroupingParens()) {\n // ...\n Diag(Tok, diag::err_requires_clause_inside_parens);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:18:21: error: trailing requires clause should be placed outside parentheses","clang/test/CXX/dcl/dcl.decl/p3.cpp:43:12: error: trailing requires clause should be placed outside parentheses","clang/test/CXX/dcl/dcl.decl/p3.cpp:44:12: error: trailing requires clause should be placed outside parentheses","clang/test/CXX/dcl/dcl.decl/p3.cpp:49:30: error: trailing requires clause should be placed outside parentheses"} | ["clang/test/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:18:21: error: trailing requires clause should be placed outside parentheses","clang/test/CXX/dcl/dcl.decl/p3.cpp:43:12: error: trailing requires clause should be placed outside parentheses","clang/test/CXX/dcl/dcl.decl/p3.cpp:44:12: error: trailing requires clause should be placed outside parentheses","clang/test/CXX/dcl/dcl.decl/p3.cpp:49:30: error: trailing requires clause should be placed outside parentheses"} | ||
Line 2,897: | Line 2,925: | ||
}, | }, | ||
["err_requires_clause_must_appear_after_trailing_return"]={ | ["err_requires_clause_must_appear_after_trailing_return"]={ | ||
[ | [i]={{nil,p,"err_requires_clause_must_appear_after_trailing_return"}}, | ||
[ | [h]={{nil,p,"trailing return type must appear before trailing requires clause"}}, | ||
[ | [g]={{nil,p,"trailing return type must appear before trailing requires clause"}}, | ||
[ | [b]=k, | ||
[ | [e]="trailing return type must appear before trailing requires clause", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,x}}, | ||
[ | [c]={hc,1570627358,nc,oc}, | ||
[j]={{ | [j]={{Qb,4142,"/// Parse a requires-clause as part of a function declaration.\nvoid Parser::ParseTrailingRequiresClause(Declarator &D) {\n // ...\n // Did the user swap the trailing return type and requires clause?\n if (D.isFunctionDeclarator() && Tok.is(tok::arrow) && D.getDeclSpec().getTypeSpecType() == TST_auto) {\n // ...\n if (!TrailingReturnType.isInvalid()) {\n Diag(ArrowLoc, diag::err_requires_clause_must_appear_after_trailing_return) << Range;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:15:40: error: trailing return type must appear before trailing requires clause","clang/test/CXX/dcl/dcl.decl/p3.cpp:37:30: error: trailing return type must appear before trailing requires clause"} | ["clang/test/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:15:40: error: trailing return type must appear before trailing requires clause","clang/test/CXX/dcl/dcl.decl/p3.cpp:37:30: error: trailing return type must appear before trailing requires clause"} | ||
Line 2,911: | Line 2,939: | ||
}, | }, | ||
["err_requires_clause_on_declarator_not_declaring_a_function"]={ | ["err_requires_clause_on_declarator_not_declaring_a_function"]={ | ||
[ | [i]={{nil,p,"err_requires_clause_on_declarator_not_declaring_a_function"}}, | ||
[ | [h]={{nil,p,"trailing requires clause can only be used when declaring a function"}}, | ||
[ | [g]={{nil,p,"trailing requires clause can only be used when declaring a function"}}, | ||
[ | [b]=k, | ||
[ | [e]="trailing requires clause can only be used when declaring a function", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,x}}, | ||
[ | [c]={hc,1570627358,nc,oc}, | ||
[j]={{ | [j]={{jb,7375,"/// ParseParameterDeclarationClause - Parse a (possibly empty) parameter-list\n/// after the opening parenthesis. This function will not parse a K&R-style\n/// identifier list.\n///\n/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs\n/// is non-null, then the caller parsed those attributes immediately after the\n/// open paren - they will be applied to the DeclSpec of the first parameter.\n///\n/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will\n/// be the location of the ellipsis, if any was parsed.\n///\n/// parameter-type-list: [C99 6.7.5]\n/// parameter-list\n/// parameter-list \',\' \'...\'\n/// [C++] parameter-list \'...\'\n///\n/// parameter-list: [C99 6.7.5]\n/// parameter-declaration\n/// parameter-list \',\' parameter-declaration\n///\n/// parameter-declaration: [C99 6.7.5]\n/// declaration-specifiers declarator\n/// [C++] declaration-specifiers declarator \'=\' assignment-expression\n/// [C++11] initializer-clause\n/// [GNU] declaration-specifiers declarator attributes\n/// declaration-specifiers abstract-declarator[opt]\n/// [C++] declaration-specifiers abstract-declarator[opt]\n/// \'=\' assignment-expression\n/// [GNU] declaration-specifiers abstract-declarator[opt] attributes\n/// [C++11] attribute-specifier-seq parameter-declaration\n///\nvoid Parser::ParseParameterDeclarationClause(DeclaratorContext DeclaratorCtx, ParsedAttributes &FirstArgAttrs, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc, bool IsACXXFunctionDeclaration) {\n // ...\n do {\n // ...\n if (Tok.is(tok::kw_requires)) {\n // ...\n Diag(Tok, diag::err_requires_clause_on_declarator_not_declaring_a_function);"},{Qb,4122,"/// Parse a requires-clause as part of a function declaration.\nvoid Parser::ParseTrailingRequiresClause(Declarator &D) {\n // ...\n if (!D.isDeclarationOfFunction()) {\n Diag(RequiresKWLoc, diag::err_requires_clause_on_declarator_not_declaring_a_function);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:46:14: error: trailing requires clause can only be used when declaring a function","clang/test/CXX/dcl/dcl.decl/p3.cpp:47:25: error: trailing requires clause can only be used when declaring a function","clang/test/CXX/dcl/dcl.decl/p3.cpp:48:30: error: trailing requires clause can only be used when declaring a function"} | ["clang/test/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:46:14: error: trailing requires clause can only be used when declaring a function","clang/test/CXX/dcl/dcl.decl/p3.cpp:47:25: error: trailing requires clause can only be used when declaring a function","clang/test/CXX/dcl/dcl.decl/p3.cpp:48:30: error: trailing requires clause can only be used when declaring a function"} | ||
Line 2,925: | Line 2,953: | ||
}, | }, | ||
["err_requires_expr_expected_type_constraint"]={ | ["err_requires_expr_expected_type_constraint"]={ | ||
[ | [i]={{nil,p,"err_requires_expr_expected_type_constraint"}}, | ||
[ | [h]={{nil,p,"expected concept name with optional arguments"}}, | ||
[ | [g]={{nil,p,"expected concept name with optional arguments"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected concept name with optional arguments", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,x}}, | ||
[ | [c]={hc,1570627358,nc,oc}, | ||
[j]={{ | [j]={{Vb,3591,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n while (!Tok.is(tok::r_brace)) {\n // ...\n case tok::l_brace: {\n // ...\n if (!isTypeConstraintAnnotation()) {\n Diag(Tok, diag::err_requires_expr_expected_type_constraint);"}}, | ||
[l]={ | [l]={ | ||
[ | [Mc]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:97:38: error: expected concept name with optional arguments"} | ||
} | } | ||
}, | }, | ||
["err_requires_expr_in_simple_requirement"]={ | ["err_requires_expr_in_simple_requirement"]={ | ||
[ | [i]={{nil,C,"err_requires_expr_in_simple_requirement"}}, | ||
[ | [h]={{nil,C,"requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)"}}, | ||
[ | [g]={{nil,C,"requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)"}}, | ||
[ | [b]=k, | ||
[ | [e]="requires expression in requirement body; did you intend to place it in a nested requirement\\? \\(add another \'requires\' before the expression\\)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,C,x}}, | ||
[ | [c]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions.","[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"}, | ||
[j]={{ | [j]={{Vb,3736,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n while (!Tok.is(tok::r_brace)) {\n // ...\n default: {\n // ...\n if (!Expression.isInvalid() && PossibleRequiresExprInSimpleRequirement)\n Diag(StartLoc, diag::err_requires_expr_in_simple_requirement) << FixItHint::CreateInsertion(StartLoc, \"requires\");"}}, | ||
[l]={ | [l]={ | ||
[ | [Mc]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:137:23: error: requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:140:23: error: requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:143:23: error: requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)"} | ||
} | } | ||
}, | }, | ||
["err_requires_expr_local_parameter_default_argument"]={ | ["err_requires_expr_local_parameter_default_argument"]={ | ||
[ | [i]={{nil,p,"err_requires_expr_local_parameter_default_argument"}}, | ||
[ | [h]={{nil,p,"default arguments not allowed for parameters of a requires expression"}}, | ||
[ | [g]={{nil,p,"default arguments not allowed for parameters of a requires expression"}}, | ||
[ | [b]=k, | ||
[ | [e]="default arguments not allowed for parameters of a requires expression", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={vc,1576172311,wc,xc}, | ||
[j]={{ | [j]={{P,9162,"RequiresExprBodyDecl *Sema::ActOnStartRequiresExpr(SourceLocation RequiresKWLoc, ArrayRef<ParmVarDecl *> LocalParameters, Scope *BodyScope) {\n // ...\n for (ParmVarDecl *Param : LocalParameters) {\n if (Param->hasDefaultArg())\n // ...\n Diag(Param->getDefaultArgRange().getBegin(), diag::err_requires_expr_local_parameter_default_argument);"}}, | ||
[l]={ | [l]={ | ||
[ | [Mc]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:37:30: error: default arguments not allowed for parameters of a requires expression"} | ||
} | } | ||
}, | }, | ||
["err_requires_expr_missing_arrow"]={ | ["err_requires_expr_missing_arrow"]={ | ||
[ | [i]={{nil,p,"err_requires_expr_missing_arrow"}}, | ||
[ | [h]={{nil,p,"expected \'->\' before expression type requirement"}}, | ||
[ | [g]={{nil,p,"expected \'->\' before expression type requirement"}}, | ||
[ | [b]=k, | ||
[ | [e]="expected \'\\-\\>\' before expression type requirement", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,x}}, | ||
[ | [c]={hc,1570627358,nc,oc}, | ||
[j]={{ | [j]={{Vb,3583,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n while (!Tok.is(tok::r_brace)) {\n // ...\n case tok::l_brace: {\n // ...\n if (!TryConsumeToken(tok::arrow))\n // ...\n Diag(Tok, diag::err_requires_expr_missing_arrow) << FixItHint::CreateInsertion(Tok.getLocation(), \"->\");"}}, | ||
[l]={ | [l]={ | ||
[ | [Mc]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:97:38: error: expected \'->\' before expression type requirement","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:107:38: error: expected \'->\' before expression type requirement"} | ||
} | } | ||
}, | }, | ||
["err_requires_expr_parameter_list_ellipsis"]={ | ["err_requires_expr_parameter_list_ellipsis"]={ | ||
[ | [i]={{nil,p,"err_requires_expr_parameter_list_ellipsis"}}, | ||
[ | [h]={{nil,p,"varargs not allowed in requires expression"}}, | ||
[ | [g]={{nil,p,"varargs not allowed in requires expression"}}, | ||
[ | [b]=k, | ||
[ | [e]="varargs not allowed in requires expression", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,x}}, | ||
[ | [c]={hc,1570627358,nc,oc}, | ||
[j]={{ | [j]={{Vb,3511,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n if (!Tok.is(tok::r_paren)) {\n // ...\n if (EllipsisLoc.isValid())\n Diag(EllipsisLoc, diag::err_requires_expr_parameter_list_ellipsis);"}}, | ||
[l]={ | [l]={ | ||
[ | [Mc]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:8:28: error: varargs not allowed in requires expression"} | ||
} | } | ||
}, | }, | ||
["err_requires_expr_parameter_referenced_in_evaluated_context"]={ | ["err_requires_expr_parameter_referenced_in_evaluated_context"]={ | ||
[ | [i]={{nil,p,"err_requires_expr_parameter_referenced_in_evaluated_context"}}, | ||
[ | [h]={{nil,p,"constraint variable %0 cannot be used in an evaluated context"}}, | ||
[ | [g]={{nil,p,"constraint variable A cannot be used in an evaluated context"}}, | ||
[ | [b]=k, | ||
[ | [e]="constraint variable (.*?) cannot be used in an evaluated context", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={vc,1576172311,wc,xc}, | ||
[j]={{n,404,"/// 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 (isa<ParmVarDecl>(D) && isa<RequiresExprBodyDecl>(D->getDeclContext()) && !isUnevaluatedContext()) {\n // ...\n Diag(Loc, diag::err_requires_expr_parameter_referenced_in_evaluated_context) << D;"}}, | [j]={{n,404,"/// 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 (isa<ParmVarDecl>(D) && isa<RequiresExprBodyDecl>(D->getDeclContext()) && !isUnevaluatedContext()) {\n // ...\n Diag(Loc, diag::err_requires_expr_parameter_referenced_in_evaluated_context) << D;"}}, | ||
[l]={ | [l]={ | ||
Line 3,009: | Line 3,037: | ||
}, | }, | ||
["err_requires_expr_simple_requirement_noexcept"]={ | ["err_requires_expr_simple_requirement_noexcept"]={ | ||
[ | [i]={{nil,p,"err_requires_expr_simple_requirement_noexcept"}}, | ||
[ | [h]={{nil,p,"\'noexcept\' can only be used in a compound requirement (with \'{\' \'}\' around the expression)"}}, | ||
[ | [g]={{nil,p,"\'noexcept\' can only be used in a compound requirement (with \'{\' \'}\' around the expression)"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'noexcept\' can only be used in a compound requirement \\(with \'\\{\' \'\\}\' around the expression\\)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,x}}, | ||
[ | [c]={hc,1570627358,nc,oc}, | ||
[j]={{ | [j]={{Vb,3746,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n while (!Tok.is(tok::r_brace)) {\n // ...\n default: {\n // ...\n // User may have tried to put some compound requirement stuff here\n if (Tok.is(tok::kw_noexcept)) {\n Diag(Tok, diag::err_requires_expr_simple_requirement_noexcept) << FixItHint::CreateInsertion(StartLoc, \"{\") << FixItHint::CreateInsertion(Tok.getLocation(), \"}\");"}}, | ||
[l]={ | [l]={ | ||
[ | [Mc]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:122:25: error: \'noexcept\' can only be used in a compound requirement (with \'{\' \'}\' around the expression)"} | ||
} | } | ||
}, | }, | ||
["err_restricted_superclass_mismatch"]={ | ["err_restricted_superclass_mismatch"]={ | ||
[ | [i]="err_restricted_superclass_mismatch", | ||
[h]="cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute", | |||
[g]="cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute", | |||
[b]=k, | |||
[e]="cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute", | [e]="cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"a8c44ba2c01e",1477650310,"[Objective-C] Add objc_subclassing_restricted attribute","[Objective-C] Add objc_subclassing_restricted attribute\n\nThis patch adds an objc_subclassing_restricted attribute into clang. This\nattribute acts similarly to \'final\' - Objective-C classes with this attribute\ncan\'t be subclassed. However, @interface declarations that have\nobjc_subclassing_restricted but don\'t have @implementation are allowed to\ninherit other @interface declarations with objc_subclassing_restricted. This is\nneeded to describe the Swift class hierarchy in clang while making sure that\nthe Objective-C classes cannot subclass the Swift classes.\n\nThis attribute is already implemented in a fork of clang that\'s used for Swift\n(https://github.com/apple/swift-clang) and this patch moves that code to the\nupstream clang repository.\n\nrdar://28937548\n\nDifferential Revision: https://reviews.llvm.org/D25993\n\nllvm-svn: 285391"}, | |||
[j]={{Kb,4165,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n // ...\n if (ObjCInterfaceDecl *IDecl = IC->getClassInterface()) {\n // ...\n if (const ObjCInterfaceDecl *Super = IDecl->getSuperClass()) {\n // An interface can subclass another interface with a\n // objc_subclassing_restricted attribute when it has that attribute as\n // well (because of interfaces imported from Swift). Therefore we have\n // to check if we can subclass in the implementation as well.\n if (IDecl->hasAttr<ObjCSubclassingRestrictedAttr>() && Super->hasAttr<ObjCSubclassingRestrictedAttr>()) {\n Diag(IC->getLocation(), diag::err_restricted_superclass_mismatch);"},{Kb,4197,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n // ...\n } else if (ObjCCategoryImplDecl *CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassDecl)) {\n // ...\n } else if (const auto *IntfDecl = dyn_cast<ObjCInterfaceDecl>(ClassDecl)) {\n if (const ObjCInterfaceDecl *Super = IntfDecl->getSuperClass()) {\n if (!IntfDecl->hasAttr<ObjCSubclassingRestrictedAttr>() && Super->hasAttr<ObjCSubclassingRestrictedAttr>()) {\n Diag(IntfDecl->getLocation(), diag::err_restricted_superclass_mismatch);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/subclassing-restricted-attr.m"]={"clang/test/SemaObjC/subclassing-restricted-attr.m:14:12: error: cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute","clang/test/SemaObjC/subclassing-restricted-attr.m:35:17: error: cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute"} | ["clang/test/SemaObjC/subclassing-restricted-attr.m"]={"clang/test/SemaObjC/subclassing-restricted-attr.m:14:12: error: cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute","clang/test/SemaObjC/subclassing-restricted-attr.m:35:17: error: cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute"} | ||
Line 3,037: | Line 3,065: | ||
}, | }, | ||
["err_ret_local_block"]={ | ["err_ret_local_block"]={ | ||
[ | [i]="err_ret_local_block", | ||
[h]="returning block that lives on the local stack", | |||
[g]="returning block that lives on the local stack", | |||
[b]=k, | |||
[e]="returning block that lives on the local stack", | [e]="returning block that lives on the local stack", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{Q,8262,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_Return:\n case LK_StmtExprResult:\n if (auto *DRE = dyn_cast<DeclRefExpr>(L)) {\n // ...\n } else if (isa<BlockExpr>(L)) {\n Diag(DiagLoc, diag::err_ret_local_block) << DiagRange;"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Analysis/stack-block-returned.cpp"]={"clang/test/Analysis/stack-block-returned.cpp:8:10: error: returning block that lives on the local stack"} | ["clang/test/Analysis/stack-block-returned.cpp"]={"clang/test/Analysis/stack-block-returned.cpp:8:10: error: returning block that lives on the local stack"} | ||
Line 3,051: | Line 3,079: | ||
}, | }, | ||
["err_rethrow_used_outside_catch"]={ | ["err_rethrow_used_outside_catch"]={ | ||
[ | [i]="err_rethrow_used_outside_catch", | ||
[ | [h]="@throw (rethrow) used outside of a @catch block", | ||
[ | [g]="@throw (rethrow) used outside of a @catch block", | ||
[ | [b]=k, | ||
[ | [e]="@throw \\(rethrow\\) used outside of a @catch block", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{ | [j]={{Z,4292,"StmtResult Sema::ActOnObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw, Scope *CurScope) {\n // ...\n if (!Throw) {\n // ...\n if (!AtCatchParent)\n return StmtError(Diag(AtLoc, diag::err_rethrow_used_outside_catch));"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/try-catch.m"]={"clang/test/SemaObjC/try-catch.m:51:3: error: @throw (rethrow) used outside of a @catch block"} | ["clang/test/SemaObjC/try-catch.m"]={"clang/test/SemaObjC/try-catch.m:51:3: error: @throw (rethrow) used outside of a @catch block"} | ||
Line 3,065: | Line 3,093: | ||
}, | }, | ||
["err_return_block_has_expr"]={ | ["err_return_block_has_expr"]={ | ||
[ | [i]="err_return_block_has_expr", | ||
[h]="void block should not return a value", | |||
[g]="void block should not return a value", | |||
[b]=k, | |||
[e]="void block should not return a value", | [e]="void block should not return a value", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={u,1237025389,s,t}, | |||
[j]={{Z,3688,"/// 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 // ...\n else {\n Diag(ReturnLoc, diag::err_return_block_has_expr);"}} | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_return_in_captured_stmt"]={ | ["err_return_in_captured_stmt"]={ | ||
[ | [i]="err_return_in_captured_stmt", | ||
[ | [h]="cannot return from %0", | ||
[ | [g]="cannot return from A", | ||
[ | [b]=k, | ||
[ | [e]="cannot return from (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"6dfa25a19f3f",1366141058,"Sema for Captured Statements","Sema for Captured Statements\n\nAdd CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic\nanalysis. Currently captures all variables by reference.\n\nTODO: templates\n\nAuthor: Ben Langmuir <ben.langmuir@intel.com>\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D433\n\nllvm-svn: 179618"}, | ||
[j]={{ | [j]={{Z,3661,"/// 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 if (auto *CurBlock = dyn_cast<BlockScopeInfo>(CurCap)) {\n // ...\n } else if (auto *CurRegion = dyn_cast<CapturedRegionScopeInfo>(CurCap)) {\n Diag(ReturnLoc, diag::err_return_in_captured_stmt) << CurRegion->getRegionName();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/captured-statements.c"]={"clang/test/Sema/captured-statements.c:30:7: error: cannot return from default captured statement"} | ["clang/test/Sema/captured-statements.c"]={"clang/test/Sema/captured-statements.c:30:7: error: cannot return from default captured statement"} | ||
Line 3,090: | Line 3,118: | ||
}, | }, | ||
["err_return_in_constructor_handler"]={ | ["err_return_in_constructor_handler"]={ | ||
[ | [i]="err_return_in_constructor_handler", | ||
[h]="return in the catch of a function try block of a constructor is illegal", | |||
[g]="return in the catch of a function try block of a constructor is illegal", | |||
[b]=k, | |||
[e]="return in the catch of a function try block of a constructor is illegal", | [e]="return in the catch of a function try block of a constructor is illegal", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"4c018663b22c",1240868004,"Track down return statements in the handlers of a function-try-block of constructors. Meh ...","Track down return statements in the handlers of a function-try-block of constructors. Meh ...\n\nllvm-svn: 70256"}, | |||
[j]={{H,17943,"static void SearchForReturnInStmt(Sema &Self, Stmt *S) {\n for (Stmt *SubStmt : S->children()) {\n // ...\n if (isa<ReturnStmt>(SubStmt))\n Self.Diag(SubStmt->getBeginLoc(), diag::err_return_in_constructor_handler);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
[ | [ed]={"clang/test/SemaCXX/exceptions.cpp:86:11: error: return in the catch of a function try block of a constructor is illegal","clang/test/SemaCXX/exceptions.cpp:98:5: error: return in the catch of a function try block of a constructor is illegal","clang/test/SemaCXX/exceptions.cpp:102:9: error: return in the catch of a function try block of a constructor is illegal"} | ||
} | } | ||
}, | }, | ||
["err_return_in_coroutine"]={ | ["err_return_in_coroutine"]={ | ||
[ | [i]="err_return_in_coroutine", | ||
[ | [h]="return statement not allowed in coroutine; did you mean \'co_return\'?", | ||
[ | [g]="return statement not allowed in coroutine; did you mean \'co_return\'?", | ||
[ | [b]=k, | ||
[ | [e]="return statement not allowed in coroutine; did you mean \'co_return\'\\?", | ||
[ | [f]=a, | ||
[ | [d]="Coroutines Issue", | ||
[ | [c]={"cfd53b4e9993",1445494430,"[coroutines] Initial stub Sema functionality for handling coroutine await / yield / return.","[coroutines] Initial stub Sema functionality for handling coroutine await / yield / return.\n\nllvm-svn: 250993"}, | ||
[j]={{"clang/lib/Sema/SemaCoroutine.cpp",1123,"void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) {\n // ...\n // [stmt.return.coroutine]p1:\n // A coroutine shall not enclose a return statement ([stmt.return]).\n if (Fn->FirstReturnLoc.isValid()) {\n // ...\n Diag(Fn->FirstReturnLoc, diag::err_return_in_coroutine);"}}, | [j]={{"clang/lib/Sema/SemaCoroutine.cpp",1123,"void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) {\n // ...\n // [stmt.return.coroutine]p1:\n // A coroutine shall not enclose a return statement ([stmt.return]).\n if (Fn->FirstReturnLoc.isValid()) {\n // ...\n Diag(Fn->FirstReturnLoc, diag::err_return_in_coroutine);"}}, | ||
[l]={ | [l]={ | ||
Line 3,118: | Line 3,146: | ||
}, | }, | ||
["err_return_init_list"]={ | ["err_return_init_list"]={ | ||
[ | [i]="err_return_init_list", | ||
[ | [h]="%select{void function|void method|constructor|destructor}1 %0 must not return a value", | ||
[ | [g]={{nil,nil,{{"void function","void method","constructor","destructor"}," A must not return a value"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:void function|void method|constructor|destructor) (.*?) must not return a value", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"eef474ce1bc8",1329907808,"Fix parsing and processing initializer lists in return statements and as direct member initializers.","Fix parsing and processing initializer lists in return statements and as direct member initializers.\n\nllvm-svn: 151155"}, | ||
[j]={{ | [j]={{Z,4063,"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 Diag(ReturnLoc, diag::err_return_init_list) << CurDecl << FunctionKind << RetValExp->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/return-void.cpp"]={"clang/test/SemaCXX/return-void.cpp:3:13: error: void function \'f1\' must not return a value","clang/test/SemaCXX/return-void.cpp:5:35: error: void function \'f2\' must not return a value","clang/test/SemaCXX/return-void.cpp:7:32: error: void function \'f2<float>\' must not return a value","clang/test/SemaCXX/return-void.cpp:15:15: error: void function \'f3\' must not return a value","clang/test/SemaCXX/return-void.cpp:16:9: error: constructor \'S\' must not return a value","clang/test/SemaCXX/return-void.cpp:17:10: error: destructor \'~S\' must not return a value","clang/test/SemaCXX/return-void.cpp:21:15: error: void function \'f4\' must not return a value","clang/test/SemaCXX/return-void.cpp:22:10: error: constructor \'ST<T>\' must not return a value","clang/test/SemaCXX/return-void.cpp:23:11: error: destructor \'~ST<T>\' must not return a value"} | ["clang/test/SemaCXX/return-void.cpp"]={"clang/test/SemaCXX/return-void.cpp:3:13: error: void function \'f1\' must not return a value","clang/test/SemaCXX/return-void.cpp:5:35: error: void function \'f2\' must not return a value","clang/test/SemaCXX/return-void.cpp:7:32: error: void function \'f2<float>\' must not return a value","clang/test/SemaCXX/return-void.cpp:15:15: error: void function \'f3\' must not return a value","clang/test/SemaCXX/return-void.cpp:16:9: error: constructor \'S\' must not return a value","clang/test/SemaCXX/return-void.cpp:17:10: error: destructor \'~S\' must not return a value","clang/test/SemaCXX/return-void.cpp:21:15: error: void function \'f4\' must not return a value","clang/test/SemaCXX/return-void.cpp:22:10: error: constructor \'ST<T>\' must not return a value","clang/test/SemaCXX/return-void.cpp:23:11: error: destructor \'~ST<T>\' must not return a value"} | ||
Line 3,132: | Line 3,160: | ||
}, | }, | ||
["err_return_value_with_address_space"]={ | ["err_return_value_with_address_space"]={ | ||
[ | [i]={{nil,M,"err_return_value_with_address_space"}}, | ||
[ | [h]={{nil,M,"return type cannot be qualified with address space"}}, | ||
[ | [g]={{nil,M,"return type cannot be qualified with address space"}}, | ||
[ | [b]=k, | ||
[ | [e]="return type cannot be qualified with address space", | ||
[ | [f]=a, | ||
[ | [d]={{nil,M,m}}, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{w,10253,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n if (AddressSpace != LangAS::Default) {\n Diag(NewFD->getLocation(), diag::err_return_value_with_address_space);"},{w,10287,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().HLSL) {\n // ...\n if (AddressSpace != LangAS::Default) {\n Diag(NewFD->getLocation(), diag::err_return_value_with_address_space);"},{kd,876,"static TypeSourceInfo *getLambdaType(Sema &S, LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope, SourceLocation Loc, bool &ExplicitResultType) {\n // ...\n if (ParamInfo.getNumTypeObjects() == 0) {\n // ...\n } else {\n // ...\n if (ExplicitResultType && S.getLangOpts().HLSL) {\n // ...\n if (!RetTy.isNull()) {\n // ...\n if (AddressSpace != LangAS::Default)\n S.Diag(FTI.getTrailingReturnTypeLoc(), diag::err_return_value_with_address_space);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaHLSL/group_shared.hlsl"]={"clang/test/SemaHLSL/group_shared.hlsl:14:20: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:20:20: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:25:21: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:32:24: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:35:24: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:38:31: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:41:31: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:80:18: error: return type cannot be qualified with address space"} | ["clang/test/SemaHLSL/group_shared.hlsl"]={"clang/test/SemaHLSL/group_shared.hlsl:14:20: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:20:20: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:25:21: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:32:24: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:35:24: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:38:31: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:41:31: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:80:18: error: return type cannot be qualified with address space"} | ||
Line 3,146: | Line 3,174: | ||
}, | }, | ||
["err_right_angle_bracket_equal_needs_space"]={ | ["err_right_angle_bracket_equal_needs_space"]={ | ||
[ | [i]="err_right_angle_bracket_equal_needs_space", | ||
[ | [h]="a space is required between a right angle bracket and an equals sign (use \'> =\')", | ||
[ | [g]="a space is required between a right angle bracket and an equals sign (use \'> =\')", | ||
[ | [b]=k, | ||
[ | [e]="a space is required between a right angle bracket and an equals sign \\(use \'\\> \\=\'\\)", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"7b3f322517c2",1339999864,"Extend the error recovery for a template-argument-list terminated by \'>>\' to","Extend the error recovery for a template-argument-list terminated by \'>>\' to\nalso deal with \'>>>\' (in CUDA), \'>=\', and \'>>=\'. Fix the FixItHints logic to\ndeal with cases where the token is followed by an adjacent \'=\', \'==\', \'>=\',\n\'>>=\', or \'>>>\' token, where a naive fix-it would result in a differing token\nstream on a re-lex.\n\nllvm-svn: 158652"}, | ||
[j]={{ | [j]={{xd,1209,"/// Parses a \'>\' at the end of a template list.\n///\n/// If this function encounters \'>>\', \'>>>\', \'>=\', or \'>>=\', it tries\n/// to determine if these tokens were supposed to be a \'>\' followed by\n/// \'>\', \'>>\', \'>=\', or \'>=\'. It emits an appropriate diagnostic if necessary.\n///\n/// \\param RAngleLoc the location of the consumed \'>\'.\n///\n/// \\param ConsumeLastToken if true, the \'>\' is consumed.\n///\n/// \\param ObjCGenericList if true, this is the \'>\' closing an Objective-C\n/// type parameter or type argument list, rather than a C++ template parameter\n/// or argument list.\n///\n/// \\returns true, if current token does not start with \'>\', false otherwise.\nbool Parser::ParseGreaterThanInTemplateList(SourceLocation LAngleLoc, SourceLocation &RAngleLoc, bool ConsumeLastToken, bool ObjCGenericList) {\n // ...\n // Diagnose this situation as appropriate.\n if (!ObjCGenericList) {\n // ...\n if (getLangOpts().CPlusPlus11 && (Tok.is(tok::greatergreater) || Tok.is(tok::greatergreatergreater)))\n // ...\n else if (Tok.is(tok::greaterequal))\n DiagId = diag::err_right_angle_bracket_equal_needs_space;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/cxx-template-argument.cpp"]={"clang/test/Parser/cxx-template-argument.cpp:22:15: error: a space is required between a right angle bracket and an equals sign (use \'> =\')","clang/test/Parser/cxx-template-argument.cpp:23:18: error: a space is required between a right angle bracket and an equals sign (use \'> =\')","clang/test/Parser/cxx-template-argument.cpp:30:18: error: a space is required between a right angle bracket and an equals sign (use \'> =\')","clang/test/Parser/cxx-template-argument.cpp:36:21: error: a space is required between a right angle bracket and an equals sign (use \'> =\')"} | ["clang/test/Parser/cxx-template-argument.cpp"]={"clang/test/Parser/cxx-template-argument.cpp:22:15: error: a space is required between a right angle bracket and an equals sign (use \'> =\')","clang/test/Parser/cxx-template-argument.cpp:23:18: error: a space is required between a right angle bracket and an equals sign (use \'> =\')","clang/test/Parser/cxx-template-argument.cpp:30:18: error: a space is required between a right angle bracket and an equals sign (use \'> =\')","clang/test/Parser/cxx-template-argument.cpp:36:21: error: a space is required between a right angle bracket and an equals sign (use \'> =\')"} | ||
Line 3,160: | Line 3,188: | ||
}, | }, | ||
["err_riscv_builtin_invalid_lmul"]={ | ["err_riscv_builtin_invalid_lmul"]={ | ||
[ | [i]={{nil,F,"err_riscv_builtin_invalid_lmul"}}, | ||
[ | [h]={{nil,F,"LMUL argument must be in the range [0,3] or [5,7]"}}, | ||
[ | [g]={{nil,F,"LMUL argument must be in the range [0,3] or [5,7]"}}, | ||
[ | [b]=k, | ||
[ | [e]="LMUL argument must be in the range \\[0,3\\] or \\[5,7\\]", | ||
[ | [f]=a, | ||
[ | [d]={{nil,F,a}}, | ||
[ | [c]={Vc,1615397021,Zc,ad}, | ||
[j]={{ | [j]={{z,4493,"bool Sema::CheckRISCVLMUL(CallExpr *TheCall, unsigned ArgNum) {\n // ...\n return Diag(TheCall->getBeginLoc(), diag::err_riscv_builtin_invalid_lmul) << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c"]={"clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:6:3: error: LMUL argument must be in the range [0,3] or [5,7]","clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:7:3: error: LMUL argument must be in the range [0,3] or [5,7]","clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:8:3: error: LMUL argument must be in the range [0,3] or [5,7]","clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:9:3: error: LMUL argument must be in the range [0,3] or [5,7]"} | ["clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c"]={"clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:6:3: error: LMUL argument must be in the range [0,3] or [5,7]","clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:7:3: error: LMUL argument must be in the range [0,3] or [5,7]","clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:8:3: error: LMUL argument must be in the range [0,3] or [5,7]","clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:9:3: error: LMUL argument must be in the range [0,3] or [5,7]"} | ||
Line 3,174: | Line 3,202: | ||
}, | }, | ||
["err_riscv_builtin_requires_extension"]={ | ["err_riscv_builtin_requires_extension"]={ | ||
[ | [i]={{nil,F,"err_riscv_builtin_requires_extension"}}, | ||
[ | [h]={{nil,M,"builtin requires%select{| at least one of the following extensions to be enabled}0: %1"},{y,C,"builtin requires at least one of the following extensions support to be enabled : %0"},{F,F,"builtin requires \'%0\' extension support to be enabled"}}, | ||
[ | [g]={{nil,M,{"builtin requires",{a," at least one of the following extensions to be enabled"},": B"}},{y,C,"builtin requires at least one of the following extensions support to be enabled : A"},{F,F,"builtin requires \'A\' extension support to be enabled"}}, | ||
[ | [b]=k, | ||
[ | [e]="builtin requires(?:| at least one of the following extensions to be enabled)\\: (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,F,a}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{ | [j]={{z,4542,"bool Sema::CheckRISCVBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n // Check if each required feature is included\n for (StringRef F : ReqFeatures) {\n // ...\n if (llvm::none_of(ReqOpFeatures, [&TI](StringRef OF) { return TI.hasFeature(OF); })) {\n // ...\n Diag(TheCall->getBeginLoc(), diag::err_riscv_builtin_requires_extension) << IsExtension << TheCall->getSourceRange() << StringRef(FeatureStrs);"},{z,4611,"bool Sema::CheckRISCVBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_tu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_tu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_m:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_m:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_mu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_mu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_tum:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_tum:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_tumu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_tumu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_tu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_tu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_m:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_m:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_mu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_mu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_tum:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_tum:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_tumu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_tumu:\n case RISCVVector::BI__builtin_rvv_vmulh_vv:\n case RISCVVector::BI__builtin_rvv_vmulh_vx:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_tu:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_tu:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_m:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_m:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_mu:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_mu:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_tum:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_tum:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_tumu:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_tumu:\n case RISCVVector::BI__builtin_rvv_vsmul_vv:\n case RISCVVector::BI__builtin_rvv_vsmul_vx:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_tu:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_tu:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_m:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_m:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_mu:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_mu:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_tum:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_tum:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_tumu:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_tumu: {\n // ...\n if (RequireV && !TI.hasFeature(\"v\"))\n return Diag(TheCall->getBeginLoc(), diag::err_riscv_builtin_requires_extension) << /* IsExtension */ false << TheCall->getSourceRange() << \"v\";"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CodeGen/RISCV/rvb-intrinsics/riscv32-zbb-error.c"]={"clang/test/CodeGen/RISCV/rvb-intrinsics/riscv32-zbb-error.c:5:10: error: builtin requires: \'RV64\'"} | ["clang/test/CodeGen/RISCV/rvb-intrinsics/riscv32-zbb-error.c"]={"clang/test/CodeGen/RISCV/rvb-intrinsics/riscv32-zbb-error.c:5:10: error: builtin requires: \'RV64\'"} | ||
Line 3,188: | Line 3,216: | ||
}, | }, | ||
["err_riscv_type_requires_extension"]={ | ["err_riscv_type_requires_extension"]={ | ||
[ | [i]="err_riscv_type_requires_extension", | ||
[ | [h]="RISC-V type %0 requires the \'%1\' extension", | ||
[ | [g]="RISC-V type A requires the \'B\' extension", | ||
[ | [b]=k, | ||
[ | [e]="RISC\\-V type (.*?) requires the \'(.*?)\' extension", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{z,5427,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n // (ELEN, LMUL) pairs of (8, mf8), (16, mf4), (32, mf2), (64, m1) requires at\n // least zve64x\n if ((Ty->isRVVType(/* Bitwidth */ 64, /* IsFloat */ false) || Ty->isRVVType(/* ElementCount */ 1)) && !TI.hasFeature(\"zve64x\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zve64x\";"},{z,5430,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n if (Ty->isRVVType(/* Bitwidth */ 16, /* IsFloat */ true) && !TI.hasFeature(\"zvfh\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zvfh\";"},{z,5433,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n if (Ty->isRVVType(/* Bitwidth */ 32, /* IsFloat */ true) && !TI.hasFeature(\"zve32f\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zve32f\";"},{z,5436,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n if (Ty->isRVVType(/* Bitwidth */ 64, /* IsFloat */ true) && !TI.hasFeature(\"zve64d\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zve64d\";"},{z,5440,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n // Given that caller already checked isRVVType() before calling this function,\n // if we don\'t have at least zve32x supported, then we need to emit error.\n if (!TI.hasFeature(\"zve32x\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zve32x\";"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/riscv-vector-zve64x-check.c"]={"clang/test/Sema/riscv-vector-zve64x-check.c:10:19: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:12:9: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:14:10: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:9:17: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:18:20: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:20:9: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:22:10: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:17:18: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:26:20: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:28:9: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:30:10: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:25:18: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:34:19: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:36:9: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:38:10: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:33:17: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension"} | ["clang/test/Sema/riscv-vector-zve64x-check.c"]={"clang/test/Sema/riscv-vector-zve64x-check.c:10:19: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:12:9: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:14:10: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:9:17: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:18:20: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:20:9: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:22:10: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:17:18: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:26:20: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:28:9: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:30:10: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:25:18: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:34:19: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:36:9: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:38:10: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:33:17: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension"} | ||
Line 3,202: | Line 3,230: | ||
}, | }, | ||
["err_root_class_cannot_use_super"]={ | ["err_root_class_cannot_use_super"]={ | ||
[ | [i]="err_root_class_cannot_use_super", | ||
[ | [h]="%0 cannot use \'super\' because it is a root class", | ||
[ | [g]="A cannot use \'super\' because it is a root class", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) cannot use \'super\' because it is a root class", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{ | [j]={{ac,2178,"ExprResult Sema::ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc) {\n // ...\n if (!IFace) {\n // If the \"receiver\" is \'super\' in a method, handle it as an expression-like\n // property reference.\n if (receiverNamePtr->isStr(\"super\")) {\n if (ObjCMethodDecl *CurMethod = tryCaptureObjCSelf(receiverNameLoc)) {\n if (auto classDecl = CurMethod->getClassInterface()) {\n // ...\n if (CurMethod->isInstanceMethod()) {\n if (SuperType.isNull()) {\n // ...\n Diag(receiverNameLoc, diag::err_root_class_cannot_use_super) << CurMethod->getClassInterface()->getIdentifier();"},{ac,2405,"ExprResult Sema::ActOnSuperMessage(Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args) {\n // ...\n if (SuperTy.isNull()) {\n // ...\n Diag(SuperLoc, diag::err_root_class_cannot_use_super) << Class->getIdentifier();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/super-property-notation.m"]={"clang/test/SemaObjC/super-property-notation.m:38:3: error: \'ClassBase\' cannot use \'super\' because it is a root class","clang/test/SemaObjC/super-property-notation.m:39:4: error: \'ClassBase\' cannot use \'super\' because it is a root class"} | ["clang/test/SemaObjC/super-property-notation.m"]={"clang/test/SemaObjC/super-property-notation.m:38:3: error: \'ClassBase\' cannot use \'super\' because it is a root class","clang/test/SemaObjC/super-property-notation.m:39:4: error: \'ClassBase\' cannot use \'super\' because it is a root class"} | ||
Line 3,216: | Line 3,244: | ||
}, | }, | ||
["err_roptr_cannot_build_shared"]={ | ["err_roptr_cannot_build_shared"]={ | ||
[ | [i]="err_roptr_cannot_build_shared", | ||
[ | [h]="-mxcoff-roptr is not supported with -shared", | ||
[ | [g]="-mxcoff-roptr is not supported with -shared", | ||
[ | [b]=k, | ||
[ | [e]="\\-mxcoff\\-roptr is not supported with \\-shared", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"9715af434579",1684163645,"[AIX][clang] Storage Locations for Constant Pointers","[AIX][clang] Storage Locations for Constant Pointers\n\nThis patch adds clang options `-mxcoff-roptr` and `-mno-xcoff-roptr` to specify storage locations for constant pointers on AIX.\n\nWhen the `-mxcoff-roptr` option is in effect, constant pointers, virtual function tables, and virtual type tables are placed in read-only storage. When the `-mno-xcoff-roptr` option is in effect, pointers, virtual function tables, and virtual type tables are placed are placed in read/write storage.\n\nThis patch depends on https://reviews.llvm.org/D144189.\n\nReviewed By: hubert.reinterpretcast, stephenpeckham\n\nDifferential Revision: https://reviews.llvm.org/D144190"}, | ||
[j]={{"clang/lib/Driver/ToolChains/AIX.cpp",141,"void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Args.hasFlag(options::OPT_mxcoff_roptr, options::OPT_mno_xcoff_roptr, false)) {\n if (Args.hasArg(options::OPT_shared))\n D.Diag(diag::err_roptr_cannot_build_shared);"}} | [j]={{"clang/lib/Driver/ToolChains/AIX.cpp",141,"void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Args.hasFlag(options::OPT_mxcoff_roptr, options::OPT_mno_xcoff_roptr, false)) {\n if (Args.hasArg(options::OPT_shared))\n D.Diag(diag::err_roptr_cannot_build_shared);"}} | ||
}, | }, | ||
["err_roptr_requires_data_sections"]={ | ["err_roptr_requires_data_sections"]={ | ||
[ | [i]="err_roptr_requires_data_sections", | ||
[ | [h]="-mxcoff-roptr is supported only with -fdata-sections", | ||
[ | [g]="-mxcoff-roptr is supported only with -fdata-sections", | ||
[ | [b]=k, | ||
[ | [e]="\\-mxcoff\\-roptr is supported only with \\-fdata\\-sections", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"9715af434579",1684163645,"[AIX][clang] Storage Locations for Constant Pointers","[AIX][clang] Storage Locations for Constant Pointers\n\nThis patch adds clang options `-mxcoff-roptr` and `-mno-xcoff-roptr` to specify storage locations for constant pointers on AIX.\n\nWhen the `-mxcoff-roptr` option is in effect, constant pointers, virtual function tables, and virtual type tables are placed in read-only storage. When the `-mno-xcoff-roptr` option is in effect, pointers, virtual function tables, and virtual type tables are placed are placed in read/write storage.\n\nThis patch depends on https://reviews.llvm.org/D144189.\n\nReviewed By: hubert.reinterpretcast, stephenpeckham\n\nDifferential Revision: https://reviews.llvm.org/D144190"}, | ||
[j]={{"clang/lib/Driver/ToolChains/CommonArgs.cpp",766,"#endif\n // ...\n if (Args.hasArg(options::OPT_mxcoff_roptr) || Args.hasArg(options::OPT_mno_xcoff_roptr)) {\n // ...\n if (HasRoptr) {\n // The data sections option is on by default on AIX. We only need to error\n // out when -fno-data-sections is specified explicitly to turn off data\n // sections.\n if (DataSectionsTurnedOff)\n D.Diag(diag::err_roptr_requires_data_sections);"},{"clang/lib/Frontend/CompilerInvocation.cpp",1947,"#include \"clang/Driver/Options.inc\"\n // ...\n if (Arg *A = Args.getLastArg(OPT_mxcoff_roptr)) {\n // ...\n // Since the storage mapping class is specified per csect,\n // without using data sections, it is less effective to use read-only\n // pointers. Using read-only pointers may cause other RO variables in the\n // same csect to become RW when the linker acts upon `-bforceimprw`;\n // therefore, we require that separate data sections\n // are used when `-mxcoff-roptr` is in effect. We respect the setting of\n // data-sections since we have not found reasons to do otherwise that\n // overcome the user surprise of not respecting the setting.\n if (!Args.hasFlag(OPT_fdata_sections, OPT_fno_data_sections, false))\n Diags.Report(diag::err_roptr_requires_data_sections);"}} | [j]={{"clang/lib/Driver/ToolChains/CommonArgs.cpp",766,"#endif\n // ...\n if (Args.hasArg(options::OPT_mxcoff_roptr) || Args.hasArg(options::OPT_mno_xcoff_roptr)) {\n // ...\n if (HasRoptr) {\n // The data sections option is on by default on AIX. We only need to error\n // out when -fno-data-sections is specified explicitly to turn off data\n // sections.\n if (DataSectionsTurnedOff)\n D.Diag(diag::err_roptr_requires_data_sections);"},{"clang/lib/Frontend/CompilerInvocation.cpp",1947,"#include \"clang/Driver/Options.inc\"\n // ...\n if (Arg *A = Args.getLastArg(OPT_mxcoff_roptr)) {\n // ...\n // Since the storage mapping class is specified per csect,\n // without using data sections, it is less effective to use read-only\n // pointers. Using read-only pointers may cause other RO variables in the\n // same csect to become RW when the linker acts upon `-bforceimprw`;\n // therefore, we require that separate data sections\n // are used when `-mxcoff-roptr` is in effect. We respect the setting of\n // data-sections since we have not found reasons to do otherwise that\n // overcome the user surprise of not respecting the setting.\n if (!Args.hasFlag(OPT_fdata_sections, OPT_fno_data_sections, false))\n Diags.Report(diag::err_roptr_requires_data_sections);"}} | ||
}, | }, | ||
["err_rotation_argument_to_cadd"]={ | ["err_rotation_argument_to_cadd"]={ | ||
[ | [i]={{nil,q,"err_rotation_argument_to_cadd"}}, | ||
[ | [h]={{nil,q,"argument should be the value 90 or 270"}}, | ||
[ | [g]={{nil,q,"argument should be the value 90 or 270"}}, | ||
[ | [b]=k, | ||
[ | [e]="argument should be the value 90 or 270", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{ | [j]={{z,2992,"#include \"clang/Basic/arm_sme_sema_rangechecks.inc\"\n // ...\n for (auto &I : ImmChecks) {\n // ...\n case SVETypeFlags::ImmCheckComplexRot90_270:\n if (CheckImmediateInSet([](int64_t V) { return V == 90 || V == 270; }, diag::err_rotation_argument_to_cadd))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp"]={"clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:18:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:20:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:22:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:24:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:26:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:28:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:30:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:32:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:34:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:36:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:38:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:40:17: error: argument should be the value 90 or 270"} | ["clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp"]={"clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:18:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:20:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:22:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:24:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:26:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:28:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:30:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:32:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:34:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:36:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:38:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:40:17: error: argument should be the value 90 or 270"} | ||
Line 3,252: | Line 3,280: | ||
}, | }, | ||
["err_rotation_argument_to_cmla"]={ | ["err_rotation_argument_to_cmla"]={ | ||
[ | [i]={{nil,q,"err_rotation_argument_to_cmla"}}, | ||
[ | [h]={{nil,q,"argument should be the value 0, 90, 180 or 270"}}, | ||
[ | [g]={{nil,q,"argument should be the value 0, 90, 180 or 270"}}, | ||
[ | [b]=k, | ||
[ | [e]="argument should be the value 0, 90, 180 or 270", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{ | [j]={{z,3000,"#include \"clang/Basic/arm_sme_sema_rangechecks.inc\"\n // ...\n for (auto &I : ImmChecks) {\n // ...\n case SVETypeFlags::ImmCheckComplexRotAll90:\n if (CheckImmediateInSet([](int64_t V) { return V == 0 || V == 90 || V == 180 || V == 270; }, diag::err_rotation_argument_to_cmla))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp"]={"clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:46:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:48:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:50:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:52:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:54:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:56:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:58:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:60:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:62:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:64:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:66:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:68:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:70:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:72:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:74:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:76:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:78:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:80:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:82:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:84:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:86:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:88:17: error: argument should be the value 0, 90, 180 or 270"} | ["clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp"]={"clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:46:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:48:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:50:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:52:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:54:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:56:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:58:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:60:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:62:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:64:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:66:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:68:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:70:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:72:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:74:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:76:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:78:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:80:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:82:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:84:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:86:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:88:17: error: argument should be the value 0, 90, 180 or 270"} | ||
Line 3,266: | Line 3,294: | ||
}, | }, | ||
["err_rref_in_exception_spec"]={ | ["err_rref_in_exception_spec"]={ | ||
[ | [i]="err_rref_in_exception_spec", | ||
[ | [h]="rvalue reference type %0 is not allowed in exception specification", | ||
[ | [g]="rvalue reference type A is not allowed in exception specification", | ||
[ | [b]=k, | ||
[ | [e]="rvalue reference type (.*?) is not allowed in exception specification", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"a118c6a8c0e9",1354143162,"Per C++11 [except.spec]p2, rvalue references are not permitted in exception specifications.","Per C++11 [except.spec]p2, rvalue references are not permitted in exception specifications.\n\nllvm-svn: 168824"}, | ||
[j]={{"clang/lib/Sema/SemaExceptionSpec.cpp",152,"/// 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 (const PointerType *PT = T->getAs<PointerType>()) {\n // ...\n } else if (const ReferenceType *RT = T->getAs<ReferenceType>()) {\n // ...\n if (RT->isRValueReferenceType()) {\n // ...\n Diag(Range.getBegin(), diag::err_rref_in_exception_spec) << T << Range;"}}, | [j]={{"clang/lib/Sema/SemaExceptionSpec.cpp",152,"/// 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 (const PointerType *PT = T->getAs<PointerType>()) {\n // ...\n } else if (const ReferenceType *RT = T->getAs<ReferenceType>()) {\n // ...\n if (RT->isRValueReferenceType()) {\n // ...\n Diag(Range.getBegin(), diag::err_rref_in_exception_spec) << T << Range;"}}, | ||
[l]={ | [l]={ | ||
[ | [ed]={"clang/test/SemaCXX/exceptions.cpp:164:24: error: rvalue reference type \'int &&\' is not allowed in exception specification"} | ||
} | } | ||
}, | }, | ||
["err_sampler_argument_required"]={ | ["err_sampler_argument_required"]={ | ||
[ | [i]="err_sampler_argument_required", | ||
[ | [h]="sampler_t variable required - got %0", | ||
[ | [g]="sampler_t variable required - got A", | ||
[ | [b]=k, | ||
[ | [e]="sampler_t variable required \\- got (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"610541989a52",1360234547,"Add OpenCL samplers as Clang builtin types and check sampler related restrictions.","Add OpenCL samplers as Clang builtin types and check sampler related restrictions.\n\nllvm-svn: 174601"}, | ||
[j]={{ | [j]={{Q,9310,"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_OCLSamplerInit: {\n // ...\n // Case 1\n if (Entity.isParameterKind()) {\n if (!SourceType->isSamplerT() && !SourceType->isIntegerType()) {\n S.Diag(Kind.getLocation(), diag::err_sampler_argument_required) << SourceType;"}} | ||
}, | }, | ||
["err_sampler_initializer_not_integer"]={ | ["err_sampler_initializer_not_integer"]={ | ||
[ | [i]="err_sampler_initializer_not_integer", | ||
[ | [h]="sampler_t initialization requires 32-bit integer, not %0", | ||
[ | [g]="sampler_t initialization requires 32-bit integer, not A", | ||
[ | [b]=k, | ||
[ | [e]="sampler_t initialization requires 32\\-bit integer, not (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"0bc4b2d33731",1469733990,"[OpenCL] Generate opaque type for sampler_t and function call for the initializer","[OpenCL] Generate opaque type for sampler_t and function call for the initializer\n\nCurrently Clang use int32 to represent sampler_t, which have been a source of issue for some backends, because in some backends sampler_t cannot be represented by int32. They have to depend on kernel argument metadata and use IPA to find the sampler arguments and global variables and transform them to target specific sampler type.\n\nThis patch uses opaque pointer type opencl.sampler_t* for sampler_t. For each use of file-scope sampler variable, it generates a function call of __translate_sampler_initializer. For each initialization of function-scope sampler variable, it generates a function call of __translate_sampler_initializer.\n\nEach builtin library can implement its own __translate_sampler_initializer(). Since the real sampler type tends to be architecture dependent, allowing it to be initialized by a library function simplifies backend design. A typical implementation of __translate_sampler_initializer could be a table lookup of real sampler literal values. Since its argument is always a literal, the returned pointer is known at compile time and easily optimized to finally become some literal values directly put into image read instructions.\n\nThis patch is partially based on Alexey Sotkin\'s work in Khronos Clang (https://github.com/KhronosGroup/SPIR/commit/3d4eec61623502fc306e8c67c9868be2b136e42b).\n\nDifferential Revision: https://reviews.llvm.org/D21567\n\nllvm-svn: 277024"}, | ||
[j]={{ | [j]={{Q,9345,"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_OCLSamplerInit: {\n // ...\n // Case 1\n if (Entity.isParameterKind()) {\n // ...\n } else {\n // ...\n if (!SourceType->isIntegerType() || 32 != S.Context.getIntWidth(SourceType)) {\n S.Diag(Kind.getLocation(), diag::err_sampler_initializer_not_integer) << SourceType;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaOpenCL/sampler_t.cl"]={"clang/test/SemaOpenCL/sampler_t.cl:38:20: error: sampler_t initialization requires 32-bit integer, not \'long long\'","clang/test/SemaOpenCL/sampler_t.cl:58:19: error: sampler_t initialization requires 32-bit integer, not \'long long\'"} | ["clang/test/SemaOpenCL/sampler_t.cl"]={"clang/test/SemaOpenCL/sampler_t.cl:38:20: error: sampler_t initialization requires 32-bit integer, not \'long long\'","clang/test/SemaOpenCL/sampler_t.cl:58:19: error: sampler_t initialization requires 32-bit integer, not \'long long\'"} | ||
Line 3,305: | Line 3,333: | ||
}, | }, | ||
["err_scoped_enum_missing_identifier"]={ | ["err_scoped_enum_missing_identifier"]={ | ||
[ | [i]="err_scoped_enum_missing_identifier", | ||
[h]="scoped enumeration requires a name", | |||
[g]="scoped enumeration requires a name", | |||
[b]=k, | |||
[e]="scoped enumeration requires a name", | [e]="scoped enumeration requires a name", | ||
[f]= | [f]=a, | ||
[ | [d]=x, | ||
[c]={"0bf3140424a0",1286581827,"Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a","Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a\nbit by me). \n\nllvm-svn: 116122"}, | |||
[j]={{jb,4873,"/// 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 if (!Name && ScopedEnumKWLoc.isValid()) {\n // ...\n Diag(Tok, diag::err_scoped_enum_missing_identifier);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/drs/dr6xx.cpp"]={"clang/test/CXX/drs/dr6xx.cpp:743:14: error: scoped enumeration requires a name","clang/test/CXX/drs/dr6xx.cpp:748:16: error: scoped enumeration requires a name"} | ["clang/test/CXX/drs/dr6xx.cpp"]={"clang/test/CXX/drs/dr6xx.cpp:743:14: error: scoped enumeration requires a name","clang/test/CXX/drs/dr6xx.cpp:748:16: error: scoped enumeration requires a name"} | ||
Line 3,319: | Line 3,347: | ||
}, | }, | ||
["err_second_argument_to_cwsc_not_pointer"]={ | ["err_second_argument_to_cwsc_not_pointer"]={ | ||
[ | [i]="err_second_argument_to_cwsc_not_pointer", | ||
[h]="second argument to __builtin_call_with_static_chain must be of pointer type", | |||
[g]="second argument to __builtin_call_with_static_chain must be of pointer type", | |||
[b]=k, | |||
[e]="second argument to __builtin_call_with_static_chain must be of pointer type", | [e]="second argument to __builtin_call_with_static_chain must be of pointer type", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"f770683f14f9",1418427685,"Implement the __builtin_call_with_static_chain GNU extension.","Implement the __builtin_call_with_static_chain GNU extension.\n\nThe extension has the following syntax:\n\n __builtin_call_with_static_chain(Call, Chain)\n where Call must be a function call expression and Chain must be of pointer type\n\nThis extension performs a function call Call with a static chain pointer\nChain passed to the callee in a designated register. This is useful for\ncalling foreign language functions whose ABI uses static chain pointers\n(e.g. to implement closures).\n\nDifferential Revision: http://reviews.llvm.org/D6332\n\nllvm-svn: 224167"}, | |||
[j]={{z,770,"static bool SemaBuiltinCallWithStaticChain(Sema &S, CallExpr *BuiltinCall) {\n // ...\n if (!ChainResult.get()->getType()->isPointerType()) {\n S.Diag(BuiltinLoc, diag::err_second_argument_to_cwsc_not_pointer) << Chain->getSourceRange();"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Sema/call-with-static-chain.c"]={"clang/test/Sema/call-with-static-chain.c:10:3: error: second argument to __builtin_call_with_static_chain must be of pointer type"} | ["clang/test/Sema/call-with-static-chain.c"]={"clang/test/Sema/call-with-static-chain.c:10:3: error: second argument to __builtin_call_with_static_chain must be of pointer type"} | ||
Line 3,333: | Line 3,361: | ||
}, | }, | ||
["err_second_parameter_to_va_arg_abstract"]={ | ["err_second_parameter_to_va_arg_abstract"]={ | ||
[ | [i]="err_second_parameter_to_va_arg_abstract", | ||
[ | [h]="second argument to \'va_arg\' is of abstract type %0", | ||
[ | [g]="second argument to \'va_arg\' is of abstract type A", | ||
[ | [b]=k, | ||
[ | [e]="second argument to \'va_arg\' is of abstract type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c75d1a10985a",1308028652,"Properly diagnose using abstract and incomplete types in va_arg","Properly diagnose using abstract and incomplete types in va_arg\n\n- Move a test from test/SemaTemplate/instantiate-expr-3.cpp, it did not belong there\n- Incomplete and abstract types are considered hard errors\n\nllvm-svn: 132979"}, | ||
[j]={{n,17233,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n if (!TInfo->getType()->isDependentType()) {\n // ...\n if (RequireNonAbstractType(TInfo->getTypeLoc().getBeginLoc(), TInfo->getType(), diag::err_second_parameter_to_va_arg_abstract, TInfo->getTypeLoc()))"}}, | [j]={{n,17233,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n if (!TInfo->getType()->isDependentType()) {\n // ...\n if (RequireNonAbstractType(TInfo->getTypeLoc().getBeginLoc(), TInfo->getType(), diag::err_second_parameter_to_va_arg_abstract, TInfo->getTypeLoc()))"}}, | ||
[l]={ | [l]={ | ||
Line 3,347: | Line 3,375: | ||
}, | }, | ||
["err_second_parameter_to_va_arg_incomplete"]={ | ["err_second_parameter_to_va_arg_incomplete"]={ | ||
[ | [i]="err_second_parameter_to_va_arg_incomplete", | ||
[ | [h]="second argument to \'va_arg\' is of incomplete type %0", | ||
[ | [g]="second argument to \'va_arg\' is of incomplete type A", | ||
[ | [b]=k, | ||
[ | [e]="second argument to \'va_arg\' is of incomplete type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c75d1a10985a",1308028652,"Properly diagnose using abstract and incomplete types in va_arg","Properly diagnose using abstract and incomplete types in va_arg\n\n- Move a test from test/SemaTemplate/instantiate-expr-3.cpp, it did not belong there\n- Incomplete and abstract types are considered hard errors\n\nllvm-svn: 132979"}, | ||
[j]={{n,17226,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n if (!TInfo->getType()->isDependentType()) {\n if (RequireCompleteType(TInfo->getTypeLoc().getBeginLoc(), TInfo->getType(), diag::err_second_parameter_to_va_arg_incomplete, TInfo->getTypeLoc()))"}}, | [j]={{n,17226,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n if (!TInfo->getType()->isDependentType()) {\n if (RequireCompleteType(TInfo->getTypeLoc().getBeginLoc(), TInfo->getType(), diag::err_second_parameter_to_va_arg_incomplete, TInfo->getTypeLoc()))"}}, | ||
[l]={ | [l]={ | ||
Line 3,361: | Line 3,389: | ||
}, | }, | ||
["err_section_conflict"]={ | ["err_section_conflict"]={ | ||
[ | [i]="err_section_conflict", | ||
[ | [h]="%0 causes a section type conflict with %1", | ||
[ | [g]="A causes a section type conflict with B", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) causes a section type conflict with (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c3b18967ed07",1396996247,"[MS-ABI] Add support for #pragma section and related pragmas","[MS-ABI] Add support for #pragma section and related pragmas\nThis patch adds support for the msvc pragmas section, bss_seg, code_seg, \nconst_seg and data_seg as well as support for __declspec(allocate()).\n\nAdditionally it corrects semantics and adds diagnostics for \n__attribute__((section())) and the interaction between the attribute \nand the msvc pragmas and declspec. In general conflicts should now be \nwell diganosed within and among these features.\n\nIn supporting the pragmas new machinery for uniform lexing for \nmsvc pragmas was introduced. The new machinery always lexes the \nentire pragma and stores it on an annotation token. The parser \nis responsible for parsing the pragma when the handling the \nannotation token.\n\nThere is a known outstanding bug in this implementation in C mode. \nBecause these attributes and pragmas apply _only_ to definitions, we \nprocess them at the time we detect a definition. Due to tentative \ndefinitions in C, we end up processing the definition late. This means \nthat in C mode, everything that ends up in a BSS section will end up in \nthe _last_ BSS section rather than the one that was live at the time of \ntentative definition, even if that turns out to be the point of actual \ndefinition. This issue is not known to impact anything as of yet \nbecause we are not aware of a clear use or use case for #pragma bss_seg \nbut should be fixed at some point.\n\nDifferential Revision=http://reviews.llvm.org/D3065#inline-16241 \n\nllvm-svn: 205810"}, | ||
[j]={{L,700,"bool Sema::UnifySection(StringRef SectionName, int SectionFlags, NamedDecl *Decl) {\n // ...\n Diag(Decl->getLocation(), diag::err_section_conflict) << Decl << Section;"},{L,720,"bool Sema::UnifySection(StringRef SectionName, int SectionFlags, SourceLocation PragmaSectionLocation) {\n // ...\n if (SectionIt != Context.SectionInfos.end()) {\n // ...\n if (!(Section.SectionFlags & ASTContext::PSF_Implicit)) {\n Diag(PragmaSectionLocation, diag::err_section_conflict) << \"this\" << Section;"}}, | [j]={{L,700,"bool Sema::UnifySection(StringRef SectionName, int SectionFlags, NamedDecl *Decl) {\n // ...\n Diag(Decl->getLocation(), diag::err_section_conflict) << Decl << Section;"},{L,720,"bool Sema::UnifySection(StringRef SectionName, int SectionFlags, SourceLocation PragmaSectionLocation) {\n // ...\n if (SectionIt != Context.SectionInfos.end()) {\n // ...\n if (!(Section.SectionFlags & ASTContext::PSF_Implicit)) {\n Diag(PragmaSectionLocation, diag::err_section_conflict) << \"this\" << Section;"}}, | ||
[l]={ | [l]={ | ||
Line 3,375: | Line 3,403: | ||
}, | }, | ||
["err_seh___except_block"]={ | ["err_seh___except_block"]={ | ||
[ | [i]="err_seh___except_block", | ||
[ | [h]="%0 only allowed in __except block or filter expression", | ||
[ | [g]="A only allowed in __except block or filter expression", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) only allowed in __except block or filter expression", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"1c0675e155b9",1303952914,"Parsing/AST support for Structured Exception Handling","Parsing/AST support for Structured Exception Handling\n\nPatch authored by Sohail Somani.\n\nProvide parsing and AST support for Windows structured exception handling.\n\nllvm-svn: 130366"}, | ||
[j]={{ | [j]={{Nb,550,"/// Initialize - Warm up the parser.\n///\nvoid Parser::Initialize() {\n // ...\n if (getLangOpts().Borland) {\n // ...\n PP.SetPoisonReason(Ident__exception_code, diag::err_seh___except_block);"},{Nb,551,"/// Initialize - Warm up the parser.\n///\nvoid Parser::Initialize() {\n // ...\n if (getLangOpts().Borland) {\n // ...\n PP.SetPoisonReason(Ident___exception_code, diag::err_seh___except_block);"},{Nb,552,"/// Initialize - Warm up the parser.\n///\nvoid Parser::Initialize() {\n // ...\n if (getLangOpts().Borland) {\n // ...\n PP.SetPoisonReason(Ident_GetExceptionCode, diag::err_seh___except_block);"},{z,2470,"#include \"clang/Basic/Builtins.def\"\n // ...\n case Builtin::BI__exception_code:\n case Builtin::BI_exception_code:\n if (SemaBuiltinSEHScopeCheck(*this, TheCall, Scope::SEHExceptScope, diag::err_seh___except_block))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/exceptions-seh.cpp"]={"clang/test/SemaCXX/exceptions-seh.cpp:23:3: error: \'_exception_code\' only allowed in __except block or filter expression","clang/test/SemaCXX/exceptions-seh.cpp:34:3: error: \'_exception_code\' only allowed in __except block or filter expression"} | ["clang/test/SemaCXX/exceptions-seh.cpp"]={"clang/test/SemaCXX/exceptions-seh.cpp:23:3: error: \'_exception_code\' only allowed in __except block or filter expression","clang/test/SemaCXX/exceptions-seh.cpp:34:3: error: \'_exception_code\' only allowed in __except block or filter expression"} | ||
Line 3,389: | Line 3,417: | ||
}, | }, | ||
["err_seh___except_filter"]={ | ["err_seh___except_filter"]={ | ||
[ | [i]="err_seh___except_filter", | ||
[ | [h]="%0 only allowed in __except filter expression", | ||
[ | [g]="A only allowed in __except filter expression", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) only allowed in __except filter expression", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"1c0675e155b9",1303952914,"Parsing/AST support for Structured Exception Handling","Parsing/AST support for Structured Exception Handling\n\nPatch authored by Sohail Somani.\n\nProvide parsing and AST support for Windows structured exception handling.\n\nllvm-svn: 130366"}, | ||
[j]={{ | [j]={{Nb,553,"/// Initialize - Warm up the parser.\n///\nvoid Parser::Initialize() {\n // ...\n if (getLangOpts().Borland) {\n // ...\n PP.SetPoisonReason(Ident__exception_info, diag::err_seh___except_filter);"},{Nb,554,"/// Initialize - Warm up the parser.\n///\nvoid Parser::Initialize() {\n // ...\n if (getLangOpts().Borland) {\n // ...\n PP.SetPoisonReason(Ident___exception_info, diag::err_seh___except_filter);"},{Nb,555,"/// Initialize - Warm up the parser.\n///\nvoid Parser::Initialize() {\n // ...\n if (getLangOpts().Borland) {\n // ...\n PP.SetPoisonReason(Ident_GetExceptionInfo, diag::err_seh___except_filter);"},{z,2476,"#include \"clang/Basic/Builtins.def\"\n // ...\n case Builtin::BI__exception_info:\n case Builtin::BI_exception_info:\n if (SemaBuiltinSEHScopeCheck(*this, TheCall, Scope::SEHFilterScope, diag::err_seh___except_filter))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/exceptions-seh.cpp"]={"clang/test/SemaCXX/exceptions-seh.cpp:24:3: error: \'_exception_info\' only allowed in __except filter expression","clang/test/SemaCXX/exceptions-seh.cpp:35:3: error: \'_exception_info\' only allowed in __except filter expression"} | ["clang/test/SemaCXX/exceptions-seh.cpp"]={"clang/test/SemaCXX/exceptions-seh.cpp:24:3: error: \'_exception_info\' only allowed in __except filter expression","clang/test/SemaCXX/exceptions-seh.cpp:35:3: error: \'_exception_info\' only allowed in __except filter expression"} | ||
Line 3,403: | Line 3,431: | ||
}, | }, | ||
["err_seh___finally_block"]={ | ["err_seh___finally_block"]={ | ||
[ | [i]="err_seh___finally_block", | ||
[ | [h]="%0 only allowed in __finally block", | ||
[ | [g]="A only allowed in __finally block", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) only allowed in __finally block", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"1c0675e155b9",1303952914,"Parsing/AST support for Structured Exception Handling","Parsing/AST support for Structured Exception Handling\n\nPatch authored by Sohail Somani.\n\nProvide parsing and AST support for Windows structured exception handling.\n\nllvm-svn: 130366"}, | ||
[j]={{ | [j]={{Nb,556,"/// Initialize - Warm up the parser.\n///\nvoid Parser::Initialize() {\n // ...\n if (getLangOpts().Borland) {\n // ...\n PP.SetPoisonReason(Ident__abnormal_termination, diag::err_seh___finally_block);"},{Nb,557,"/// Initialize - Warm up the parser.\n///\nvoid Parser::Initialize() {\n // ...\n if (getLangOpts().Borland) {\n // ...\n PP.SetPoisonReason(Ident___abnormal_termination, diag::err_seh___finally_block);"},{Nb,558,"/// Initialize - Warm up the parser.\n///\nvoid Parser::Initialize() {\n // ...\n if (getLangOpts().Borland) {\n // ...\n PP.SetPoisonReason(Ident_AbnormalTermination, diag::err_seh___finally_block);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/__try.c"]={"clang/test/Sema/__try.c:151:9: error: \'__abnormal_termination\' only allowed in __finally block","clang/test/Sema/__try.c:152:9: error: \'AbnormalTermination\' only allowed in __finally block","clang/test/Sema/__try.c:155:11: error: \'AbnormalTermination\' only allowed in __finally block","clang/test/Sema/__try.c:156:11: error: \'__abnormal_termination\' only allowed in __finally block","clang/test/Sema/__try.c:159:11: error: \'AbnormalTermination\' only allowed in __finally block","clang/test/Sema/__try.c:160:11: error: \'__abnormal_termination\' only allowed in __finally block"} | ["clang/test/Sema/__try.c"]={"clang/test/Sema/__try.c:151:9: error: \'__abnormal_termination\' only allowed in __finally block","clang/test/Sema/__try.c:152:9: error: \'AbnormalTermination\' only allowed in __finally block","clang/test/Sema/__try.c:155:11: error: \'AbnormalTermination\' only allowed in __finally block","clang/test/Sema/__try.c:156:11: error: \'__abnormal_termination\' only allowed in __finally block","clang/test/Sema/__try.c:159:11: error: \'AbnormalTermination\' only allowed in __finally block","clang/test/Sema/__try.c:160:11: error: \'__abnormal_termination\' only allowed in __finally block"} | ||
Line 3,417: | Line 3,445: | ||
}, | }, | ||
["err_seh_expected_handler"]={ | ["err_seh_expected_handler"]={ | ||
[ | [i]="err_seh_expected_handler", | ||
[h]="expected \'__except\' or \'__finally\' block", | |||
[g]="expected \'__except\' or \'__finally\' block", | |||
[b]=k, | |||
[e]="expected \'__except\' or \'__finally\' block", | [e]="expected \'__except\' or \'__finally\' block", | ||
[f | [f]=a, | ||
[d]=a, | |||
[c]={"1c0675e155b9",1303952914,"Parsing/AST support for Structured Exception Handling","Parsing/AST support for Structured Exception Handling\n\nPatch authored by Sohail Somani.\n\nProvide parsing and AST support for Windows structured exception handling.\n\nllvm-svn: 130366"}, | |||
[j]={{Oc,602,"/// ParseSEHTryBlockCommon\n///\n/// seh-try-block:\n/// \'__try\' compound-statement seh-handler\n///\n/// seh-handler:\n/// seh-except-block\n/// seh-finally-block\n///\nStmtResult Parser::ParseSEHTryBlock() {\n // ...\n if (Tok.is(tok::identifier) && Tok.getIdentifierInfo() == getSEHExceptKeyword()) {\n // ...\n } else if (Tok.is(tok::kw___finally)) {\n // ...\n } else {\n return StmtError(Diag(Tok, diag::err_seh_expected_handler));"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Parser/ms-seh.c"]={"clang/test/Parser/ms-seh.c:10:1: error: expected \'__except\' or \'__finally\' block"} | ["clang/test/Parser/ms-seh.c"]={"clang/test/Parser/ms-seh.c:10:1: error: expected \'__except\' or \'__finally\' block"} | ||
Line 3,431: | Line 3,459: | ||
}, | }, | ||
["err_seh_in_a_coroutine_with_cxx_exceptions"]={ | ["err_seh_in_a_coroutine_with_cxx_exceptions"]={ | ||
[ | [i]={{nil,o,"err_seh_in_a_coroutine_with_cxx_exceptions"}}, | ||
[ | [h]={{nil,o,"cannot use SEH \'__try\' in a coroutine when C++ exceptions are enabled"}}, | ||
[ | [g]={{nil,o,"cannot use SEH \'__try\' in a coroutine when C++ exceptions are enabled"}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot use SEH \'__try\' in a coroutine when C\\+\\+ exceptions are enabled", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,"Coroutines Issue"}}, | ||
[ | [c]={"5b050e4a1836",1495492397,"[coroutines] Wrap the body of the coroutine in try-catch","[coroutines] Wrap the body of the coroutine in try-catch\n\nSummary:\nIf unhandled_exception member function is present in the coroutine promise,\nwrap the body of the coroutine in:\n\n```\ntry {\n body\n} catch(...) { promise.unhandled_exception(); }\n```\n\nReviewers: EricWF, rnk, rsmith\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D31692\n\nllvm-svn: 303583"}, | ||
[j]={{"clang/lib/Sema/SemaCoroutine.cpp",1701,"bool CoroutineStmtBuilder::makeOnException() {\n // ...\n // Since the body of the coroutine will be wrapped in try-catch, it will\n // be incompatible with SEH __try if present in a function.\n if (!S.getLangOpts().Borland && Fn.FirstSEHTryLoc.isValid()) {\n S.Diag(Fn.FirstSEHTryLoc, diag::err_seh_in_a_coroutine_with_cxx_exceptions);"}}, | [j]={{"clang/lib/Sema/SemaCoroutine.cpp",1701,"bool CoroutineStmtBuilder::makeOnException() {\n // ...\n // Since the body of the coroutine will be wrapped in try-catch, it will\n // be incompatible with SEH __try if present in a function.\n if (!S.getLangOpts().Borland && Fn.FirstSEHTryLoc.isValid()) {\n S.Diag(Fn.FirstSEHTryLoc, diag::err_seh_in_a_coroutine_with_cxx_exceptions);"}}, | ||
[l]={ | [l]={ | ||
Line 3,445: | Line 3,473: | ||
}, | }, | ||
["err_seh_try_outside_functions"]={ | ["err_seh_try_outside_functions"]={ | ||
[ | [i]="err_seh_try_outside_functions", | ||
[ | [h]="cannot use SEH \'__try\' in blocks, captured regions, or Obj-C method decls", | ||
[ | [g]="cannot use SEH \'__try\' in blocks, captured regions, or Obj-C method decls", | ||
[ | [b]=k, | ||
[ | [e]="cannot use SEH \'__try\' in blocks, captured regions, or Obj\\-C method decls", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"11ca834bef95",1423003955,"SEH: Track users of __try so we can pick a per-func EH personality","SEH: Track users of __try so we can pick a per-func EH personality\n\nThere are four major kinds of declarations that cause code generation:\n- FunctionDecl (includes CXXMethodDecl etc)\n- ObjCMethodDecl\n- BlockDecl\n- CapturedDecl\n\nThis patch tracks __try usage on FunctionDecls and diagnoses __try usage\nin other decls. If someone wants to use __try from ObjC, they can use it\nfrom a free function, since the ObjC code will need an ObjC-style EH\npersonality.\n\nEventually we will want to look through CapturedDecls and track SEH\nusage on the parent FunctionDecl, if present.\n\nllvm-svn: 228058"}, | ||
[j]={{ | [j]={{Z,4606,"StmtResult Sema::ActOnSEHTryBlock(bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler) {\n // ...\n if (FD)\n // ...\n else\n Diag(TryLoc, diag::err_seh_try_outside_functions);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/exceptions-seh.cpp"]={"clang/test/SemaCXX/exceptions-seh.cpp:91:5: error: cannot use SEH \'__try\' in blocks, captured regions, or Obj-C method decls","clang/test/SemaCXX/exceptions-seh.cpp:103:3: error: cannot use SEH \'__try\' in blocks, captured regions, or Obj-C method decls"} | ["clang/test/SemaCXX/exceptions-seh.cpp"]={"clang/test/SemaCXX/exceptions-seh.cpp:91:5: error: cannot use SEH \'__try\' in blocks, captured regions, or Obj-C method decls","clang/test/SemaCXX/exceptions-seh.cpp:103:3: error: cannot use SEH \'__try\' in blocks, captured regions, or Obj-C method decls"} | ||
Line 3,459: | Line 3,487: | ||
}, | }, | ||
["err_seh_try_unsupported"]={ | ["err_seh_try_unsupported"]={ | ||
[ | [i]="err_seh_try_unsupported", | ||
[h]="SEH \'__try\' is not supported on this target", | |||
[g]="SEH \'__try\' is not supported on this target", | |||
[b]=k, | |||
[e]="SEH \'__try\' is not supported on this target", | [e]="SEH \'__try\' is not supported on this target", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"ddd40964f077",1430259572,"[SEH] Add 32-bit lowering code for __try","[SEH] Add 32-bit lowering code for __try\n\nThis is just the clang-side of 32-bit SEH. LLVM still needs work, and it\nwill determinstically fail to compile until it\'s feature complete.\n\nOn x86, all outlined handlers have no parameters, but they do implicitly\ntake the EBP value passed in and use it to address locals of the parent\nframe. We model this with llvm.frameaddress(1).\n\nThis works (mostly), but __finally block inlining can break it. For now,\nwe apply the \'noinline\' attribute. If we really want to inline __finally\nblocks on 32-bit x86, we should teach the inliner how to untangle\nframeescape and framerecover.\n\nPromote the error diagnostic from codegen to sema. It now rejects SEH on\nnon-Windows platforms. LLVM doesn\'t implement SEH on non-x86 Windows\nplatforms, but there\'s nothing preventing it.\n\nllvm-svn: 236052"}, | |||
[j]={{Z,4610,"StmtResult Sema::ActOnSEHTryBlock(bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler) {\n // ...\n // Reject __try on unsupported targets.\n if (!Context.getTargetInfo().isSEHTrySupported())\n Diag(TryLoc, diag::err_seh_try_unsupported);"}} | |||
[ | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_selected_explicit_constructor"]={ | ["err_selected_explicit_constructor"]={ | ||
[ | [i]="err_selected_explicit_constructor", | ||
[ | [h]="chosen constructor is explicit in copy-initialization", | ||
[ | [g]="chosen constructor is explicit in copy-initialization", | ||
[ | [b]=k, | ||
[ | [e]="chosen constructor is explicit in copy\\-initialization", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"048a6d797690",1333310099,"Properly handle explicit constructors in list-initialization. Fixes PR12120.","Properly handle explicit constructors in list-initialization. Fixes PR12120.\n\nllvm-svn: 153849"}, | ||
[j]={{ | [j]={{Q,9992,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ExplicitConstructor: {\n S.Diag(Kind.getLocation(), diag::err_selected_explicit_constructor) << Args[0]->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/p7.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p7.cpp:14:3: error: chosen constructor is explicit in copy-initialization"} | ["clang/test/CXX/dcl.decl/dcl.init/p7.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p7.cpp:14:3: error: chosen constructor is explicit in copy-initialization"} | ||
Line 3,484: | Line 3,512: | ||
}, | }, | ||
["err_selector_element_const_type"]={ | ["err_selector_element_const_type"]={ | ||
[ | [i]="err_selector_element_const_type", | ||
[ | [h]={{nil,v,"selector element of type %0 cannot be a constant lvalue expression"},{ib,nil,"selector element of type %0 cannot be a constant l-value expression"}}, | ||
[ | [g]={{nil,v,"selector element of type A cannot be a constant lvalue expression"},{ib,nil,"selector element of type A cannot be a constant l-value expression"}}, | ||
[ | [b]=k, | ||
[ | [e]="selector element of type (.*?) cannot be a constant lvalue expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"8bcf182b9df6",1381442284,"ObjectiveC. ObjectiveC\'s collection selector expression in","ObjectiveC. ObjectiveC\'s collection selector expression in\nthe fereach loop must be a non-const lvalue expression as\nit will be assigned to at the beginning of the loop.\n// rdar://15123684\n\nllvm-svn: 192399"}, | ||
[j]={{ | [j]={{Z,2345,"StmtResult Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc) {\n // ...\n if (First) {\n // ...\n if (DeclStmt *DS = dyn_cast<DeclStmt>(First)) {\n // ...\n } else {\n // ...\n if (FirstType.isConstQualified())\n Diag(ForLoc, diag::err_selector_element_const_type) << FirstType << First->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:794:5: error: selector element of type \'NSString *const __strong\' cannot be a constant lvalue expression"} | ["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:794:5: error: selector element of type \'NSString *const __strong\' cannot be a constant lvalue expression"} | ||
Line 3,498: | Line 3,526: | ||
}, | }, | ||
["err_selector_element_not_lvalue"]={ | ["err_selector_element_not_lvalue"]={ | ||
[ | [i]="err_selector_element_not_lvalue", | ||
[h]="selector element is not a valid lvalue", | |||
[g]="selector element is not a valid lvalue", | |||
[b]=k, | |||
[e]="selector element is not a valid lvalue", | [e]="selector element is not a valid lvalue", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={u,1237025389,s,t}, | |||
[j]={{Z,2340,"StmtResult Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc) {\n // ...\n if (First) {\n // ...\n if (DeclStmt *DS = dyn_cast<DeclStmt>(First)) {\n // ...\n } else {\n // ...\n if (!FirstE->isTypeDependent() && !FirstE->isLValue())\n return StmtError(Diag(First->getBeginLoc(), diag::err_selector_element_not_lvalue) << First->getSourceRange());"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/foreach.m"]={"clang/test/SemaObjC/foreach.m:9:10: error: selector element is not a valid lvalue","clang/test/SemaObjC/foreach.m:10:10: error: selector element is not a valid lvalue","clang/test/SemaObjC/foreach.m:55:8: error: selector element is not a valid lvalue"} | ["clang/test/SemaObjC/foreach.m"]={"clang/test/SemaObjC/foreach.m:9:10: error: selector element is not a valid lvalue","clang/test/SemaObjC/foreach.m:10:10: error: selector element is not a valid lvalue","clang/test/SemaObjC/foreach.m:55:8: error: selector element is not a valid lvalue"} | ||
Line 3,512: | Line 3,540: | ||
}, | }, | ||
["err_selector_element_type"]={ | ["err_selector_element_type"]={ | ||
[ | [i]="err_selector_element_type", | ||
[ | [h]="selector element type %0 is not a valid object", | ||
[ | [g]="selector element type A is not a valid object", | ||
[ | [b]=k, | ||
[ | [e]="selector element type (.*?) is not a valid object", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{Z,2351,"StmtResult Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc) {\n // ...\n if (First) {\n // ...\n if (!FirstType->isDependentType() && !FirstType->isObjCObjectPointerType() && !FirstType->isBlockPointerType())\n return StmtError(Diag(ForLoc, diag::err_selector_element_type) << FirstType << First->getSourceRange());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/objc-forcollection-neg-2.m"]={"clang/test/Parser/objc-forcollection-neg-2.m:33:9: error: selector element type \'MyList<P> ***\' is not a valid object"} | ["clang/test/Parser/objc-forcollection-neg-2.m"]={"clang/test/Parser/objc-forcollection-neg-2.m:33:9: error: selector element type \'MyList<P> ***\' is not a valid object"} | ||
Line 3,526: | Line 3,554: | ||
}, | }, | ||
["err_setter_type_void"]={ | ["err_setter_type_void"]={ | ||
[ | [i]="err_setter_type_void", | ||
[h]="type of setter must be void", | |||
[g]="type of setter must be void", | |||
[b]=k, | |||
[e]="type of setter must be void", | [e]="type of setter must be void", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={K,1236199783,J,I}, | |||
[ | |||
[ | |||
[j]={{hb,2446,"/// ProcessPropertyDecl - Make sure that any user-defined setter/getter methods\n/// have the property type and issue diagnostics if they don\'t.\n/// Also synthesize a getter/setter method if none exist (and update the\n/// appropriate lookup tables.\nvoid Sema::ProcessPropertyDecl(ObjCPropertyDecl *property) {\n // ...\n if (!property->isReadOnly() && SetterMethod) {\n if (Context.getCanonicalType(SetterMethod->getReturnType()) != Context.VoidTy)\n Diag(SetterMethod->getLocation(), diag::err_setter_type_void);"}} | [j]={{hb,2446,"/// ProcessPropertyDecl - Make sure that any user-defined setter/getter methods\n/// have the property type and issue diagnostics if they don\'t.\n/// Also synthesize a getter/setter method if none exist (and update the\n/// appropriate lookup tables.\nvoid Sema::ProcessPropertyDecl(ObjCPropertyDecl *property) {\n // ...\n if (!property->isReadOnly() && SetterMethod) {\n if (Context.getCanonicalType(SetterMethod->getReturnType()) != Context.VoidTy)\n Diag(SetterMethod->getLocation(), diag::err_setter_type_void);"}} | ||
}, | }, | ||
["err_setting_eval_method_used_in_unsafe_context"]={ | ["err_setting_eval_method_used_in_unsafe_context"]={ | ||
[ | [i]={{nil,y,"err_setting_eval_method_used_in_unsafe_context"}}, | ||
[ | [h]={{nil,y,"%select{\'#pragma clang fp eval_method\'|option \'ffp-eval-method\'}0 cannot be used with %select{option \'fapprox-func\'|option \'mreassociate\'|option \'freciprocal\'|option \'ffp-eval-method\'|\'#pragma clang fp reassociate\'}1"}}, | ||
[ | [g]={{nil,y,{{"\'#pragma clang fp eval_method\'","option \'ffp-eval-method\'"}," cannot be used with ",{"option \'fapprox-func\'","option \'mreassociate\'","option \'freciprocal\'","option \'ffp-eval-method\'","\'#pragma clang fp reassociate\'"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:\'\\#pragma clang fp eval_method\'|option \'ffp\\-eval\\-method\') cannot be used with (?:option \'fapprox\\-func\'|option \'mreassociate\'|option \'freciprocal\'|option \'ffp\\-eval\\-method\'|\'\\#pragma clang fp reassociate\')", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,m}}, | ||
[ | [c]={md,1620118562,nd,od}, | ||
[j]={{L,540,"void Sema::ActOnPragmaFPEvalMethod(SourceLocation Loc, LangOptions::FPEvalMethodKind Value) {\n // ...\n if (getLangOpts().ApproxFunc)\n Diag(Loc, diag::err_setting_eval_method_used_in_unsafe_context) << 0 << 0;"},{L,542,"void Sema::ActOnPragmaFPEvalMethod(SourceLocation Loc, LangOptions::FPEvalMethodKind Value) {\n // ...\n if (getLangOpts().AllowFPReassoc)\n Diag(Loc, diag::err_setting_eval_method_used_in_unsafe_context) << 0 << 1;"},{L,544,"void Sema::ActOnPragmaFPEvalMethod(SourceLocation Loc, LangOptions::FPEvalMethodKind Value) {\n // ...\n if (getLangOpts().AllowRecip)\n Diag(Loc, diag::err_setting_eval_method_used_in_unsafe_context) << 0 << 2;"},{L,1336,"void Sema::ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled) {\n if (IsEnabled) {\n // ...\n if (Reason != -1)\n Diag(Loc, diag::err_setting_eval_method_used_in_unsafe_context) << Reason << 4;"}} | [j]={{L,540,"void Sema::ActOnPragmaFPEvalMethod(SourceLocation Loc, LangOptions::FPEvalMethodKind Value) {\n // ...\n if (getLangOpts().ApproxFunc)\n Diag(Loc, diag::err_setting_eval_method_used_in_unsafe_context) << 0 << 0;"},{L,542,"void Sema::ActOnPragmaFPEvalMethod(SourceLocation Loc, LangOptions::FPEvalMethodKind Value) {\n // ...\n if (getLangOpts().AllowFPReassoc)\n Diag(Loc, diag::err_setting_eval_method_used_in_unsafe_context) << 0 << 1;"},{L,544,"void Sema::ActOnPragmaFPEvalMethod(SourceLocation Loc, LangOptions::FPEvalMethodKind Value) {\n // ...\n if (getLangOpts().AllowRecip)\n Diag(Loc, diag::err_setting_eval_method_used_in_unsafe_context) << 0 << 2;"},{L,1336,"void Sema::ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled) {\n if (IsEnabled) {\n // ...\n if (Reason != -1)\n Diag(Loc, diag::err_setting_eval_method_used_in_unsafe_context) << Reason << 4;"}} | ||
}, | }, | ||
["err_shared_var_init"]={ | ["err_shared_var_init"]={ | ||
[ | [i]="err_shared_var_init", | ||
[ | [h]="initialization is not supported for __shared__ variables.", | ||
[ | [g]="initialization is not supported for __shared__ variables.", | ||
[ | [b]=k, | ||
[ | [e]="initialization is not supported for __shared__ variables\\.", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"97c01c35f8da",1454452188,"[CUDA] Do not allow dynamic initialization of global device side variables.","[CUDA] Do not allow dynamic initialization of global device side variables.\n\nIn general CUDA does not allow dynamic initialization of\nglobal device-side variables. One exception is that CUDA allows\nrecords with empty constructors as described in section E2.2.1 of\nCUDA 7.5 Programming guide.\n\nThis patch applies initializer checks for all device-side variables.\nEmpty constructors are accepted, but no code is generated for them.\n\nDifferential Revision: http://reviews.llvm.org/D15305\n\nllvm-svn: 259592"}, | ||
[j]={{"clang/lib/Sema/SemaCUDA.cpp",624,"void Sema::checkAllowedCUDAInitializer(VarDecl *VD) {\n // ...\n if (IsDeviceOrConstantVar || IsSharedVar) {\n // ...\n Diag(VD->getLocation(), IsSharedVar ? diag::err_shared_var_init : diag::err_dynamic_var_init) << Init->getSourceRange();"}}, | [j]={{"clang/lib/Sema/SemaCUDA.cpp",624,"void Sema::checkAllowedCUDAInitializer(VarDecl *VD) {\n // ...\n if (IsDeviceOrConstantVar || IsSharedVar) {\n // ...\n Diag(VD->getLocation(), IsSharedVar ? diag::err_shared_var_init : diag::err_dynamic_var_init) << Init->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 3,562: | Line 3,590: | ||
}, | }, | ||
["err_shift_rhs_only_vector"]={ | ["err_shift_rhs_only_vector"]={ | ||
[ | [i]="err_shift_rhs_only_vector", | ||
[ | [h]="requested shift is a vector of type %0 but the first operand is not a vector (%1)", | ||
[ | [g]="requested shift is a vector of type A but the first operand is not a vector (B)", | ||
[ | [b]=k, | ||
[ | [e]="requested shift is a vector of type (.*?) but the first operand is not a vector \\((.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c65605d008dd",1423201495,"OpenCL: handle shift operator with vector operands","OpenCL: handle shift operator with vector operands\n\nIntroduce a number of checks:\n1. If LHS is a scalar, then RHS cannot be a vector.\n2. Operands must be of integer type.\n3. If both are vectors, then the number of elements must match.\n\nRelax the requirement for \"usual arithmetic conversions\":\nWhen LHS is a vector, a scalar RHS can simply be expanded into a\nvector; OpenCL does not require that its rank be lower than the LHS.\nFor example, the following code is not an error even if the implicit\ntype of the constant literal is \"int\".\n\n char2 foo(char2 v) { return v << 1; }\n\nConsolidate existing tests under CodeGenOpenCL, and add more tests\nunder SemaOpenCL.\n\nllvm-svn: 228382"}, | ||
[j]={{n,12103,"/// Return the resulting type when a vector is shifted\n/// by a scalar or vector shift amount.\nstatic QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // OpenCL v1.1 s6.3.j says RHS can be a vector only if LHS is a vector.\n if ((S.LangOpts.OpenCL || S.LangOpts.ZVector) && !LHS.get()->getType()->isVectorType()) {\n S.Diag(Loc, diag::err_shift_rhs_only_vector) << RHS.get()->getType() << LHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | [j]={{n,12103,"/// Return the resulting type when a vector is shifted\n/// by a scalar or vector shift amount.\nstatic QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // OpenCL v1.1 s6.3.j says RHS can be a vector only if LHS is a vector.\n if ((S.LangOpts.OpenCL || S.LangOpts.ZVector) && !LHS.get()->getType()->isVectorType()) {\n S.Diag(Loc, diag::err_shift_rhs_only_vector) << RHS.get()->getType() << LHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 3,576: | Line 3,604: | ||
}, | }, | ||
["err_shufflevector_argument_too_large"]={ | ["err_shufflevector_argument_too_large"]={ | ||
[ | [i]="err_shufflevector_argument_too_large", | ||
[h]="index for __builtin_shufflevector must be less than the total number of vector elements", | |||
[g]="index for __builtin_shufflevector must be less than the total number of vector elements", | |||
[b]=k, | |||
[e]="index for __builtin_shufflevector must be less than the total number of vector elements", | [e]="index for __builtin_shufflevector must be less than the total number of vector elements", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{z,8508,"/// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.\n// This is declared to take (...), so we have to check everything.\nExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {\n // ...\n for (unsigned i = 2; i < TheCall->getNumArgs(); i++) {\n // ...\n if (Result->getActiveBits() > 64 || Result->getZExtValue() >= numElements * 2)\n return ExprError(Diag(TheCall->getBeginLoc(), diag::err_shufflevector_argument_too_large) << TheCall->getArg(i)->getSourceRange());"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/instantiate-clang.cpp"]={"clang/test/SemaTemplate/instantiate-clang.cpp:34:11: error: index for __builtin_shufflevector must be less than the total number of vector elements","clang/test/SemaTemplate/instantiate-clang.cpp:35:11: error: index for __builtin_shufflevector must be less than the total number of vector elements"} | ["clang/test/SemaTemplate/instantiate-clang.cpp"]={"clang/test/SemaTemplate/instantiate-clang.cpp:34:11: error: index for __builtin_shufflevector must be less than the total number of vector elements","clang/test/SemaTemplate/instantiate-clang.cpp:35:11: error: index for __builtin_shufflevector must be less than the total number of vector elements"} | ||
Line 3,590: | Line 3,618: | ||
}, | }, | ||
["err_shufflevector_nonconstant_argument"]={ | ["err_shufflevector_nonconstant_argument"]={ | ||
[ | [i]="err_shufflevector_nonconstant_argument", | ||
[h]="index for __builtin_shufflevector must be a constant integer", | |||
[g]="index for __builtin_shufflevector must be a constant integer", | |||
[b]=k, | |||
[e]="index for __builtin_shufflevector must be a constant integer", | [e]="index for __builtin_shufflevector must be a constant integer", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={u,1237025389,s,t}, | |||
[j]={{z,8498,"/// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.\n// This is declared to take (...), so we have to check everything.\nExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {\n // ...\n for (unsigned i = 2; i < TheCall->getNumArgs(); i++) {\n // ...\n if (!(Result = TheCall->getArg(i)->getIntegerConstantExpr(Context)))\n return ExprError(Diag(TheCall->getBeginLoc(), diag::err_shufflevector_nonconstant_argument) << TheCall->getArg(i)->getSourceRange());"}} | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_single_decl_assign_in_for_range"]={ | ["err_single_decl_assign_in_for_range"]={ | ||
[ | [i]="err_single_decl_assign_in_for_range", | ||
[ | [h]="range-based \'for\' statement uses \':\', not \'=\'", | ||
[ | [g]="range-based \'for\' statement uses \':\', not \'=\'", | ||
[ | [b]=k, | ||
[ | [e]="range\\-based \'for\' statement uses \'\\:\', not \'\\=\'", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"49ff754d4be5",1399548505,"Suggest fix-it \':\' when \'=\' used in for-range-declaration","Suggest fix-it \':\' when \'=\' used in for-range-declaration\n\nFix for PR19176. Clang will suggest a fix-it hint for cases like:\n int arr[] = {1, 2, 3, 4};\n for (auto i = arr)\n ^\n :\n\nllvm-svn: 208299"}, | ||
[j]={{ | [j]={{jb,2532,"Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(Declarator &D, const ParsedTemplateInfo &TemplateInfo, ForRangeInit *FRI) {\n // ...\n // Parse declarator \'=\' initializer.\n case InitKind::Equal: {\n // ...\n if (Tok.is(tok::kw_delete)) {\n // ...\n } else if (Tok.is(tok::kw_default)) {\n // ...\n } else {\n // ...\n // If this is the only decl in (possibly) range based for statement,\n // our best guess is that the user meant \':\' instead of \'=\'.\n if (Tok.is(tok::r_paren) && FRI && D.isFirstDeclarator()) {\n Diag(EqualLoc, diag::err_single_decl_assign_in_for_range) << FixItHint::CreateReplacement(EqualLoc, \":\");"}} | ||
}, | }, | ||
["err_size_t_literal_too_large"]={ | ["err_size_t_literal_too_large"]={ | ||
[ | [i]={{nil,F,"err_size_t_literal_too_large"}}, | ||
[ | [h]={{nil,F,"%select{signed |}0\'size_t\' literal is out of range of possible %select{signed |}0\'size_t\' values"}}, | ||
[ | [g]={{nil,F,{{"signed ",a},"\'size_t\' literal is out of range of possible ",{"signed ",a},"\'size_t\' values"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:signed |)\'size_t\' literal is out of range of possible (?:signed |)\'size_t\' values", | ||
[ | [f]=a, | ||
[ | [d]={{nil,F,a}}, | ||
[ | [c]={"dc7ebd2cb0cf",1616862441,"[C++2b] Support size_t literals","[C++2b] Support size_t literals\n\nThis adds support for C++2b\'s z/uz suffixes for size_t literals (P0330)."}, | ||
[j]={{n,4241,"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 Diag(Tok.getLocation(), diag::err_size_t_literal_too_large) << Literal.isUnsigned;"}}, | [j]={{n,4241,"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 Diag(Tok.getLocation(), diag::err_size_t_literal_too_large) << Literal.isUnsigned;"}}, | ||
[l]={ | [l]={ | ||
Line 3,626: | Line 3,654: | ||
}, | }, | ||
["err_sizeless_in_exception_spec"]={ | ["err_sizeless_in_exception_spec"]={ | ||
[ | [i]={{nil,q,"err_sizeless_in_exception_spec"}}, | ||
[ | [h]={{nil,q,"%select{|reference to }0sizeless type %1 is not allowed in exception specification"}}, | ||
[ | [g]={{nil,q,{{a,"reference to "},"sizeless type B is not allowed in exception specification"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:|reference to )sizeless type (.*?) is not allowed in exception specification", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{"clang/lib/Sema/SemaExceptionSpec.cpp",185,"/// 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 // The MSVC compatibility mode doesn\'t extend to sizeless types,\n // so diagnose them separately.\n if (PointeeT->isSizelessType() && Kind != 1) {\n Diag(Range.getBegin(), diag::err_sizeless_in_exception_spec) << (Kind == 2 ? 1 : 0) << PointeeT << Range;"}}, | [j]={{"clang/lib/Sema/SemaExceptionSpec.cpp",185,"/// 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 // The MSVC compatibility mode doesn\'t extend to sizeless types,\n // so diagnose them separately.\n if (PointeeT->isSizelessType() && Kind != 1) {\n Diag(Range.getBegin(), diag::err_sizeless_in_exception_spec) << (Kind == 2 ? 1 : 0) << PointeeT << Range;"}}, | ||
[l]={ | [l]={ | ||
Line 3,640: | Line 3,668: | ||
}, | }, | ||
["err_sizeless_nonlocal"]={ | ["err_sizeless_nonlocal"]={ | ||
[ | [i]={{nil,q,"err_sizeless_nonlocal"}}, | ||
[ | [h]={{nil,q,"non-local variable with sizeless type %0"}}, | ||
[ | [g]={{nil,q,"non-local variable with sizeless type A"}}, | ||
[ | [b]=k, | ||
[ | [e]="non\\-local variable with sizeless type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{ | [j]={{w,8749,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (!NewVD->hasLocalStorage() && T->isSizelessType() && !T.isWebAssemblyReferenceType()) {\n Diag(NewVD->getLocation(), diag::err_sizeless_nonlocal) << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/sizeless-1.c"]={"clang/test/Sema/sizeless-1.c:8:10: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')","clang/test/Sema/sizeless-1.c:9:17: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')","clang/test/Sema/sizeless-1.c:10:17: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')","clang/test/Sema/sizeless-1.c:11:19: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')","clang/test/Sema/sizeless-1.c:57:19: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')"} | ["clang/test/Sema/sizeless-1.c"]={"clang/test/Sema/sizeless-1.c:8:10: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')","clang/test/Sema/sizeless-1.c:9:17: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')","clang/test/Sema/sizeless-1.c:10:17: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')","clang/test/Sema/sizeless-1.c:11:19: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')","clang/test/Sema/sizeless-1.c:57:19: error: non-local variable with sizeless type \'svint8_t\' (aka \'__SVInt8_t\')"} | ||
Line 3,654: | Line 3,682: | ||
}, | }, | ||
["err_sizeof_alignof_function_type"]={ | ["err_sizeof_alignof_function_type"]={ | ||
[ | [i]="err_sizeof_alignof_function_type", | ||
[ | [h]={{nil,q,"invalid application of \'%0\' to a function type"},{p,E,"invalid application of \'%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align|__alignof}0\' to a function type"},{ic,nil,"invalid application of \'%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align}0\' to a function type"}}, | ||
[ | [g]={{nil,q,"invalid application of \'A\' to a function type"},{p,E,{"invalid application of \'",{jd,qd,"vec_step","__builtin_omp_required_simd_align","__alignof"},"\' to a function type"}},{ic,nil,{"invalid application of \'",{jd,qd,"vec_step","__builtin_omp_required_simd_align"},"\' to a function type"}}}, | ||
[ | [b]=k, | ||
[ | [e]="invalid application of \'(.*?)\' to a function type", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"4e28b2658901",1376432802,"sizeof(void) etc. should be a hard error in C++.","sizeof(void) etc. should be a hard error in C++.\n\nPR16872.\n\nllvm-svn: 188324"}, | ||
[j]={{n,4441,"/// 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 if (ExprTy->isFunctionType()) {\n Diag(E->getExprLoc(), diag::err_sizeof_alignof_function_type) << getTraitSpelling(ExprKind) << E->getSourceRange();"},{n,4700,"/// 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 if (ExprType->isFunctionType()) {\n Diag(OpLoc, diag::err_sizeof_alignof_function_type) << KWName << ExprRange;"}}, | [j]={{n,4441,"/// 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 if (ExprTy->isFunctionType()) {\n Diag(E->getExprLoc(), diag::err_sizeof_alignof_function_type) << getTraitSpelling(ExprKind) << E->getSourceRange();"},{n,4700,"/// 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 if (ExprType->isFunctionType()) {\n Diag(OpLoc, diag::err_sizeof_alignof_function_type) << KWName << ExprRange;"}}, | ||
[l]={ | [l]={ | ||
Line 3,668: | Line 3,696: | ||
}, | }, | ||
["err_sizeof_alignof_incomplete_or_sizeless_type"]={ | ["err_sizeof_alignof_incomplete_or_sizeless_type"]={ | ||
[ | [i]={{nil,q,"err_sizeof_alignof_incomplete_or_sizeless_type"}}, | ||
[ | [h]={{nil,q,"invalid application of \'%0\' to %select{an incomplete|sizeless}1 type %2"}}, | ||
[ | [g]={{nil,q,{"invalid application of \'A\' to ",{"an incomplete","sizeless"}," type C"}}}, | ||
[ | [b]=k, | ||
[ | [e]="invalid application of \'(.*?)\' to (?:an incomplete|sizeless) type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,4416,"/// 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 // \'alignof\' applied to an expression only requires the base element type of\n // the expression to be complete. \'sizeof\' requires the expression\'s type to\n // be complete (and will attempt to complete it if it\'s an array of unknown\n // bound).\n if (ExprKind == UETT_AlignOf || ExprKind == UETT_PreferredAlignOf) {\n if (RequireCompleteSizedType(E->getExprLoc(), Context.getBaseElementType(E->getType()), diag::err_sizeof_alignof_incomplete_or_sizeless_type, getTraitSpelling(ExprKind), E->getSourceRange()))"},{n,4426,"/// 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 // \'alignof\' applied to an expression only requires the base element type of\n // the expression to be complete. \'sizeof\' requires the expression\'s type to\n // be complete (and will attempt to complete it if it\'s an array of unknown\n // bound).\n if (ExprKind == UETT_AlignOf || ExprKind == UETT_PreferredAlignOf) {\n // ...\n } else {\n if (RequireCompleteSizedExprType(E, diag::err_sizeof_alignof_incomplete_or_sizeless_type, getTraitSpelling(ExprKind), E->getSourceRange()))"},{n,4692,"/// 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 if (RequireCompleteSizedType(OpLoc, ExprType, diag::err_sizeof_alignof_incomplete_or_sizeless_type, KWName, ExprRange))"}}, | [j]={{n,4416,"/// 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 // \'alignof\' applied to an expression only requires the base element type of\n // the expression to be complete. \'sizeof\' requires the expression\'s type to\n // be complete (and will attempt to complete it if it\'s an array of unknown\n // bound).\n if (ExprKind == UETT_AlignOf || ExprKind == UETT_PreferredAlignOf) {\n if (RequireCompleteSizedType(E->getExprLoc(), Context.getBaseElementType(E->getType()), diag::err_sizeof_alignof_incomplete_or_sizeless_type, getTraitSpelling(ExprKind), E->getSourceRange()))"},{n,4426,"/// 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 // \'alignof\' applied to an expression only requires the base element type of\n // the expression to be complete. \'sizeof\' requires the expression\'s type to\n // be complete (and will attempt to complete it if it\'s an array of unknown\n // bound).\n if (ExprKind == UETT_AlignOf || ExprKind == UETT_PreferredAlignOf) {\n // ...\n } else {\n if (RequireCompleteSizedExprType(E, diag::err_sizeof_alignof_incomplete_or_sizeless_type, getTraitSpelling(ExprKind), E->getSourceRange()))"},{n,4692,"/// 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 if (RequireCompleteSizedType(OpLoc, ExprType, diag::err_sizeof_alignof_incomplete_or_sizeless_type, KWName, ExprRange))"}}, | ||
[l]={ | [l]={ | ||
Line 3,682: | Line 3,710: | ||
}, | }, | ||
["err_sizeof_alignof_typeof_bitfield"]={ | ["err_sizeof_alignof_typeof_bitfield"]={ | ||
[ | [i]="err_sizeof_alignof_typeof_bitfield", | ||
[ | [h]={{nil,M,"invalid application of \'%select{sizeof|alignof|typeof|typeof_unqual}0\' to bit-field"},{y,nil,"invalid application of \'%select{sizeof|alignof|typeof}0\' to bit-field"}}, | ||
[ | [g]={{nil,M,{"invalid application of \'",{jd,qd,"typeof","typeof_unqual"},"\' to bit-field"}},{y,nil,{"invalid application of \'",{jd,qd,"typeof"},"\' to bit-field"}}}, | ||
[ | [b]=k, | ||
[ | [e]="invalid application of \'(?:sizeof|alignof|typeof|typeof_unqual)\' to bit\\-field", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e301ba2b4891",1447207335,"Add support for GCC\'s \'__auto_type\' extension, per the GCC manual:","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"}, | ||
[j]={{n,4502,"static bool CheckAlignOfExpr(Sema &S, Expr *E, UnaryExprOrTypeTrait ExprKind) {\n // ...\n if (E->getObjectKind() == OK_BitField) {\n S.Diag(E->getExprLoc(), diag::err_sizeof_alignof_typeof_bitfield) << 1 << E->getSourceRange();"},{n,4878,"/// Build a sizeof or alignof expression given an expression\n/// operand.\nExprResult Sema::CreateUnaryExprOrTypeTraitExpr(Expr *E, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind) {\n // ...\n if (E->isTypeDependent()) {\n // ...\n } else if (ExprKind == UETT_AlignOf || ExprKind == UETT_PreferredAlignOf) {\n // ...\n } else if (ExprKind == UETT_VecStep) {\n // ...\n } else if (ExprKind == UETT_OpenMPRequiredSimdAlign) {\n // ...\n } else if (E->refersToBitField()) { // C99 6.5.3.4p1.\n Diag(E->getExprLoc(), diag::err_sizeof_alignof_typeof_bitfield) << 0;"},{ | [j]={{n,4502,"static bool CheckAlignOfExpr(Sema &S, Expr *E, UnaryExprOrTypeTrait ExprKind) {\n // ...\n if (E->getObjectKind() == OK_BitField) {\n S.Diag(E->getExprLoc(), diag::err_sizeof_alignof_typeof_bitfield) << 1 << E->getSourceRange();"},{n,4878,"/// Build a sizeof or alignof expression given an expression\n/// operand.\nExprResult Sema::CreateUnaryExprOrTypeTraitExpr(Expr *E, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind) {\n // ...\n if (E->isTypeDependent()) {\n // ...\n } else if (ExprKind == UETT_AlignOf || ExprKind == UETT_PreferredAlignOf) {\n // ...\n } else if (ExprKind == UETT_VecStep) {\n // ...\n } else if (ExprKind == UETT_OpenMPRequiredSimdAlign) {\n // ...\n } else if (E->refersToBitField()) { // C99 6.5.3.4p1.\n Diag(E->getExprLoc(), diag::err_sizeof_alignof_typeof_bitfield) << 0;"},{R,9412,"QualType Sema::BuildTypeofExprType(Expr *E, TypeOfKind Kind) {\n // ...\n if (!getLangOpts().CPlusPlus && E->refersToBitField())\n Diag(E->getExprLoc(), diag::err_sizeof_alignof_typeof_bitfield) << (Kind == TypeOfKind::Unqualified ? 3 : 2);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/c2x-typeof.c"]={"clang/test/Sema/c2x-typeof.c:48:7: error: invalid application of \'typeof\' to bit-field","clang/test/Sema/c2x-typeof.c:49:14: error: invalid application of \'typeof_unqual\' to bit-field"} | ["clang/test/Sema/c2x-typeof.c"]={"clang/test/Sema/c2x-typeof.c:48:7: error: invalid application of \'typeof\' to bit-field","clang/test/Sema/c2x-typeof.c:49:14: error: invalid application of \'typeof_unqual\' to bit-field"} | ||
Line 3,696: | Line 3,724: | ||
}, | }, | ||
["err_sizeof_nonfragile_interface"]={ | ["err_sizeof_nonfragile_interface"]={ | ||
[ | [i]="err_sizeof_nonfragile_interface", | ||
[ | [h]="application of \'%select{alignof|sizeof}1\' to interface %0 is not supported on this architecture and platform", | ||
[ | [g]={{nil,nil,{"application of \'",{qd,jd},"\' to interface A is not supported on this architecture and platform"}}}, | ||
[ | [b]=k, | ||
[ | [e]="application of \'(?:alignof|sizeof)\' to interface (.*?) is not supported on this architecture and platform", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"37920f53599e",1240343716,"reject sizeof(itf) when itf is a forward declared interface, or when","reject sizeof(itf) when itf is a forward declared interface, or when\nin non-fragile abi mode. rdar://6811884\n\nllvm-svn: 69701"}, | ||
[j]={{n,4348,"static bool CheckObjCTraitOperandConstraints(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) {\n // Reject sizeof(interface) and sizeof(interface<proto>) if the\n // runtime doesn\'t allow it.\n if (!S.LangOpts.ObjCRuntime.allowsSizeofAlignof() && T->isObjCObjectType()) {\n S.Diag(Loc, diag::err_sizeof_nonfragile_interface) << T << (TraitKind == UETT_SizeOf) << ArgRange;"}}, | [j]={{n,4348,"static bool CheckObjCTraitOperandConstraints(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) {\n // Reject sizeof(interface) and sizeof(interface<proto>) if the\n // runtime doesn\'t allow it.\n if (!S.LangOpts.ObjCRuntime.allowsSizeofAlignof() && T->isObjCObjectType()) {\n S.Diag(Loc, diag::err_sizeof_nonfragile_interface) << T << (TraitKind == UETT_SizeOf) << ArgRange;"}}, | ||
[l]={ | [l]={ | ||
Line 3,710: | Line 3,738: | ||
}, | }, | ||
["err_sizeof_pack_no_pack_name"]={ | ["err_sizeof_pack_no_pack_name"]={ | ||
[ | [i]="err_sizeof_pack_no_pack_name", | ||
[ | [h]="%0 does not refer to the name of a parameter pack", | ||
[ | [g]="A does not refer to the name of a parameter pack", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) does not refer to the name of a parameter pack", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"820ba7ba43a2",1294162438,"Implement the sizeof...(pack) expression to compute the length of a","Implement the sizeof...(pack) expression to compute the length of a\nparameter pack.\n\nNote that we\'re missing proper libclang support for the new\nSizeOfPackExpr expression node.\n\nllvm-svn: 122813"}, | ||
[j]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",1047,"/// Called when an expression computing the size of a parameter pack\n/// is parsed.\n///\n/// \\code\n/// template<typename ...Types> struct count {\n/// static const unsigned value = sizeof...(Types);\n/// };\n/// \\endcode\n///\n//\n/// \\param OpLoc The location of the \"sizeof\" keyword.\n/// \\param Name The name of the parameter pack whose size will be determined.\n/// \\param NameLoc The source location of the name of the parameter pack.\n/// \\param RParenLoc The location of the closing parentheses.\nExprResult Sema::ActOnSizeofParameterPackExpr(Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc) {\n // ...\n if (!ParameterPack || !ParameterPack->isParameterPack()) {\n Diag(NameLoc, diag::err_sizeof_pack_no_pack_name) << &Name;"}}, | [j]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",1047,"/// Called when an expression computing the size of a parameter pack\n/// is parsed.\n///\n/// \\code\n/// template<typename ...Types> struct count {\n/// static const unsigned value = sizeof...(Types);\n/// };\n/// \\endcode\n///\n//\n/// \\param OpLoc The location of the \"sizeof\" keyword.\n/// \\param Name The name of the parameter pack whose size will be determined.\n/// \\param NameLoc The source location of the name of the parameter pack.\n/// \\param RParenLoc The location of the closing parentheses.\nExprResult Sema::ActOnSizeofParameterPackExpr(Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc) {\n // ...\n if (!ParameterPack || !ParameterPack->isParameterPack()) {\n Diag(NameLoc, diag::err_sizeof_pack_no_pack_name) << &Name;"}}, | ||
[l]={ | [l]={ | ||
Line 3,724: | Line 3,752: | ||
}, | }, | ||
["err_sizeof_pack_no_pack_name_suggest"]={ | ["err_sizeof_pack_no_pack_name_suggest"]={ | ||
[ | [i]="err_sizeof_pack_no_pack_name_suggest", | ||
[ | [h]="%0 does not refer to the name of a parameter pack; did you mean %1?", | ||
[ | [g]="A does not refer to the name of a parameter pack; did you mean B?", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) does not refer to the name of a parameter pack; did you mean (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"820ba7ba43a2",1294162438,"Implement the sizeof...(pack) expression to compute the length of a","Implement the sizeof...(pack) expression to compute the length of a\nparameter pack.\n\nNote that we\'re missing proper libclang support for the new\nSizeOfPackExpr expression node.\n\nllvm-svn: 122813"}, | ||
[j]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",1031,"/// Called when an expression computing the size of a parameter pack\n/// is parsed.\n///\n/// \\code\n/// template<typename ...Types> struct count {\n/// static const unsigned value = sizeof...(Types);\n/// };\n/// \\endcode\n///\n//\n/// \\param OpLoc The location of the \"sizeof\" keyword.\n/// \\param Name The name of the parameter pack whose size will be determined.\n/// \\param NameLoc The source location of the name of the parameter pack.\n/// \\param RParenLoc The location of the closing parentheses.\nExprResult Sema::ActOnSizeofParameterPackExpr(Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc) {\n // ...\n case LookupResult::NotFound:\n case LookupResult::NotFoundInCurrentInstantiation: {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), S, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(Corrected, PDiag(diag::err_sizeof_pack_no_pack_name_suggest) << &Name, PDiag(diag::note_parameter_pack_here));"}}, | [j]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",1031,"/// Called when an expression computing the size of a parameter pack\n/// is parsed.\n///\n/// \\code\n/// template<typename ...Types> struct count {\n/// static const unsigned value = sizeof...(Types);\n/// };\n/// \\endcode\n///\n//\n/// \\param OpLoc The location of the \"sizeof\" keyword.\n/// \\param Name The name of the parameter pack whose size will be determined.\n/// \\param NameLoc The source location of the name of the parameter pack.\n/// \\param RParenLoc The location of the closing parentheses.\nExprResult Sema::ActOnSizeofParameterPackExpr(Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc) {\n // ...\n case LookupResult::NotFound:\n case LookupResult::NotFoundInCurrentInstantiation: {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), S, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(Corrected, PDiag(diag::err_sizeof_pack_no_pack_name_suggest) << &Name, PDiag(diag::note_parameter_pack_here));"}}, | ||
[l]={ | [l]={ | ||
Line 3,738: | Line 3,766: | ||
}, | }, | ||
["err_sizeof_parameter_pack"]={ | ["err_sizeof_parameter_pack"]={ | ||
[ | [i]="err_sizeof_parameter_pack", | ||
[ | [h]="expected parenthesized parameter pack name in \'sizeof...\' expression", | ||
[ | [g]="expected parenthesized parameter pack name in \'sizeof...\' expression", | ||
[ | [b]=k, | ||
[ | [e]="expected parenthesized parameter pack name in \'sizeof\\.\\.\\.\' expression", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"820ba7ba43a2",1294162438,"Implement the sizeof...(pack) expression to compute the length of a","Implement the sizeof...(pack) expression to compute the length of a\nparameter pack.\n\nNote that we\'re missing proper libclang support for the new\nSizeOfPackExpr expression node.\n\nllvm-svn: 122813"}, | ||
[j]={{"clang/lib/Parse/ParseExpr.cpp",2477,"/// 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 // [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n if (Tok.is(tok::ellipsis) && OpTok.is(tok::kw_sizeof)) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n } else {\n Diag(Tok, diag::err_sizeof_parameter_pack);"}} | [j]={{"clang/lib/Parse/ParseExpr.cpp",2477,"/// 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 // [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n if (Tok.is(tok::ellipsis) && OpTok.is(tok::kw_sizeof)) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n } else {\n Diag(Tok, diag::err_sizeof_parameter_pack);"}} | ||
}, | }, | ||
["err_sls_hardening_arm_not_supported"]={ | ["err_sls_hardening_arm_not_supported"]={ | ||
[ | [i]={{nil,v,"err_sls_hardening_arm_not_supported"}}, | ||
[ | [h]={{nil,v,"-mharden-sls is only supported on armv7-a or later"}}, | ||
[ | [g]={{nil,v,"-mharden-sls is only supported on armv7-a or later"}}, | ||
[ | [b]=k, | ||
[ | [e]="\\-mharden\\-sls is only supported on armv7\\-a or later", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,a}}, | ||
[ | [c]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee","[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee\n\nAMDGPU backend need to know whether floating point opcodes that support exception\nflag gathering quiet and propagate signaling NaN inputs per IEEE754-2008, which is\nconveyed by a function attribute \"amdgpu-ieee\". \"amdgpu-ieee\"=\"false\" turns this off.\nWithout this function attribute backend assumes it is on for compute functions.\n\n-mamdgpu-ieee and -mno-amdgpu-ieee are added to Clang to control this function attribute.\nBy default it is on. -mno-amdgpu-ieee requires -fno-honor-nans or equivalent.\n\nReviewed by: Matt Arsenault\n\nDifferential Revision: https://reviews.llvm.org/D77013"}, | ||
[j]={{ | [j]={{sd,954,"llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS, bool ForMultilib) {\n // ...\n // Enable/disable straight line speculation hardening.\n if (Arg *A = Args.getLastArg(options::OPT_mharden_sls_EQ)) {\n // ...\n if (EnableRetBr || EnableBlr)\n if (!(isARMAProfile(Triple) && getARMSubArchVersionNumber(Triple) >= 7))\n D.Diag(diag::err_sls_hardening_arm_not_supported) << Scope << A->getAsString(Args);"}} | ||
}, | }, | ||
["err_spaceship_argument_narrowing"]={ | ["err_spaceship_argument_narrowing"]={ | ||
[ | [i]={{nil,O,"err_spaceship_argument_narrowing"}}, | ||
[ | [h]={{nil,O,"argument to \'operator<=>\' %select{cannot be narrowed from type %1 to %2|evaluates to %1, which cannot be narrowed to type %2}0"}}, | ||
[ | [g]={{nil,O,{"argument to \'operator<=>\' ",{"cannot be narrowed from type B to C","evaluates to B, which cannot be narrowed to type C"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="argument to \'operator\\<\\=\\>\' (?:cannot be narrowed from type (.*?) to (.*?)|evaluates to (.*?), which cannot be narrowed to type (.*?))", | ||
[ | [f]=a, | ||
[ | [d]={{nil,O,a}}, | ||
[ | [c]={"0683c0e68d31",1525727230,"[C++2a] Implement operator<=> CodeGen and ExprConstant","[C++2a] Implement operator<=> CodeGen and ExprConstant\n\nSummary:\nThis patch tackles long hanging fruit for the builtin operator<=> expressions. It is currently needs some cleanup before landing, but I want to get some initial feedback.\n\nThe main changes are:\n\n* Lookup, build, and store the required standard library types and expressions in `ASTContext`. By storing them in ASTContext we don\'t need to store (and duplicate) the required expressions in the BinaryOperator AST nodes. \n\n* Implement [expr.spaceship] checking, including diagnosing narrowing conversions. \n\n* Implement `ExprConstant` for builtin spaceship operators.\n\n* Implement builitin operator<=> support in `CodeGenAgg`. Initially I emitted the required comparisons using `ScalarExprEmitter::VisitBinaryOperator`, but this caused the operand expressions to be emitted once for every required cmp.\n\n* Implement [builtin.over] with modifications to support the intent of P0946R0. See the note on `BuiltinOperatorOverloadBuilder::addThreeWayArithmeticOverloads` for more information about the workaround.\n\n\n\n\nReviewers: rsmith, aaron.ballman, majnemer, rnk, compnerd, rjmccall\n\nReviewed By: rjmccall\n\nSubscribers: rjmccall, rsmith, aaron.ballman, junbuml, mgorny, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D45476\n\nllvm-svn: 331677"}, | ||
[j]={{n,12780,"static bool checkThreeWayNarrowingConversion(Sema &S, QualType ToType, Expr *E, QualType FromType, SourceLocation Loc) {\n // ...\n case NK_Constant_Narrowing:\n // ...\n S.Diag(E->getBeginLoc(), diag::err_spaceship_argument_narrowing) << /*Constant*/ 1 << PreNarrowingValue.getAsString(S.Context, PreNarrowingType) << ToType;"},{n,12908,"static bool checkThreeWayNarrowingConversion(Sema &S, QualType ToType, Expr *E, QualType FromType, SourceLocation Loc) {\n // ...\n case NK_Type_Narrowing:\n S.Diag(E->getBeginLoc(), diag::err_spaceship_argument_narrowing) << /*Constant*/ 0 << FromType << ToType;"}}, | [j]={{n,12780,"static bool checkThreeWayNarrowingConversion(Sema &S, QualType ToType, Expr *E, QualType FromType, SourceLocation Loc) {\n // ...\n case NK_Constant_Narrowing:\n // ...\n S.Diag(E->getBeginLoc(), diag::err_spaceship_argument_narrowing) << /*Constant*/ 1 << PreNarrowingValue.getAsString(S.Context, PreNarrowingType) << ToType;"},{n,12908,"static bool checkThreeWayNarrowingConversion(Sema &S, QualType ToType, Expr *E, QualType FromType, SourceLocation Loc) {\n // ...\n case NK_Type_Narrowing:\n S.Diag(E->getBeginLoc(), diag::err_spaceship_argument_narrowing) << /*Constant*/ 0 << FromType << ToType;"}}, | ||
[l]={ | [l]={ | ||
Line 3,774: | Line 3,802: | ||
}, | }, | ||
["err_spec_member_not_instantiated"]={ | ["err_spec_member_not_instantiated"]={ | ||
[ | [i]="err_spec_member_not_instantiated", | ||
[ | [h]="specialization of member %q0 does not specialize an instantiated member", | ||
[ | [g]="specialization of member A does not specialize an instantiated member", | ||
[ | [b]=k, | ||
[ | [e]="specialization of member (.*?) does not specialize an instantiated member", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"86d142a80113",1254986698,"For instantiations of static data members of class templates, keep","For instantiations of static data members of class templates, keep\ntrack of the kind of specialization or instantiation. Also, check the\nscope of the specialization and ensure that a specialization\ndeclaration without an initializer is not a definition.\n\nllvm-svn: 83533"}, | ||
[j]={{ | [j]={{r,9715,"/// Perform semantic analysis for the given non-template member\n/// specialization.\n///\n/// This routine performs all of the semantic analysis required for an\n/// explicit member function specialization. On successful completion,\n/// the function declaration \\p FD will become a member function\n/// specialization.\n///\n/// \\param Member the member declaration, which will be updated to become a\n/// specialization.\n///\n/// \\param Previous the set of declarations, one of which may be specialized\n/// by this function specialization; the set will be modified to contain the\n/// redeclared member.\nbool Sema::CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous) {\n // ...\n // Make sure that this is a specialization of a member.\n if (!InstantiatedFrom) {\n Diag(Member->getLocation(), diag::err_spec_member_not_instantiated) << Member;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp:70:21: error: specialization of member \'X<IntHolder, long>::X\' does not specialize an instantiated member"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp:70:21: error: specialization of member \'X<IntHolder, long>::X\' does not specialize an instantiated member"} | ||
Line 3,788: | Line 3,816: | ||
}, | }, | ||
["err_specialization_after_instantiation"]={ | ["err_specialization_after_instantiation"]={ | ||
[ | [i]="err_specialization_after_instantiation", | ||
[ | [h]="explicit specialization of %0 after instantiation", | ||
[ | [g]="explicit specialization of A after instantiation", | ||
[ | [b]=k, | ||
[ | [e]="explicit specialization of (.*?) after instantiation", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"06db9f50a2d6",1255378708,"Diagnose the declaration of explicit specializations after an implicit","Diagnose the declaration of explicit specializations after an implicit\ninstantiation has already been required. To do so, keep track of the\npoint of instantiation for anything that can be instantiated.\n\nllvm-svn: 83890"}, | ||
[j]={{ | [j]={{r,4674,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n // ...\n // C++ [temp.expl.spec]p6:\n // If a template, a member template or the member of a class template is\n // explicitly specialized then that specialization shall be declared\n // before the first use of that specialization that would cause an implicit\n // instantiation to take place, in every translation unit in which such a\n // use occurs; no diagnostic is required.\n if (PrevDecl && PrevDecl->getPointOfInstantiation().isValid()) {\n // ...\n if (!Okay) {\n // ...\n Diag(TemplateNameLoc, diag::err_specialization_after_instantiation) << Name << Range;"},{r,8879,"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 // C++ [temp.expl.spec]p6:\n // If a template, a member template or the member of a class template is\n // explicitly specialized then that specialization shall be declared\n // before the first use of that specialization that would cause an implicit\n // instantiation to take place, in every translation unit in which such a\n // use occurs; no diagnostic is required.\n if (PrevDecl && PrevDecl->getPointOfInstantiation().isValid()) {\n // ...\n if (!Okay) {\n // ...\n Diag(TemplateNameLoc, diag::err_specialization_after_instantiation) << Context.getTypeDeclType(Specialization) << Range;"},{r,9200,"/// 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_ExplicitSpecialization:\n // ...\n case TSK_ExplicitInstantiationDeclaration:\n case TSK_ExplicitInstantiationDefinition:\n // ...\n Diag(NewLoc, diag::err_specialization_after_instantiation) << PrevDecl;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:25:15: error: explicit specialization of \'f\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:29:15: error: explicit specialization of \'g<int>\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:33:17: error: explicit specialization of \'Nested\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:36:14: error: explicit specialization of \'member\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:39:8: error: explicit specialization of \'X0<int>\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:55:17: error: explicit specialization of \'sort<String>\' after instantiation"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:25:15: error: explicit specialization of \'f\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:29:15: error: explicit specialization of \'g<int>\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:33:17: error: explicit specialization of \'Nested\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:36:14: error: explicit specialization of \'member\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:39:8: error: explicit specialization of \'X0<int>\' after instantiation","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:55:17: error: explicit specialization of \'sort<String>\' after instantiation"} | ||
Line 3,802: | Line 3,830: | ||
}, | }, | ||
["err_specialization_not_primary_template"]={ | ["err_specialization_not_primary_template"]={ | ||
[ | [i]={{nil,o,"err_specialization_not_primary_template"}}, | ||
[ | [h]={{nil,o,"cannot reference member of primary template because deduced class template specialization %0 is %select{instantiated from a partial|an explicit}1 specialization"}}, | ||
[ | [g]={{nil,o,{"cannot reference member of primary template because deduced class template specialization A is ",{"instantiated from a partial","an explicit"}," specialization"}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot reference member of primary template because deduced class template specialization (.*?) is (?:instantiated from a partial|an explicit) specialization", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,m}}, | ||
[ | [c]={"e6d4b773dea2",1496803347,"Fix a couple of class template argument deduction crashes with libc++\'s tuple.","Fix a couple of class template argument deduction crashes with libc++\'s tuple.\n\nRecursiveASTVisitor was not properly recursing through a\nSubstTemplateTypeParmTypes, resulting in crashes in pack expansion where we\ncouldn\'t always find an unexpanded pack within a pack expansion.\n\nWe also have an issue where substitution of deduced template arguments for an\nimplicit deduction guide creates the \"impossible\" case of naming a\nnon-dependent member of the current instantiation, but within a specialization\nthat is actually instantiated from a different (partial/explicit)\nspecialization of the template. We resolve this by declaring that constructors\nthat do so can only be used to deduce specializations of the primary template.\nI\'m running this past CWG to see if people agree this is the right thing to do.\n\nllvm-svn: 304862"}, | ||
[j]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",6233,"/// Find the instantiation of the given declaration within the\n/// current instantiation.\n///\n/// This routine is intended to be used when \\p D is a declaration\n/// referenced from within a template, that needs to mapped into the\n/// corresponding declaration within an instantiation. For example,\n/// given:\n///\n/// \\code\n/// template<typename T>\n/// struct X {\n/// enum Kind {\n/// KnownValue = sizeof(T)\n/// };\n///\n/// bool getKind() const { return KnownValue; }\n/// };\n///\n/// template struct X<int>;\n/// \\endcode\n///\n/// In the instantiation of X<int>::getKind(), we need to map the \\p\n/// EnumConstantDecl for \\p KnownValue (which refers to\n/// X<T>::<Kind>::KnownValue) to its instantiation (X<int>::<Kind>::KnownValue).\n/// \\p FindInstantiatedDecl performs this mapping from within the instantiation\n/// of X<int>.\nNamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext) {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n // ...\n while (!DC->isFileContext()) {\n // ...\n // Move to the outer template scope.\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(DC)) {\n // ...\n if (Guide && Guide->isImplicit()) {\n // ...\n // Check that this template-id names the primary template and not a\n // partial or explicit specialization. (In the latter cases, it\'s\n // meaningless to attempt to find an instantiation of D within the\n // specialization.)\n // FIXME: The standard doesn\'t say what should happen here.\n if (FindingInstantiatedContext && usesPartialOrExplicitSpecialization(Loc, cast<ClassTemplateSpecializationDecl>(SubstRecord))) {\n Diag(Loc, diag::err_specialization_not_primary_template) << T << (SubstRecord->getTemplateSpecializationKind() == TSK_ExplicitSpecialization);"}} | [j]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",6233,"/// Find the instantiation of the given declaration within the\n/// current instantiation.\n///\n/// This routine is intended to be used when \\p D is a declaration\n/// referenced from within a template, that needs to mapped into the\n/// corresponding declaration within an instantiation. For example,\n/// given:\n///\n/// \\code\n/// template<typename T>\n/// struct X {\n/// enum Kind {\n/// KnownValue = sizeof(T)\n/// };\n///\n/// bool getKind() const { return KnownValue; }\n/// };\n///\n/// template struct X<int>;\n/// \\endcode\n///\n/// In the instantiation of X<int>::getKind(), we need to map the \\p\n/// EnumConstantDecl for \\p KnownValue (which refers to\n/// X<T>::<Kind>::KnownValue) to its instantiation (X<int>::<Kind>::KnownValue).\n/// \\p FindInstantiatedDecl performs this mapping from within the instantiation\n/// of X<int>.\nNamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext) {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n // ...\n while (!DC->isFileContext()) {\n // ...\n // Move to the outer template scope.\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(DC)) {\n // ...\n if (Guide && Guide->isImplicit()) {\n // ...\n // Check that this template-id names the primary template and not a\n // partial or explicit specialization. (In the latter cases, it\'s\n // meaningless to attempt to find an instantiation of D within the\n // specialization.)\n // FIXME: The standard doesn\'t say what should happen here.\n if (FindingInstantiatedContext && usesPartialOrExplicitSpecialization(Loc, cast<ClassTemplateSpecializationDecl>(SubstRecord))) {\n Diag(Loc, diag::err_specialization_not_primary_template) << T << (SubstRecord->getTemplateSpecializationKind() == TSK_ExplicitSpecialization);"}} | ||
}, | }, | ||
["err_specialize_member_of_template"]={ | ["err_specialize_member_of_template"]={ | ||
[ | [i]="err_specialize_member_of_template", | ||
[ | [h]="cannot specialize %select{|(with \'template<>\') }0a member of an unspecialized template", | ||
[ | [g]={{nil,nil,{"cannot specialize ",{a,"(with \'template<>\') "},"a member of an unspecialized template"}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot specialize (?:|\\(with \'template\\<\\>\'\\) )a member of an unspecialized template", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"522d5eb7c3c2",1307373775,"Diagnose the condition in C++ [temp.expl.spec]p16 that prohibits","Diagnose the condition in C++ [temp.expl.spec]p16 that prohibits\nspecializing a member of an unspecialized template, and recover from\nsuch errors without crashing. Fixes PR10024 / <rdar://problem/9509761>.\n\nllvm-svn: 132677"}, | ||
[j]={{ | [j]={{r,3370,"/// Match the given template parameter lists to the given scope\n/// specifier, returning the template parameter list that applies to the\n/// name.\n///\n/// \\param DeclStartLoc the start of the declaration that has a scope\n/// specifier or a template parameter list.\n///\n/// \\param DeclLoc The location of the declaration itself.\n///\n/// \\param SS the scope specifier that will be matched to the given template\n/// parameter lists. This scope specifier precedes a qualified name that is\n/// being declared.\n///\n/// \\param TemplateId The template-id following the scope specifier, if there\n/// is one. Used to check for a missing \'template<>\'.\n///\n/// \\param ParamLists the template parameter lists, from the outermost to the\n/// innermost template parameter lists.\n///\n/// \\param IsFriend Whether to apply the slightly different rules for\n/// matching template parameters to scope specifiers in friend\n/// declarations.\n///\n/// \\param IsMemberSpecialization will be set true if the scope specifier\n/// denotes a fully-specialized type, and therefore this is a declaration of\n/// a member specialization.\n///\n/// \\returns the template parameter list, if any, that corresponds to the\n/// name that is preceded by the scope specifier @p SS. This template\n/// parameter list may have template parameters (if we\'re declaring a\n/// template) or may have no template parameters (if we\'re declaring a\n/// template specialization), or may be NULL (if what we\'re declaring isn\'t\n/// itself a template).\nTemplateParameterList *Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef<TemplateParameterList *> ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic) {\n // ...\n auto CheckExplicitSpecialization = [&](SourceRange Range, bool Recovery) {\n if (SawNonEmptyTemplateParameterList) {\n if (!SuppressDiagnostic)\n Diag(DeclLoc, diag::err_specialize_member_of_template) << !Recovery << Range;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/explicit-specialization-member.cpp"]={"clang/test/SemaTemplate/explicit-specialization-member.cpp:45:16: error: cannot specialize a member of an unspecialized template","clang/test/SemaTemplate/explicit-specialization-member.cpp:54:38: error: cannot specialize a member of an unspecialized template"} | ["clang/test/SemaTemplate/explicit-specialization-member.cpp"]={"clang/test/SemaTemplate/explicit-specialization-member.cpp:45:16: error: cannot specialize a member of an unspecialized template","clang/test/SemaTemplate/explicit-specialization-member.cpp:54:38: error: cannot specialize a member of an unspecialized template"} | ||
Line 3,827: | Line 3,855: | ||
}, | }, | ||
["err_stack_tagging_requires_hardware_feature"]={ | ["err_stack_tagging_requires_hardware_feature"]={ | ||
[ | [i]={{nil,p,"err_stack_tagging_requires_hardware_feature"}}, | ||
[ | [h]={{nil,y,"\'-fsanitize=memtag-stack\' requires hardware support (+memtag). For Armv8 or Armv9, try compiling with -march=armv8a+memtag or -march=armv9a+memtag"},{C,p,"\'-fsanitize=memtag\' requires hardware support (+memtag)"}}, | ||
[ | [g]={{nil,y,"\'-fsanitize=memtag-stack\' requires hardware support (+memtag). For Armv8 or Armv9, try compiling with -march=armv8a+memtag or -march=armv9a+memtag"},{C,p,"\'-fsanitize=memtag\' requires hardware support (+memtag)"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'\\-fsanitize\\=memtag\\-stack\' requires hardware support \\(\\+memtag\\)\\. For Armv8 or Armv9, try compiling with \\-march\\=armv8a\\+memtag or \\-march\\=armv9a\\+memtag", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,a}}, | ||
[ | [c]={"4593e4131aff",1534346725,"AMDGPU: Teach toolchain to link rocm device libs","AMDGPU: Teach toolchain to link rocm device libs\n\nCurrently the library is separately linked, but this isn\'t correct to\nimplement fast math flags correctly. Each module should get the\nversion of the library appropriate for its combination of fast math\nand related flags, with the attributes propagated into its functions\nand internalized.\n\nHIP already maintains the list of libraries, but this is not used for\nOpenCL. Unfortunately, HIP uses a separate --hip-device-lib argument,\ndespite both languages using the same bitcode library. Eventually\nthese two searches need to be merged.\n\nAn additional problem is there are 3 different locations the libraries\nare installed, depending on which build is used. This also needs to be\nconsolidated (or at least the search logic needs to deal with this\nunnecessary complexity)."}, | ||
[j]={{"clang/lib/Driver/SanitizerArgs.cpp",1386,"void SanitizerArgs::addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, types::ID InputType) const {\n // ...\n if (Sanitizers.has(SanitizerKind::MemtagStack) && !hasTargetFeatureMTE(CmdArgs))\n TC.getDriver().Diag(diag::err_stack_tagging_requires_hardware_feature);"}} | [j]={{"clang/lib/Driver/SanitizerArgs.cpp",1386,"void SanitizerArgs::addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, types::ID InputType) const {\n // ...\n if (Sanitizers.has(SanitizerKind::MemtagStack) && !hasTargetFeatureMTE(CmdArgs))\n TC.getDriver().Diag(diag::err_stack_tagging_requires_hardware_feature);"}} | ||
}, | }, | ||
["err_standalone_class_nested_name_specifier"]={ | ["err_standalone_class_nested_name_specifier"]={ | ||
[ | [i]="err_standalone_class_nested_name_specifier", | ||
[ | [h]="forward declaration of %select{class|struct|interface|union|enum|enum class|enum struct}0 cannot have a nested name specifier", | ||
[ | [g]={{nil,nil,{"forward declaration of ",{mc,Gc,td,Nc,ud,"enum class","enum struct"}," cannot have a nested name specifier"}},{M,nil,{"forward declaration of ",{mc,Gc,td,Nc,ud}," cannot have a nested name specifier"}}}, | ||
[ | [b]=k, | ||
[ | [e]="forward declaration of (?:class|struct|interface|union|enum|enum class|enum struct) cannot have a nested name specifier", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"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"}, | ||
[j]={{ | [j]={{w,5157,"/// 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 (Tag && SS.isNotEmpty() && !Tag->isCompleteDefinition() && !IsExplicitInstantiation && !IsExplicitSpecialization && !isa<ClassTemplatePartialSpecializationDecl>(Tag)) {\n // ...\n Diag(SS.getBeginLoc(), diag::err_standalone_class_nested_name_specifier) << GetDiagnosticTypeSpecifierID(DS) << SS.getRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p1.cpp:11:8: error: forward declaration of struct cannot have a nested name specifier","clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p1.cpp:13:29: error: forward declaration of struct cannot have a nested name specifier","clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p1.cpp:23:29: error: forward declaration of struct cannot have a nested name specifier"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p1.cpp:11:8: error: forward declaration of struct cannot have a nested name specifier","clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p1.cpp:13:29: error: forward declaration of struct cannot have a nested name specifier","clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p1.cpp:23:29: error: forward declaration of struct cannot have a nested name specifier"} | ||
Line 3,852: | Line 3,880: | ||
}, | }, | ||
["err_static_assert_expression_is_not_constant"]={ | ["err_static_assert_expression_is_not_constant"]={ | ||
[ | [i]="err_static_assert_expression_is_not_constant", | ||
[ | [h]={{nil,y,"static assertion expression is not an integral constant expression"},{C,nil,"static_assert expression is not an integral constant expression"}}, | ||
[ | [g]={{nil,y,"static assertion expression is not an integral constant expression"},{C,nil,"static_assert expression is not an integral constant expression"}}, | ||
[ | [b]=k, | ||
[ | [e]="static assertion expression is not an integral constant expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{H,17105,"Decl *Sema::BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessage, SourceLocation RParenLoc, bool Failed) {\n // ...\n if (!AssertExpr->isTypeDependent() && !AssertExpr->isValueDependent() && (!AssertMessage || (!AssertMessage->isTypeDependent() && !AssertMessage->isValueDependent())) && !Failed) {\n // ...\n if (!Failed && VerifyIntegerConstantExpression(BaseExpr, &Cond, diag::err_static_assert_expression_is_not_constant, FoldKind).isInvalid())"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/crash-lambda-weak-attr.cpp"]={"clang/test/SemaCXX/crash-lambda-weak-attr.cpp:6:15: error: static assertion expression is not an integral constant expression"} | ["clang/test/SemaCXX/crash-lambda-weak-attr.cpp"]={"clang/test/SemaCXX/crash-lambda-weak-attr.cpp:6:15: error: static assertion expression is not an integral constant expression"} | ||
Line 3,866: | Line 3,894: | ||
}, | }, | ||
["err_static_assert_failed"]={ | ["err_static_assert_failed"]={ | ||
[ | [i]="err_static_assert_failed", | ||
[ | [h]={{nil,y,"static assertion failed%select{: %1|}0"},{C,nil,"static_assert failed%select{ %1|}0"}}, | ||
[ | [g]={{nil,y,{"static assertion failed",{": B",a}}},{C,nil,{"static_assert failed",{Ob,a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="static assertion failed(?:\\: (.*?)|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{H,17142,"Decl *Sema::BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessage, SourceLocation RParenLoc, bool Failed) {\n // ...\n if (!AssertExpr->isTypeDependent() && !AssertExpr->isValueDependent() && (!AssertMessage || (!AssertMessage->isTypeDependent() && !AssertMessage->isValueDependent())) && !Failed) {\n // ...\n if (!Failed && !Cond && !InTemplateDefinition) {\n // ...\n if (InnerCond && isa<ConceptSpecializationExpr>(InnerCond)) {\n // ...\n Diag(AssertExpr->getBeginLoc(), diag::err_static_assert_failed) << !HasMessage << Msg.str() << AssertExpr->getSourceRange();"},{H,17155,"Decl *Sema::BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessage, SourceLocation RParenLoc, bool Failed) {\n // ...\n if (!AssertExpr->isTypeDependent() && !AssertExpr->isValueDependent() && (!AssertMessage || (!AssertMessage->isTypeDependent() && !AssertMessage->isValueDependent())) && !Failed) {\n // ...\n if (!Failed && !Cond && !InTemplateDefinition) {\n // ...\n if (InnerCond && isa<ConceptSpecializationExpr>(InnerCond)) {\n // ...\n } else if (InnerCond && !isa<CXXBoolLiteralExpr>(InnerCond) && !isa<IntegerLiteral>(InnerCond)) {\n // ...\n } else {\n Diag(AssertExpr->getBeginLoc(), diag::err_static_assert_failed) << !HasMessage << Msg.str() << AssertExpr->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/using-decl-templates.cpp"]={"clang/test/SemaCXX/using-decl-templates.cpp:98:17: error: static assertion failed: "} | ["clang/test/SemaCXX/using-decl-templates.cpp"]={"clang/test/SemaCXX/using-decl-templates.cpp:98:17: error: static assertion failed: "} | ||
Line 3,880: | Line 3,908: | ||
}, | }, | ||
["err_static_assert_invalid_mem_fn_ret_ty"]={ | ["err_static_assert_invalid_mem_fn_ret_ty"]={ | ||
[ | [i]="err_static_assert_invalid_mem_fn_ret_ty", | ||
[ | [h]="the message in a static assertion must have a \'%select{size|data}0()\' member function returning an object convertible to \'%select{std::size_t|const char *}0\'", | ||
[ | [g]={{nil,nil,{"the message in a static assertion must have a \'",{"size","data"},"()\' member function returning an object convertible to \'",{"std::size_t","const char *"},uc}}}, | ||
[ | [b]=k, | ||
[ | [e]="the message in a static assertion must have a \'(?:size|data)\\(\\)\' member function returning an object convertible to \'(?:std\\:\\:size_t|const char \\*)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"47ccfd7a89e2",1667306232,"[Clang] Implement P2741R3 - user-generated static_assert messages","[Clang] Implement P2741R3 - user-generated static_assert messages\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D154290"}, | ||
[j]={{ | [j]={{H,16981,"bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, std::string &Result, ASTContext &Ctx, bool ErrorOnInvalidMessage) {\n // ...\n auto FindMember = [&](StringRef Member, bool &Empty, bool Diag = false) -> std::optional<LookupResult> {\n // ...\n default:\n if (Diag)\n Candidates.NoteCandidates(PartialDiagnosticAt(Loc, PDiag(diag::err_static_assert_invalid_mem_fn_ret_ty) << (Member == \"data\")), *this, OCD_AllCandidates, /*Args=*/{});"},{H,17034,"bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, std::string &Result, ASTContext &Ctx, bool ErrorOnInvalidMessage) {\n // ...\n if (EvaluatedSize.isInvalid()) {\n Diag(Loc, diag::err_static_assert_invalid_mem_fn_ret_ty) << /*size*/ 0;"},{H,17044,"bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, std::string &Result, ASTContext &Ctx, bool ErrorOnInvalidMessage) {\n // ...\n if (EvaluatedData.isInvalid()) {\n Diag(Loc, diag::err_static_assert_invalid_mem_fn_ret_ty) << /*data*/ 1;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:20:21: error: the message in a static assertion must have a \'size()\' member function returning an object convertible to \'std::size_t\'","clang/test/SemaCXX/static-assert-cxx26.cpp:26:21: error: the message in a static assertion must have a \'data()\' member function returning an object convertible to \'const char *\'","clang/test/SemaCXX/static-assert-cxx26.cpp:181:22: error: the message in a static assertion must have a \'size()\' member function returning an object convertible to \'std::size_t\'","clang/test/SemaCXX/static-assert-cxx26.cpp:183:22: error: the message in a static assertion must have a \'data()\' member function returning an object convertible to \'const char *\'","clang/test/SemaCXX/static-assert-cxx26.cpp:225:22: error: the message in a static assertion must have a \'size()\' member function returning an object convertible to \'std::size_t\'","clang/test/SemaCXX/static-assert-cxx26.cpp:225:22: error: the message in a static assertion must have a \'data()\' member function returning an object convertible to \'const char *\'"} | ["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:20:21: error: the message in a static assertion must have a \'size()\' member function returning an object convertible to \'std::size_t\'","clang/test/SemaCXX/static-assert-cxx26.cpp:26:21: error: the message in a static assertion must have a \'data()\' member function returning an object convertible to \'const char *\'","clang/test/SemaCXX/static-assert-cxx26.cpp:181:22: error: the message in a static assertion must have a \'size()\' member function returning an object convertible to \'std::size_t\'","clang/test/SemaCXX/static-assert-cxx26.cpp:183:22: error: the message in a static assertion must have a \'data()\' member function returning an object convertible to \'const char *\'","clang/test/SemaCXX/static-assert-cxx26.cpp:225:22: error: the message in a static assertion must have a \'size()\' member function returning an object convertible to \'std::size_t\'","clang/test/SemaCXX/static-assert-cxx26.cpp:225:22: error: the message in a static assertion must have a \'data()\' member function returning an object convertible to \'const char *\'"} | ||
Line 3,894: | Line 3,922: | ||
}, | }, | ||
["err_static_assert_invalid_message"]={ | ["err_static_assert_invalid_message"]={ | ||
[ | [i]="err_static_assert_invalid_message", | ||
[ | [h]="the message in a static assertion must be a string literal or an object with \'data()\' and \'size()\' member functions", | ||
[ | [g]="the message in a static assertion must be a string literal or an object with \'data()\' and \'size()\' member functions", | ||
[ | [b]=k, | ||
[ | [e]="the message in a static assertion must be a string literal or an object with \'data\\(\\)\' and \'size\\(\\)\' member functions", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"47ccfd7a89e2",1667306232,"[Clang] Implement P2741R3 - user-generated static_assert messages","[Clang] Implement P2741R3 - user-generated static_assert messages\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D154290"}, | ||
[j]={{ | [j]={{H,16953,"bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, std::string &Result, ASTContext &Ctx, bool ErrorOnInvalidMessage) {\n // ...\n if (!RD) {\n Diag(Loc, diag::err_static_assert_invalid_message);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:4:21: error: the message in a static assertion must be a string literal or an object with \'data()\' and \'size()\' member functions","clang/test/SemaCXX/static-assert-cxx26.cpp:279:24: error: the message in a static assertion must be a string literal or an object with \'data()\' and \'size()\' member functions"} | ["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:4:21: error: the message in a static assertion must be a string literal or an object with \'data()\' and \'size()\' member functions","clang/test/SemaCXX/static-assert-cxx26.cpp:279:24: error: the message in a static assertion must be a string literal or an object with \'data()\' and \'size()\' member functions"} | ||
Line 3,908: | Line 3,936: | ||
}, | }, | ||
["err_static_assert_message_constexpr"]={ | ["err_static_assert_message_constexpr"]={ | ||
[ | [i]="err_static_assert_message_constexpr", | ||
[h]="the message in a static assertion must be produced by a constant expression", | |||
[g]="the message in a static assertion must be produced by a constant expression", | |||
[b]=k, | |||
[e]="the message in a static assertion must be produced by a constant expression", | [e]="the message in a static assertion must be produced by a constant expression", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"47ccfd7a89e2",1667306232,"[Clang] Implement P2741R3 - user-generated static_assert messages","[Clang] Implement P2741R3 - user-generated static_assert messages\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D154290"}, | |||
[j]={{H,17059,"bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, std::string &Result, ASTContext &Ctx, bool ErrorOnInvalidMessage) {\n // ...\n if (!Message->EvaluateCharRangeAsString(Result, EvaluatedSize.get(), EvaluatedData.get(), Ctx, Status) || !Notes.empty()) {\n Diag(Message->getBeginLoc(), ErrorOnInvalidMessage ? diag::err_static_assert_message_constexpr : diag::warn_static_assert_message_constexpr);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:37:22: error: the message in a static assertion must be produced by a constant expression","clang/test/SemaCXX/static-assert-cxx26.cpp:51:22: error: the message in a static assertion must be produced by a constant expression","clang/test/SemaCXX/static-assert-cxx26.cpp:85:22: error: the message in a static assertion must be produced by a constant expression","clang/test/SemaCXX/static-assert-cxx26.cpp:125:22: error: the message in a static assertion must be produced by a constant expression","clang/test/SemaCXX/static-assert-cxx26.cpp:267:22: error: the message in a static assertion must be produced by a constant expression"} | ["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:37:22: error: the message in a static assertion must be produced by a constant expression","clang/test/SemaCXX/static-assert-cxx26.cpp:51:22: error: the message in a static assertion must be produced by a constant expression","clang/test/SemaCXX/static-assert-cxx26.cpp:85:22: error: the message in a static assertion must be produced by a constant expression","clang/test/SemaCXX/static-assert-cxx26.cpp:125:22: error: the message in a static assertion must be produced by a constant expression","clang/test/SemaCXX/static-assert-cxx26.cpp:267:22: error: the message in a static assertion must be produced by a constant expression"} | ||
Line 3,922: | Line 3,950: | ||
}, | }, | ||
["err_static_assert_missing_member_function"]={ | ["err_static_assert_missing_member_function"]={ | ||
[ | [i]="err_static_assert_missing_member_function", | ||
[ | [h]="the message object in this static assertion is missing %select{a \'size()\' member function|a \'data()\' member function|\'data()\' and \'size()\' member functions}0", | ||
[ | [g]={{nil,nil,{"the message object in this static assertion is missing ",{"a \'size()\' member function","a \'data()\' member function","\'data()\' and \'size()\' member functions"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="the message object in this static assertion is missing (?:a \'size\\(\\)\' member function|a \'data\\(\\)\' member function|\'data\\(\\)\' and \'size\\(\\)\' member functions)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"47ccfd7a89e2",1667306232,"[Clang] Implement P2741R3 - user-generated static_assert messages","[Clang] Implement P2741R3 - user-generated static_assert messages\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D154290"}, | ||
[j]={{ | [j]={{H,16992,"bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, std::string &Result, ASTContext &Ctx, bool ErrorOnInvalidMessage) {\n // ...\n if (SizeNotFound || DataNotFound) {\n Diag(Loc, diag::err_static_assert_missing_member_function) << ((SizeNotFound && DataNotFound) ? 2 : SizeNotFound ? 0 : 1);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:6:21: error: the message object in this static assertion is missing \'data()\' and \'size()\' member functions","clang/test/SemaCXX/static-assert-cxx26.cpp:13:21: error: the message object in this static assertion is missing a \'data()\' member function","clang/test/SemaCXX/static-assert-cxx26.cpp:14:21: error: the message object in this static assertion is missing a \'size()\' member function"} | ["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:6:21: error: the message object in this static assertion is missing \'data()\' and \'size()\' member functions","clang/test/SemaCXX/static-assert-cxx26.cpp:13:21: error: the message object in this static assertion is missing a \'data()\' member function","clang/test/SemaCXX/static-assert-cxx26.cpp:14:21: error: the message object in this static assertion is missing a \'size()\' member function"} | ||
Line 3,936: | Line 3,964: | ||
}, | }, | ||
["err_static_assert_requirement_failed"]={ | ["err_static_assert_requirement_failed"]={ | ||
[ | [i]="err_static_assert_requirement_failed", | ||
[ | [h]={{nil,y,"static assertion failed due to requirement \'%0\'%select{: %2|}1"},{C,A,"static_assert failed due to requirement \'%0\'%select{ %2|}1"}}, | ||
[ | [g]={{nil,y,{"static assertion failed due to requirement \'A\'",{": C",a}}},{C,A,{"static_assert failed due to requirement \'A\'",{" C",a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="static assertion failed due to requirement \'(.*?)\'(?:\\: (.*?)|)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,m}}, | ||
[ | [c]={"672281a5116d",1505432322,"Diagnostic specific failed condition in a static_assert.","Diagnostic specific failed condition in a static_assert.\n\nWhen a static_assert fails, dig out a specific condition to diagnose,\nusing the same logic that we use to find the enable_if condition to\ndiagnose.\n\nllvm-svn: 313315"}, | ||
[j]={{ | [j]={{H,17150,"Decl *Sema::BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessage, SourceLocation RParenLoc, bool Failed) {\n // ...\n if (!AssertExpr->isTypeDependent() && !AssertExpr->isValueDependent() && (!AssertMessage || (!AssertMessage->isTypeDependent() && !AssertMessage->isValueDependent())) && !Failed) {\n // ...\n if (!Failed && !Cond && !InTemplateDefinition) {\n // ...\n if (InnerCond && isa<ConceptSpecializationExpr>(InnerCond)) {\n // ...\n } else if (InnerCond && !isa<CXXBoolLiteralExpr>(InnerCond) && !isa<IntegerLiteral>(InnerCond)) {\n Diag(InnerCond->getBeginLoc(), diag::err_static_assert_requirement_failed) << InnerCondDescription << !HasMessage << Msg.str() << InnerCond->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:101:19: error: static assertion failed due to requirement \'sizeof (arr2) == 13\': "} | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:101:19: error: static assertion failed due to requirement \'sizeof (arr2) == 13\': "} | ||
Line 3,950: | Line 3,978: | ||
}, | }, | ||
["err_static_block_func"]={ | ["err_static_block_func"]={ | ||
[ | [i]="err_static_block_func", | ||
[h]="function declared in block scope cannot have \'static\' storage class", | |||
[g]="function declared in block scope cannot have \'static\' storage class", | |||
[b]=k, | |||
[e]="function declared in block scope cannot have \'static\' storage class", | [e]="function declared in block scope cannot have \'static\' storage class", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{w,9121,"static StorageClass getFunctionStorageClass(Sema &SemaRef, Declarator &D) {\n // ...\n case DeclSpec::SCS_static: {\n if (SemaRef.CurContext->getRedeclContext()->isFunctionOrMethod()) {\n // ...\n SemaRef.Diag(D.getDeclSpec().getStorageClassSpecLoc(), diag::err_static_block_func);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Sema/function.c"]={"clang/test/Sema/function.c:58:3: error: function declared in block scope cannot have \'static\' storage class"} | ["clang/test/Sema/function.c"]={"clang/test/Sema/function.c:58:3: error: function declared in block scope cannot have \'static\' storage class"} | ||
Line 3,964: | Line 3,992: | ||
}, | }, | ||
["err_static_data_member_not_allowed_in_anon_struct"]={ | ["err_static_data_member_not_allowed_in_anon_struct"]={ | ||
[ | [i]="err_static_data_member_not_allowed_in_anon_struct", | ||
[ | [h]={{nil,q,"static data member %0 not allowed in anonymous %select{struct|interface|union|class|enum}1"},{p,nil,"static data member %0 not allowed in anonymous struct"}}, | ||
[ | [g]={{nil,q,{"static data member A not allowed in anonymous ",{Gc,td,Nc,mc,ud}}},{p,nil,"static data member A not allowed in anonymous struct"}}, | ||
[ | [b]=k, | ||
[ | [e]="static data member (.*?) not allowed in anonymous (?:struct|interface|union|class|enum)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"429737556135",1329424882,"C++11 allows unions to have static data members. Remove the corresponding","C++11 allows unions to have static data members. Remove the corresponding\nrestriction and add some tests.\n\nllvm-svn: 150721"}, | ||
[j]={{ | [j]={{w,7598,"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 Diag(D.getIdentifierLoc(), diag::err_static_data_member_not_allowed_in_anon_struct) << Name << AnonStruct->getTagKind();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/class/class.union/p2-0x.cpp"]={"clang/test/CXX/class/class.union/p2-0x.cpp:40:22: error: static data member \'n\' not allowed in anonymous union","clang/test/CXX/class/class.union/p2-0x.cpp:46:20: error: static data member \'k\' not allowed in anonymous union"} | ["clang/test/CXX/class/class.union/p2-0x.cpp"]={"clang/test/CXX/class/class.union/p2-0x.cpp:40:22: error: static data member \'n\' not allowed in anonymous union","clang/test/CXX/class/class.union/p2-0x.cpp:46:20: error: static data member \'k\' not allowed in anonymous union"} | ||
Line 3,978: | Line 4,006: | ||
}, | }, | ||
["err_static_data_member_not_allowed_in_local_class"]={ | ["err_static_data_member_not_allowed_in_local_class"]={ | ||
[ | [i]="err_static_data_member_not_allowed_in_local_class", | ||
[ | [h]={{nil,q,"static data member %0 not allowed in local %select{struct|interface|union|class|enum}2 %1"},{p,nil,"static data member %0 not allowed in local class %1"}}, | ||
[ | [g]={{nil,q,{"static data member A not allowed in local ",{Gc,td,Nc,mc,ud},Ob}},{p,nil,"static data member A not allowed in local class B"}}, | ||
[ | [b]=k, | ||
[ | [e]="static data member (.*?) not allowed in local (?:struct|interface|union|class|enum) (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d2e8adfc7599",1245803333,"Support for [class.local]p4.","Support for [class.local]p4.\n\nllvm-svn: 74030"}, | ||
[j]={{ | [j]={{w,7591,"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 Diag(D.getIdentifierLoc(), diag::err_static_data_member_not_allowed_in_local_class) << Name << RD->getDeclName() << RD->getTagKind();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/blocks.cpp"]={"clang/test/SemaCXX/blocks.cpp:160:18: error: static data member \'x\' not allowed in local class \'X\'","clang/test/SemaCXX/blocks.cpp:164:20: error: static data member \'z\' not allowed in local struct \'Z\'"} | ["clang/test/SemaCXX/blocks.cpp"]={"clang/test/SemaCXX/blocks.cpp:160:18: error: static data member \'x\' not allowed in local class \'X\'","clang/test/SemaCXX/blocks.cpp:164:20: error: static data member \'z\' not allowed in local struct \'Z\'"} | ||
Line 3,992: | Line 4,020: | ||
}, | }, | ||
["err_static_data_member_reinitialization"]={ | ["err_static_data_member_reinitialization"]={ | ||
[ | [i]="err_static_data_member_reinitialization", | ||
[ | [h]="static data member %0 already has an initializer", | ||
[ | [g]="static data member A already has an initializer", | ||
[ | [b]=k, | ||
[ | [e]="static data member (.*?) already has an initializer", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"84fe12d1e954",1385003864,"Provide better diagnostic wording for initializers on static","Provide better diagnostic wording for initializers on static\ndata member definitions when the variable has an initializer\nin its declaration.\n\nFor the following code:\n\n struct S {\n static const int x = 42;\n };\n const int S::x = 42;\n\nThis patch changes the diagnostic from:\n\n a.cc:4:14: error: redefinition of \'x\'\n const int S::x = 42;\n ^\n a.cc:2:20: note: previous definition is here\n static const int x = 42;\n ^\nto:\n\n a.cc:4:18: error: static data member \'x\' already has an initializer\n const int S::x = 42;\n ^\n a.cc:2:24: note: previous initialization is here\n static const int x = 42;\n ^\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2235\n\nllvm-svn: 195306"}, | ||
[j]={{ | [j]={{w,13249,"/// 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 (getLangOpts().CPlusPlus) {\n // C++ [class.static.data]p4\n // If a static data member is of const integral or const\n // enumeration type, its declaration in the class definition can\n // specify a constant-initializer which shall be an integral\n // constant expression (5.19). In that case, the member can appear\n // in integral constant expressions. The member shall still be\n // defined in a namespace scope if it is used in the program and the\n // namespace scope definition shall not contain an initializer.\n //\n // We already performed a redefinition check above, but for static\n // data members we also need to check whether there was an in-class\n // declaration with an initializer.\n if (VDecl->isStaticDataMember() && VDecl->getCanonicalDecl()->hasInit()) {\n Diag(Init->getExprLoc(), diag::err_static_data_member_reinitialization) << VDecl->getDeclName();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/class/class.static/class.static.data/p4.cpp"]={"clang/test/CXX/class/class.static/class.static.data/p4.cpp:15:63: error: static data member \'i\' already has an initializer","clang/test/CXX/class/class.static/class.static.data/p4.cpp:20:62: error: static data member \'i\' already has an initializer"} | ["clang/test/CXX/class/class.static/class.static.data/p4.cpp"]={"clang/test/CXX/class/class.static/class.static.data/p4.cpp:15:63: error: static data member \'i\' already has an initializer","clang/test/CXX/class/class.static/class.static.data/p4.cpp:20:62: error: static data member \'i\' already has an initializer"} | ||
Line 4,006: | Line 4,034: | ||
}, | }, | ||
["err_static_downcast_via_virtual"]={ | ["err_static_downcast_via_virtual"]={ | ||
[ | [i]="err_static_downcast_via_virtual", | ||
[ | [h]="cannot cast %0 to %1 via virtual base %2", | ||
[ | [g]="cannot cast A to B via virtual base C", | ||
[ | [b]=k, | ||
[ | [e]="cannot cast (.*?) to (.*?) via virtual base (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{jc,1724,"/// TryStaticDowncast - Common functionality of TryStaticReferenceDowncast and\n/// TryStaticPointerDowncast. Tests whether a static downcast from SrcType to\n/// DestType is possible and allowed.\nTryCastResult TryStaticDowncast(Sema &Self, CanQualType SrcType, CanQualType DestType, bool CStyle, SourceRange OpRange, QualType OrigSrcType, QualType OrigDestType, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath) {\n // ...\n if (Paths.getDetectedVirtual() != nullptr) {\n // ...\n Self.Diag(OpRange.getBegin(), diag::err_static_downcast_via_virtual) << OrigSrcType << OrigDestType << VirtualBase << OpRange;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/cstyle-cast.cpp"]={"clang/test/SemaCXX/cstyle-cast.cpp:126:9: error: cannot cast \'A *\' to \'C1 *\' via virtual base \'B\'","clang/test/SemaCXX/cstyle-cast.cpp:127:9: error: cannot cast \'A\' to \'C1 &\' via virtual base \'B\'","clang/test/SemaCXX/cstyle-cast.cpp:128:9: error: cannot cast \'A *\' to \'D *\' via virtual base \'B\'","clang/test/SemaCXX/cstyle-cast.cpp:129:9: error: cannot cast \'A\' to \'D &\' via virtual base \'B\'"} | ["clang/test/SemaCXX/cstyle-cast.cpp"]={"clang/test/SemaCXX/cstyle-cast.cpp:126:9: error: cannot cast \'A *\' to \'C1 *\' via virtual base \'B\'","clang/test/SemaCXX/cstyle-cast.cpp:127:9: error: cannot cast \'A\' to \'C1 &\' via virtual base \'B\'","clang/test/SemaCXX/cstyle-cast.cpp:128:9: error: cannot cast \'A *\' to \'D *\' via virtual base \'B\'","clang/test/SemaCXX/cstyle-cast.cpp:129:9: error: cannot cast \'A\' to \'D &\' via virtual base \'B\'"} | ||
Line 4,020: | Line 4,048: | ||
}, | }, | ||
["err_static_function_scope"]={ | ["err_static_function_scope"]={ | ||
[ | [i]="err_static_function_scope", | ||
[h]="variables in function scope cannot be declared static", | |||
[g]="variables in function scope cannot be declared static", | |||
[b]=k, | |||
[e]="variables in function scope cannot be declared static", | [e]="variables in function scope cannot be declared static", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"4fdce3faa898",1340147392,"Extend the support for cl-std to include 1.2.","Extend the support for cl-std to include 1.2.\nAdd error checking for the static qualifier which is now allowed in certain situations for OpenCL 1.2. Use the CL version to turn on this feature.\nAdded test case for 1.2 static storage class feature.\n\nllvm-svn: 158759"}, | |||
[j]={{w,8548,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n // OpenCL v1.2 s6.8 - The static qualifier is valid only in program\n // scope.\n if (getLangOpts().OpenCLVersion == 120 && !getOpenCLOptions().isAvailableOption(\"cl_clang_storage_class_specifiers\", getLangOpts()) && NewVD->isStaticLocal()) {\n Diag(NewVD->getLocation(), diag::err_static_function_scope);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaOpenCL/storageclass.cl"]={"clang/test/SemaOpenCL/storageclass.cl:117:14: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:124:23: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:170:16: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:177:25: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:182:23: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:189:22: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:198:24: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:207:24: error: variables in function scope cannot be declared static"} | ["clang/test/SemaOpenCL/storageclass.cl"]={"clang/test/SemaOpenCL/storageclass.cl:117:14: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:124:23: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:170:16: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:177:25: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:182:23: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:189:22: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:198:24: error: variables in function scope cannot be declared static","clang/test/SemaOpenCL/storageclass.cl:207:24: error: variables in function scope cannot be declared static"} | ||
Line 4,034: | Line 4,062: | ||
}, | }, | ||
["err_static_illegal_in_new"]={ | ["err_static_illegal_in_new"]={ | ||
[ | [i]="err_static_illegal_in_new", | ||
[h]="the \'static\' modifier for the array size is not legal in new expressions", | |||
[g]="the \'static\' modifier for the array size is not legal in new expressions", | |||
[b]=k, | |||
[e]="the \'static\' modifier for the array size is not legal in new expressions", | [e]="the \'static\' modifier for the array size is not legal in new expressions", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{P,1866,"/// Parsed a C++ \'new\' expression (C++ 5.3.4).\n///\n/// E.g.:\n/// @code new (memory) int[size][4] @endcode\n/// or\n/// @code ::new Foo(23, \"hello\") @endcode\n///\n/// \\param StartLoc The first location of the expression.\n/// \\param UseGlobal True if \'new\' was prefixed with \'::\'.\n/// \\param PlacementLParen Opening paren of the placement arguments.\n/// \\param PlacementArgs Placement new arguments.\n/// \\param PlacementRParen Closing paren of the placement arguments.\n/// \\param TypeIdParens If the type is in parens, the source range.\n/// \\param D The type to be allocated, as well as array dimensions.\n/// \\param Initializer The initializing expression or initializer-list, or null\n/// if there is none.\nExprResult Sema::ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, Expr *Initializer) {\n // ...\n // If the specified type is an array, unwrap it and save the expression.\n if (D.getNumTypeObjects() > 0 && D.getTypeObject(0).Kind == DeclaratorChunk::Array) {\n // ...\n if (Chunk.Arr.hasStatic)\n return ExprError(Diag(Chunk.Loc, diag::err_static_illegal_in_new) << D.getSourceRange());"}} | |||
[ | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_static_kernel"]={ | ["err_static_kernel"]={ | ||
[ | [i]="err_static_kernel", | ||
[h]="kernel functions cannot be declared static", | |||
[g]="kernel functions cannot be declared static", | |||
[b]=k, | |||
[e]="kernel functions cannot be declared static", | [e]="kernel functions cannot be declared static", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"4fdce3faa898",1340147392,"Extend the support for cl-std to include 1.2.","Extend the support for cl-std to include 1.2.\nAdd error checking for the static qualifier which is now allowed in certain situations for OpenCL 1.2. Use the CL version to turn on this feature.\nAdded test case for 1.2 static storage class feature.\n\nllvm-svn: 158759"}, | |||
[j]={{w,10691,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().OpenCL && NewFD->hasAttr<OpenCLKernelAttr>()) {\n // OpenCL v1.2 s6.8 static is invalid for kernel functions.\n if (SC == SC_Static) {\n Diag(D.getIdentifierLoc(), diag::err_static_kernel);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaOpenCL/storageclass-cl20.cl"]={"clang/test/SemaOpenCL/storageclass-cl20.cl:22:20: error: kernel functions cannot be declared static"} | ["clang/test/SemaOpenCL/storageclass-cl20.cl"]={"clang/test/SemaOpenCL/storageclass-cl20.cl:22:20: error: kernel functions cannot be declared static"} | ||
Line 4,061: | Line 4,089: | ||
["groups"]={"c++23-extensions","c++2b-extensions"}, | ["groups"]={"c++23-extensions","c++2b-extensions"}, | ||
["maingroup"]="c++23-extensions", | ["maingroup"]="c++23-extensions", | ||
[ | [i]={{nil,M,"err_static_lambda"}}, | ||
[ | [h]="static lambdas are a C++23 extension", | ||
[ | [g]="static lambdas are a C++23 extension", | ||
[ | [b]="(?:warning|error|fatal error)\\: ", | ||
[ | [e]="static lambdas are a C\\+\\+23 extension", | ||
[ | [f]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+23\\-extensions[^\\]]*\\]", | ||
[ | [d]={{nil,M,x}}, | ||
[ | [c]={"6523814c4e38",1664466303,"[Clang] P1169R4: static operator()","[Clang] P1169R4: static operator()\n\nImplements \'P1169R4: static operator()\' from C++2b.\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D133659"}, | ||
[j]={{ | [j]={{Vb,1210,"static void addStaticToLambdaDeclSpecifier(Parser &P, SourceLocation StaticLoc, DeclSpec &DS) {\n if (StaticLoc.isValid()) {\n P.Diag(StaticLoc, !P.getLangOpts().CPlusPlus23 ? diag::err_static_lambda : diag::warn_cxx20_compat_static_lambda);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:1043:33: warning: static lambdas are a C++23 extension [-Wc++23-extensions]"} | ["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:1043:33: warning: static lambdas are a C++23 extension [-Wc++23-extensions]"} | ||
Line 4,075: | Line 4,103: | ||
}, | }, | ||
["err_static_lambda_captures"]={ | ["err_static_lambda_captures"]={ | ||
[ | [i]={{nil,M,"err_static_lambda_captures"}}, | ||
[ | [h]={{nil,M,"a static lambda cannot have any captures"}}, | ||
[ | [g]={{nil,M,"a static lambda cannot have any captures"}}, | ||
[ | [b]=k, | ||
[ | [e]="a static lambda cannot have any captures", | ||
[ | [f]=a, | ||
[ | [d]={{nil,M,x}}, | ||
[ | [c]={"6523814c4e38",1664466303,"[Clang] P1169R4: static operator()","[Clang] P1169R4: static operator()\n\nImplements \'P1169R4: static operator()\' from C++2b.\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D133659"}, | ||
[j]={{ | [j]={{Vb,1266,"static void DiagnoseStaticSpecifierRestrictions(Parser &P, SourceLocation StaticLoc, SourceLocation MutableLoc, const LambdaIntroducer &Intro) {\n // ...\n if (Intro.hasLambdaCapture()) {\n P.Diag(StaticLoc, diag::err_static_lambda_captures);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/cxx2b-lambdas.cpp"]={"clang/test/Parser/cxx2b-lambdas.cpp:55:20: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:56:20: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:57:21: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:58:22: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:59:25: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:60:20: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:64:16: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:65:17: error: a static lambda cannot have any captures"} | ["clang/test/Parser/cxx2b-lambdas.cpp"]={"clang/test/Parser/cxx2b-lambdas.cpp:55:20: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:56:20: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:57:21: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:58:22: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:59:25: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:60:20: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:64:16: error: a static lambda cannot have any captures","clang/test/Parser/cxx2b-lambdas.cpp:65:17: error: a static lambda cannot have any captures"} | ||
Line 4,089: | Line 4,117: | ||
}, | }, | ||
["err_static_main"]={ | ["err_static_main"]={ | ||
[ | [i]="err_static_main", | ||
[h]="\'main\' is not allowed to be declared static", | |||
[g]="\'main\' is not allowed to be declared static", | |||
[b]=k, | |||
[e]="\'main\' is not allowed to be declared static", | [e]="\'main\' is not allowed to be declared static", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"d937bf13d461",1315463584,"Adding FixIts to static/inline main declaration diagnostics.","Adding FixIts to static/inline main declaration diagnostics.\n\nllvm-svn: 139282"}, | |||
[j]={{w,12077,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // C++11 [basic.start.main]p3:\n // A program that [...] declares main to be inline, static or\n // constexpr is ill-formed.\n // C11 6.7.4p4: In a hosted environment, no function specifier(s) shall\n // appear in a declaration of main.\n // static main is not an error under C99, but we should warn about it.\n // We accept _Noreturn main as an extension.\n if (FD->getStorageClass() == SC_Static)\n Diag(DS.getStorageClassSpecLoc(), getLangOpts().CPlusPlus ? diag::err_static_main : diag::warn_static_main) << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp"]={"clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp:10:1: error: \'main\' is not allowed to be declared static"} | ["clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp"]={"clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp:10:1: error: \'main\' is not allowed to be declared static"} | ||
Line 4,103: | Line 4,131: | ||
}, | }, | ||
["err_static_mutable_lambda"]={ | ["err_static_mutable_lambda"]={ | ||
[ | [i]={{nil,M,"err_static_mutable_lambda"}}, | ||
[ | [h]={{nil,M,"lambda cannot be both mutable and static"}}, | ||
[ | [g]={{nil,M,"lambda cannot be both mutable and static"}}, | ||
[ | [b]=k, | ||
[ | [e]="lambda cannot be both mutable and static", | ||
[ | [f]=a, | ||
[ | [d]={{nil,M,x}}, | ||
[ | [c]={"6523814c4e38",1664466303,"[Clang] P1169R4: static operator()","[Clang] P1169R4: static operator()\n\nImplements \'P1169R4: static operator()\' from C++2b.\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D133659"}, | ||
[j]={{ | [j]={{Vb,1264,"static void DiagnoseStaticSpecifierRestrictions(Parser &P, SourceLocation StaticLoc, SourceLocation MutableLoc, const LambdaIntroducer &Intro) {\n // ...\n // [expr.prim.lambda.general] p4\n // The lambda-specifier-seq shall not contain both mutable and static.\n // If the lambda-specifier-seq contains static, there shall be no\n // lambda-capture.\n if (MutableLoc.isValid())\n P.Diag(StaticLoc, diag::err_static_mutable_lambda);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/cxx2b-lambdas.cpp"]={"clang/test/Parser/cxx2b-lambdas.cpp:43:17: error: lambda cannot be both mutable and static"} | ["clang/test/Parser/cxx2b-lambdas.cpp"]={"clang/test/Parser/cxx2b-lambdas.cpp:43:17: error: lambda cannot be both mutable and static"} | ||
Line 4,117: | Line 4,145: | ||
}, | }, | ||
["err_static_non_static"]={ | ["err_static_non_static"]={ | ||
[ | [i]="err_static_non_static", | ||
[ | [h]="static declaration of %0 follows non-static declaration", | ||
[ | [g]="static declaration of A follows non-static declaration", | ||
[ | [b]=k, | ||
[ | [e]="static declaration of (.*?) follows non\\-static declaration", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{w,3702,"/// 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 // ...\n } else {\n Diag(New->getLocation(), diag::err_static_non_static) << New;"},{w,4633,"/// 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 // ...\n } else {\n Diag(New->getLocation(), diag::err_static_non_static) << New->getDeclName();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp"]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp:11:13: error: static declaration of \'operator delete\' follows non-static declaration"} | ["clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp"]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp:11:13: error: static declaration of \'operator delete\' follows non-static declaration"} | ||
Line 4,131: | Line 4,159: | ||
}, | }, | ||
["err_static_not_bitfield"]={ | ["err_static_not_bitfield"]={ | ||
[ | [i]="err_static_not_bitfield", | ||
[ | [h]="static member %0 cannot be a bit-field", | ||
[ | [g]="static member A cannot be a bit-field", | ||
[ | [b]=k, | ||
[ | [e]="static member (.*?) cannot be a bit\\-field", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{H,3626,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n // ...\n if (isInstField) {\n // ...\n } else {\n // ...\n // Non-instance-fields can\'t have a bitfield.\n if (BitWidth) {\n if (Member->isInvalidDecl()) {\n // ...\n } else if (isa<VarDecl>(Member) || isa<VarTemplateDecl>(Member)) {\n // ...\n Diag(Loc, diag::err_static_not_bitfield) << Name << BitWidth->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:34:14: error: static member \'sb\' cannot be a bit-field"} | ["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:34:14: error: static member \'sb\' cannot be a bit-field"} | ||
Line 4,145: | Line 4,173: | ||
}, | }, | ||
["err_static_out_of_line"]={ | ["err_static_out_of_line"]={ | ||
[ | [i]="err_static_out_of_line", | ||
[h]="\'static\' can only be specified inside the class definition", | |||
[g]="\'static\' can only be specified inside the class definition", | |||
[b]=k, | |||
[e]="\'static\' can only be specified inside the class definition", | [e]="\'static\' can only be specified inside the class definition", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{w,7550,"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 (DC->isRecord() && !CurContext->isRecord()) {\n // ...\n case SC_Static:\n Diag(D.getDeclSpec().getStorageClassSpecLoc(), diag::err_static_out_of_line) << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"},{w,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());"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp:32:12: error: \'static\' can only be specified inside the class definition"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp:32:12: error: \'static\' can only be specified inside the class definition"} | ||
Line 4,159: | Line 4,187: | ||
}, | }, | ||
["err_static_overrides_virtual"]={ | ["err_static_overrides_virtual"]={ | ||
[ | [i]="err_static_overrides_virtual", | ||
[ | [h]="\'static\' member function %0 overrides a virtual function in a base class", | ||
[ | [g]="\'static\' member function A overrides a virtual function in a base class", | ||
[ | [b]=k, | ||
[ | [e]="\'static\' member function (.*?) overrides a virtual function in a base class", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"5a2bb5ba9810",1287010532,"Diagnose when a \'static\' member function overrides a virtual function","Diagnose when a \'static\' member function overrides a virtual function\nin a base class. Fixes PR8168.\n\nllvm-svn: 116448"}, | ||
[j]={{ | [j]={{H,7018,"/// Perform semantic checks on a class definition that has been\n/// completing, introducing implicitly-declared members, checking for\n/// abstract types, etc.\n///\n/// \\param S The scope in which the class was parsed. Null if we didn\'t just\n/// parse a class definition.\n/// \\param Record The completed class.\nvoid Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {\n // ...\n // Perform checks that can\'t be done until we know all the properties of a\n // member function (whether it\'s defaulted, deleted, virtual, overriding,\n // ...).\n auto CheckCompletedMemberFunction = [&](CXXMethodDecl *MD) {\n // A static function cannot override anything.\n if (MD->getStorageClass() == SC_Static) {\n if (ReportOverrides(*this, diag::err_static_overrides_virtual, MD, [](const CXXMethodDecl *) { return true; }))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/virtual-override.cpp"]={"clang/test/SemaCXX/virtual-override.cpp:289:17: error: \'static\' member function \'foo\' overrides a virtual function in a base class"} | ["clang/test/SemaCXX/virtual-override.cpp"]={"clang/test/SemaCXX/virtual-override.cpp:289:17: error: \'static\' member function \'foo\' overrides a virtual function in a base class"} | ||
Line 4,173: | Line 4,201: | ||
}, | }, | ||
["err_statically_allocated_object"]={ | ["err_statically_allocated_object"]={ | ||
[ | [i]="err_statically_allocated_object", | ||
[h]="interface type cannot be statically allocated", | |||
[g]="interface type cannot be statically allocated", | |||
[b]=k, | |||
[e]="interface type cannot be statically allocated", | [e]="interface type cannot be statically allocated", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{w,8525,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (T->isObjCObjectType()) {\n Diag(NewVD->getLocation(), diag::err_statically_allocated_object) << FixItHint::CreateInsertion(NewVD->getLocation(), \"*\");"},{w,18887,"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 // ...\n } else if (FDTy->isObjCObjectType()) {\n // ...\n Diag(FD->getLocation(), diag::err_statically_allocated_object) << FixItHint::CreateInsertion(FD->getLocation(), \"*\");"},{hb,608,"ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TInfo, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC) {\n // ...\n if (T->isObjCObjectType()) {\n // ...\n Diag(FD.D.getIdentifierLoc(), diag::err_statically_allocated_object) << FixItHint::CreateInsertion(StarLoc, \"*\");"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/invalid-objc-decls-1.m"]={"clang/test/SemaObjC/invalid-objc-decls-1.m:4:7: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:6:14: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:9:9: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:16:9: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:21:9: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:26:13: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:32:8: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:39:36: error: interface type cannot be statically allocated"} | ["clang/test/SemaObjC/invalid-objc-decls-1.m"]={"clang/test/SemaObjC/invalid-objc-decls-1.m:4:7: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:6:14: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:9:9: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:16:9: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:21:9: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:26:13: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:32:8: error: interface type cannot be statically allocated","clang/test/SemaObjC/invalid-objc-decls-1.m:39:36: error: interface type cannot be statically allocated"} | ||
Line 4,187: | Line 4,215: | ||
}, | }, | ||
["err_std_compare_type_not_supported"]={ | ["err_std_compare_type_not_supported"]={ | ||
[ | [i]={{nil,O,"err_std_compare_type_not_supported"}}, | ||
[ | [h]={{nil,O,"standard library implementation of %0 is not supported; %select{member \'%2\' does not have expected form|member \'%2\' is missing|the type is not trivially copyable|the type does not have the expected form}1"}}, | ||
[ | [g]={{nil,O,{"standard library implementation of A is not supported; ",{"member \'C\' does not have expected form","member \'C\' is missing","the type is not trivially copyable","the type does not have the expected form"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="standard library implementation of (.*?) is not supported; (?:member \'(.*?)\' does not have expected form|member \'(.*?)\' is missing|the type is not trivially copyable|the type does not have the expected form)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,O,a}}, | ||
[ | [c]={"0683c0e68d31",1525727230,"[C++2a] Implement operator<=> CodeGen and ExprConstant","[C++2a] Implement operator<=> CodeGen and ExprConstant\n\nSummary:\nThis patch tackles long hanging fruit for the builtin operator<=> expressions. It is currently needs some cleanup before landing, but I want to get some initial feedback.\n\nThe main changes are:\n\n* Lookup, build, and store the required standard library types and expressions in `ASTContext`. By storing them in ASTContext we don\'t need to store (and duplicate) the required expressions in the BinaryOperator AST nodes. \n\n* Implement [expr.spaceship] checking, including diagnosing narrowing conversions. \n\n* Implement `ExprConstant` for builtin spaceship operators.\n\n* Implement builitin operator<=> support in `CodeGenAgg`. Initially I emitted the required comparisons using `ScalarExprEmitter::VisitBinaryOperator`, but this caused the operand expressions to be emitted once for every required cmp.\n\n* Implement [builtin.over] with modifications to support the intent of P0946R0. See the note on `BuiltinOperatorOverloadBuilder::addThreeWayArithmeticOverloads` for more information about the workaround.\n\n\n\n\nReviewers: rsmith, aaron.ballman, majnemer, rnk, compnerd, rjmccall\n\nReviewed By: rjmccall\n\nSubscribers: rjmccall, rsmith, aaron.ballman, junbuml, mgorny, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D45476\n\nllvm-svn: 331677"}, | ||
[j]={{ | [j]={{H,11591,"struct InvalidSTLDiagnoser {\n // ...\n QualType operator()(UnsupportedSTLSelect Sel = USS_Other, StringRef Name = \"\", const VarDecl *VD = nullptr) {\n {\n auto D = S.Diag(Loc, diag::err_std_compare_type_not_supported) << TyForDiags << ((int)Sel);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/std-compare-cxx2a.cpp"]={"clang/test/SemaCXX/std-compare-cxx2a.cpp:79:14: error: standard library implementation of \'std::strong_ordering\' is not supported; the type is not trivially copyable"} | ["clang/test/SemaCXX/std-compare-cxx2a.cpp"]={"clang/test/SemaCXX/std-compare-cxx2a.cpp:79:14: error: standard library implementation of \'std::strong_ordering\' is not supported; the type is not trivially copyable"} | ||
Line 4,201: | Line 4,229: | ||
}, | }, | ||
["err_std_source_location_impl_malformed"]={ | ["err_std_source_location_impl_malformed"]={ | ||
[ | [i]={{nil,y,"err_std_source_location_impl_malformed"}}, | ||
[ | [h]={{nil,y,"\'std::source_location::__impl\' must be standard-layout and have only two \'const char *\' fields \'_M_file_name\' and \'_M_function_name\', and two integral fields \'_M_line\' and \'_M_column\'"}}, | ||
[ | [g]={{nil,y,"\'std::source_location::__impl\' must be standard-layout and have only two \'const char *\' fields \'_M_file_name\' and \'_M_function_name\', and two integral fields \'_M_line\' and \'_M_column\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'std\\:\\:source_location\\:\\:__impl\' must be standard\\-layout and have only two \'const char \\*\' fields \'_M_file_name\' and \'_M_function_name\', and two integral fields \'_M_line\' and \'_M_column\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,a}}, | ||
[ | [c]={md,1620118562,nd,od}, | ||
[j]={{n,17377,"static CXXRecordDecl *LookupStdSourceLocationImpl(Sema &S, SourceLocation Loc) {\n // ...\n // Verify that __impl is a trivial struct type, with no base classes, and with\n // only the four expected fields.\n if (ImplDecl->isUnion() || !ImplDecl->isStandardLayout() || ImplDecl->getNumBases() != 0) {\n S.Diag(Loc, diag::err_std_source_location_impl_malformed);"},{n,17452,"static CXXRecordDecl *LookupStdSourceLocationImpl(Sema &S, SourceLocation Loc) {\n // ...\n if (Count != 4) {\n S.Diag(Loc, diag::err_std_source_location_impl_malformed);"}}, | [j]={{n,17377,"static CXXRecordDecl *LookupStdSourceLocationImpl(Sema &S, SourceLocation Loc) {\n // ...\n // Verify that __impl is a trivial struct type, with no base classes, and with\n // only the four expected fields.\n if (ImplDecl->isUnion() || !ImplDecl->isStandardLayout() || ImplDecl->getNumBases() != 0) {\n S.Diag(Loc, diag::err_std_source_location_impl_malformed);"},{n,17452,"static CXXRecordDecl *LookupStdSourceLocationImpl(Sema &S, SourceLocation Loc) {\n // ...\n if (Count != 4) {\n S.Diag(Loc, diag::err_std_source_location_impl_malformed);"}}, | ||
[l]={ | [l]={ | ||
Line 4,215: | Line 4,243: | ||
}, | }, | ||
["err_std_source_location_impl_not_found"]={ | ["err_std_source_location_impl_not_found"]={ | ||
[ | [i]={{nil,y,"err_std_source_location_impl_not_found"}}, | ||
[ | [h]={{nil,y,"\'std::source_location::__impl\' was not found; it must be defined before \'__builtin_source_location\' is called"}}, | ||
[ | [g]={{nil,y,"\'std::source_location::__impl\' was not found; it must be defined before \'__builtin_source_location\' is called"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'std\\:\\:source_location\\:\\:__impl\' was not found; it must be defined before \'__builtin_source_location\' is called", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,a}}, | ||
[ | [c]={md,1620118562,nd,od}, | ||
[j]={{n,17345,"static CXXRecordDecl *LookupStdSourceLocationImpl(Sema &S, SourceLocation Loc) {\n // ...\n if (!ImplDecl || !ImplDecl->isCompleteDefinition()) {\n S.Diag(Loc, diag::err_std_source_location_impl_not_found);"}}, | [j]={{n,17345,"static CXXRecordDecl *LookupStdSourceLocationImpl(Sema &S, SourceLocation Loc) {\n // ...\n if (!ImplDecl || !ImplDecl->isCompleteDefinition()) {\n S.Diag(Loc, diag::err_std_source_location_impl_not_found);"}}, | ||
[l]={ | [l]={ | ||
Line 4,229: | Line 4,257: | ||
}, | }, | ||
["err_std_type_trait_not_class_template"]={ | ["err_std_type_trait_not_class_template"]={ | ||
[ | [i]="err_std_type_trait_not_class_template", | ||
[ | [h]="unsupported standard library implementation: \'std::%0\' is not a class template", | ||
[ | [g]="unsupported standard library implementation: \'std::A\' is not a class template", | ||
[ | [b]=k, | ||
[ | [e]="unsupported standard library implementation\\: \'std\\:\\:(.*?)\' is not a class template", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"7873de0cf65f",1470954346,"P0217R3: Perform semantic checks and initialization for the bindings in a","P0217R3: Perform semantic checks and initialization for the bindings in a\ndecomposition declaration for arrays, aggregate-like structs, tuple-like\ntypes, and (as an extension) for complex and vector types.\n\nllvm-svn: 278435"}, | ||
[j]={{ | [j]={{H,1065,"static bool lookupStdTypeTraitMember(Sema &S, LookupResult &TraitMemberLookup, SourceLocation Loc, StringRef Trait, TemplateArgumentListInfo &Args, unsigned DiagID) {\n // ...\n if (!TraitTD) {\n // ...\n S.Diag(Loc, diag::err_std_type_trait_not_class_template) << Trait;"}} | ||
}, | }, | ||
["err_stmt_expr_in_default_arg"]={ | ["err_stmt_expr_in_default_arg"]={ | ||
[ | [i]={{nil,y,"err_stmt_expr_in_default_arg"}}, | ||
[ | [h]={{nil,y,"default %select{argument|non-type template argument}0 may not use a GNU statement expression"}}, | ||
[ | [g]={{nil,y,{"default ",{"argument","non-type template argument"}," may not use a GNU statement expression"}}}, | ||
[ | [b]=k, | ||
[ | [e]="default (?:argument|non\\-type template argument) may not use a GNU statement expression", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,m}}, | ||
[ | [c]={md,1620118562,nd,od}, | ||
[j]={{ | [j]={{jb,7470,"/// ParseParameterDeclarationClause - Parse a (possibly empty) parameter-list\n/// after the opening parenthesis. This function will not parse a K&R-style\n/// identifier list.\n///\n/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs\n/// is non-null, then the caller parsed those attributes immediately after the\n/// open paren - they will be applied to the DeclSpec of the first parameter.\n///\n/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will\n/// be the location of the ellipsis, if any was parsed.\n///\n/// parameter-type-list: [C99 6.7.5]\n/// parameter-list\n/// parameter-list \',\' \'...\'\n/// [C++] parameter-list \'...\'\n///\n/// parameter-list: [C99 6.7.5]\n/// parameter-declaration\n/// parameter-list \',\' parameter-declaration\n///\n/// parameter-declaration: [C99 6.7.5]\n/// declaration-specifiers declarator\n/// [C++] declaration-specifiers declarator \'=\' assignment-expression\n/// [C++11] initializer-clause\n/// [GNU] declaration-specifiers declarator attributes\n/// declaration-specifiers abstract-declarator[opt]\n/// [C++] declaration-specifiers abstract-declarator[opt]\n/// \'=\' assignment-expression\n/// [GNU] declaration-specifiers abstract-declarator[opt] attributes\n/// [C++11] attribute-specifier-seq parameter-declaration\n///\nvoid Parser::ParseParameterDeclarationClause(DeclaratorContext DeclaratorCtx, ParsedAttributes &FirstArgAttrs, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc, bool IsACXXFunctionDeclaration) {\n // ...\n do {\n // ...\n // If no parameter was specified, verify that *something* was specified,\n // otherwise we have a missing type and identifier.\n if (DS.isEmpty() && ParmDeclarator.getIdentifier() == nullptr && ParmDeclarator.getNumTypeObjects() == 0) {\n // ...\n } else {\n // ...\n // Parse the default argument, if any. We parse the default\n // arguments in all dialects; the semantic analysis in\n // ActOnParamDefaultArgument will reject the default argument in\n // C.\n if (Tok.is(tok::equal)) {\n // ...\n // Parse the default argument\n if (DeclaratorCtx == DeclaratorContext::Member) {\n // ...\n } else {\n // ...\n if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {\n // ...\n } else {\n if (Tok.is(tok::l_paren) && NextToken().is(tok::l_brace)) {\n Diag(Tok, diag::err_stmt_expr_in_default_arg) << 0;"},{xd,1043,"/// ParseNonTypeTemplateParameter - Handle the parsing of non-type\n/// template parameters (e.g., in \"template<int Size> class array;\").\n///\n/// template-parameter:\n/// ...\n/// parameter-declaration\nNamedDecl *Parser::ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position) {\n // ...\n if (TryConsumeToken(tok::equal, EqualLoc)) {\n if (Tok.is(tok::l_paren) && NextToken().is(tok::l_brace)) {\n Diag(Tok.getLocation(), diag::err_stmt_expr_in_default_arg) << 1;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/stmt-expr-in-default-arg.cpp"]={"clang/test/Sema/stmt-expr-in-default-arg.cpp:4:24: error: default argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:6:21: error: default argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:8:21: error: default non-type template argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:10:26: error: default argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:13:21: error: default non-type template argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:16:21: error: default non-type template argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:25:23: error: default argument may not use a GNU statement expression"} | ["clang/test/Sema/stmt-expr-in-default-arg.cpp"]={"clang/test/Sema/stmt-expr-in-default-arg.cpp:4:24: error: default argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:6:21: error: default argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:8:21: error: default non-type template argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:10:26: error: default argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:13:21: error: default non-type template argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:16:21: error: default non-type template argument may not use a GNU statement expression","clang/test/Sema/stmt-expr-in-default-arg.cpp:25:23: error: default argument may not use a GNU statement expression"} | ||
Line 4,254: | Line 4,282: | ||
}, | }, | ||
["err_stmtexpr_file_scope"]={ | ["err_stmtexpr_file_scope"]={ | ||
[ | [i]="err_stmtexpr_file_scope", | ||
[h]="statement expression not allowed at file scope", | |||
[g]="statement expression not allowed at file scope", | |||
[b]=k, | |||
[e]="statement expression not allowed at file scope", | [e]="statement expression not allowed at file scope", | ||
[f | [f]=a, | ||
[d]=x, | |||
[c]={u,1237025389,s,t}, | |||
[ | |||
[ | |||
[j]={{"clang/lib/Parse/ParseExpr.cpp",2938,"/// 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 // ...\n if (!getCurScope()->getFnParent() && !getCurScope()->getBlockParent()) {\n Result = ExprError(Diag(OpenLoc, diag::err_stmtexpr_file_scope));"}}, | [j]={{"clang/lib/Parse/ParseExpr.cpp",2938,"/// 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 // ...\n if (!getCurScope()->getFnParent() && !getCurScope()->getBlockParent()) {\n Result = ExprError(Diag(OpenLoc, diag::err_stmtexpr_file_scope));"}}, | ||
[l]={ | [l]={ | ||
Line 4,268: | Line 4,296: | ||
}, | }, | ||
["err_storage_class_for_static_member"]={ | ["err_storage_class_for_static_member"]={ | ||
[ | [i]="err_storage_class_for_static_member", | ||
[h]="static data member definition cannot specify a storage class", | |||
[g]="static data member definition cannot specify a storage class", | |||
[b]=k, | |||
[e]="static data member definition cannot specify a storage class", | [e]="static data member definition cannot specify a storage class", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"45f96f87c3cf",1371649314,"Fix pr16354.","Fix pr16354.\n\nWe now reject things like\n\nstruct ABC {\n static double a;\n};\nregister double ABC::a = 1.0;\n\nllvm-svn: 184300"}, | |||
[j]={{w,7562,"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 (DC->isRecord() && !CurContext->isRecord()) {\n // ...\n case SC_Auto:\n case SC_Register:\n case SC_Extern:\n // ...\n Diag(D.getDeclSpec().getStorageClassSpecLoc(), diag::err_storage_class_for_static_member) << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/static-data-member.cpp"]={"clang/test/SemaCXX/static-data-member.cpp:13:1: error: static data member definition cannot specify a storage class","clang/test/SemaCXX/static-data-member.cpp:15:1: error: static data member definition cannot specify a storage class","clang/test/SemaCXX/static-data-member.cpp:16:1: error: static data member definition cannot specify a storage class"} | ["clang/test/SemaCXX/static-data-member.cpp"]={"clang/test/SemaCXX/static-data-member.cpp:13:1: error: static data member definition cannot specify a storage class","clang/test/SemaCXX/static-data-member.cpp:15:1: error: static data member definition cannot specify a storage class","clang/test/SemaCXX/static-data-member.cpp:16:1: error: static data member definition cannot specify a storage class"} | ||
Line 4,282: | Line 4,310: | ||
}, | }, | ||
["err_storage_spec_on_catch_parm"]={ | ["err_storage_spec_on_catch_parm"]={ | ||
[ | [i]="err_storage_spec_on_catch_parm", | ||
[ | [h]="@catch parameter cannot have storage specifier \'%0\'", | ||
[ | [g]="@catch parameter cannot have storage specifier \'A\'", | ||
[ | [b]=k, | ||
[ | [e]="@catch parameter cannot have storage specifier \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"f356419bf57b",1272303169,"Refactor Objective-C @catch parameter checking by detangling it from","Refactor Objective-C @catch parameter checking by detangling it from\nfunction-parameter checking and splitting it into the normal\nActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch\nparameter rather than the ill-fitting ParmVarDecl.\n\nllvm-svn: 102347"}, | ||
[j]={{ | [j]={{Kb,5196,"Decl *Sema::ActOnObjCExceptionDecl(Scope *S, Declarator &D) {\n // ...\n // We allow the \"register\" storage class on exception variables because\n // GCC did, but we drop it completely. Any other storage class is an error.\n if (DS.getStorageClassSpec() == DeclSpec::SCS_register) {\n // ...\n } else if (DeclSpec::SCS SCS = DS.getStorageClassSpec()) {\n Diag(DS.getStorageClassSpecLoc(), diag::err_storage_spec_on_catch_parm) << DeclSpec::getSpecifierName(SCS);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/stmts.m"]={"clang/test/SemaObjC/stmts.m:14:13: error: @catch parameter cannot have storage specifier \'static\'"} | ["clang/test/SemaObjC/stmts.m"]={"clang/test/SemaObjC/stmts.m:14:13: error: @catch parameter cannot have storage specifier \'static\'"} | ||
Line 4,296: | Line 4,324: | ||
}, | }, | ||
["err_storageclass_invalid_for_member"]={ | ["err_storageclass_invalid_for_member"]={ | ||
[ | [i]="err_storageclass_invalid_for_member", | ||
[h]="storage class specified for a member declaration", | |||
[g]="storage class specified for a member declaration", | |||
[b]=k, | |||
[e]="storage class specified for a member declaration", | [e]="storage class specified for a member declaration", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={K,1236199783,J,I}, | |||
[j]={{H,3495,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n // ...\n default:\n Diag(DS.getStorageClassSpecLoc(), diag::err_storageclass_invalid_for_member);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.deduct.guide/p1.cpp"]={"clang/test/CXX/temp/temp.deduct.guide/p1.cpp:66:1: error: storage class specified for a member declaration"} | ["clang/test/CXX/temp/temp.deduct.guide/p1.cpp"]={"clang/test/CXX/temp/temp.deduct.guide/p1.cpp:66:1: error: storage class specified for a member declaration"} | ||
Line 4,310: | Line 4,338: | ||
}, | }, | ||
["err_store_value_to_reg"]={ | ["err_store_value_to_reg"]={ | ||
[ | [i]={{nil,y,"err_store_value_to_reg"}}, | ||
[ | [h]={{nil,y,"impossible constraint in asm: can\'t store value into a register"}}, | ||
[ | [g]={{nil,y,"impossible constraint in asm: can\'t store value into a register"}}, | ||
[ | [b]=k, | ||
[ | [e]="impossible constraint in asm\\: can\'t store value into a register", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,"Inline Assembly Issue"}}, | ||
[ | [c]={md,1620118562,nd,od}, | ||
[j]={{"clang/lib/CodeGen/CGStmt.cpp",2413,"static void EmitAsmStores(CodeGenFunction &CGF, const AsmStmt &S, const llvm::ArrayRef<llvm::Value *> RegResults, const llvm::ArrayRef<llvm::Type *> ResultRegTypes, const llvm::ArrayRef<llvm::Type *> ResultTruncRegTypes, const llvm::ArrayRef<LValue> ResultRegDests, const llvm::ArrayRef<QualType> ResultRegQualTys, const llvm::BitVector &ResultTypeRequiresCast, const llvm::BitVector &ResultRegIsFlagReg) {\n // ...\n for (unsigned i = 0, e = RegResults.size(); i != e; ++i) {\n // ...\n // ResultTypeRequiresCast elements correspond to the first\n // ResultTypeRequiresCast.size() elements of RegResults.\n if ((i < ResultTypeRequiresCast.size()) && ResultTypeRequiresCast[i]) {\n // ...\n if (Ty.isNull()) {\n // ...\n CGM.getDiags().Report(OutExpr->getExprLoc(), diag::err_store_value_to_reg);"},{"clang/lib/Sema/SemaStmtAsm.cpp",683,"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 for (unsigned i = 0, e = InputConstraintInfos.size(); i != e; ++i) {\n // ...\n // If the smaller value wasn\'t mentioned in the asm string, and if the\n // output was a register, just extend the shorter one to the size of the\n // larger one.\n if (!SmallerValueMentioned && InputDomain != AD_Other && OutputConstraintInfos[TiedTo].allowsRegister()) {\n // FIXME: GCC supports the OutSize to be 128 at maximum. Currently codegen\n // crash when the size larger than the register size. So we limit it here.\n if (OutTy->isStructureType() && Context.getIntTypeForBitwidth(OutSize, /*Signed*/ false).isNull()) {\n targetDiag(OutputExpr->getExprLoc(), diag::err_store_value_to_reg);"}}, | [j]={{"clang/lib/CodeGen/CGStmt.cpp",2413,"static void EmitAsmStores(CodeGenFunction &CGF, const AsmStmt &S, const llvm::ArrayRef<llvm::Value *> RegResults, const llvm::ArrayRef<llvm::Type *> ResultRegTypes, const llvm::ArrayRef<llvm::Type *> ResultTruncRegTypes, const llvm::ArrayRef<LValue> ResultRegDests, const llvm::ArrayRef<QualType> ResultRegQualTys, const llvm::BitVector &ResultTypeRequiresCast, const llvm::BitVector &ResultRegIsFlagReg) {\n // ...\n for (unsigned i = 0, e = RegResults.size(); i != e; ++i) {\n // ...\n // ResultTypeRequiresCast elements correspond to the first\n // ResultTypeRequiresCast.size() elements of RegResults.\n if ((i < ResultTypeRequiresCast.size()) && ResultTypeRequiresCast[i]) {\n // ...\n if (Ty.isNull()) {\n // ...\n CGM.getDiags().Report(OutExpr->getExprLoc(), diag::err_store_value_to_reg);"},{"clang/lib/Sema/SemaStmtAsm.cpp",683,"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 for (unsigned i = 0, e = InputConstraintInfos.size(); i != e; ++i) {\n // ...\n // If the smaller value wasn\'t mentioned in the asm string, and if the\n // output was a register, just extend the shorter one to the size of the\n // larger one.\n if (!SmallerValueMentioned && InputDomain != AD_Other && OutputConstraintInfos[TiedTo].allowsRegister()) {\n // FIXME: GCC supports the OutSize to be 128 at maximum. Currently codegen\n // crash when the size larger than the register size. So we limit it here.\n if (OutTy->isStructureType() && Context.getIntTypeForBitwidth(OutSize, /*Signed*/ false).isNull()) {\n targetDiag(OutputExpr->getExprLoc(), diag::err_store_value_to_reg);"}}, | ||
[l]={ | [l]={ | ||
Line 4,324: | Line 4,352: | ||
}, | }, | ||
["err_string_concat_mixed_suffix"]={ | ["err_string_concat_mixed_suffix"]={ | ||
[ | [i]="err_string_concat_mixed_suffix", | ||
[ | [h]="differing user-defined suffixes (\'%0\' and \'%1\') in string literal concatenation", | ||
[ | [g]="differing user-defined suffixes (\'A\' and \'B\') in string literal concatenation", | ||
[ | [b]=k, | ||
[ | [e]="differing user\\-defined suffixes \\(\'(.*?)\' and \'(.*?)\'\\) in string literal concatenation", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={"e18f0faff242",1330920135,"Lexing support for user-defined literals. Currently these lex as the same token","Lexing support for user-defined literals. Currently these lex as the same token\nkinds as the underlying string literals, and we silently drop the ud-suffix;\nthose issues will be fixed by subsequent patches.\n\nllvm-svn: 152012"}, | ||
[j]={{"clang/lib/Lex/LiteralSupport.cpp",2050,"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 // ...\n } else {\n Diags->Report(TokLoc, diag::err_string_concat_mixed_suffix) << UDSuffixBuf << UDSuffix << SourceRange(UDSuffixTokLoc, UDSuffixTokLoc);"}}, | [j]={{"clang/lib/Lex/LiteralSupport.cpp",2050,"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 // ...\n } else {\n Diags->Report(TokLoc, diag::err_string_concat_mixed_suffix) << UDSuffixBuf << UDSuffix << SourceRange(UDSuffixTokLoc, UDSuffixTokLoc);"}}, | ||
[l]={ | [l]={ | ||
Line 4,338: | Line 4,366: | ||
}, | }, | ||
["err_strong_property"]={ | ["err_strong_property"]={ | ||
[ | [i]="err_strong_property", | ||
[ | [h]="existing instance variable %1 for strong property %0 may not be __weak", | ||
[ | [g]="existing instance variable B for strong property A may not be __weak", | ||
[ | [b]=k, | ||
[ | [e]="existing instance variable (.*?) for strong property (.*?) may not be __weak", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{hb,1410,"/// 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 // Fall thru - see previous comment\n if ((property->getType()->isObjCObjectPointerType() || PropType.isObjCGCStrong()) && IvarType.isObjCGCWeak() && getLangOpts().getGC() != LangOptions::NonGC) {\n Diag(PropertyDiagLoc, diag::err_strong_property) << property->getDeclName() << Ivar->getDeclName();"}}, | [j]={{hb,1410,"/// 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 // Fall thru - see previous comment\n if ((property->getType()->isObjCObjectPointerType() || PropType.isObjCGCStrong()) && IvarType.isObjCGCWeak() && getLangOpts().getGC() != LangOptions::NonGC) {\n Diag(PropertyDiagLoc, diag::err_strong_property) << property->getDeclName() << Ivar->getDeclName();"}}, | ||
[l]={ | [l]={ | ||
Line 4,352: | Line 4,380: | ||
}, | }, | ||
["err_subscript_function_type"]={ | ["err_subscript_function_type"]={ | ||
[ | [i]="err_subscript_function_type", | ||
[ | [h]="subscript of pointer to function type %0", | ||
[ | [g]="subscript of pointer to function type A", | ||
[ | [b]=k, | ||
[ | [e]="subscript of pointer to function type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"ac1fb65d0cb6",1237924374,"Make sure to use RequireCompleteType rather than testing for","Make sure to use RequireCompleteType rather than testing for\nincomplete types. RequireCompleteType is needed when the type may be\ncompleted by instantiating a template.\n\nllvm-svn: 67643"}, | ||
[j]={{n,5970,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n // C99 6.5.2.1p1: \"shall have type \"pointer to *object* type\". Similarly,\n // C++ [expr.sub]p1: The type \"T\" shall be a completely-defined object\n // type. Note that Functions are not objects, and that (in C99 parlance)\n // incomplete types are not object types.\n if (ResultType->isFunctionType()) {\n Diag(BaseExpr->getBeginLoc(), diag::err_subscript_function_type) << ResultType << BaseExpr->getSourceRange();"}} | [j]={{n,5970,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n // C99 6.5.2.1p1: \"shall have type \"pointer to *object* type\". Similarly,\n // C++ [expr.sub]p1: The type \"T\" shall be a completely-defined object\n // type. Note that Functions are not objects, and that (in C99 parlance)\n // incomplete types are not object types.\n if (ResultType->isFunctionType()) {\n Diag(BaseExpr->getBeginLoc(), diag::err_subscript_function_type) << ResultType << BaseExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_subscript_incomplete_or_sizeless_type"]={ | ["err_subscript_incomplete_or_sizeless_type"]={ | ||
[ | [i]={{nil,q,"err_subscript_incomplete_or_sizeless_type"}}, | ||
[ | [h]={{nil,q,"subscript of pointer to %select{incomplete|sizeless}0 type %1"}}, | ||
[ | [g]={{nil,q,{"subscript of pointer to ",{"incomplete","sizeless"}," type B"}}}, | ||
[ | [b]=k, | ||
[ | [e]="subscript of pointer to (?:incomplete|sizeless) type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,6026,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n } else if (!ResultType->isDependentType() && !ResultType.isWebAssemblyReferenceType() && RequireCompleteSizedType(LLoc, ResultType, diag::err_subscript_incomplete_or_sizeless_type, BaseExpr))"}}, | [j]={{n,6026,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n } else if (!ResultType->isDependentType() && !ResultType.isWebAssemblyReferenceType() && RequireCompleteSizedType(LLoc, ResultType, diag::err_subscript_incomplete_or_sizeless_type, BaseExpr))"}}, | ||
[l]={ | [l]={ | ||
Line 4,377: | Line 4,405: | ||
}, | }, | ||
["err_subscript_nonfragile_interface"]={ | ["err_subscript_nonfragile_interface"]={ | ||
[ | [i]="err_subscript_nonfragile_interface", | ||
[ | [h]="subscript requires size of interface %0, which is not constant for this architecture and platform", | ||
[ | [g]="subscript requires size of interface A, which is not constant for this architecture and platform", | ||
[ | [b]=k, | ||
[ | [e]="subscript requires size of interface (.*?), which is not constant for this architecture and platform", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"62975a788e75",1240533045,"Fix rdar://6821047 - clang crashes on subscript of interface in 64-bit mode","Fix rdar://6821047 - clang crashes on subscript of interface in 64-bit mode\n\nSeveral changes here:\n1. We change Type::isIncompleteType to realize that forward declared \n interfaces are incomplete. This eliminate special case code for this\n from the sizeof path, and starts us rejecting P[4] when P is a pointer\n to an incomplete interface.\n2. Explicitly reject P[4] when P points to an interface in non-fragile ABI\n mode.\n3. Switch the sizeof(interface) diagnostic back to an error instead of a \n warning in non-fragile abi mode.\n\nllvm-svn: 69943"}, | ||
[j]={{n,5895,"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 if (!LangOpts.isSubscriptPointerArithmetic()) {\n Diag(LLoc, diag::err_subscript_nonfragile_interface) << ResultType << BaseExpr->getSourceRange();"}} | [j]={{n,5895,"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 if (!LangOpts.isSubscriptPointerArithmetic()) {\n Diag(LLoc, diag::err_subscript_nonfragile_interface) << ResultType << BaseExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_subscript_svbool_t"]={ | ["err_subscript_svbool_t"]={ | ||
[ | [i]={{nil,y,"err_subscript_svbool_t"}}, | ||
[ | [h]={{nil,y,"subscript of svbool_t is not allowed"}}, | ||
[ | [g]={{nil,y,"subscript of svbool_t is not allowed"}}, | ||
[ | [b]=k, | ||
[ | [e]="subscript of svbool_t is not allowed", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,m}}, | ||
[ | [c]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, | ||
[j]={{n,5924,"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 if (BTy->isSVEBool())\n return ExprError(Diag(LLoc, diag::err_subscript_svbool_t) << LHSExp->getSourceRange() << RHSExp->getSourceRange());"}}, | [j]={{n,5924,"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 if (BTy->isSVEBool())\n return ExprError(Diag(LLoc, diag::err_subscript_svbool_t) << LHSExp->getSourceRange() << RHSExp->getSourceRange());"}}, | ||
[l]={ | [l]={ | ||
Line 4,402: | Line 4,430: | ||
}, | }, | ||
["err_super_in_lambda_unsupported"]={ | ["err_super_in_lambda_unsupported"]={ | ||
[ | [i]="err_super_in_lambda_unsupported", | ||
[h]="use of \'__super\' inside a lambda is unsupported", | |||
[g]="use of \'__super\' inside a lambda is unsupported", | |||
[b]=k, | |||
[e]="use of \'__super\' inside a lambda is unsupported", | [e]="use of \'__super\' inside a lambda is unsupported", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"67860249e064",1411691300,"-ms-extensions: Implement __super scope specifier (PR13236).","-ms-extensions: Implement __super scope specifier (PR13236).\n\nWe build a NestedNameSpecifier that records the CXXRecordDecl in which\n__super appeared. Name lookup is performed in all base classes of the\nrecorded CXXRecordDecl. Use of __super is allowed only inside class and\nmember function scope.\n\nllvm-svn: 218484"}, | |||
[ | |||
[j]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",316,"bool Sema::ActOnSuperScopeSpecifier(SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS) {\n if (getCurLambda()) {\n Diag(SuperLoc, diag::err_super_in_lambda_unsupported);"}}, | [j]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",316,"bool Sema::ActOnSuperScopeSpecifier(SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS) {\n if (getCurLambda()) {\n Diag(SuperLoc, diag::err_super_in_lambda_unsupported);"}}, | ||
[l]={ | [l]={ | ||
Line 4,416: | Line 4,444: | ||
}, | }, | ||
["err_super_in_using_declaration"]={ | ["err_super_in_using_declaration"]={ | ||
[ | [i]="err_super_in_using_declaration", | ||
[h]="\'__super\' cannot be used with a using declaration", | |||
[g]="\'__super\' cannot be used with a using declaration", | |||
[b]=k, | |||
[e]="\'__super\' cannot be used with a using declaration", | [e]="\'__super\' cannot be used with a using declaration", | ||
[f]= | [f]=a, | ||
[ | [d]=x, | ||
[c]={"67860249e064",1411691300,"-ms-extensions: Implement __super scope specifier (PR13236).","-ms-extensions: Implement __super scope specifier (PR13236).\n\nWe build a NestedNameSpecifier that records the CXXRecordDecl in which\n__super appeared. Name lookup is performed in all base classes of the\nrecorded CXXRecordDecl. Use of __super is allowed only inside class and\nmember function scope.\n\nllvm-svn: 218484"}, | |||
[j]={{Qb,606,"/// 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 (Tok.is(tok::kw___super)) {\n Diag(Tok.getLocation(), diag::err_super_in_using_declaration);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/MicrosoftSuper.cpp"]={"clang/test/SemaCXX/MicrosoftSuper.cpp:4:9: error: \'__super\' cannot be used with a using declaration"} | ["clang/test/SemaCXX/MicrosoftSuper.cpp"]={"clang/test/SemaCXX/MicrosoftSuper.cpp:4:9: error: \'__super\' cannot be used with a using declaration"} | ||
Line 4,430: | Line 4,458: | ||
}, | }, | ||
["err_sve_vector_in_non_sve_target"]={ | ["err_sve_vector_in_non_sve_target"]={ | ||
[ | [i]={{nil,M,"err_sve_vector_in_non_sve_target"}}, | ||
[ | [h]={{nil,M,"SVE vector type %0 cannot be used in a target without sve"}}, | ||
[ | [g]={{nil,M,"SVE vector type A cannot be used in a target without sve"}}, | ||
[ | [b]=k, | ||
[ | [e]="SVE vector type (.*?) cannot be used in a target without sve", | ||
[ | [f]=a, | ||
[ | [d]={{nil,M,m}}, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{qc,2063,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckType = [&](QualType Ty, bool IsRetTy = false) {\n // ...\n // Don\'t allow SVE types in functions without a SVE target.\n if (Ty->isSVESizelessBuiltinType() && FD && FD->hasBody()) {\n // ...\n if (!Builtin::evaluateRequiredTargetFeatures(\"sve\", CallerFeatureMap))\n Diag(D->getLocation(), diag::err_sve_vector_in_non_sve_target) << Ty;"},{w,8782,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n // Check that SVE types are only used in functions with SVE available.\n if (T->isSVESizelessBuiltinType() && isa<FunctionDecl>(CurContext)) {\n // ...\n if (!Builtin::evaluateRequiredTargetFeatures(\"sve\", CallerFeatureMap)) {\n Diag(NewVD->getLocation(), diag::err_sve_vector_in_non_sve_target) << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/arm-sve-target.cpp"]={"clang/test/Sema/arm-sve-target.cpp:6:17: error: SVE vector type \'__SVFloat32_t\' cannot be used in a target without sve","clang/test/Sema/arm-sve-target.cpp:25:15: error: SVE vector type \'__SVFloat32_t\' cannot be used in a target without sve","clang/test/Sema/arm-sve-target.cpp:34:6: error: SVE vector type \'__SVFloat32_t\' cannot be used in a target without sve","clang/test/Sema/arm-sve-target.cpp:42:23: error: SVE vector type \'__clang_svint32x4_t\' cannot be used in a target without sve","clang/test/Sema/arm-sve-target.cpp:41:21: error: SVE vector type \'__clang_svint32x4_t\' cannot be used in a target without sve"} | ["clang/test/Sema/arm-sve-target.cpp"]={"clang/test/Sema/arm-sve-target.cpp:6:17: error: SVE vector type \'__SVFloat32_t\' cannot be used in a target without sve","clang/test/Sema/arm-sve-target.cpp:25:15: error: SVE vector type \'__SVFloat32_t\' cannot be used in a target without sve","clang/test/Sema/arm-sve-target.cpp:34:6: error: SVE vector type \'__SVFloat32_t\' cannot be used in a target without sve","clang/test/Sema/arm-sve-target.cpp:42:23: error: SVE vector type \'__clang_svint32x4_t\' cannot be used in a target without sve","clang/test/Sema/arm-sve-target.cpp:41:21: error: SVE vector type \'__clang_svint32x4_t\' cannot be used in a target without sve"} | ||
Line 4,444: | Line 4,472: | ||
}, | }, | ||
["err_swift_abi_parameter_wrong_type"]={ | ["err_swift_abi_parameter_wrong_type"]={ | ||
[ | [i]="err_swift_abi_parameter_wrong_type", | ||
[ | [h]="\'%0\' parameter must have pointer%select{| to unqualified pointer}1 type; type here is %2", | ||
[ | [g]={{nil,nil,{"\'A\' parameter must have pointer",{a," to unqualified pointer"}," type; type here is C"}}}, | ||
[ | [b]=k, | ||
[ | [e]="\'(.*?)\' parameter must have pointer(?:| to unqualified pointer) type; type here is (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"477f2bb0d53c",1456987172,"Semantic analysis for the swiftcall calling convention.","Semantic analysis for the swiftcall calling convention.\n\nI\'ve tried to keep the infrastructure behind parameter ABI\ntreatments fairly general.\n\nllvm-svn: 262587"}, | ||
[j]={{ | [j]={{db,5527,"void Sema::AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI abi) {\n // ...\n case ParameterABI::SwiftContext:\n if (!isValidSwiftContextType(type)) {\n Diag(CI.getLoc(), diag::err_swift_abi_parameter_wrong_type) << getParameterABISpelling(abi) << /*pointer to pointer */ 0 << type;"},{db,5535,"void Sema::AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI abi) {\n // ...\n case ParameterABI::SwiftAsyncContext:\n if (!isValidSwiftContextType(type)) {\n Diag(CI.getLoc(), diag::err_swift_abi_parameter_wrong_type) << getParameterABISpelling(abi) << /*pointer to pointer */ 0 << type;"},{db,5543,"void Sema::AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI abi) {\n // ...\n case ParameterABI::SwiftErrorResult:\n if (!isValidSwiftErrorResultType(type)) {\n Diag(CI.getLoc(), diag::err_swift_abi_parameter_wrong_type) << getParameterABISpelling(abi) << /*pointer to pointer */ 1 << type;"},{db,5551,"void Sema::AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI abi) {\n // ...\n case ParameterABI::SwiftIndirectResult:\n if (!isValidSwiftIndirectResultType(type)) {\n Diag(CI.getLoc(), diag::err_swift_abi_parameter_wrong_type) << getParameterABISpelling(abi) << /*pointer*/ 0 << type;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/attr-swiftcall.cpp"]={"clang/test/SemaCXX/attr-swiftcall.cpp:21:31: error: \'swift_indirect_result\' parameter must have pointer type; type here is \'int\'","clang/test/SemaCXX/attr-swiftcall.cpp:29:51: error: \'swift_error_result\' parameter must have pointer to unqualified pointer type; type here is \'int\'","clang/test/SemaCXX/attr-swiftcall.cpp:30:52: error: \'swift_error_result\' parameter must have pointer to unqualified pointer type; type here is \'int *\'","clang/test/SemaCXX/attr-swiftcall.cpp:35:23: error: \'swift_context\' parameter must have pointer type; type here is \'int\'","clang/test/SemaCXX/attr-swiftcall.cpp:42:29: error: \'swift_async_context\' parameter must have pointer type; type here is \'int\'"} | ["clang/test/SemaCXX/attr-swiftcall.cpp"]={"clang/test/SemaCXX/attr-swiftcall.cpp:21:31: error: \'swift_indirect_result\' parameter must have pointer type; type here is \'int\'","clang/test/SemaCXX/attr-swiftcall.cpp:29:51: error: \'swift_error_result\' parameter must have pointer to unqualified pointer type; type here is \'int\'","clang/test/SemaCXX/attr-swiftcall.cpp:30:52: error: \'swift_error_result\' parameter must have pointer to unqualified pointer type; type here is \'int *\'","clang/test/SemaCXX/attr-swiftcall.cpp:35:23: error: \'swift_context\' parameter must have pointer type; type here is \'int\'","clang/test/SemaCXX/attr-swiftcall.cpp:42:29: error: \'swift_async_context\' parameter must have pointer type; type here is \'int\'"} | ||
Line 4,458: | Line 4,486: | ||
}, | }, | ||
["err_swift_async_bad_block_type"]={ | ["err_swift_async_bad_block_type"]={ | ||
[ | [i]={{nil,v,"err_swift_async_bad_block_type"}}, | ||
[ | [h]={{nil,v,"\'swift_async\' completion handler parameter must have block type returning \'void\', type here is %0"}}, | ||
[ | [g]={{nil,v,"\'swift_async\' completion handler parameter must have block type returning \'void\', type here is A"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'swift_async\' completion handler parameter must have block type returning \'void\', type here is (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{ | [j]={{db,6946,"static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (Kind == SwiftAsyncAttr::None) {\n // ...\n } else {\n // ...\n if (!CompletionBlockType->isBlockPointerType()) {\n S.Diag(CompletionBlock->getLocation(), diag::err_swift_async_bad_block_type) << CompletionBlock->getType();"},{db,6954,"static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (Kind == SwiftAsyncAttr::None) {\n // ...\n } else {\n // ...\n if (!BlockTy->castAs<FunctionType>()->getReturnType()->isVoidType()) {\n S.Diag(CompletionBlock->getLocation(), diag::err_swift_async_bad_block_type) << CompletionBlock->getType();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/attr-swift-async.m"]={"clang/test/SemaObjC/attr-swift-async.m:12:32: error: \'swift_async\' completion handler parameter must have block type returning \'void\', type here is \'int\'","clang/test/SemaObjC/attr-swift-async.m:13:39: error: \'swift_async\' completion handler parameter must have block type returning \'void\', type here is \'int (^)()\'","clang/test/SemaObjC/attr-swift-async.m:23:26: error: \'swift_async\' completion handler parameter must have block type returning \'void\', type here is \'int (^)()\'","clang/test/SemaObjC/attr-swift-async.m:36:43: error: \'swift_async\' completion handler parameter must have block type returning \'void\', type here is \'int (^)()\'"} | ["clang/test/SemaObjC/attr-swift-async.m"]={"clang/test/SemaObjC/attr-swift-async.m:12:32: error: \'swift_async\' completion handler parameter must have block type returning \'void\', type here is \'int\'","clang/test/SemaObjC/attr-swift-async.m:13:39: error: \'swift_async\' completion handler parameter must have block type returning \'void\', type here is \'int (^)()\'","clang/test/SemaObjC/attr-swift-async.m:23:26: error: \'swift_async\' completion handler parameter must have block type returning \'void\', type here is \'int (^)()\'","clang/test/SemaObjC/attr-swift-async.m:36:43: error: \'swift_async\' completion handler parameter must have block type returning \'void\', type here is \'int (^)()\'"} | ||
Line 4,472: | Line 4,500: | ||
}, | }, | ||
["err_swift_async_error_no_error_parameter"]={ | ["err_swift_async_error_no_error_parameter"]={ | ||
[ | [i]={{nil,F,"err_swift_async_error_no_error_parameter"}}, | ||
[ | [h]={{nil,F,"%0 attribute with \'nonnull_error\' convention can only be applied to a %select{function|method}1 with a completion handler with an error parameter"}}, | ||
[ | [g]={{nil,F,{"A attribute with \'nonnull_error\' convention can only be applied to a ",{W,kb}," with a completion handler with an error parameter"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(.*?) attribute with \'nonnull_error\' convention can only be applied to a (?:function|method) with a completion handler with an error parameter", | ||
[ | [f]=a, | ||
[ | [d]={{nil,F,m}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{ | [j]={{db,6527,"static void checkSwiftAsyncErrorBlock(Sema &S, Decl *D, const SwiftAsyncErrorAttr *ErrorAttr, const SwiftAsyncAttr *AsyncAttr) {\n // ...\n case SwiftAsyncErrorAttr::NonNullError: {\n // ...\n if (!AnyErrorParams) {\n S.Diag(ErrorAttr->getLocation(), diag::err_swift_async_error_no_error_parameter) << ErrorAttr << isa<ObjCMethodDecl>(D);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/attr-swift-async-error.m"]={"clang/test/SemaObjC/attr-swift-async-error.m:37:1: error: \'swift_async_error\' attribute with \'nonnull_error\' convention can only be applied to a function with a completion handler with an error parameter","clang/test/SemaObjC/attr-swift-async-error.m:89:3: error: \'swift_async_error\' attribute with \'nonnull_error\' convention can only be applied to a method with a completion handler with an error parameter"} | ["clang/test/SemaObjC/attr-swift-async-error.m"]={"clang/test/SemaObjC/attr-swift-async-error.m:37:1: error: \'swift_async_error\' attribute with \'nonnull_error\' convention can only be applied to a function with a completion handler with an error parameter","clang/test/SemaObjC/attr-swift-async-error.m:89:3: error: \'swift_async_error\' attribute with \'nonnull_error\' convention can only be applied to a method with a completion handler with an error parameter"} | ||
Line 4,486: | Line 4,514: | ||
}, | }, | ||
["err_swift_async_error_non_integral"]={ | ["err_swift_async_error_non_integral"]={ | ||
[ | [i]={{nil,F,"err_swift_async_error_non_integral"}}, | ||
[ | [h]={{nil,F,"%0 attribute with \'%1\' convention must have an integral-typed parameter in completion handler at index %2, type here is %3"}}, | ||
[ | [g]={{nil,F,"A attribute with \'B\' convention must have an integral-typed parameter in completion handler at index C, type here is D"}}, | ||
[ | [b]=k, | ||
[ | [e]="(.*?) attribute with \'(.*?)\' convention must have an integral\\-typed parameter in completion handler at index (.*?), type here is (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,F,m}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{ | [j]={{db,6496,"static void checkSwiftAsyncErrorBlock(Sema &S, Decl *D, const SwiftAsyncErrorAttr *ErrorAttr, const SwiftAsyncAttr *AsyncAttr) {\n // ...\n case SwiftAsyncErrorAttr::ZeroArgument:\n case SwiftAsyncErrorAttr::NonZeroArgument: {\n // ...\n if (!ErrorParam->isIntegralType(S.Context)) {\n // ...\n S.Diag(ErrorAttr->getLocation(), diag::err_swift_async_error_non_integral) << ErrorAttr << ConvStr << ParamIdx << ErrorParam;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/attr-swift-async-error.m"]={"clang/test/SemaObjC/attr-swift-async-error.m:41:1: error: \'swift_async_error\' attribute with \'zero_argument\' convention must have an integral-typed parameter in completion handler at index 1, type here is \'double\'","clang/test/SemaObjC/attr-swift-async-error.m:81:3: error: \'swift_async_error\' attribute with \'nonzero_argument\' convention must have an integral-typed parameter in completion handler at index 1, type here is \'double\'"} | ["clang/test/SemaObjC/attr-swift-async-error.m"]={"clang/test/SemaObjC/attr-swift-async-error.m:41:1: error: \'swift_async_error\' attribute with \'zero_argument\' convention must have an integral-typed parameter in completion handler at index 1, type here is \'double\'","clang/test/SemaObjC/attr-swift-async-error.m:81:3: error: \'swift_async_error\' attribute with \'nonzero_argument\' convention must have an integral-typed parameter in completion handler at index 1, type here is \'double\'"} | ||
Line 4,500: | Line 4,528: | ||
}, | }, | ||
["err_swift_async_error_without_swift_async"]={ | ["err_swift_async_error_without_swift_async"]={ | ||
[ | [i]={{nil,F,"err_swift_async_error_without_swift_async"}}, | ||
[ | [h]={{nil,F,"%0 attribute must be applied to a %select{function|method}1 annotated with non-\'none\' attribute \'swift_async\'"}}, | ||
[ | [g]={{nil,F,{"A attribute must be applied to a ",{W,kb}," annotated with non-\'none\' attribute \'swift_async\'"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(.*?) attribute must be applied to a (?:function|method) annotated with non\\-\'none\' attribute \'swift_async\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,F,m}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{ | [j]={{db,6463,"static void checkSwiftAsyncErrorBlock(Sema &S, Decl *D, const SwiftAsyncErrorAttr *ErrorAttr, const SwiftAsyncAttr *AsyncAttr) {\n if (AsyncAttr->getKind() == SwiftAsyncAttr::None) {\n if (ErrorAttr->getConvention() != SwiftAsyncErrorAttr::None) {\n S.Diag(AsyncAttr->getLocation(), diag::err_swift_async_error_without_swift_async) << AsyncAttr << isa<ObjCMethodDecl>(D);"}} | ||
}, | }, | ||
["err_swift_async_no_access"]={ | ["err_swift_async_no_access"]={ | ||
[ | [i]={{nil,v,"err_swift_async_no_access"}}, | ||
[ | [h]={{nil,v,"first argument to \'swift_async\' must be either \'none\', \'swift_private\', or \'not_swift_private\'"}}, | ||
[ | [g]={{nil,v,"first argument to \'swift_async\' must be either \'none\', \'swift_private\', or \'not_swift_private\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="first argument to \'swift_async\' must be either \'none\', \'swift_private\', or \'not_swift_private\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{ | [j]={{db,6923,"static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!SwiftAsyncAttr::ConvertStrToKind(II->getName(), Kind)) {\n S.Diag(AL.getLoc(), diag::err_swift_async_no_access) << AL << II;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/attr-swift-async.m"]={"clang/test/SemaObjC/attr-swift-async.m:20:1: error: first argument to \'swift_async\' must be either \'none\', \'swift_private\', or \'not_swift_private\'"} | ["clang/test/SemaObjC/attr-swift-async.m"]={"clang/test/SemaObjC/attr-swift-async.m:20:1: error: first argument to \'swift_async\' must be either \'none\', \'swift_private\', or \'not_swift_private\'"} | ||
Line 4,525: | Line 4,553: | ||
}, | }, | ||
["err_swift_error_result_not_after_swift_context"]={ | ["err_swift_error_result_not_after_swift_context"]={ | ||
[ | [i]="err_swift_error_result_not_after_swift_context", | ||
[h]="\'swift_error_result\' parameter must follow \'swift_context\' parameter", | |||
[g]="\'swift_error_result\' parameter must follow \'swift_context\' parameter", | |||
[b]=k, | |||
[e]="\'swift_error_result\' parameter must follow \'swift_context\' parameter", | [e]="\'swift_error_result\' parameter must follow \'swift_context\' parameter", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"477f2bb0d53c",1456987172,"Semantic analysis for the swiftcall calling convention.","Semantic analysis for the swiftcall calling convention.\n\nI\'ve tried to keep the infrastructure behind parameter ABI\ntreatments fairly general.\n\nllvm-svn: 262587"}, | |||
[j]={{R,3005,"/// Check the extended parameter information. Most of the necessary\n/// checking should occur when applying the parameter attribute; the\n/// only other checks required are positional restrictions.\nstatic void checkExtParameterInfos(Sema &S, ArrayRef<QualType> paramTypes, const FunctionProtoType::ExtProtoInfo &EPI, llvm::function_ref<SourceLocation(unsigned)> getParamLoc) {\n // ...\n for (size_t paramIndex = 0, numParams = paramTypes.size(); paramIndex != numParams; ++paramIndex) {\n // ...\n // swift_error parameters must be preceded by a swift_context parameter.\n case ParameterABI::SwiftErrorResult:\n // ...\n if (paramIndex == 0 || EPI.ExtParameterInfos[paramIndex - 1].getABI() != ParameterABI::SwiftContext) {\n S.Diag(getParamLoc(paramIndex), diag::err_swift_error_result_not_after_swift_context);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/attr-swiftcall.cpp"]={"clang/test/SemaCXX/attr-swiftcall.cpp:27:48: error: \'swift_error_result\' parameter must follow \'swift_context\' parameter","clang/test/SemaCXX/attr-swiftcall.cpp:28:64: error: \'swift_error_result\' parameter must follow \'swift_context\' parameter"} | ["clang/test/SemaCXX/attr-swiftcall.cpp"]={"clang/test/SemaCXX/attr-swiftcall.cpp:27:48: error: \'swift_error_result\' parameter must follow \'swift_context\' parameter","clang/test/SemaCXX/attr-swiftcall.cpp:28:64: error: \'swift_error_result\' parameter must follow \'swift_context\' parameter"} | ||
Line 4,539: | Line 4,567: | ||
}, | }, | ||
["err_swift_indirect_result_not_first"]={ | ["err_swift_indirect_result_not_first"]={ | ||
[ | [i]="err_swift_indirect_result_not_first", | ||
[h]="\'swift_indirect_result\' parameters must be first parameters of function", | |||
[g]="\'swift_indirect_result\' parameters must be first parameters of function", | |||
[b]=k, | |||
[e]="\'swift_indirect_result\' parameters must be first parameters of function", | [e]="\'swift_indirect_result\' parameters must be first parameters of function", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"477f2bb0d53c",1456987172,"Semantic analysis for the swiftcall calling convention.","Semantic analysis for the swiftcall calling convention.\n\nI\'ve tried to keep the infrastructure behind parameter ABI\ntreatments fairly general.\n\nllvm-svn: 262587"}, | |||
[j]={{R,2986,"/// Check the extended parameter information. Most of the necessary\n/// checking should occur when applying the parameter attribute; the\n/// only other checks required are positional restrictions.\nstatic void checkExtParameterInfos(Sema &S, ArrayRef<QualType> paramTypes, const FunctionProtoType::ExtProtoInfo &EPI, llvm::function_ref<SourceLocation(unsigned)> getParamLoc) {\n // ...\n for (size_t paramIndex = 0, numParams = paramTypes.size(); paramIndex != numParams; ++paramIndex) {\n // ...\n // swift_indirect_result parameters must be a prefix of the function\n // arguments.\n case ParameterABI::SwiftIndirectResult:\n // ...\n if (paramIndex != 0 && EPI.ExtParameterInfos[paramIndex - 1].getABI() != ParameterABI::SwiftIndirectResult) {\n S.Diag(getParamLoc(paramIndex), diag::err_swift_indirect_result_not_first);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/attr-swiftcall.cpp"]={"clang/test/SemaCXX/attr-swiftcall.cpp:20:68: error: \'swift_indirect_result\' parameters must be first parameters of function"} | ["clang/test/SemaCXX/attr-swiftcall.cpp"]={"clang/test/SemaCXX/attr-swiftcall.cpp:20:68: error: \'swift_indirect_result\' parameters must be first parameters of function"} | ||
Line 4,553: | Line 4,581: | ||
}, | }, | ||
["err_swift_param_attr_not_swiftcall"]={ | ["err_swift_param_attr_not_swiftcall"]={ | ||
[ | [i]="err_swift_param_attr_not_swiftcall", | ||
[ | [h]={{nil,F,"\'%0\' parameter can only be used with swiftcall%select{ or swiftasynccall|}1 calling convention%select{|s}1"},{v,nil,"\'%0\' parameter can only be used with swiftcall calling convention"}}, | ||
[ | [g]={{nil,F,{"\'A\' parameter can only be used with swiftcall",{" or swiftasynccall",a}," calling convention",{a,kc}}},{v,nil,"\'A\' parameter can only be used with swiftcall calling convention"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'(.*?)\' parameter can only be used with swiftcall(?: or swiftasynccall|) calling convention(?:|s)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"477f2bb0d53c",1456987172,"Semantic analysis for the swiftcall calling convention.","Semantic analysis for the swiftcall calling convention.\n\nI\'ve tried to keep the infrastructure behind parameter ABI\ntreatments fairly general.\n\nllvm-svn: 262587"}, | ||
[j]={{ | [j]={{R,2966,"/// Check the extended parameter information. Most of the necessary\n/// checking should occur when applying the parameter attribute; the\n/// only other checks required are positional restrictions.\nstatic void checkExtParameterInfos(Sema &S, ArrayRef<QualType> paramTypes, const FunctionProtoType::ExtProtoInfo &EPI, llvm::function_ref<SourceLocation(unsigned)> getParamLoc) {\n // ...\n auto checkCompatible = [&](unsigned paramIndex, RequiredCC required) {\n // ...\n S.Diag(getParamLoc(paramIndex), diag::err_swift_param_attr_not_swiftcall) << getParameterABISpelling(EPI.ExtParameterInfos[paramIndex].getABI()) << (required == RequiredCC::OnlySwift);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/attr-swiftcall.cpp"]={"clang/test/SemaCXX/attr-swiftcall.cpp:19:53: error: \'swift_indirect_result\' parameter can only be used with swiftcall or swiftasynccall calling convention","clang/test/SemaCXX/attr-swiftcall.cpp:27:48: error: \'swift_error_result\' parameter can only be used with swiftcall calling conventions","clang/test/SemaCXX/attr-swiftcall.cpp:34:37: error: \'swift_context\' parameter can only be used with swiftcall or swiftasynccall calling convention"} | ["clang/test/SemaCXX/attr-swiftcall.cpp"]={"clang/test/SemaCXX/attr-swiftcall.cpp:19:53: error: \'swift_indirect_result\' parameter can only be used with swiftcall or swiftasynccall calling convention","clang/test/SemaCXX/attr-swiftcall.cpp:27:48: error: \'swift_error_result\' parameter can only be used with swiftcall calling conventions","clang/test/SemaCXX/attr-swiftcall.cpp:34:37: error: \'swift_context\' parameter can only be used with swiftcall or swiftasynccall calling convention"} | ||
Line 4,567: | Line 4,595: | ||
}, | }, | ||
["err_switch_explicit_conversion"]={ | ["err_switch_explicit_conversion"]={ | ||
[ | [i]="err_switch_explicit_conversion", | ||
[ | [h]="switch condition type %0 requires explicit conversion to %1", | ||
[ | [g]="switch condition type A requires explicit conversion to B", | ||
[ | [b]=k, | ||
[ | [e]="switch condition type (.*?) requires explicit conversion to (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d0c22e0d10fc",1258983968,"Implement conversion from a switch condition with class type to an","Implement conversion from a switch condition with class type to an\nintegral or enumeration type (vi user-defined conversions). Fixes PR5518.\n\nllvm-svn: 89655"}, | ||
[j]={{ | [j]={{Z,1051,"ExprResult Sema::CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond) {\n class SwitchConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder diagnoseExplicitConv(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy) override { return S.Diag(Loc, diag::err_switch_explicit_conversion) << T << ConvTy; }"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/switch-0x.cpp"]={"clang/test/SemaCXX/switch-0x.cpp:9:3: error: switch condition type \'A\' requires explicit conversion to \'int\'"} | ["clang/test/SemaCXX/switch-0x.cpp"]={"clang/test/SemaCXX/switch-0x.cpp:9:3: error: switch condition type \'A\' requires explicit conversion to \'int\'"} | ||
Line 4,581: | Line 4,609: | ||
}, | }, | ||
["err_switch_incomplete_class_type"]={ | ["err_switch_incomplete_class_type"]={ | ||
[ | [i]="err_switch_incomplete_class_type", | ||
[ | [h]="switch condition has incomplete class type %0", | ||
[ | [g]="switch condition has incomplete class type A", | ||
[ | [b]=k, | ||
[ | [e]="switch condition has incomplete class type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"378e1923b6a5",1258984401,"Require a class type to be complete before probing its conversion","Require a class type to be complete before probing its conversion\nfunctions for a switch condition\'s conversion to integral or\nenumeration type. \n\nllvm-svn: 89656"}, | ||
[j]={{ | [j]={{Z,1045,"ExprResult Sema::CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond) {\n class SwitchConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder diagnoseIncomplete(Sema &S, SourceLocation Loc, QualType T) override { return S.Diag(Loc, diag::err_switch_incomplete_class_type) << T << Cond->getSourceRange(); }"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/switch.cpp"]={"clang/test/SemaCXX/switch.cpp:40:3: error: switch condition has incomplete class type \'C\'"} | ["clang/test/SemaCXX/switch.cpp"]={"clang/test/SemaCXX/switch.cpp:40:3: error: switch condition has incomplete class type \'C\'"} | ||
Line 4,595: | Line 4,623: | ||
}, | }, | ||
["err_switch_into_protected_scope"]={ | ["err_switch_into_protected_scope"]={ | ||
[ | [i]="err_switch_into_protected_scope", | ||
[h]="cannot jump from switch statement to this case label", | |||
[g]="cannot jump from switch statement to this case label", | |||
[b]=k, | |||
[e]="cannot jump from switch statement to this case label", | [e]="cannot jump from switch statement to this case label", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"7535f41c6673",1240083757,"first step to getting switches giving \"jump into vla scope\" errors.","first step to getting switches giving \"jump into vla scope\" errors.\n\nllvm-svn: 69461"}, | |||
[ | |||
[ | |||
[j]={{"clang/lib/ARCMigrate/TransProtectedScope.cpp",121,"class ProtectedScopeFixer {\n // ...\n ProtectedScopeFixer(BodyContext &BodyCtx) : Pass(BodyCtx.getMigrationContext().Pass), SM(Pass.Ctx.getSourceManager()) {\n // ...\n while (I != E) {\n if (I->getID() == diag::err_switch_into_protected_scope && isInRange(I->getLocation(), BodyRange)) {"},{"clang/lib/ARCMigrate/TransProtectedScope.cpp",134,"class ProtectedScopeFixer {\n // ...\n void handleProtectedScopeError(SmallVectorImpl<StoredDiagnostic>::iterator &DiagI, SmallVectorImpl<StoredDiagnostic>::iterator DiagE) {\n // ...\n assert(DiagI->getID() == diag::err_switch_into_protected_scope);"},{"clang/lib/ARCMigrate/TransProtectedScope.cpp",145,"class ProtectedScopeFixer {\n // ...\n void handleProtectedScopeError(SmallVectorImpl<StoredDiagnostic>::iterator &DiagI, SmallVectorImpl<StoredDiagnostic>::iterator DiagE) {\n // ...\n if (handledAllNotes)\n Pass.TA.clearDiagnostic(diag::err_switch_into_protected_scope, ErrLoc);"},{"clang/lib/Sema/JumpDiagnostics.cpp",712,"/// 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 for (SwitchCase *SC = SS->getSwitchCaseList(); SC; SC = SC->getNextSwitchCase()) {\n // ...\n CheckJump(SS, SC, Loc, diag::err_switch_into_protected_scope, 0, diag::warn_cxx98_compat_switch_into_protected_scope);"}}, | [j]={{"clang/lib/ARCMigrate/TransProtectedScope.cpp",121,"class ProtectedScopeFixer {\n // ...\n ProtectedScopeFixer(BodyContext &BodyCtx) : Pass(BodyCtx.getMigrationContext().Pass), SM(Pass.Ctx.getSourceManager()) {\n // ...\n while (I != E) {\n if (I->getID() == diag::err_switch_into_protected_scope && isInRange(I->getLocation(), BodyRange)) {"},{"clang/lib/ARCMigrate/TransProtectedScope.cpp",134,"class ProtectedScopeFixer {\n // ...\n void handleProtectedScopeError(SmallVectorImpl<StoredDiagnostic>::iterator &DiagI, SmallVectorImpl<StoredDiagnostic>::iterator DiagE) {\n // ...\n assert(DiagI->getID() == diag::err_switch_into_protected_scope);"},{"clang/lib/ARCMigrate/TransProtectedScope.cpp",145,"class ProtectedScopeFixer {\n // ...\n void handleProtectedScopeError(SmallVectorImpl<StoredDiagnostic>::iterator &DiagI, SmallVectorImpl<StoredDiagnostic>::iterator DiagE) {\n // ...\n if (handledAllNotes)\n Pass.TA.clearDiagnostic(diag::err_switch_into_protected_scope, ErrLoc);"},{"clang/lib/Sema/JumpDiagnostics.cpp",712,"/// 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 for (SwitchCase *SC = SS->getSwitchCaseList(); SC; SC = SC->getNextSwitchCase()) {\n // ...\n CheckJump(SS, SC, Loc, diag::err_switch_into_protected_scope, 0, diag::warn_cxx98_compat_switch_into_protected_scope);"}}, | ||
[l]={ | [l]={ | ||
Line 4,609: | Line 4,637: | ||
}, | }, | ||
["err_switch_multiple_conversions"]={ | ["err_switch_multiple_conversions"]={ | ||
[ | [i]="err_switch_multiple_conversions", | ||
[ | [h]="multiple conversions from switch condition type %0 to an integral or enumeration type", | ||
[ | [g]="multiple conversions from switch condition type A to an integral or enumeration type", | ||
[ | [b]=k, | ||
[ | [e]="multiple conversions from switch condition type (.*?) to an integral or enumeration type", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d0c22e0d10fc",1258983968,"Implement conversion from a switch condition with class type to an","Implement conversion from a switch condition with class type to an\nintegral or enumeration type (vi user-defined conversions). Fixes PR5518.\n\nllvm-svn: 89655"}, | ||
[j]={{ | [j]={{Z,1062,"ExprResult Sema::CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond) {\n class SwitchConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder diagnoseAmbiguous(Sema &S, SourceLocation Loc, QualType T) override { return S.Diag(Loc, diag::err_switch_multiple_conversions) << T; }"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/switch.cpp"]={"clang/test/SemaCXX/switch.cpp:33:3: error: multiple conversions from switch condition type \'B\' to an integral or enumeration type"} | ["clang/test/SemaCXX/switch.cpp"]={"clang/test/SemaCXX/switch.cpp:33:3: error: multiple conversions from switch condition type \'B\' to an integral or enumeration type"} | ||
Line 4,623: | Line 4,651: | ||
}, | }, | ||
["err_sycl_special_type_num_init_method"]={ | ["err_sycl_special_type_num_init_method"]={ | ||
[ | [i]={{nil,C,"err_sycl_special_type_num_init_method"}}, | ||
[ | [h]={{nil,C,"types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined"}}, | ||
[ | [g]={{nil,C,"types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined"}}, | ||
[ | [b]=k, | ||
[ | [e]="types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined", | ||
[ | [f]=a, | ||
[ | [d]={{nil,C,a}}, | ||
[ | [c]={hd,1616787805,gd,fd}, | ||
[j]={{ | [j]={{w,17816,"void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD, SourceRange BraceRange) {\n // ...\n if (auto *RD = dyn_cast<CXXRecordDecl>(Tag)) {\n // ...\n if (RD->hasAttr<SYCLSpecialClassAttr>()) {\n // ...\n if (NumInitMethods > 1 || !Def->hasInitMethod())\n Diag(RD->getLocation(), diag::err_sycl_special_type_num_init_method);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaSYCL/special-class-attribute.cpp"]={"clang/test/SemaSYCL/special-class-attribute.cpp:42:43: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:45:37: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:49:37: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:56:8: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:59:44: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:78:37: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:83:43: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:88:38: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:93:44: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined"} | ["clang/test/SemaSYCL/special-class-attribute.cpp"]={"clang/test/SemaSYCL/special-class-attribute.cpp:42:43: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:45:37: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:49:37: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:56:8: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:59:44: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:78:37: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:83:43: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:88:38: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined","clang/test/SemaSYCL/special-class-attribute.cpp:93:44: error: types with \'sycl_special_class\' attribute must have one and only one \'__init\' method defined"} | ||
Line 4,637: | Line 4,665: | ||
}, | }, | ||
["err_synthesize_category_decl"]={ | ["err_synthesize_category_decl"]={ | ||
[ | [i]="err_synthesize_category_decl", | ||
[h]="@synthesize not allowed in a category\'s implementation", | |||
[g]="@synthesize not allowed in a category\'s implementation", | |||
[b]=k, | |||
[e]="@synthesize not allowed in a category\'s implementation", | [e]="@synthesize not allowed in a category\'s implementation", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={wb,1480718311,vb,tb}, | |||
[ | |||
[j]={{hb,1176,"/// 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 = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {\n // ...\n } else if ((CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassImpDecl))) {\n if (Synthesize) {\n Diag(AtLoc, diag::err_synthesize_category_decl);"}}, | [j]={{hb,1176,"/// 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 = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {\n // ...\n } else if ((CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassImpDecl))) {\n if (Synthesize) {\n Diag(AtLoc, diag::err_synthesize_category_decl);"}}, | ||
[l]={ | [l]={ | ||
Line 4,651: | Line 4,679: | ||
}, | }, | ||
["err_synthesize_on_class_property"]={ | ["err_synthesize_on_class_property"]={ | ||
[ | [i]="err_synthesize_on_class_property", | ||
[ | [h]="@synthesize not allowed on a class property %0", | ||
[ | [g]="@synthesize not allowed on a class property A", | ||
[ | [b]=k, | ||
[ | [e]="@synthesize not allowed on a class property (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={wb,1480718311,vb,tb}, | ||
[j]={{hb,1118,"/// 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 = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {\n // ...\n if (property->isClassProperty() && Synthesize) {\n Diag(PropertyLoc, diag::err_synthesize_on_class_property) << PropertyId;"}}, | [j]={{hb,1118,"/// 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 = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {\n // ...\n if (property->isClassProperty() && Synthesize) {\n Diag(PropertyLoc, diag::err_synthesize_on_class_property) << PropertyId;"}}, | ||
[l]={ | [l]={ | ||
Line 4,665: | Line 4,693: | ||
}, | }, | ||
["err_synthesize_variable_sized_ivar"]={ | ["err_synthesize_variable_sized_ivar"]={ | ||
[ | [i]={{nil,A,"err_synthesize_variable_sized_ivar"}}, | ||
[ | [h]={{nil,A,"synthesized property with variable size type %0 requires an existing instance variable"}}, | ||
[ | [g]={{nil,A,"synthesized property with variable size type A requires an existing instance variable"}}, | ||
[ | [b]=k, | ||
[ | [e]="synthesized property with variable size type (.*?) requires an existing instance variable", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,m}}, | ||
[ | [c]={"30680e943735",1508796101,"[Sema] Add support for flexible array members in Obj-C.","[Sema] Add support for flexible array members in Obj-C.\n\nAllow Obj-C ivars with incomplete array type but only as the last ivar.\nAlso add a requirement for ivars that contain a flexible array member to\nbe at the end of class too. It is possible to add in a subclass another\nivar at the end but we\'ll emit a warning in this case. Also we\'ll emit a\nwarning if a variable sized ivar is declared in class extension or in\nimplementation because subclasses won\'t know they should avoid adding\nnew ivars.\n\nIn ARC incomplete array objects are treated as __unsafe_unretained so\nrequire them to be marked as such.\n\nProhibit synthesizing ivars with flexible array members because order of\nsynthesized ivars is not obvious and tricky to control. Spelling out\nivar explicitly gives control to developers and helps to avoid surprises\nwith unexpected ivar ordering.\n\nFor C and C++ changed diagnostic to tell explicitly a field is not the\nlast one and point to the next field. It is not as useful as in Obj-C\nbut it is an improvement and it is consistent with Obj-C. For C for\nunions emit more specific err_flexible_array_union instead of generic\nerr_field_incomplete.\n\nrdar://problem/21054495\n\nReviewers: rjmccall, theraven\n\nReviewed By: rjmccall\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D38773\n\nllvm-svn: 316381"}, | ||
[j]={{hb,1335,"/// 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 if (!Ivar) {\n // ...\n if (!CompleteTypeErr) {\n // ...\n if (RecordTy && RecordTy->getDecl()->hasFlexibleArrayMember()) {\n Diag(PropertyIvarLoc, diag::err_synthesize_variable_sized_ivar) << PropertyIvarType;"}}, | [j]={{hb,1335,"/// 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 if (!Ivar) {\n // ...\n if (!CompleteTypeErr) {\n // ...\n if (RecordTy && RecordTy->getDecl()->hasFlexibleArrayMember()) {\n Diag(PropertyIvarLoc, diag::err_synthesize_variable_sized_ivar) << PropertyIvarType;"}}, | ||
[l]={ | [l]={ | ||
Line 4,679: | Line 4,707: | ||
}, | }, | ||
["err_synthesized_property_name"]={ | ["err_synthesized_property_name"]={ | ||
[ | [i]="err_synthesized_property_name", | ||
[h]="expected a property name in @synthesize", | |||
[g]="expected a property name in @synthesize", | |||
[b]=k, | |||
[e]="expected a property name in @synthesize", | [e]="expected a property name in @synthesize", | ||
[f]= | [f]=a, | ||
[ | [d]=x, | ||
[c]={"88e72a0bf662",1258573545,"Improve diagnostics and recovery when parsing @synthesized definitions","Improve diagnostics and recovery when parsing @synthesized definitions\n\nllvm-svn: 89227"}, | |||
[ | |||
[j]={{"clang/lib/Parse/ParseObjc.cpp",2385,"/// property-synthesis:\n/// @synthesize property-ivar-list \';\'\n///\n/// property-ivar-list:\n/// property-ivar\n/// property-ivar-list \',\' property-ivar\n///\n/// property-ivar:\n/// identifier\n/// identifier \'=\' identifier\n///\nDecl *Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {\n // ...\n while (true) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_synthesized_property_name);"}}, | [j]={{"clang/lib/Parse/ParseObjc.cpp",2385,"/// property-synthesis:\n/// @synthesize property-ivar-list \';\'\n///\n/// property-ivar-list:\n/// property-ivar\n/// property-ivar-list \',\' property-ivar\n///\n/// property-ivar:\n/// identifier\n/// identifier \'=\' identifier\n///\nDecl *Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {\n // ...\n while (true) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_synthesized_property_name);"}}, | ||
[l]={ | [l]={ | ||
Line 4,693: | Line 4,721: | ||
}, | }, | ||
["err_synthesizing_arc_weak_property_disabled"]={ | ["err_synthesizing_arc_weak_property_disabled"]={ | ||
[ | [i]="err_synthesizing_arc_weak_property_disabled", | ||
[h]="cannot synthesize weak property in file using manual reference counting", | |||
[g]="cannot synthesize weak property in file using manual reference counting", | |||
[b]=k, | |||
[e]="cannot synthesize weak property in file using manual reference counting", | [e]="cannot synthesize weak property in file using manual reference counting", | ||
[f | [f]=a, | ||
[d]="ARC Weak References", | |||
[c]={"b61e14e5962a",1445921690,"Be more conservative about diagnosing \"incorrect\" uses of __weak:","Be more conservative about diagnosing \"incorrect\" uses of __weak:\nallow them to be written in certain kinds of user declaration and\ndiagnose on the use-site instead.\n\nAlso, improve and fix some diagnostics relating to __weak and\nproperties.\n\nrdar://23228631\n\nllvm-svn: 251384"}, | |||
[ | |||
[ | |||
[j]={{hb,1253,"/// 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 if (kind & ObjCPropertyAttribute::kind_weak) {\n // Add GC __weak to the ivar type if the property is weak.\n if (getLangOpts().getGC() != LangOptions::NonGC) {\n // ...\n } else {\n if (!getLangOpts().ObjCWeak) {\n // Only complain here when synthesizing an ivar.\n if (!Ivar) {\n Diag(PropertyDiagLoc, getLangOpts().ObjCWeakRuntime ? diag::err_synthesizing_arc_weak_property_disabled : diag::err_synthesizing_arc_weak_property_no_runtime);"}}, | [j]={{hb,1253,"/// 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 if (kind & ObjCPropertyAttribute::kind_weak) {\n // Add GC __weak to the ivar type if the property is weak.\n if (getLangOpts().getGC() != LangOptions::NonGC) {\n // ...\n } else {\n if (!getLangOpts().ObjCWeak) {\n // Only complain here when synthesizing an ivar.\n if (!Ivar) {\n Diag(PropertyDiagLoc, getLangOpts().ObjCWeakRuntime ? diag::err_synthesizing_arc_weak_property_disabled : diag::err_synthesizing_arc_weak_property_no_runtime);"}}, | ||
[l]={ | [l]={ | ||
Line 4,707: | Line 4,735: | ||
}, | }, | ||
["err_synthesizing_arc_weak_property_no_runtime"]={ | ["err_synthesizing_arc_weak_property_no_runtime"]={ | ||
[ | [i]="err_synthesizing_arc_weak_property_no_runtime", | ||
[h]="cannot synthesize weak property because the current deployment target does not support weak references", | |||
[g]="cannot synthesize weak property because the current deployment target does not support weak references", | |||
[b]=k, | |||
[e]="cannot synthesize weak property because the current deployment target does not support weak references", | [e]="cannot synthesize weak property because the current deployment target does not support weak references", | ||
[f | [f]=a, | ||
[d]="ARC Weak References", | |||
[c]={"b61e14e5962a",1445921690,"Be more conservative about diagnosing \"incorrect\" uses of __weak:","Be more conservative about diagnosing \"incorrect\" uses of __weak:\nallow them to be written in certain kinds of user declaration and\ndiagnose on the use-site instead.\n\nAlso, improve and fix some diagnostics relating to __weak and\nproperties.\n\nrdar://23228631\n\nllvm-svn: 251384"}, | |||
[ | |||
[ | |||
[j]={{hb,1254,"/// 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 if (kind & ObjCPropertyAttribute::kind_weak) {\n // Add GC __weak to the ivar type if the property is weak.\n if (getLangOpts().getGC() != LangOptions::NonGC) {\n // ...\n } else {\n if (!getLangOpts().ObjCWeak) {\n // Only complain here when synthesizing an ivar.\n if (!Ivar) {\n Diag(PropertyDiagLoc, getLangOpts().ObjCWeakRuntime ? diag::err_synthesizing_arc_weak_property_disabled : diag::err_synthesizing_arc_weak_property_no_runtime);"}}, | [j]={{hb,1254,"/// 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 if (kind & ObjCPropertyAttribute::kind_weak) {\n // Add GC __weak to the ivar type if the property is weak.\n if (getLangOpts().getGC() != LangOptions::NonGC) {\n // ...\n } else {\n if (!getLangOpts().ObjCWeak) {\n // Only complain here when synthesizing an ivar.\n if (!Ivar) {\n Diag(PropertyDiagLoc, getLangOpts().ObjCWeakRuntime ? diag::err_synthesizing_arc_weak_property_disabled : diag::err_synthesizing_arc_weak_property_no_runtime);"}}, | ||
[l]={ | [l]={ | ||
Line 4,721: | Line 4,749: | ||
}, | }, | ||
["err_systemz_invalid_tabort_code"]={ | ["err_systemz_invalid_tabort_code"]={ | ||
[ | [i]="err_systemz_invalid_tabort_code", | ||
[h]="invalid transaction abort code", | |||
[g]="invalid transaction abort code", | |||
[b]=k, | |||
[e]="invalid transaction abort code", | [e]="invalid transaction abort code", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"3a610ebf1e7c",1427892865,"[SystemZ] Support transactional execution on zEC12","[SystemZ] Support transactional execution on zEC12\n\nThe zEC12 provides the transactional-execution facility. This is exposed\nto users via a set of builtin routines on other compilers. This patch\nadds clang support to enable those builtins. In partciular, the patch:\n\n- enables the transactional-execution feature by default on zEC12\n- allows to override presence of that feature via the -mhtm/-mno-htm options\n- adds a predefined macro __HTM__ if the feature is enabled\n- adds support for the transactional-execution GCC builtins\n- adds Sema checking to verify the __builtin_tabort abort code\n- adds the s390intrin.h header file (for GCC compatibility)\n- adds s390 sections to the htmintrin.h and htmxlintrin.h header files\n\nSince this is first use of target-specific intrinsics on the platform,\nthe patch creates the include/clang/Basic/BuiltinsSystemZ.def file and\nhooks it up in TargetBuiltins.h and lib/Basic/Targets.cpp.\n\nAn associated LLVM patch adds the required LLVM IR intrinsics.\n\nFor reference, the transactional-execution instructions are documented\nin the z/Architecture Principles of Operation for the zEC12:\nhttp://publibfp.boulder.ibm.com/cgi-bin/bookmgr/download/DZ9ZR009.pdf\nThe associated builtins are documented in the GCC manual:\nhttp://gcc.gnu.org/onlinedocs/gcc/S_002f390-System-z-Built-in-Functions.html\nThe htmxlintrin.h intrinsics provided for compatibility with the IBM XL\ncompiler are documented in the \"z/OS XL C/C++ Programming Guide\".\n\nllvm-svn: 233804"}, | |||
[j]={{z,5332,"bool Sema::CheckSystemZBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n if (BuiltinID == SystemZ::BI__builtin_tabort) {\n // ...\n if (std::optional<llvm::APSInt> AbortCode = Arg->getIntegerConstantExpr(Context))\n if (AbortCode->getSExtValue() >= 0 && AbortCode->getSExtValue() < 256)\n return Diag(Arg->getBeginLoc(), diag::err_systemz_invalid_tabort_code) << Arg->getSourceRange();"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CodeGen/SystemZ/builtins-systemz-error.c"]={"clang/test/CodeGen/SystemZ/builtins-systemz-error.c:6:21: error: invalid transaction abort code","clang/test/CodeGen/SystemZ/builtins-systemz-error.c:7:21: error: invalid transaction abort code"} | ["clang/test/CodeGen/SystemZ/builtins-systemz-error.c"]={"clang/test/CodeGen/SystemZ/builtins-systemz-error.c:6:21: error: invalid transaction abort code","clang/test/CodeGen/SystemZ/builtins-systemz-error.c:7:21: error: invalid transaction abort code"} | ||
Line 4,735: | Line 4,763: | ||
}, | }, | ||
["err_tag_definition_of_typedef"]={ | ["err_tag_definition_of_typedef"]={ | ||
[ | [i]="err_tag_definition_of_typedef", | ||
[ | [h]="definition of type %0 conflicts with %select{typedef|type alias}1 of the same name", | ||
[ | [g]={{nil,nil,{"definition of type A conflicts with ",{Rc,Ic}," of the same name"}}}, | ||
[ | [b]=k, | ||
[ | [e]="definition of type (.*?) conflicts with (?:typedef|type alias) of the same name", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{w,17451,"/// 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 // ...\n } else {\n // Use a better diagnostic if an elaborated-type-specifier\n // found the wrong kind of type on the first\n // (non-redeclaration) lookup.\n if ((TUK == TUK_Reference || TUK == TUK_Friend) && !Previous.isForRedeclaration()) {\n // ...\n } else if (!isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // ...\n } else if (TUK == TUK_Reference || TUK == TUK_Friend) {\n // ...\n } else if (TypedefNameDecl *TND = dyn_cast<TypedefNameDecl>(PrevDecl)) {\n // ...\n Diag(NameLoc, diag::err_tag_definition_of_typedef) << Name << Kind << TND->getUnderlyingType();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/typedef-redecl.cpp"]={"clang/test/SemaCXX/typedef-redecl.cpp:17:8: error: definition of type \'Y2\' conflicts with typedef of the same name"} | ["clang/test/SemaCXX/typedef-redecl.cpp"]={"clang/test/SemaCXX/typedef-redecl.cpp:17:8: error: definition of type \'Y2\' conflicts with typedef of the same name"} | ||
Line 4,749: | Line 4,777: | ||
}, | }, | ||
["err_tag_index_out_of_range"]={ | ["err_tag_index_out_of_range"]={ | ||
[ | [i]={{nil,A,"err_tag_index_out_of_range"}}, | ||
[ | [h]={{nil,A,"%select{type tag|argument}0 index %1 is greater than the number of arguments specified"}}, | ||
[ | [g]={{nil,A,{{"type tag","argument"}," index B is greater than the number of arguments specified"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:type tag|argument) index (.*?) is greater than the number of arguments specified", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,m}}, | ||
[ | [c]={"d1f6dcd1f548",1511997014,"Perform a bounds check on a function\'s argument list before accessing any index value specified by a...","Perform a bounds check on a function\'s argument list before accessing any index value specified by an \'argument_with_type_tag\' attribute. Fixes PR28520.\n\nPatch by Matt Davis.\n\nllvm-svn: 319383"}, | ||
[j]={{ | [j]={{z,18384,"void Sema::CheckArgumentWithTypeTag(const ArgumentWithTypeTagAttr *Attr, const ArrayRef<const Expr *> ExprArgs, SourceLocation CallSiteLoc) {\n // ...\n if (TypeTagIdxAST >= ExprArgs.size()) {\n Diag(CallSiteLoc, diag::err_tag_index_out_of_range) << 0 << Attr->getTypeTagIdx().getSourceIndex();"},{z,18404,"void Sema::CheckArgumentWithTypeTag(const ArgumentWithTypeTagAttr *Attr, const ArrayRef<const Expr *> ExprArgs, SourceLocation CallSiteLoc) {\n // ...\n if (ArgumentIdxAST >= ExprArgs.size()) {\n Diag(CallSiteLoc, diag::err_tag_index_out_of_range) << 1 << Attr->getArgumentIdx().getSourceIndex();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/error-type-safety.cpp"]={"clang/test/Sema/error-type-safety.cpp:45:22: error: type tag index 2 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:46:24: error: type tag index 3 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:47:26: error: type tag index 2 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:48:28: error: type tag index 3 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:50:35: error: argument index 3 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:51:37: error: argument index 4 is greater than the number of arguments specified"} | ["clang/test/Sema/error-type-safety.cpp"]={"clang/test/Sema/error-type-safety.cpp:45:22: error: type tag index 2 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:46:24: error: type tag index 3 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:47:26: error: type tag index 2 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:48:28: error: type tag index 3 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:50:35: error: argument index 3 is greater than the number of arguments specified","clang/test/Sema/error-type-safety.cpp:51:37: error: argument index 4 is greater than the number of arguments specified"} | ||
Line 4,763: | Line 4,791: | ||
}, | }, | ||
["err_tag_reference_conflict"]={ | ["err_tag_reference_conflict"]={ | ||
[ | [i]="err_tag_reference_conflict", | ||
[ | [h]="implicit declaration introduced by elaborated type conflicts with a %select{non-struct type|non-class type|non-union type|non-enum type|typedef|type alias|template|type alias template|template template argument}0 of the same name", | ||
[ | [g]={{nil,nil,{"implicit declaration introduced by elaborated type conflicts with a ",{"non-struct type","non-class type","non-union type","non-enum type",Rc,Ic,Lc,"type alias template","template template argument"}," of the same name"}}}, | ||
[ | [b]=k, | ||
[ | [e]="implicit declaration introduced by elaborated type conflicts with a (?:non\\-struct type|non\\-class type|non\\-union type|non\\-enum type|typedef|type alias|template|type alias template|template template argument) of the same name", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"a245671ae003",1271990501,"C++ doesn\'t really use \"namespaces\" for different kinds of names the same","C++ doesn\'t really use \"namespaces\" for different kinds of names the same\nway that C does. Among other differences, elaborated type specifiers\nare defined to skip \"non-types\", which, as you might imagine, does not\ninclude typedefs. Rework our use of IDNS masks to capture the semantics\nof different kinds of declarations better, and remove most current lookup\nfilters. Removing the last remaining filter is more complicated and will\nhappen in a separate patch.\n\nFixes PR 6885 as well some spectrum of unfiled bugs.\n\nllvm-svn: 102164"}, | ||
[j]={{ | [j]={{w,17442,"/// 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 // ...\n } else {\n // Use a better diagnostic if an elaborated-type-specifier\n // found the wrong kind of type on the first\n // (non-redeclaration) lookup.\n if ((TUK == TUK_Reference || TUK == TUK_Friend) && !Previous.isForRedeclaration()) {\n // ...\n } else if (!isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // ...\n } else if (TUK == TUK_Reference || TUK == TUK_Friend) {\n // ...\n Diag(NameLoc, diag::err_tag_reference_conflict) << NTK;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/elaborated-type-specifier.cpp"]={"clang/test/SemaCXX/elaborated-type-specifier.cpp:61:10: error: implicit declaration introduced by elaborated type conflicts with a template of the same name"} | ["clang/test/SemaCXX/elaborated-type-specifier.cpp"]={"clang/test/SemaCXX/elaborated-type-specifier.cpp:61:10: error: implicit declaration introduced by elaborated type conflicts with a template of the same name"} | ||
Line 4,777: | Line 4,805: | ||
}, | }, | ||
["err_tag_reference_non_tag"]={ | ["err_tag_reference_non_tag"]={ | ||
[ | [i]="err_tag_reference_non_tag", | ||
[ | [h]="%select{non-struct type|non-class type|non-union type|non-enum type|typedef|type alias|template|type alias template|template template argument}1 %0 cannot be referenced with a %select{struct|interface|union|class|enum}2 specifier", | ||
[ | [g]={{nil,nil,{{"non-struct type","non-class type","non-union type","non-enum type",Rc,Ic,Lc,"type alias template","template template argument"}," A cannot be referenced with a ",{Gc,td,Nc,mc,ud}," specifier"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:non\\-struct type|non\\-class type|non\\-union type|non\\-enum type|typedef|type alias|template|type alias template|template template argument) (.*?) cannot be referenced with a (?:struct|interface|union|class|enum) specifier", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"a245671ae003",1271990501,"C++ doesn\'t really use \"namespaces\" for different kinds of names the same","C++ doesn\'t really use \"namespaces\" for different kinds of names the same\nway that C does. Among other differences, elaborated type specifiers\nare defined to skip \"non-types\", which, as you might imagine, does not\ninclude typedefs. Rework our use of IDNS masks to capture the semantics\nof different kinds of declarations better, and remove most current lookup\nfilters. Removing the last remaining filter is more complicated and will\nhappen in a separate patch.\n\nFixes PR 6885 as well some spectrum of unfiled bugs.\n\nllvm-svn: 102164"}, | ||
[j]={{ | [j]={{w,17429,"/// 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 // ...\n } else {\n // Use a better diagnostic if an elaborated-type-specifier\n // found the wrong kind of type on the first\n // (non-redeclaration) lookup.\n if ((TUK == TUK_Reference || TUK == TUK_Friend) && !Previous.isForRedeclaration()) {\n // ...\n Diag(NameLoc, diag::err_tag_reference_non_tag) << PrevDecl << NTK << Kind;"},{r,4284,"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 if (TypeAliasTemplateDecl *TAT = dyn_cast_or_null<TypeAliasTemplateDecl>(Template.getAsTemplateDecl())) {\n // ...\n Diag(TemplateLoc, diag::err_tag_reference_non_tag) << TAT << NTK_TypeAliasTemplate << TagKind;"},{r,9963,"// 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 (!ClassTemplate) {\n // ...\n Diag(TemplateNameLoc, diag::err_tag_reference_non_tag) << TD << NTK << Kind;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/PR8755.cpp"]={"clang/test/SemaCXX/PR8755.cpp:10:17: error: typedef \'iterator\' cannot be referenced with a class specifier"} | ["clang/test/SemaCXX/PR8755.cpp"]={"clang/test/SemaCXX/PR8755.cpp:10:17: error: typedef \'iterator\' cannot be referenced with a class specifier"} | ||
Line 4,791: | Line 4,819: | ||
}, | }, | ||
["err_tagless_friend_type_template"]={ | ["err_tagless_friend_type_template"]={ | ||
[ | [i]="err_tagless_friend_type_template", | ||
[h]="friend type templates must use an elaborated type", | |||
[g]="friend type templates must use an elaborated type", | |||
[b]=k, | |||
[e]="friend type templates must use an elaborated type", | [e]="friend type templates must use an elaborated type", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"11083da4d0aa",1253141228,"Improved representation and support for friend class templates. Angst about same.","Improved representation and support for friend class templates. Angst about same.\n\nllvm-svn: 82088"}, | |||
[j]={{H,17444,"/// Handle a friend type declaration. This works in tandem with\n/// ActOnTag.\n///\n/// Notes on friend class templates:\n///\n/// We generally treat friend class declarations as if they were\n/// declaring a class. So, for example, the elaborated type specifier\n/// in a friend declaration is required to obey the restrictions of a\n/// class-head (i.e. no typedefs in the scope chain), template\n/// parameters are required to match up with simple template-ids, &c.\n/// However, unlike when declaring a template specialization, it\'s\n/// okay to refer to a template specialization without an empty\n/// template parameter declaration, e.g.\n/// friend class A<T>::B<unsigned>;\n/// We permit this as a special case; if there are any template\n/// parameters present at all, require proper matching, i.e.\n/// template <> template \\<class T> friend class A<int>::B;\nDecl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TempParams) {\n // ...\n // This is definitely an error in C++98. It\'s probably meant to\n // be forbidden in C++0x, too, but the specification is just\n // poorly written.\n //\n // The problem is with declarations like the following:\n // template <T> friend A<T>::foo;\n // where deciding whether a class C is a friend or not now hinges\n // on whether there exists an instantiation of A that causes\n // \'foo\' to equal C. There are restrictions on class-heads\n // (which we declare (by fiat) elaborated friend declarations to\n // be) that makes this tractable.\n //\n // FIXME: handle \"template <> friend class A<T>;\", which\n // is possibly well-formed? Who even knows?\n if (TempParams.size() && !T->isElaboratedTypeSpecifier()) {\n Diag(Loc, diag::err_tagless_friend_type_template) << DS.getSourceRange();"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.decls/temp.friend/p3.cpp"]={"clang/test/CXX/temp/temp.decls/temp.friend/p3.cpp:11:22: error: friend type templates must use an elaborated type"} | ["clang/test/CXX/temp/temp.decls/temp.friend/p3.cpp"]={"clang/test/CXX/temp/temp.decls/temp.friend/p3.cpp:11:22: error: friend type templates must use an elaborated type"} | ||
Line 4,805: | Line 4,833: | ||
}, | }, | ||
["err_target_clone_doesnt_match"]={ | ["err_target_clone_doesnt_match"]={ | ||
[ | [i]={{nil,C,"err_target_clone_doesnt_match"}}, | ||
[ | [h]={{nil,C,"\'target_clones\' attribute does not match previous declaration"}}, | ||
[ | [g]={{nil,C,"\'target_clones\' attribute does not match previous declaration"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'target_clones\' attribute does not match previous declaration", | ||
[ | [f]=a, | ||
[ | [d]={{nil,C,a}}, | ||
[ | [c]={hd,1616787805,gd,fd}, | ||
[j]={{ | [j]={{w,11477,"/// Check the validity of a new function declaration being added to an existing\n/// multiversioned declaration collection.\nstatic bool CheckMultiVersionAdditionalDecl(Sema &S, FunctionDecl *OldFD, FunctionDecl *NewFD, MultiVersionKind NewMVKind, const CPUDispatchAttr *NewCPUDisp, const CPUSpecificAttr *NewCPUSpec, const TargetClonesAttr *NewClones, bool &Redeclaration, NamedDecl *&OldDecl, LookupResult &Previous) {\n // ...\n // Next, check ALL non-invalid non-overloads to see if this is a redeclaration\n // of a previous member of the MultiVersion set.\n for (NamedDecl *ND : Previous) {\n // ...\n case MultiVersionKind::TargetClones: {\n // ...\n if (CurClones && NewClones && (CurClones->featuresStrs_size() != NewClones->featuresStrs_size() || !std::equal(CurClones->featuresStrs_begin(), CurClones->featuresStrs_end(), NewClones->featuresStrs_begin()))) {\n S.Diag(NewFD->getLocation(), diag::err_target_clone_doesnt_match);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/attr-target-clones-aarch64.c"]={"clang/test/Sema/attr-target-clones-aarch64.c:27:92: error: \'target_clones\' attribute does not match previous declaration","clang/test/Sema/attr-target-clones-aarch64.c:37:65: error: \'target_clones\' attribute does not match previous declaration"} | ["clang/test/Sema/attr-target-clones-aarch64.c"]={"clang/test/Sema/attr-target-clones-aarch64.c:27:92: error: \'target_clones\' attribute does not match previous declaration","clang/test/Sema/attr-target-clones-aarch64.c:37:65: error: \'target_clones\' attribute does not match previous declaration"} | ||
Line 4,819: | Line 4,847: | ||
}, | }, | ||
["err_target_clone_must_have_default"]={ | ["err_target_clone_must_have_default"]={ | ||
[ | [i]={{nil,C,"err_target_clone_must_have_default"}}, | ||
[ | [h]={{nil,C,"\'target_clones\' multiversioning requires a default target"}}, | ||
[ | [g]={{nil,C,"\'target_clones\' multiversioning requires a default target"}}, | ||
[ | [b]=k, | ||
[ | [e]="\'target_clones\' multiversioning requires a default target", | ||
[ | [f]=a, | ||
[ | [d]={{nil,C,a}}, | ||
[ | [c]={hd,1616787805,gd,fd}, | ||
[j]={{ | [j]={{db,3654,"static void handleTargetClonesAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!HasDefault) {\n S.Diag(AL.getLoc(), diag::err_target_clone_must_have_default);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/attr-target-clones.c"]={"clang/test/Sema/attr-target-clones.c:4:21: error: \'target_clones\' multiversioning requires a default target"} | ["clang/test/Sema/attr-target-clones.c"]={"clang/test/Sema/attr-target-clones.c:4:21: error: \'target_clones\' multiversioning requires a default target"} | ||
Line 4,833: | Line 4,861: | ||
}, | }, | ||
["err_target_unknown_abi"]={ | ["err_target_unknown_abi"]={ | ||
[ | [i]="err_target_unknown_abi", | ||
[ | [h]="unknown target ABI \'%0\'", | ||
[ | [g]="unknown target ABI \'A\'", | ||
[ | [b]=k, | ||
[ | [e]="unknown target ABI \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"b9bbd54fdb5b",1258267726,"Add TargetOptions and use it when constructing targets.","Add TargetOptions and use it when constructing targets.\n - This ended up being hard to factor, sorry for the large diff.\n\n - Some post-commit cleanup to come.\n\nllvm-svn: 88833"}, | ||
[j]={{ | [j]={{bd,809,"/// CreateTargetInfo - Return the target info object for the specified target\n/// options.\nTargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, const std::shared_ptr<TargetOptions> &Opts) {\n // ...\n // Set the target ABI if specified.\n if (!Opts->ABI.empty() && !Target->setABI(Opts->ABI)) {\n Diags.Report(diag::err_target_unknown_abi) << Opts->ABI;"}} | ||
}, | }, | ||
["err_target_unknown_cpu"]={ | ["err_target_unknown_cpu"]={ | ||
[ | [i]="err_target_unknown_cpu", | ||
[ | [h]="unknown target CPU \'%0\'", | ||
[ | [g]="unknown target CPU \'A\'", | ||
[ | [b]=k, | ||
[ | [e]="unknown target CPU \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"acde99ea522d",1261161757,"ARM: Fix predefines (__ARM_ARCH_..., __REGISTER_PREFIX).","ARM: Fix predefines (__ARM_ARCH_..., __REGISTER_PREFIX).\n - This should be done leveraging the backend, but I\'m a little refactored\n out. I\'ll fix it one day, I promise.\n\nllvm-svn: 91700"}, | ||
[j]={{ | [j]={{bd,788,"/// CreateTargetInfo - Return the target info object for the specified target\n/// options.\nTargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, const std::shared_ptr<TargetOptions> &Opts) {\n // ...\n // Set the target CPU if specified.\n if (!Opts->CPU.empty() && !Target->setCPU(Opts->CPU)) {\n Diags.Report(diag::err_target_unknown_cpu) << Opts->CPU;"},{bd,799,"/// CreateTargetInfo - Return the target info object for the specified target\n/// options.\nTargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, const std::shared_ptr<TargetOptions> &Opts) {\n // ...\n // Check the TuneCPU name if specified.\n if (!Opts->TuneCPU.empty() && !Target->isValidTuneCPUName(Opts->TuneCPU)) {\n Diags.Report(diag::err_target_unknown_cpu) << Opts->TuneCPU;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/predefined-arch-macros.c"]={"error: unknown target CPU \'amdgcn\'"} | ["clang/test/Preprocessor/predefined-arch-macros.c"]={"error: unknown target CPU \'amdgcn\'"} | ||
Line 4,858: | Line 4,886: | ||
}, | }, | ||
["err_target_unknown_fpmath"]={ | ["err_target_unknown_fpmath"]={ | ||
[ | [i]="err_target_unknown_fpmath", | ||
[ | [h]="unknown FP unit \'%0\'", | ||
[ | [g]="unknown FP unit \'A\'", | ||
[ | [b]=k, | ||
[ | [e]="unknown FP unit \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"eb26547177b9",1377122343,"Move -mfpmath handling to -cc1 and implement it for x86.","Move -mfpmath handling to -cc1 and implement it for x86.\n\nThe original idea was to implement it all on the driver, but to do that the\ndriver needs to know the sse level and to do that it has to know the default\nfeatures of a cpu.\n\nBenjamin Kramer pointed out that if one day we decide to implement support for\n\' __attribute__ ((__target__ (\"arch=core2\")))\', then the frontend needs to\nkeep its knowledge of default features of a cpu.\n\nTo avoid duplicating which part of clang handles default cpu features,\nit is probably better to handle -mfpmath in the frontend.\n\nFor ARM this patch is just a small improvement. Instead of a cpu list, we\ncheck if neon is enabled, which allows us to reject things like\n\n-mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon\n\nFor X86, since LLVM doesn\'t support an independent ssefp feature, we just\nmake sure the selected -mfpmath matches the sse level.\n\nllvm-svn: 188939"}, | ||
[j]={{ | [j]={{bd,815,"/// CreateTargetInfo - Return the target info object for the specified target\n/// options.\nTargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, const std::shared_ptr<TargetOptions> &Opts) {\n // ...\n // Set the fp math unit.\n if (!Opts->FPMath.empty() && !Target->setFPMath(Opts->FPMath)) {\n Diags.Report(diag::err_target_unknown_fpmath) << Opts->FPMath;"}} | ||
}, | }, | ||
["err_target_unknown_triple"]={ | ["err_target_unknown_triple"]={ | ||
[ | [i]="err_target_unknown_triple", | ||
[ | [h]="unknown target triple \'%0\'", | ||
[ | [g]="unknown target triple \'A\'", | ||
[ | [b]=k, | ||
[ | [e]="unknown target triple \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"b9bbd54fdb5b",1258267726,"Add TargetOptions and use it when constructing targets.","Add TargetOptions and use it when constructing targets.\n - This ended up being hard to factor, sorry for the large diff.\n\n - Some post-commit cleanup to come.\n\nllvm-svn: 88833"}, | ||
[j]={{ | [j]={{bd,781,"/// CreateTargetInfo - Return the target info object for the specified target\n/// options.\nTargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, const std::shared_ptr<TargetOptions> &Opts) {\n // ...\n if (!Target) {\n Diags.Report(diag::err_target_unknown_triple) << Triple.str();"},{"clang/lib/Driver/ToolChains/CrossWindows.cpp",98,"void tools::CrossWindows::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n default:\n D.Diag(diag::err_target_unknown_triple) << TC.getEffectiveTriple().str();"},{"clang/lib/Driver/ToolChains/Gnu.cpp",453,"void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (const char *LDMOption = getLDMOption(ToolChain.getTriple(), Args)) {\n // ...\n } else {\n D.Diag(diag::err_target_unknown_triple) << Triple.str();"},{"clang/lib/Driver/ToolChains/MinGW.cpp",139,"void tools::MinGW::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n default:\n D.Diag(diag::err_target_unknown_triple) << TC.getEffectiveTriple().str();"},{"clang/tools/driver/cc1as_main.cpp",390,"static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts, DiagnosticsEngine &Diags) {\n // ...\n if (!TheTarget)\n return Diags.Report(diag::err_target_unknown_triple) << Opts.Triple;"},{"clang/tools/driver/cc1as_main.cpp",574,"static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts, DiagnosticsEngine &Diags) {\n // ...\n if (!TAP)\n Failed = Diags.Report(diag::err_target_unknown_triple) << Opts.Triple;"},{"clang/unittests/Basic/DiagnosticTest.cpp",42,"// Check that DiagnosticErrorTrap works with SuppressAllDiagnostics.\nTEST(DiagnosticTest, suppressAndTrap) {\n // ...\n {\n // ...\n Diags.Report(diag::err_target_unknown_triple) << \"unknown\";"}} | ||
}, | }, | ||
["err_target_unsupported_abi"]={ | ["err_target_unsupported_abi"]={ | ||
[ | [i]="err_target_unsupported_abi", | ||
[ | [h]="ABI \'%0\' is not supported on CPU \'%1\'", | ||
[ | [g]="ABI \'A\' is not supported on CPU \'B\'", | ||
[ | [b]=k, | ||
[ | [e]="ABI \'(.*?)\' is not supported on CPU \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"32b2d6b1602b",1465894730,"[mips] Defer validity check for CPU/ABI pairs and improve error message for invalid cases.","[mips] Defer validity check for CPU/ABI pairs and improve error message for invalid cases.\n\nSummary:\nThe validity of ABI/CPU pairs is no longer checked on the fly but is\ninstead checked after initialization. As a result, invalid CPU/ABI pairs\ncan be reported as being known but invalid instead of being unknown. For\nexample, we now emit:\n error: ABI \'n32\' is not supported on CPU \'mips32r2\'\ninstead of:\n error: unknown target ABI \'n64\'\n\nReviewers: atanasyan\n\nSubscribers: sdardis, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D21023\n\nllvm-svn: 272645"}, | ||
[j]={{"clang/lib/Basic/Targets/Mips.cpp",245,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // ...\n // 64-bit ABI\'s require 64-bit CPU\'s.\n if (!processorSupportsGPR64() && (ABI == \"n32\" || ABI == \"n64\")) {\n Diags.Report(diag::err_target_unsupported_abi) << ABI << CPU;"}} | [j]={{"clang/lib/Basic/Targets/Mips.cpp",245,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // ...\n // 64-bit ABI\'s require 64-bit CPU\'s.\n if (!processorSupportsGPR64() && (ABI == \"n32\" || ABI == \"n64\")) {\n Diags.Report(diag::err_target_unsupported_abi) << ABI << CPU;"}} | ||
}, | }, | ||
["err_target_unsupported_abi_for_triple"]={ | ["err_target_unsupported_abi_for_triple"]={ | ||
[ | [i]="err_target_unsupported_abi_for_triple", | ||
[ | [h]="ABI \'%0\' is not supported for \'%1\'", | ||
[ | [g]="ABI \'A\' is not supported for \'B\'", | ||
[ | [b]=k, | ||
[ | [e]="ABI \'(.*?)\' is not supported for \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"32b2d6b1602b",1465894730,"[mips] Defer validity check for CPU/ABI pairs and improve error message for invalid cases.","[mips] Defer validity check for CPU/ABI pairs and improve error message for invalid cases.\n\nSummary:\nThe validity of ABI/CPU pairs is no longer checked on the fly but is\ninstead checked after initialization. As a result, invalid CPU/ABI pairs\ncan be reported as being known but invalid instead of being unknown. For\nexample, we now emit:\n error: ABI \'n32\' is not supported on CPU \'mips32r2\'\ninstead of:\n error: unknown target ABI \'n64\'\n\nReviewers: atanasyan\n\nSubscribers: sdardis, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D21023\n\nllvm-svn: 272645"} | ||
}, | }, | ||
["err_target_unsupported_arch"]={ | ["err_target_unsupported_arch"]={ | ||
[ | [i]="err_target_unsupported_arch", | ||
[ | [h]="the target architecture \'%0\' is not supported by the target \'%1\'", | ||
[ | [g]="the target architecture \'A\' is not supported by the target \'B\'", | ||
[ | [b]=k, | ||
[ | [e]="the target architecture \'(.*?)\' is not supported by the target \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"f4c9e49f9449",1396643479,"Driver: add target definition for Windows on ARM","Driver: add target definition for Windows on ARM\n\nThis introduces the definitions needed for the Windows on ARM target. Add\ntarget definitions for both the MSVC environment and the MSVC + Itanium C++ ABI\nenvironment. The Visual Studio definitions correspond to the definitions\nprovided by Visual Studio 2012.\n\nllvm-svn: 205650"}, | ||
[j]={{"clang/lib/Driver/ToolChains/Clang.cpp",4778,"void Clang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Triple.isOSWindows() && (Triple.getArch() == llvm::Triple::arm || Triple.getArch() == llvm::Triple::thumb)) {\n // ...\n if (Failure || Version < 7)\n D.Diag(diag::err_target_unsupported_arch) << Triple.getArchName() << TripleStr;"},{"clang/lib/Driver/ToolChains/Myriad.cpp",220,"MyriadToolChain::MyriadToolChain(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) : Generic_ELF(D, Triple, Args) {\n // ...\n default:\n D.Diag(clang::diag::err_target_unsupported_arch) << Triple.getArchName() << \"myriad\";"},{"clang/lib/Driver/ToolChains/NaCl.cpp",99,"// This is quite similar to gnutools::Linker::ConstructJob with changes that\n// we use static by default, do not yet support sanitizers or LTO, and a few\n// others. Eventually we can support more of that and hopefully migrate back\n// to gnutools::Linker.\nvoid nacltools::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Arch == llvm::Triple::x86)\n // ...\n else if (Arch == llvm::Triple::arm)\n // ...\n else if (Arch == llvm::Triple::x86_64)\n // ...\n else if (Arch == llvm::Triple::mipsel)\n // ...\n else\n D.Diag(diag::err_target_unsupported_arch) << ToolChain.getArchName() << \"Native Client\";"}} | [j]={{"clang/lib/Driver/ToolChains/Clang.cpp",4778,"void Clang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Triple.isOSWindows() && (Triple.getArch() == llvm::Triple::arm || Triple.getArch() == llvm::Triple::thumb)) {\n // ...\n if (Failure || Version < 7)\n D.Diag(diag::err_target_unsupported_arch) << Triple.getArchName() << TripleStr;"},{"clang/lib/Driver/ToolChains/Myriad.cpp",220,"MyriadToolChain::MyriadToolChain(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) : Generic_ELF(D, Triple, Args) {\n // ...\n default:\n D.Diag(clang::diag::err_target_unsupported_arch) << Triple.getArchName() << \"myriad\";"},{"clang/lib/Driver/ToolChains/NaCl.cpp",99,"// This is quite similar to gnutools::Linker::ConstructJob with changes that\n// we use static by default, do not yet support sanitizers or LTO, and a few\n// others. Eventually we can support more of that and hopefully migrate back\n// to gnutools::Linker.\nvoid nacltools::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Arch == llvm::Triple::x86)\n // ...\n else if (Arch == llvm::Triple::arm)\n // ...\n else if (Arch == llvm::Triple::x86_64)\n // ...\n else if (Arch == llvm::Triple::mipsel)\n // ...\n else\n D.Diag(diag::err_target_unsupported_arch) << ToolChain.getArchName() << \"Native Client\";"}} | ||
}, | }, | ||
["err_target_unsupported_cpu_for_micromips"]={ | ["err_target_unsupported_cpu_for_micromips"]={ | ||
[ | [i]={{nil,A,"err_target_unsupported_cpu_for_micromips"}}, | ||
[ | [h]={{nil,A,"micromips is not supported for target CPU \'%0\'"}}, | ||
[ | [g]={{nil,A,"micromips is not supported for target CPU \'A\'"}}, | ||
[ | [b]=k, | ||
[ | [e]="micromips is not supported for target CPU \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,a}}, | ||
[ | [c]={"8ee529615210",1512991757,"[mips] Removal of microMIPS64R6","[mips] Removal of microMIPS64R6\n\nmicroMIPS64R6 is removed from backend, and therefore frontend\nwill show an error when target is microMIPS64R6.\n\nThis is Clang part of patch.\n\nDifferential Revision: https://reviews.llvm.org/D35624\n\nllvm-svn: 320351"}, | ||
[j]={{"clang/lib/Basic/Targets/Mips.cpp",239,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // microMIPS64R6 backend was removed.\n if (getTriple().isMIPS64() && IsMicromips && (ABI == \"n32\" || ABI == \"n64\")) {\n Diags.Report(diag::err_target_unsupported_cpu_for_micromips) << CPU;"}} | [j]={{"clang/lib/Basic/Targets/Mips.cpp",239,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // microMIPS64R6 backend was removed.\n if (getTriple().isMIPS64() && IsMicromips && (ABI == \"n32\" || ABI == \"n64\")) {\n Diags.Report(diag::err_target_unsupported_cpu_for_micromips) << CPU;"}} | ||
}, | }, | ||
["err_target_unsupported_execute_only"]={ | ["err_target_unsupported_execute_only"]={ | ||
[ | [i]="err_target_unsupported_execute_only", | ||
[ | [h]="execute only is not supported for the %0 sub-architecture", | ||
[ | [g]="execute only is not supported for the A sub-architecture", | ||
[ | [b]=k, | ||
[ | [e]="execute only is not supported for the (.*?) sub\\-architecture", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"61ef150d53e4",1481788764,"[ARM] Implement execute-only support in CodeGen","[ARM] Implement execute-only support in CodeGen\n\nSummary:\nThis implements execute-only support for ARM code generation, which\nprevents the compiler from generating data accesses to code sections.\nThe following changes are involved:\n\n* Add the CodeGen option \"-arm-execute-only\" to the ARM code generator.\n* Add the clang flag \"-mexecute-only\" as well as the GCC-compatible\n alias \"-mpure-code\" to enable this option.\n* When enabled, literal pools are replaced with MOVW/MOVT instructions,\n with VMOV used in addition for floating-point literals. As the MOVT\n instruction is required, execute-only support is only available in\n Thumb mode for targets supporting ARMv8-M baseline or Thumb2.\n* Jump tables are placed in data sections when in execute-only mode.\n* The execute-only text section is assigned section ID 0, and is\n marked as unreadable with the SHF_ARM_PURECODE flag with symbol \'y\'.\n This also overrides selection of ELF sections for globals.\n\nReviewers: t.p.northover, rengolin\n\nSubscribers: llvm-commits, aemerson\n\nDifferential Revision: https://reviews.llvm.org/D27450\n\nllvm-svn: 289786"}, | ||
[j]={{ | [j]={{sd,849,"llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS, bool ForMultilib) {\n // ...\n // Generate execute-only output (no data access to code sections).\n // This only makes sense for the compiler, not for the assembler.\n // It\'s not needed for multilib selection and may hide an unused\n // argument diagnostic if the code is always run.\n if (!ForAS && !ForMultilib) {\n // Supported only on ARMv6T2 and ARMv7 and above.\n // Cannot be combined with -mno-movt.\n if (Arg *A = Args.getLastArg(options::OPT_mexecute_only, options::OPT_mno_execute_only)) {\n if (A->getOption().matches(options::OPT_mexecute_only)) {\n if (getARMSubArchVersionNumber(Triple) < 7 && llvm::ARM::parseArch(Triple.getArchName()) != llvm::ARM::ArchKind::ARMV6T2)\n D.Diag(diag::err_target_unsupported_execute_only) << Triple.getArchName();"}} | ||
}, | }, | ||
["err_target_unsupported_fpmath"]={ | ["err_target_unsupported_fpmath"]={ | ||
[ | [i]="err_target_unsupported_fpmath", | ||
[ | [h]="the \'%0\' unit is not supported with this instruction set", | ||
[ | [g]="the \'A\' unit is not supported with this instruction set", | ||
[ | [b]=k, | ||
[ | [e]="the \'(.*?)\' unit is not supported with this instruction set", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"eb26547177b9",1377122343,"Move -mfpmath handling to -cc1 and implement it for x86.","Move -mfpmath handling to -cc1 and implement it for x86.\n\nThe original idea was to implement it all on the driver, but to do that the\ndriver needs to know the sse level and to do that it has to know the default\nfeatures of a cpu.\n\nBenjamin Kramer pointed out that if one day we decide to implement support for\n\' __attribute__ ((__target__ (\"arch=core2\")))\', then the frontend needs to\nkeep its knowledge of default features of a cpu.\n\nTo avoid duplicating which part of clang handles default cpu features,\nit is probably better to handle -mfpmath in the frontend.\n\nFor ARM this patch is just a small improvement. Instead of a cpu list, we\ncheck if neon is enabled, which allows us to reject things like\n\n-mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon\n\nFor X86, since LLVM doesn\'t support an independent ssefp feature, we just\nmake sure the selected -mfpmath matches the sse level.\n\nllvm-svn: 188939"}, | ||
[j]={{"clang/lib/Basic/Targets/ARM.cpp",629,"bool ARMTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, DiagnosticsEngine &Diags) {\n // ...\n if (!(FPU & NeonFPU) && FPMath == FP_Neon) {\n Diags.Report(diag::err_target_unsupported_fpmath) << \"neon\";"},{"clang/lib/Basic/Targets/X86.cpp",420,"/// handleTargetFeatures - Perform initialization based on the user\n/// configured set of features.\nbool X86TargetInfo::handleTargetFeatures(std::vector<std::string> &Features, DiagnosticsEngine &Diags) {\n // ...\n // LLVM doesn\'t have a separate switch for fpmath, so only accept it if it\n // matches the selected sse level.\n if ((FPMath == FP_SSE && SSELevel < SSE1) || (FPMath == FP_387 && SSELevel >= SSE1)) {\n Diags.Report(diag::err_target_unsupported_fpmath) << (FPMath == FP_SSE ? \"sse\" : \"387\");"}} | [j]={{"clang/lib/Basic/Targets/ARM.cpp",629,"bool ARMTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, DiagnosticsEngine &Diags) {\n // ...\n if (!(FPU & NeonFPU) && FPMath == FP_Neon) {\n Diags.Report(diag::err_target_unsupported_fpmath) << \"neon\";"},{"clang/lib/Basic/Targets/X86.cpp",420,"/// handleTargetFeatures - Perform initialization based on the user\n/// configured set of features.\nbool X86TargetInfo::handleTargetFeatures(std::vector<std::string> &Features, DiagnosticsEngine &Diags) {\n // ...\n // LLVM doesn\'t have a separate switch for fpmath, so only accept it if it\n // matches the selected sse level.\n if ((FPMath == FP_SSE && SSELevel < SSE1) || (FPMath == FP_387 && SSELevel >= SSE1)) {\n Diags.Report(diag::err_target_unsupported_fpmath) << (FPMath == FP_SSE ? \"sse\" : \"387\");"}} | ||
}, | }, | ||
["err_target_unsupported_mcmse"]={ | ["err_target_unsupported_mcmse"]={ | ||
[ | [i]={{nil,D,"err_target_unsupported_mcmse"}}, | ||
[ | [h]={{nil,D,"-mcmse is not supported for %0"}}, | ||
[ | [g]={{nil,D,"-mcmse is not supported for A"}}, | ||
[ | [b]=k, | ||
[ | [e]="\\-mcmse is not supported for (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,D,a}}, | ||
[ | [c]={"603a2bac05a8",1558448486,"[ARM][CMSE] Add commandline option and feature macro","[ARM][CMSE] Add commandline option and feature macro\n\nDefines macro ARM_FEATURE_CMSE to 1 for v8-M targets and introduces\n-mcmse option which for v8-M targets sets ARM_FEATURE_CMSE to 3.\nA diagnostic is produced when the option is given on architectures\nwithout support for Security Extensions.\nReviewed By: dmgreen, snidertm\nDifferential Revision: https://reviews.llvm.org/D59879\n\nllvm-svn: 361261"}, | ||
[j]={{"clang/lib/Basic/Targets/ARM.cpp",570,"bool ARMTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, DiagnosticsEngine &Diags) {\n // ...\n // This does not diagnose illegal cases like having both\n // \"+vfpv2\" and \"+vfpv3\" or having \"+neon\" and \"-fp64\".\n for (const auto &Feature : Features) {\n if (Feature == \"+soft-float\") {\n // ...\n } else if (Feature == \"+vfp2sp\" || Feature == \"+vfp2\") {\n // ...\n } else if (Feature == \"+vfp3sp\" || Feature == \"+vfp3d16sp\" || Feature == \"+vfp3\" || Feature == \"+vfp3d16\") {\n // ...\n } else if (Feature == \"+vfp4sp\" || Feature == \"+vfp4d16sp\" || Feature == \"+vfp4\" || Feature == \"+vfp4d16\") {\n // ...\n } else if (Feature == \"+fp-armv8sp\" || Feature == \"+fp-armv8d16sp\" || Feature == \"+fp-armv8\" || Feature == \"+fp-armv8d16\") {\n // ...\n } else if (Feature == \"+neon\") {\n // ...\n } else if (Feature == \"+hwdiv\") {\n // ...\n } else if (Feature == \"+hwdiv-arm\") {\n // ...\n } else if (Feature == \"+crc\") {\n // ...\n } else if (Feature == \"+crypto\") {\n // ...\n } else if (Feature == \"+sha2\") {\n // ...\n } else if (Feature == \"+aes\") {\n // ...\n } else if (Feature == \"+dsp\") {\n // ...\n } else if (Feature == \"+fp64\") {\n // ...\n } else if (Feature == \"+8msecext\") {\n if (CPUProfile != \"M\" || ArchVersion != 8) {\n Diags.Report(diag::err_target_unsupported_mcmse) << CPU;"}} | [j]={{"clang/lib/Basic/Targets/ARM.cpp",570,"bool ARMTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, DiagnosticsEngine &Diags) {\n // ...\n // This does not diagnose illegal cases like having both\n // \"+vfpv2\" and \"+vfpv3\" or having \"+neon\" and \"-fp64\".\n for (const auto &Feature : Features) {\n if (Feature == \"+soft-float\") {\n // ...\n } else if (Feature == \"+vfp2sp\" || Feature == \"+vfp2\") {\n // ...\n } else if (Feature == \"+vfp3sp\" || Feature == \"+vfp3d16sp\" || Feature == \"+vfp3\" || Feature == \"+vfp3d16\") {\n // ...\n } else if (Feature == \"+vfp4sp\" || Feature == \"+vfp4d16sp\" || Feature == \"+vfp4\" || Feature == \"+vfp4d16\") {\n // ...\n } else if (Feature == \"+fp-armv8sp\" || Feature == \"+fp-armv8d16sp\" || Feature == \"+fp-armv8\" || Feature == \"+fp-armv8d16\") {\n // ...\n } else if (Feature == \"+neon\") {\n // ...\n } else if (Feature == \"+hwdiv\") {\n // ...\n } else if (Feature == \"+hwdiv-arm\") {\n // ...\n } else if (Feature == \"+crc\") {\n // ...\n } else if (Feature == \"+crypto\") {\n // ...\n } else if (Feature == \"+sha2\") {\n // ...\n } else if (Feature == \"+aes\") {\n // ...\n } else if (Feature == \"+dsp\") {\n // ...\n } else if (Feature == \"+fp64\") {\n // ...\n } else if (Feature == \"+8msecext\") {\n if (CPUProfile != \"M\" || ArchVersion != 8) {\n Diags.Report(diag::err_target_unsupported_mcmse) << CPU;"}} | ||
}, | }, | ||
["err_target_unsupported_tp_hard"]={ | ["err_target_unsupported_tp_hard"]={ | ||
[ | [i]={{nil,C,"err_target_unsupported_tp_hard"}}, | ||
[ | [h]={{nil,C,"hardware TLS register is not supported for the %0 sub-architecture"}}, | ||
[ | [g]={{nil,C,"hardware TLS register is not supported for the A sub-architecture"}}, | ||
[ | [b]=k, | ||
[ | [e]="hardware TLS register is not supported for the (.*?) sub\\-architecture", | ||
[ | [f]=a, | ||
[ | [d]={{nil,C,a}}, | ||
[ | [c]={"4bafe65c2b2f",1634659977,"Add support for floating-point option `ffp-eval-method` and for","Add support for floating-point option `ffp-eval-method` and for\n`pragma clang fp eval_method`."}, | ||
[j]={{ | [j]={{sd,212,"// Select mode for reading thread pointer (-mtp=soft/cp15).\narm::ReadTPMode arm::getReadTPMode(const Driver &D, const ArgList &Args, const llvm::Triple &Triple, bool ForAS) {\n if (Arg *A = Args.getLastArg(options::OPT_mtp_mode_EQ)) {\n // ...\n if ((ThreadPointer == ReadTPMode::TPIDRURW || ThreadPointer == ReadTPMode::TPIDRURO || ThreadPointer == ReadTPMode::TPIDRPRW) && !isHardTPSupported(Triple) && !ForAS) {\n D.Diag(diag::err_target_unsupported_tp_hard) << Triple.getArchName();"},{"clang/lib/Driver/ToolChains/Clang.cpp",3397,"static void RenderSSPOptions(const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool KernelOrKext) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mstack_protector_guard_EQ)) {\n // ...\n if ((EffectiveTriple.isARM() || EffectiveTriple.isThumb()) && Value == \"tls\") {\n // ...\n // Check whether the target subarch supports the hardware TLS register\n if (!arm::isHardTPSupported(EffectiveTriple)) {\n D.Diag(diag::err_target_unsupported_tp_hard) << EffectiveTriple.getArchName();"}} | ||
}, | }, | ||
["err_target_unsupported_type"]={ | ["err_target_unsupported_type"]={ | ||
[ | [i]={{nil,C,"err_target_unsupported_type"}}, | ||
[ | [h]={{nil,C,"%0 requires %select{|%2 bit size}1 %3 %select{|return }4type support, but target \'%5\' does not support it"}}, | ||
[ | [g]={{nil,C,{"A requires ",{a,"C bit size"}," D ",{a,"return "},"type support, but target \'F\' does not support it"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(.*?) requires (?:|(.*?) bit size) (.*?) (?:|return )type support, but target \'(.*?)\' does not support it", | ||
[ | [f]=a, | ||
[ | [d]={{nil,C,"OpenMP Issue"}}, | ||
[ | [c]={Vc,1615397021,Zc,ad}, | ||
[j]={{ | [j]={{qc,1960,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckDeviceType = [&](QualType Ty) {\n // ...\n if (Ty->isBitIntType()) {\n if (!Context.getTargetInfo().hasBitIntType()) {\n PartialDiagnostic PD = PDiag(diag::err_target_unsupported_type);"},{qc,1992,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckDeviceType = [&](QualType Ty) {\n // ...\n if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type()) || (Ty->isFloat128Type() && !Context.getTargetInfo().hasFloat128Type()) || (Ty->isIbm128Type() && !Context.getTargetInfo().hasIbm128Type()) || (Ty->isIntegerType() && Context.getTypeSize(Ty) == 128 && !Context.getTargetInfo().hasInt128Type()) || (Ty->isBFloat16Type() && !Context.getTargetInfo().hasBFloat16Type() && !LangOpts.CUDAIsDevice) || LongDoubleMismatched) {\n PartialDiagnostic PD = PDiag(diag::err_target_unsupported_type);"},{qc,2019,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckType = [&](QualType Ty, bool IsRetTy = false) {\n // ...\n if (!TI.hasLongDoubleType() && UnqualTy == Context.LongDoubleTy) {\n PartialDiagnostic PD = PDiag(diag::err_target_unsupported_type);"},{qc,2038,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckType = [&](QualType Ty, bool IsRetTy = false) {\n // ...\n if (IsRetTy && !TI.hasFPReturn() && (IsDouble || IsFloat)) {\n PartialDiagnostic PD = PDiag(diag::err_target_unsupported_type);"},{z,4373,"bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case PPC::BI__builtin_ppc_maxfe:\n case PPC::BI__builtin_ppc_minfe:\n case PPC::BI__builtin_ppc_maxfl:\n case PPC::BI__builtin_ppc_minfl:\n case PPC::BI__builtin_ppc_maxfs:\n case PPC::BI__builtin_ppc_minfs: {\n if (Context.getTargetInfo().getTriple().isOSAIX() && (BuiltinID == PPC::BI__builtin_ppc_maxfe || BuiltinID == PPC::BI__builtin_ppc_minfe))\n return Diag(TheCall->getBeginLoc(), diag::err_target_unsupported_type) << \"builtin\" << true << 128 << QualType(Context.LongDoubleTy) << false << Context.getTargetInfo().getTriple().str();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCUDA/spirv-int128.cu"]={"clang/test/SemaCUDA/spirv-int128.cu:15:10: error: \'d_glb\' requires 128 bit size \'__int128\' type support, but target \'spirv64\' does not support it"} | ["clang/test/SemaCUDA/spirv-int128.cu"]={"clang/test/SemaCUDA/spirv-int128.cu:15:10: error: \'d_glb\' requires 128 bit size \'__int128\' type support, but target \'spirv64\' does not support it"} | ||
Line 4,981: | Line 5,009: | ||
}, | }, | ||
["err_target_unsupported_unaligned"]={ | ["err_target_unsupported_unaligned"]={ | ||
[ | [i]="err_target_unsupported_unaligned", | ||
[ | [h]="the %0 sub-architecture does not support unaligned accesses", | ||
[ | [g]="the A sub-architecture does not support unaligned accesses", | ||
[ | [b]=k, | ||
[ | [e]="the (.*?) sub\\-architecture does not support unaligned accesses", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"76244be6d4f8",1407921492,"Emit diagnostic for -munaligned-access on v6m targets","Emit diagnostic for -munaligned-access on v6m targets\n\nRather than silently disabling unaligned accesses for v6m targets as\nin the previous patch to llvm, instead produce a warning saying that\nthis architecture doesn\'t support unaligned accesses.\n\nPatch by Ben Foster\n\nllvm-svn: 215531"}, | ||
[j]={{ | [j]={{sd,866,"llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS, bool ForMultilib) {\n // ...\n // Kernel code has more strict alignment requirements.\n if (KernelOrKext) {\n // ...\n } else if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, options::OPT_munaligned_access)) {\n if (A->getOption().matches(options::OPT_munaligned_access)) {\n // No v6M core supports unaligned memory access (v6M ARM ARM A3.2).\n if (Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m)\n D.Diag(diag::err_target_unsupported_unaligned) << \"v6m\";"},{sd,870,"llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS, bool ForMultilib) {\n // ...\n // Kernel code has more strict alignment requirements.\n if (KernelOrKext) {\n // ...\n } else if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, options::OPT_munaligned_access)) {\n if (A->getOption().matches(options::OPT_munaligned_access)) {\n // No v6M core supports unaligned memory access (v6M ARM ARM A3.2).\n if (Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m)\n // ...\n // v8M Baseline follows on from v6M, so doesn\'t support unaligned memory\n // access either.\n else if (Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v8m_baseline)\n D.Diag(diag::err_target_unsupported_unaligned) << \"v8m.base\";"}} | ||
}, | }, | ||
["err_tcb_conflicting_attributes"]={ | ["err_tcb_conflicting_attributes"]={ | ||
[ | [i]={{nil,v,"err_tcb_conflicting_attributes"}}, | ||
[ | [h]={{nil,v,"attributes \'%0(\"%2\")\' and \'%1(\"%2\")\' are mutually exclusive"}}, | ||
[ | [g]={{nil,v,"attributes \'A(\"C\")\' and \'B(\"C\")\' are mutually exclusive"}}, | ||
[ | [b]=k, | ||
[ | [e]="attributes \'(.*?)\\(\"(.*?)\"\\)\' and \'(.*?)\\(\"(.*?)\"\\)\' are mutually exclusive", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,a}}, | ||
[ | [c]={Jb,1590001902,Lb,Mb}, | ||
[j]={{ | [j]={{db,8629,"template <typename AttrTy, typename ConflictingAttrTy> static void handleEnforceTCBAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // A function cannot be have both regular and leaf membership in the same TCB.\n if (const ConflictingAttrTy *ConflictingAttr = findEnforceTCBAttrByName<ConflictingAttrTy>(D, Argument)) {\n // ...\n S.Diag(AL.getLoc(), diag::err_tcb_conflicting_attributes) << AL.getAttrName()->getName() << ConflictingAttr->getAttrName()->getName() << Argument;"},{db,8649,"template <typename AttrTy, typename ConflictingAttrTy> static AttrTy *mergeEnforceTCBAttrImpl(Sema &S, Decl *D, const AttrTy &AL) {\n // ...\n if (const ConflictingAttrTy *ConflictingAttr = findEnforceTCBAttrByName<ConflictingAttrTy>(D, TCBName)) {\n S.Diag(ConflictingAttr->getLoc(), diag::err_tcb_conflicting_attributes) << ConflictingAttr->getAttrName()->getName() << AL.getAttrName()->getName() << TCBName;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/attr-enforce-tcb-errors.cpp"]={"clang/test/Sema/attr-enforce-tcb-errors.cpp:21:16: error: attributes \'enforce_tcb_leaf(\"x\")\' and \'enforce_tcb(\"x\")\' are mutually exclusive","clang/test/Sema/attr-enforce-tcb-errors.cpp:28:16: error: attributes \'enforce_tcb(\"x\")\' and \'enforce_tcb_leaf(\"x\")\' are mutually exclusive","clang/test/Sema/attr-enforce-tcb-errors.cpp:36:16: error: attributes \'enforce_tcb(\"x\")\' and \'enforce_tcb_leaf(\"x\")\' are mutually exclusive","clang/test/Sema/attr-enforce-tcb-errors.cpp:43:16: error: attributes \'enforce_tcb_leaf(\"x\")\' and \'enforce_tcb(\"x\")\' are mutually exclusive","clang/test/Sema/attr-enforce-tcb-errors.cpp:75:16: error: attributes \'enforce_tcb_leaf(\"x\")\' and \'enforce_tcb(\"x\")\' are mutually exclusive"} | ["clang/test/Sema/attr-enforce-tcb-errors.cpp"]={"clang/test/Sema/attr-enforce-tcb-errors.cpp:21:16: error: attributes \'enforce_tcb_leaf(\"x\")\' and \'enforce_tcb(\"x\")\' are mutually exclusive","clang/test/Sema/attr-enforce-tcb-errors.cpp:28:16: error: attributes \'enforce_tcb(\"x\")\' and \'enforce_tcb_leaf(\"x\")\' are mutually exclusive","clang/test/Sema/attr-enforce-tcb-errors.cpp:36:16: error: attributes \'enforce_tcb(\"x\")\' and \'enforce_tcb_leaf(\"x\")\' are mutually exclusive","clang/test/Sema/attr-enforce-tcb-errors.cpp:43:16: error: attributes \'enforce_tcb_leaf(\"x\")\' and \'enforce_tcb(\"x\")\' are mutually exclusive","clang/test/Sema/attr-enforce-tcb-errors.cpp:75:16: error: attributes \'enforce_tcb_leaf(\"x\")\' and \'enforce_tcb(\"x\")\' are mutually exclusive"} | ||
Line 5,006: | Line 5,034: | ||
}, | }, | ||
["err_temp_copy_ambiguous"]={ | ["err_temp_copy_ambiguous"]={ | ||
[ | [i]="err_temp_copy_ambiguous", | ||
[ | [h]={{nil,v,"ambiguous constructor call when %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"},{ib,O,"ambiguous constructor call when %select{copying variable|copying parameter|returning object|initializing statement expression result|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1"},{A,nil,"ambiguous constructor call when %select{copying variable|copying parameter|returning object|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1"}}, | ||
[ | [g]={{nil,v,{"ambiguous constructor call when ",{Xb,Yb,"initializing template parameter",Zb,yc,ec,fc,dc,bc,cc,gc,Sb,Rb},Dc}},{ib,O,{"ambiguous constructor call when ",{Xb,Yb,Zb,yc,ec,fc,dc,bc,cc,gc,Sb,Rb},Dc}},{A,nil,{"ambiguous constructor call when ",{Xb,Yb,Zb,ec,fc,dc,bc,cc,gc,Sb,Rb},Dc}}}, | ||
[ | [b]=k, | ||
[ | [e]="ambiguous constructor call when (?: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 (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e1314a64b803",1261112541,"Switch the initialization required by return statements over to the","Switch the initialization required by return statements over to the\nnew InitializationSequence. This fixes some bugs (e.g., PR5808),\nchanged some diagnostics, and caused more churn than expected. What\'s\nnew:\n\n - InitializationSequence now has a \"C conversion sequence\" category\n and step kind, which falls back to\n - Changed the diagnostics for returns to always have the result type\n of the function first and the type of the expression second.\n CheckSingleAssignmentConstraints to peform checking in C. \n - Improved ASTs for initialization of return values. The ASTs now\n capture all of the temporaries we need to create, but\n intentionally do not bind the tempoary that is actually returned,\n so that it won\'t get destroyed twice.\n - Make sure to perform an (elidable!) copy of the class object that\n is returned from a class.\n - Fix copy elision in CodeGen to properly see through the\n subexpressions that occur with elidable copies.\n - Give \"new\" its own entity kind; as with return values and thrown\n objects, we don\'t bind the expression so we don\'t call a\n destructor for it.\n\nNote that, with this patch, I\'ve broken returning move-only types in\nC++0x. We\'ll fix it later, when we tackle NRVO.\n\nllvm-svn: 91669"}, | ||
[j]={{ | [j]={{Q,6799,"/// 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_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Loc, S.PDiag(diag::err_temp_copy_ambiguous) << (int)Entity.getKind() << CurInitExpr->getType() << CurInitExpr->getSourceRange()), S, OCD_AmbiguousCandidates, CurInitExpr);"}} | ||
}, | }, | ||
["err_temp_copy_deleted"]={ | ["err_temp_copy_deleted"]={ | ||
[ | [i]="err_temp_copy_deleted", | ||
[ | [h]={{nil,v,"%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 invokes deleted constructor"},{ib,O,"%select{copying variable|copying parameter|returning object|initializing statement expression result|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1 invokes deleted constructor"},{A,nil,"%select{copying variable|copying parameter|returning object|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1 invokes deleted constructor"}}, | ||
[ | [g]={{nil,v,{{Xb,Yb,"initializing template parameter",Zb,yc,ec,fc,dc,bc,cc,gc,Sb,Rb}," of type B invokes deleted constructor"}},{ib,O,{{Xb,Yb,Zb,yc,ec,fc,dc,bc,cc,gc,Sb,Rb}," of type B invokes deleted constructor"}},{A,nil,{{Xb,Yb,Zb,ec,fc,dc,bc,cc,gc,Sb,Rb}," of type B invokes deleted constructor"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?: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 (.*?) invokes deleted constructor", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e1314a64b803",1261112541,"Switch the initialization required by return statements over to the","Switch the initialization required by return statements over to the\nnew InitializationSequence. This fixes some bugs (e.g., PR5808),\nchanged some diagnostics, and caused more churn than expected. What\'s\nnew:\n\n - InitializationSequence now has a \"C conversion sequence\" category\n and step kind, which falls back to\n - Changed the diagnostics for returns to always have the result type\n of the function first and the type of the expression second.\n CheckSingleAssignmentConstraints to peform checking in C. \n - Improved ASTs for initialization of return values. The ASTs now\n capture all of the temporaries we need to create, but\n intentionally do not bind the tempoary that is actually returned,\n so that it won\'t get destroyed twice.\n - Make sure to perform an (elidable!) copy of the class object that\n is returned from a class.\n - Fix copy elision in CodeGen to properly see through the\n subexpressions that occur with elidable copies.\n - Give \"new\" its own entity kind; as with return values and thrown\n objects, we don\'t bind the expression so we don\'t call a\n destructor for it.\n\nNote that, with this patch, I\'ve broken returning move-only types in\nC++0x. We\'ll fix it later, when we tackle NRVO.\n\nllvm-svn: 91669"}, | ||
[j]={{ | [j]={{Q,6807,"/// 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_Deleted:\n S.Diag(Loc, diag::err_temp_copy_deleted) << (int)Entity.getKind() << CurInitExpr->getType() << CurInitExpr->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/cxx1z-copy-omission.cpp"]={"clang/test/SemaCXX/cxx1z-copy-omission.cpp:55:13: error: copying variable of type \'Noncopyable\' invokes deleted constructor","clang/test/SemaCXX/cxx1z-copy-omission.cpp:60:13: error: copying variable of type \'Derived\' invokes deleted constructor","clang/test/SemaCXX/cxx1z-copy-omission.cpp:143:13: error: copying variable of type \'Noncopyable\' invokes deleted constructor","clang/test/SemaCXX/cxx1z-copy-omission.cpp:146:13: error: copying variable of type \'Derived\' invokes deleted constructor"} | ["clang/test/SemaCXX/cxx1z-copy-omission.cpp"]={"clang/test/SemaCXX/cxx1z-copy-omission.cpp:55:13: error: copying variable of type \'Noncopyable\' invokes deleted constructor","clang/test/SemaCXX/cxx1z-copy-omission.cpp:60:13: error: copying variable of type \'Derived\' invokes deleted constructor","clang/test/SemaCXX/cxx1z-copy-omission.cpp:143:13: error: copying variable of type \'Noncopyable\' invokes deleted constructor","clang/test/SemaCXX/cxx1z-copy-omission.cpp:146:13: error: copying variable of type \'Derived\' invokes deleted constructor"} | ||
Line 5,031: | Line 5,059: | ||
}, | }, | ||
["err_temp_copy_incomplete"]={ | ["err_temp_copy_incomplete"]={ | ||
[ | [i]="err_temp_copy_incomplete", | ||
[ | [h]="copying a temporary object of incomplete type %0", | ||
[ | [g]="copying a temporary object of incomplete type A", | ||
[ | [b]=k, | ||
[ | [e]="copying a temporary object of incomplete type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d5c231e7450e",1272143365,"When we attempt to create a temporary object of class type, be sure","When we attempt to create a temporary object of class type, be sure\nthat the type we\'re copying is complete. \n\nBoost.Regex now builds, although it\'s failing its regression tests\nwith our favorite \"Sema doesn\'t consider destructor as used.\"\nassertion.\n\nllvm-svn: 102271"}, | ||
[j]={{ | [j]={{Q,6766,"/// 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 if (S.RequireCompleteType(Loc, T, diag::err_temp_copy_incomplete))"}} | ||
}, | }, | ||
["err_temp_copy_no_viable"]={ | ["err_temp_copy_no_viable"]={ | ||
[ | [i]="err_temp_copy_no_viable", | ||
[ | [h]={{nil,v,"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"},{ib,O,"no viable constructor %select{copying variable|copying parameter|returning object|initializing statement expression result|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1"},{A,nil,"no viable constructor %select{copying variable|copying parameter|returning object|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1"}}, | ||
[ | [g]={{nil,v,{"no viable constructor ",{Xb,Yb,"initializing template parameter",Zb,yc,ec,fc,dc,bc,cc,gc,Sb,Rb},Dc}},{ib,O,{"no viable constructor ",{Xb,Yb,Zb,yc,ec,fc,dc,bc,cc,gc,Sb,Rb},Dc}},{A,nil,{"no viable constructor ",{Xb,Yb,Zb,ec,fc,dc,bc,cc,gc,Sb,Rb},Dc}}}, | ||
[ | [b]=k, | ||
[ | [e]="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 (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e1314a64b803",1261112541,"Switch the initialization required by return statements over to the","Switch the initialization required by return statements over to the\nnew InitializationSequence. This fixes some bugs (e.g., PR5808),\nchanged some diagnostics, and caused more churn than expected. What\'s\nnew:\n\n - InitializationSequence now has a \"C conversion sequence\" category\n and step kind, which falls back to\n - Changed the diagnostics for returns to always have the result type\n of the function first and the type of the expression second.\n CheckSingleAssignmentConstraints to peform checking in C. \n - Improved ASTs for initialization of return values. The ASTs now\n capture all of the temporaries we need to create, but\n intentionally do not bind the tempoary that is actually returned,\n so that it won\'t get destroyed twice.\n - Make sure to perform an (elidable!) copy of the class object that\n is returned from a class.\n - Fix copy elision in CodeGen to properly see through the\n subexpressions that occur with elidable copies.\n - Give \"new\" its own entity kind; as with return values and thrown\n objects, we don\'t bind the expression so we don\'t call a\n destructor for it.\n\nNote that, with this patch, I\'ve broken returning move-only types in\nC++0x. We\'ll fix it later, when we tackle NRVO.\n\nllvm-svn: 91669"}, | ||
[j]={{ | [j]={{Q,6789,"/// Make a (potentially elidable) temporary copy of the object\n/// provided by the given initializer by calling the appropriate copy\n/// constructor.\n///\n/// \\param S The Sema object used for type-checking.\n///\n/// \\param T The type of the temporary object, which must either be\n/// the type of the initializer expression or a superclass thereof.\n///\n/// \\param Entity The entity being initialized.\n///\n/// \\param CurInit The initializer expression.\n///\n/// \\param IsExtraneousCopy Whether this is an \"extraneous\" copy that\n/// is permitted in C++03 (but not C++0x) when binding a reference to\n/// an rvalue.\n///\n/// \\returns An expression that copies the initializer expression into\n/// a temporary object, or an error expression if a copy could not be\n/// created.\nstatic ExprResult CopyObject(Sema &S, QualType T, const InitializedEntity &Entity, ExprResult CurInit, bool IsExtraneousCopy) {\n // ...\n case OR_No_Viable_Function:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Loc, S.PDiag(IsExtraneousCopy && !S.isSFINAEContext() ? diag::ext_rvalue_to_reference_temp_copy_no_viable : diag::err_temp_copy_no_viable) << (int)Entity.getKind() << CurInitExpr->getType() << CurInitExpr->getSourceRange()), S, OCD_AllCandidates, CurInitExpr);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/copy-initialization.cpp"]={"clang/test/SemaCXX/copy-initialization.cpp:44:7: error: no viable constructor copying parameter of type \'const Foo\'"} | ["clang/test/SemaCXX/copy-initialization.cpp"]={"clang/test/SemaCXX/copy-initialization.cpp:44:7: error: no viable constructor copying parameter of type \'const Foo\'"} | ||
Line 5,056: | Line 5,084: | ||
}, | }, | ||
["err_template_arg_address_of_non_pointer"]={ | ["err_template_arg_address_of_non_pointer"]={ | ||
[ | [i]="err_template_arg_address_of_non_pointer", | ||
[ | [h]="address taken in non-type template argument for template parameter of reference type %0", | ||
[ | [g]="address taken in non-type template argument for template parameter of reference type A", | ||
[ | [b]=k, | ||
[ | [e]="address taken in non\\-type template argument for template parameter of reference type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"b242683d9992",1270146755,"Overhaul checking of non-type template arguments that should refer to","Overhaul checking of non-type template arguments that should refer to\nan object or function. Our previous checking was too lax, and ended up\nallowing missing or extraneous address-of operators, among other\nevils. The new checking provides better diagnostics and adheres more\nclosely to the standard.\n\nFixes PR6563 and PR6749.\n\nllvm-svn: 100125"}, | ||
[j]={{ | [j]={{r,6909,"/// 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 (AddressTaken && ParamType->isReferenceType()) {\n // If we originally had an address-of operator, but the\n // parameter has reference type, complain and (if things look\n // like they will work) drop the address-of operator.\n if (!S.Context.hasSameUnqualifiedType(Entity->getType(), ParamType.getNonReferenceType())) {\n S.Diag(AddrOpLoc, diag::err_template_arg_address_of_non_pointer) << ParamType;"},{r,6915,"/// 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 (AddressTaken && ParamType->isReferenceType()) {\n // ...\n S.Diag(AddrOpLoc, diag::err_template_arg_address_of_non_pointer) << ParamType << FixItHint::CreateRemoval(AddrOpLoc);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:116:8: error: address taken in non-type template argument for template parameter of reference type \'int &\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:118:8: error: address taken in non-type template argument for template parameter of reference type \'int &\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:129:9: error: address taken in non-type template argument for template parameter of reference type \'const int &\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:136:8: error: address taken in non-type template argument for template parameter of reference type \'int (&)(int)\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:138:8: error: address taken in non-type template argument for template parameter of reference type \'int (&)(int)\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:140:8: error: address taken in non-type template argument for template parameter of reference type \'int (&)(int)\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:146:8: error: address taken in non-type template argument for template parameter of reference type \'int (&)(int)\'"} | ["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:116:8: error: address taken in non-type template argument for template parameter of reference type \'int &\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:118:8: error: address taken in non-type template argument for template parameter of reference type \'int &\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:129:9: error: address taken in non-type template argument for template parameter of reference type \'const int &\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:136:8: error: address taken in non-type template argument for template parameter of reference type \'int (&)(int)\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:138:8: error: address taken in non-type template argument for template parameter of reference type \'int (&)(int)\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:140:8: error: address taken in non-type template argument for template parameter of reference type \'int (&)(int)\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:146:8: error: address taken in non-type template argument for template parameter of reference type \'int (&)(int)\'"} | ||
Line 5,070: | Line 5,098: | ||
}, | }, | ||
["err_template_arg_deduced_incomplete_pack"]={ | ["err_template_arg_deduced_incomplete_pack"]={ | ||
[ | [i]="err_template_arg_deduced_incomplete_pack", | ||
[ | [h]="deduced incomplete pack %0 for template parameter %1", | ||
[ | [g]="deduced incomplete pack A for template parameter B", | ||
[ | [b]=k, | ||
[ | [e]="deduced incomplete pack (.*?) for template parameter (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"539e8e370398",1483494535,"Fix template argument deduction when only some of a parameter pack is a non-deduced context.","Fix template argument deduction when only some of a parameter pack is a non-deduced context.\n\nWhen a parameter pack has multiple corresponding arguments, and some subset of\nthem are overloaded functions, it\'s possible that some subset of the parameters\nare non-deduced contexts. In such a case, keep deducing from the remainder of\nthe arguments, and resolve the incomplete pack against whatever other\ndeductions we\'ve performed for the pack.\n\nGCC, MSVC, and ICC give three different bad behaviors for this case; what we do\nnow (and what we did before) don\'t exactly match any of them, sadly :( I\'m\ngetting a core issue opened to specify more precisely how this should be\nhandled.\n\nllvm-svn: 290923"}, | ||
[j]={{"clang/lib/Sema/SemaTemplateDeduction.cpp",2675,"/// Convert the given deduced template argument and add it to the set of\n/// fully-converted template arguments.\nstatic bool ConvertDeducedTemplateArgument(Sema &S, NamedDecl *Param, DeducedTemplateArgument Arg, NamedDecl *Template, TemplateDeductionInfo &Info, bool IsDeduced, SmallVectorImpl<TemplateArgument> &SugaredOutput, SmallVectorImpl<TemplateArgument> &CanonicalOutput) {\n // ...\n if (Arg.getKind() == TemplateArgument::Pack) {\n // ...\n for (const auto &P : Arg.pack_elements()) {\n // ...\n if (P.isNull()) {\n // ...\n S.Diag(Param->getLocation(), diag::err_template_arg_deduced_incomplete_pack) << Arg << Param;"}} | [j]={{"clang/lib/Sema/SemaTemplateDeduction.cpp",2675,"/// Convert the given deduced template argument and add it to the set of\n/// fully-converted template arguments.\nstatic bool ConvertDeducedTemplateArgument(Sema &S, NamedDecl *Param, DeducedTemplateArgument Arg, NamedDecl *Template, TemplateDeductionInfo &Info, bool IsDeduced, SmallVectorImpl<TemplateArgument> &SugaredOutput, SmallVectorImpl<TemplateArgument> &CanonicalOutput) {\n // ...\n if (Arg.getKind() == TemplateArgument::Pack) {\n // ...\n for (const auto &P : Arg.pack_elements()) {\n // ...\n if (P.isNull()) {\n // ...\n S.Diag(Param->getLocation(), diag::err_template_arg_deduced_incomplete_pack) << Arg << Param;"}} | ||
}, | }, | ||
["err_template_arg_field"]={ | ["err_template_arg_field"]={ | ||
[ | [i]="err_template_arg_field", | ||
[ | [h]="non-type template argument refers to non-static data member %0", | ||
[ | [g]="non-type template argument refers to non-static data member A", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument refers to non\\-static data member (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,6839,"/// 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 // Cannot refer to non-static data members\n if (isa<FieldDecl>(Entity) || isa<IndirectFieldDecl>(Entity)) {\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_field) << Entity << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:169:9: error: non-type template argument refers to non-static data member \'NonStaticMember\'"} | ["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:169:9: error: non-type template argument refers to non-static data member \'NonStaticMember\'"} | ||
Line 5,095: | Line 5,123: | ||
}, | }, | ||
["err_template_arg_invalid"]={ | ["err_template_arg_invalid"]={ | ||
[ | [i]={{nil,M,"err_template_arg_invalid"}}, | ||
[ | [h]={{nil,M,"non-type template argument \'%0\' is invalid"}}, | ||
[ | [g]={{nil,M,"non-type template argument \'A\' is invalid"}}, | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument \'(.*?)\' is invalid", | ||
[ | [f]=a, | ||
[ | [d]={{nil,M,m}}, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{r,6617,"/// Determine whether the given template argument is a null pointer\n/// value of the appropriate type.\nstatic NullPointerValueKind isNullPointerValueTemplateArgument(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, Decl *Entity = nullptr) {\n // ...\n if (EvalResult.Val.isLValue() && !EvalResult.Val.getLValueBase()) {\n // ...\n S.Diag(Arg->getExprLoc(), diag::err_template_arg_invalid) << EvalResult.Val.getAsString(S.Context, ParamType);"}}, | ||
[l]={ | [l]={ | ||
[ | [Ac]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:31:4: error: non-type template argument \'(int *)1\' is invalid"} | ||
} | } | ||
}, | }, | ||
["err_template_arg_list_constraints_not_satisfied"]={ | ["err_template_arg_list_constraints_not_satisfied"]={ | ||
[ | [i]={{nil,p,"err_template_arg_list_constraints_not_satisfied"}}, | ||
[ | [h]={{nil,p,"constraints not satisfied for %select{class template|function template|variable template|alias template|template template parameter|template}0 %1%2"}}, | ||
[ | [g]={{nil,p,{"constraints not satisfied for ",{tc,pc,Fc,"alias template","template template parameter",Lc}," BC"}}}, | ||
[ | [b]=k, | ||
[ | [e]="constraints not satisfied for (?:class template|function template|variable template|alias template|template template parameter|template) (.*?)(.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute","[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nThis patch is simpler and only adds the no_builtin attribute.\n\nReviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert\n\nSubscribers: mgrang, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D68028"}, | ||
[j]={{"clang/lib/Sema/SemaConcept.cpp",862,"bool Sema::EnsureTemplateArgumentListConstraints(TemplateDecl *TD, const MultiLevelTemplateArgumentList &TemplateArgsLists, SourceRange TemplateIDRange) {\n // ...\n if (!Satisfaction.IsSatisfied) {\n // ...\n Diag(TemplateIDRange.getBegin(), diag::err_template_arg_list_constraints_not_satisfied) << (int)getTemplateNameKindForDiagnostics(TemplateName(TD)) << TD << TemplateArgString << TemplateIDRange;"}}, | [j]={{"clang/lib/Sema/SemaConcept.cpp",862,"bool Sema::EnsureTemplateArgumentListConstraints(TemplateDecl *TD, const MultiLevelTemplateArgumentList &TemplateArgsLists, SourceRange TemplateIDRange) {\n // ...\n if (!Satisfaction.IsSatisfied) {\n // ...\n Diag(TemplateIDRange.getBegin(), diag::err_template_arg_list_constraints_not_satisfied) << (int)getTemplateNameKindForDiagnostics(TemplateName(TD)) << TD << TemplateArgString << TemplateIDRange;"}}, | ||
[l]={ | [l]={ | ||
Line 5,123: | Line 5,151: | ||
}, | }, | ||
["err_template_arg_list_different_arity"]={ | ["err_template_arg_list_different_arity"]={ | ||
[ | [i]="err_template_arg_list_different_arity", | ||
[ | [h]="%select{too few|too many}0 template arguments for %select{class template|function template|template template parameter|template}1 %2", | ||
[ | [g]={{nil,D,{{"too few","too many"}," template arguments for ",{tc,pc,Fc,"alias template","template template parameter","concept",Lc}," C"}},{E,o,{{"too few","too many"}," template arguments for ",{tc,pc,Fc,"alias template","template template parameter",Lc}," C"}},{nil,nil,{{"too few","too many"}," template arguments for ",{tc,pc,"template template parameter",Lc}," C"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:too few|too many) template arguments for (?:class template|function template|variable template|alias template|template template parameter|concept|template) (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,5870,"/// Diagnose a missing template argument.\ntemplate <typename TemplateParmDecl> static bool diagnoseMissingArgument(Sema &S, SourceLocation Loc, TemplateDecl *TD, const TemplateParmDecl *D, TemplateArgumentListInfo &Args) {\n // ...\n S.Diag(Loc, diag::err_template_arg_list_different_arity) << /*not enough args*/ 0 << (int)S.getTemplateNameKindForDiagnostics(TemplateName(TD)) << TD;"},{r,5937,"/// Check that the given template argument list is well-formed\n/// for specializing the given template.\nbool Sema::CheckTemplateArgumentList(TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted, bool UpdateArgsWithConversions, bool *ConstraintsNotSatisfied) {\n // ...\n for (TemplateParameterList::iterator Param = Params->begin(), ParamEnd = Params->end(); Param != ParamEnd; /* increment in loop */) {\n // If we have an expanded parameter pack, make sure we don\'t have too\n // many arguments.\n if (std::optional<unsigned> Expansions = getExpandedPackSize(*Param)) {\n if (*Expansions == SugaredArgumentPack.size()) {\n // ...\n } else if (ArgIdx == NumArgs && !PartialTemplateArgs) {\n // ...\n Diag(TemplateLoc, diag::err_template_arg_list_different_arity) << /*not enough args*/ 0 << (int)getTemplateNameKindForDiagnostics(TemplateName(Template)) << Template;"},{r,6165,"/// Check that the given template argument list is well-formed\n/// for specializing the given template.\nbool Sema::CheckTemplateArgumentList(TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted, bool UpdateArgsWithConversions, bool *ConstraintsNotSatisfied) {\n // ...\n // If we have any leftover arguments, then there were too many arguments.\n // Complain and fail.\n if (ArgIdx < NumArgs) {\n Diag(TemplateLoc, diag::err_template_arg_list_different_arity) << /*too many args*/ 1 << (int)getTemplateNameKindForDiagnostics(TemplateName(Template)) << Template << SourceRange(NewArgs[ArgIdx].getLocation(), NewArgs.getRAngleLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:22:28: error: too few template arguments for class template \'A\'"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:22:28: error: too few template arguments for class template \'A\'"} | ||
Line 5,137: | Line 5,165: | ||
}, | }, | ||
["err_template_arg_member_ptr_base_derived_not_supported"]={ | ["err_template_arg_member_ptr_base_derived_not_supported"]={ | ||
[ | [i]="err_template_arg_member_ptr_base_derived_not_supported", | ||
[ | [h]="sorry, non-type template argument of pointer-to-member type %1 that refers to member %q0 of a different class is not supported yet", | ||
[ | [g]="sorry, non-type template argument of pointer-to-member type B that refers to member A of a different class is not supported yet", | ||
[ | [b]=k, | ||
[ | [e]="sorry, non\\-type template argument of pointer\\-to\\-member type (.*?) that refers to member (.*?) of a different class is not supported yet", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"410cc893745e",1416972413,"[c++1z] Most of N4268 (allow constant evaluation for non-type template arguments).","[c++1z] Most of N4268 (allow constant evaluation for non-type template arguments).\n\nWe don\'t yet support pointer-to-member template arguments that have undergone\npointer-to-member conversions, mostly because we don\'t have a mangling for them yet.\n\nllvm-svn: 222807"}, | ||
[j]={{ | [j]={{r,7325,"/// Check a template argument against its corresponding\n/// non-type template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.nontype].\n/// If an error occurred, it returns ExprError(); otherwise, it\n/// returns the converted template argument. \\p ParamType is the\n/// type of the non-type template parameter after it has been instantiated.\nExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n if (getLangOpts().CPlusPlus17) {\n // ...\n case APValue::MemberPointer: {\n // ...\n // FIXME: We need TemplateArgument representation and mangling for these.\n if (!Value.getMemberPointerPath().empty()) {\n Diag(Arg->getBeginLoc(), diag::err_template_arg_member_ptr_base_derived_not_supported) << Value.getMemberPointerDecl() << ParamType << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:100:28: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::B::*\' that refers to member \'PtrMem::E::e\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:101:28: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::B::*\' that refers to member \'PtrMem::E::e\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:105:43: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::B::*\' that refers to member \'PtrMem::E::e\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:109:28: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::E::*\' that refers to member \'PtrMem::B::b\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:110:28: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::E::*\' that refers to member \'PtrMem::B::b\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:114:43: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::E::*\' that refers to member \'PtrMem::B::b\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:208:34: error: sorry, non-type template argument of pointer-to-member type \'int Auto::Basic::Y::*\' that refers to member \'Auto::Basic::X::n\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:210:34: error: sorry, non-type template argument of pointer-to-member type \'const int Auto::Basic::Y::*\' that refers to member \'Auto::Basic::X::n\' of a different class is not supported yet"} | ["clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:100:28: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::B::*\' that refers to member \'PtrMem::E::e\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:101:28: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::B::*\' that refers to member \'PtrMem::E::e\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:105:43: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::B::*\' that refers to member \'PtrMem::E::e\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:109:28: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::E::*\' that refers to member \'PtrMem::B::b\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:110:28: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::E::*\' that refers to member \'PtrMem::B::b\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:114:43: error: sorry, non-type template argument of pointer-to-member type \'int PtrMem::E::*\' that refers to member \'PtrMem::B::b\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:208:34: error: sorry, non-type template argument of pointer-to-member type \'int Auto::Basic::Y::*\' that refers to member \'Auto::Basic::X::n\' of a different class is not supported yet","clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp:210:34: error: sorry, non-type template argument of pointer-to-member type \'const int Auto::Basic::Y::*\' that refers to member \'Auto::Basic::X::n\' of a different class is not supported yet"} | ||
Line 5,151: | Line 5,179: | ||
}, | }, | ||
["err_template_arg_method"]={ | ["err_template_arg_method"]={ | ||
[ | [i]="err_template_arg_method", | ||
[ | [h]="non-type template argument refers to non-static member function %0", | ||
[ | [g]="non-type template argument refers to non-static member function A", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument refers to non\\-static member function (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,6848,"/// 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 // Cannot refer to non-static member functions\n if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Entity)) {\n if (!Method->isStatic()) {\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_method) << Method << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_template_arg_must_be_expr"]={ | ["err_template_arg_must_be_expr"]={ | ||
[ | [i]="err_template_arg_must_be_expr", | ||
[ | [h]="template argument for non-type template parameter must be an expression", | ||
[ | [g]="template argument for non-type template parameter must be an expression", | ||
[ | [b]=k, | ||
[ | [e]="template argument for non\\-type template parameter must be an expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,5730,"/// Check that the given template argument corresponds to the given\n/// template parameter.\n///\n/// \\param Param The template parameter against which the argument will be\n/// checked.\n///\n/// \\param Arg The template argument, which may be updated due to conversions.\n///\n/// \\param Template The template in which the template argument resides.\n///\n/// \\param TemplateLoc The location of the template name for the template\n/// whose argument list we\'re matching.\n///\n/// \\param RAngleLoc The location of the right angle bracket (\'>\') that closes\n/// the template argument list.\n///\n/// \\param ArgumentPackIndex The index into the argument pack where this\n/// argument will be placed. Only valid if the parameter is a parameter pack.\n///\n/// \\param Converted The checked, converted argument will be added to the\n/// end of this small vector.\n///\n/// \\param CTAK Describes how we arrived at this particular template argument:\n/// explicitly written, deduced, etc.\n///\n/// \\returns true on error, false otherwise.\nbool Sema::CheckTemplateArgument(NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n // Check non-type template parameters.\n if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) {\n // ...\n case TemplateArgument::Template:\n case TemplateArgument::TemplateExpansion:\n // ...\n Diag(Arg.getLocation(), diag::err_template_arg_must_be_expr) << Arg.getSourceRange();"},{r,5752,"/// Check that the given template argument corresponds to the given\n/// template parameter.\n///\n/// \\param Param The template parameter against which the argument will be\n/// checked.\n///\n/// \\param Arg The template argument, which may be updated due to conversions.\n///\n/// \\param Template The template in which the template argument resides.\n///\n/// \\param TemplateLoc The location of the template name for the template\n/// whose argument list we\'re matching.\n///\n/// \\param RAngleLoc The location of the right angle bracket (\'>\') that closes\n/// the template argument list.\n///\n/// \\param ArgumentPackIndex The index into the argument pack where this\n/// argument will be placed. Only valid if the parameter is a parameter pack.\n///\n/// \\param Converted The checked, converted argument will be added to the\n/// end of this small vector.\n///\n/// \\param CTAK Describes how we arrived at this particular template argument:\n/// explicitly written, deduced, etc.\n///\n/// \\returns true on error, false otherwise.\nbool Sema::CheckTemplateArgument(NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n // Check non-type template parameters.\n if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) {\n // ...\n case TemplateArgument::Type: {\n // ...\n if (T->isFunctionType())\n // ...\n else\n Diag(SR.getBegin(), diag::err_template_arg_must_be_expr) << SR;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/missing-class-keyword-crash.cpp"]={"clang/test/SemaTemplate/missing-class-keyword-crash.cpp:7:11: error: template argument for non-type template parameter must be an expression"} | ["clang/test/SemaTemplate/missing-class-keyword-crash.cpp"]={"clang/test/SemaTemplate/missing-class-keyword-crash.cpp:7:11: error: template argument for non-type template parameter must be an expression"} | ||
Line 5,176: | Line 5,204: | ||
}, | }, | ||
["err_template_arg_must_be_template"]={ | ["err_template_arg_must_be_template"]={ | ||
[ | [i]="err_template_arg_must_be_template", | ||
[ | [h]="template argument for template template parameter must be a class template%select{| or type alias template}0", | ||
[ | [g]={{nil,nil,{"template argument for template template parameter must be a class template",{a," or type alias template"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="template argument for template template parameter must be a class template(?:| or type alias template)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,5824,"/// Check that the given template argument corresponds to the given\n/// template parameter.\n///\n/// \\param Param The template parameter against which the argument will be\n/// checked.\n///\n/// \\param Arg The template argument, which may be updated due to conversions.\n///\n/// \\param Template The template in which the template argument resides.\n///\n/// \\param TemplateLoc The location of the template name for the template\n/// whose argument list we\'re matching.\n///\n/// \\param RAngleLoc The location of the right angle bracket (\'>\') that closes\n/// the template argument list.\n///\n/// \\param ArgumentPackIndex The index into the argument pack where this\n/// argument will be placed. Only valid if the parameter is a parameter pack.\n///\n/// \\param Converted The checked, converted argument will be added to the\n/// end of this small vector.\n///\n/// \\param CTAK Describes how we arrived at this particular template argument:\n/// explicitly written, deduced, etc.\n///\n/// \\returns true on error, false otherwise.\nbool Sema::CheckTemplateArgument(NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n case TemplateArgument::Expression:\n case TemplateArgument::Type:\n // ...\n Diag(Arg.getLocation(), diag::err_template_arg_must_be_template) << getLangOpts().CPlusPlus11;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/make_integer_seq.cpp"]={"clang/test/SemaCXX/make_integer_seq.cpp:49:20: error: template argument for template template parameter must be a class template or type alias template"} | ["clang/test/SemaCXX/make_integer_seq.cpp"]={"clang/test/SemaCXX/make_integer_seq.cpp:49:20: error: template argument for template template parameter must be a class template or type alias template"} | ||
Line 5,190: | Line 5,218: | ||
}, | }, | ||
["err_template_arg_must_be_type"]={ | ["err_template_arg_must_be_type"]={ | ||
[ | [i]="err_template_arg_must_be_type", | ||
[h]="template argument for template type parameter must be a type", | |||
[g]="template argument for template type parameter must be a type", | |||
[b]=k, | |||
[e]="template argument for template type parameter must be a type", | [e]="template argument for template type parameter must be a type", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={u,1237025389,s,t}, | |||
[j]={{r,5285,"bool Sema::CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, TemplateArgumentLoc &AL, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted) {\n // ...\n default: {\n // ...\n Diag(SR.getBegin(), diag::err_template_arg_must_be_type) << SR;"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:41:4: error: template argument for template type parameter must be a type"} | ["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:41:4: error: template argument for template type parameter must be a type"} | ||
Line 5,204: | Line 5,232: | ||
}, | }, | ||
["err_template_arg_must_be_type_suggest"]={ | ["err_template_arg_must_be_type_suggest"]={ | ||
[ | [i]="err_template_arg_must_be_type_suggest", | ||
[ | [h]="template argument for template type parameter must be a type; did you forget \'typename\'?", | ||
[ | [g]="template argument for template type parameter must be a type; did you forget \'typename\'?", | ||
[ | [b]=k, | ||
[ | [e]="template argument for template type parameter must be a type; did you forget \'typename\'\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"864d0b002cdc",1337384569,"Suggest adding \'typename\' when it would make the compiler","Suggest adding \'typename\' when it would make the compiler\naccept the template argument expression as a type.\n\nllvm-svn: 157085"}, | ||
[j]={{ | [j]={{r,5255,"bool Sema::CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, TemplateArgumentLoc &AL, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted) {\n // ...\n case TemplateArgument::Expression: {\n // ...\n if (auto *II = NameInfo.getName().getAsIdentifierInfo()) {\n // ...\n if (Result.getAsSingle<TypeDecl>() || Result.getResultKind() == LookupResult::NotFoundInCurrentInstantiation) {\n // ...\n Diag(Loc, getLangOpts().MSVCCompat ? diag::ext_ms_template_type_arg_missing_typename : diag::err_template_arg_must_be_type_suggest) << FixItHint::CreateInsertion(Loc, \"typename \");"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/typename-specifier.cpp"]={"clang/test/SemaTemplate/typename-specifier.cpp:174:8: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:192:8: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:165:10: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:185:10: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:210:7: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:217:7: error: template argument for template type parameter must be a type; did you forget \'typename\'?"} | ["clang/test/SemaTemplate/typename-specifier.cpp"]={"clang/test/SemaTemplate/typename-specifier.cpp:174:8: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:192:8: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:165:10: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:185:10: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:210:7: error: template argument for template type parameter must be a type; did you forget \'typename\'?","clang/test/SemaTemplate/typename-specifier.cpp:217:7: error: template argument for template type parameter must be a type; did you forget \'typename\'?"} | ||
Line 5,218: | Line 5,246: | ||
}, | }, | ||
["err_template_arg_no_ref_bind"]={ | ["err_template_arg_no_ref_bind"]={ | ||
[ | [i]="err_template_arg_no_ref_bind", | ||
[ | [h]="non-type template parameter of reference type %diff{$ cannot bind to template argument of type $|cannot bind to template of incompatible argument type}0,1", | ||
[ | [g]={{nil,nil,{"non-type template parameter of reference type ",{"A cannot bind to template argument of type B","cannot bind to template of incompatible argument type"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template parameter of reference type (?:(.*?) cannot bind to template argument of type (.*?)|cannot bind to template of incompatible argument type)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,6685,"/// Checks whether the given template argument is compatible with its\n/// template parameter.\nstatic bool CheckTemplateArgumentIsCompatibleWithParameter(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, Expr *Arg, QualType ArgType) {\n // ...\n if (ParamType->isPointerType() && !ParamType->castAs<PointerType>()->getPointeeType()->isFunctionType() && S.IsQualificationConversion(ArgType, ParamType, false, ObjCLifetimeConversion)) {\n // ...\n } else {\n // ...\n // At this point, the template argument refers to an object or\n // function with external linkage. We now need to check whether the\n // argument and parameter types are compatible.\n if (!S.Context.hasSameUnqualifiedType(ArgType, ParamType.getNonReferenceType())) {\n // We can\'t perform this conversion or binding.\n if (ParamType->isReferenceType())\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_no_ref_bind) << ParamType << ArgIn->getType() << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp"]={"clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp:237:43: error: non-type template parameter of reference type \'float &\' cannot bind to template argument of type \'int\'"} | ["clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp"]={"clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp:237:43: error: non-type template parameter of reference type \'float &\' cannot bind to template argument of type \'int\'"} | ||
Line 5,232: | Line 5,260: | ||
}, | }, | ||
["err_template_arg_nontype_ambig"]={ | ["err_template_arg_nontype_ambig"]={ | ||
[ | [i]="err_template_arg_nontype_ambig", | ||
[ | [h]="template argument for non-type template parameter is treated as function type %0", | ||
[ | [g]="template argument for non-type template parameter is treated as function type A", | ||
[ | [b]=k, | ||
[ | [e]="template argument for non\\-type template parameter is treated as function type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,5750,"/// Check that the given template argument corresponds to the given\n/// template parameter.\n///\n/// \\param Param The template parameter against which the argument will be\n/// checked.\n///\n/// \\param Arg The template argument, which may be updated due to conversions.\n///\n/// \\param Template The template in which the template argument resides.\n///\n/// \\param TemplateLoc The location of the template name for the template\n/// whose argument list we\'re matching.\n///\n/// \\param RAngleLoc The location of the right angle bracket (\'>\') that closes\n/// the template argument list.\n///\n/// \\param ArgumentPackIndex The index into the argument pack where this\n/// argument will be placed. Only valid if the parameter is a parameter pack.\n///\n/// \\param Converted The checked, converted argument will be added to the\n/// end of this small vector.\n///\n/// \\param CTAK Describes how we arrived at this particular template argument:\n/// explicitly written, deduced, etc.\n///\n/// \\returns true on error, false otherwise.\nbool Sema::CheckTemplateArgument(NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n // Check non-type template parameters.\n if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) {\n // ...\n case TemplateArgument::Type: {\n // ...\n if (T->isFunctionType())\n Diag(SR.getBegin(), diag::err_template_arg_nontype_ambig) << SR << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:6:3: error: template argument for non-type template parameter is treated as function type \'int ()\'"} | ["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:6:3: error: template argument for non-type template parameter is treated as function type \'int ()\'"} | ||
Line 5,246: | Line 5,274: | ||
}, | }, | ||
["err_template_arg_not_address_constant"]={ | ["err_template_arg_not_address_constant"]={ | ||
[ | [i]="err_template_arg_not_address_constant", | ||
[ | [h]="non-type template argument of type %0 is not a constant expression", | ||
[ | [g]="non-type template argument of type A is not a constant expression", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument of type (.*?) is not a constant expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"20fdef32dd31",1334077705,"Rework implementation of null non-type template arguments based on","Rework implementation of null non-type template arguments based on\nRichard\'s feedback, to properly catch non-constant expressions and\ntype mismatches. Finishes <rdar://problem/11193097>.\n\nllvm-svn: 154407"}, | ||
[j]={{ | [j]={{r,6578,"/// Determine whether the given template argument is a null pointer\n/// value of the appropriate type.\nstatic NullPointerValueKind isNullPointerValueTemplateArgument(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, Decl *Entity = nullptr) {\n // ...\n if (!Arg->EvaluateAsRValue(EvalResult, S.Context) || EvalResult.HasSideEffects) {\n // ...\n S.Diag(DiagLoc, diag::err_template_arg_not_address_constant) << Arg->getType() << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
[ | [Ac]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:27:4: error: non-type template argument of type \'std::nullptr_t\' is not a constant expression","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:30:4: error: non-type template argument of type \'int *\' is not a constant expression"} | ||
} | } | ||
}, | }, | ||
["err_template_arg_not_address_of"]={ | ["err_template_arg_not_address_of"]={ | ||
[ | [i]="err_template_arg_not_address_of", | ||
[ | [h]="non-type template argument for template parameter of pointer type %0 must have its address taken", | ||
[ | [g]="non-type template argument for template parameter of pointer type A must have its address taken", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument for template parameter of pointer type (.*?) must have its address taken", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"b242683d9992",1270146755,"Overhaul checking of non-type template arguments that should refer to","Overhaul checking of non-type template arguments that should refer to\nan object or function. Our previous checking was too lax, and ended up\nallowing missing or extraneous address-of operators, among other\nevils. The new checking provides better diagnostics and adheres more\nclosely to the standard.\n\nFixes PR6563 and PR6749.\n\nllvm-svn: 100125"}, | ||
[j]={{ | [j]={{r,6938,"/// 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 the template parameter has pointer type, either we must have taken the\n // address or the argument must decay to a pointer.\n if (!AddressTaken && ParamType->isPointerType()) {\n if (Func) {\n // ...\n } else if (Entity->getType()->isArrayType()) {\n // ...\n } else {\n // ...\n if (!S.Context.hasSameUnqualifiedType(ArgType, ParamType)) {\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_not_address_of) << ParamType;"},{r,6944,"/// 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 the template parameter has pointer type, either we must have taken the\n // address or the argument must decay to a pointer.\n if (!AddressTaken && ParamType->isPointerType()) {\n if (Func) {\n // ...\n } else if (Entity->getType()->isArrayType()) {\n // ...\n } else {\n // ...\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_not_address_of) << ParamType << FixItHint::CreateInsertion(Arg->getBeginLoc(), \"&\");"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:148:25: error: non-type template argument for template parameter of pointer type \'const GUID *\' (aka \'const _GUID *\') must have its address taken"} | ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:148:25: error: non-type template argument for template parameter of pointer type \'const GUID *\' (aka \'const _GUID *\') must have its address taken"} | ||
Line 5,274: | Line 5,302: | ||
}, | }, | ||
["err_template_arg_not_convertible"]={ | ["err_template_arg_not_convertible"]={ | ||
[ | [i]="err_template_arg_not_convertible", | ||
[ | [h]="non-type template argument of type %0 cannot be converted to a value of type %1", | ||
[ | [g]="non-type template argument of type A cannot be converted to a value of type B", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument of type (.*?) cannot be converted to a value of type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,6688,"/// Checks whether the given template argument is compatible with its\n/// template parameter.\nstatic bool CheckTemplateArgumentIsCompatibleWithParameter(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, Expr *Arg, QualType ArgType) {\n // ...\n if (ParamType->isPointerType() && !ParamType->castAs<PointerType>()->getPointeeType()->isFunctionType() && S.IsQualificationConversion(ArgType, ParamType, false, ObjCLifetimeConversion)) {\n // ...\n } else {\n // ...\n // At this point, the template argument refers to an object or\n // function with external linkage. We now need to check whether the\n // argument and parameter types are compatible.\n if (!S.Context.hasSameUnqualifiedType(ArgType, ParamType.getNonReferenceType())) {\n // We can\'t perform this conversion or binding.\n if (ParamType->isReferenceType())\n // ...\n else\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_not_convertible) << ArgIn->getType() << ParamType << Arg->getSourceRange();"},{r,7061,"/// 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 if (S.IsQualificationConversion(ResultArg->getType(), ParamType.getNonReferenceType(), false, ObjCLifetimeConversion)) {\n // ...\n } else if (!S.Context.hasSameUnqualifiedType(ResultArg->getType(), ParamType.getNonReferenceType())) {\n // ...\n S.Diag(ResultArg->getBeginLoc(), diag::err_template_arg_not_convertible) << ResultArg->getType() << ParamType << ResultArg->getSourceRange();"},{r,7521,"/// Check a template argument against its corresponding\n/// non-type template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.nontype].\n/// If an error occurred, it returns ExprError(); otherwise, it\n/// returns the converted template argument. \\p ParamType is the\n/// type of the non-type template parameter after it has been instantiated.\nExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n // C++ [temp.arg.nontype]p5:\n // The following conversions are performed on each expression used\n // as a non-type template-argument. If a non-type\n // template-argument cannot be converted to the type of the\n // corresponding template-parameter then the program is\n // ill-formed.\n if (ParamType->isIntegralOrEnumerationType()) {\n // ...\n // Try to convert the argument to the parameter\'s type.\n if (Context.hasSameType(ParamType, ArgType)) {\n // ...\n } else if (ParamType->isBooleanType()) {\n // ...\n } else if (IsIntegralPromotion(Arg, ArgType, ParamType) || !ParamType->isEnumeralType()) {\n // ...\n } else {\n // ...\n Diag(Arg->getBeginLoc(), diag::err_template_arg_not_convertible) << Arg->getType() << ParamType << Arg->getSourceRange();"},{r,7704,"/// Check a template argument against its corresponding\n/// non-type template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.nontype].\n/// If an error occurred, it returns ExprError(); otherwise, it\n/// returns the converted template argument. \\p ParamType is the\n/// type of the non-type template parameter after it has been instantiated.\nExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n // Deal with parameters of type std::nullptr_t.\n if (ParamType->isNullPtrType()) {\n // ...\n case NPV_NotNullPointer:\n Diag(Arg->getExprLoc(), diag::err_template_arg_not_convertible) << Arg->getType() << ParamType;"}}, | ||
[l]={ | [l]={ | ||
[ | [Ac]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:68:4: error: non-type template argument of type \'const int\' cannot be converted to a value of type \'std::nullptr_t\'"} | ||
} | } | ||
}, | }, | ||
["err_template_arg_not_decl_ref"]={ | ["err_template_arg_not_decl_ref"]={ | ||
[ | [i]="err_template_arg_not_decl_ref", | ||
[ | [h]="non-type template argument does not refer to any declaration", | ||
[ | [g]="non-type template argument does not refer to any declaration", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument does not refer to any declaration", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"724a8a1fef46",1264932080,"Fix PR6159 and several other problems with value-dependent non-type template","Fix PR6159 and several other problems with value-dependent non-type template\narguments. This both prevents meaningless checks on these arguments and ensures\nthat they are represented as an expression by the instantiation.\n\nCleaned up and added standard text to the relevant test case. Also started\nadding tests for *rejected* cases. At least one FIXME here where (I think) we\nallow something we shouldn\'t. More to come in the area of rejecting crazy\narguments with decent diagnostics. Suggestions welcome for still better\ndiagnostics on these errors!\n\nllvm-svn: 94953"}, | ||
[j]={{ | [j]={{r,6741,"/// 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 // ...\n if (FirstOpKind == UO_AddrOf)\n // ...\n else if (Arg->getType()->isPointerType()) {\n // ...\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_not_decl_ref) << Arg->getSourceRange();"},{r,6831,"/// 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 (!Entity) {\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_not_decl_ref) << Arg->getSourceRange();"},{r,7354,"/// Check a template argument against its corresponding\n/// non-type template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.nontype].\n/// If an error occurred, it returns ExprError(); otherwise, it\n/// returns the converted template argument. \\p ParamType is the\n/// type of the non-type template parameter after it has been instantiated.\nExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n if (getLangOpts().CPlusPlus17) {\n // ...\n case APValue::LValue: {\n // ...\n if (Base && (!VD || isa<LifetimeExtendedTemporaryDecl, UnnamedGlobalConstantDecl>(VD))) {\n Diag(Arg->getBeginLoc(), diag::err_template_arg_not_decl_ref) << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/temp_arg_template.cpp"]={"clang/test/SemaTemplate/temp_arg_template.cpp:107:21: error: non-type template argument does not refer to any declaration"} | ["clang/test/SemaTemplate/temp_arg_template.cpp"]={"clang/test/SemaTemplate/temp_arg_template.cpp:107:21: error: non-type template argument does not refer to any declaration"} | ||
Line 5,302: | Line 5,330: | ||
}, | }, | ||
["err_template_arg_not_ice"]={ | ["err_template_arg_not_ice"]={ | ||
[ | [i]="err_template_arg_not_ice", | ||
[ | [h]="non-type template argument of type %0 is not an integral constant expression", | ||
[ | [g]="non-type template argument of type A is not an integral constant expression", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument of type (.*?) is not an integral constant expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,7496,"/// Check a template argument against its corresponding\n/// non-type template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.nontype].\n/// If an error occurred, it returns ExprError(); otherwise, it\n/// returns the converted template argument. \\p ParamType is the\n/// type of the non-type template parameter after it has been instantiated.\nExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n // C++ [temp.arg.nontype]p5:\n // The following conversions are performed on each expression used\n // as a non-type template-argument. If a non-type\n // template-argument cannot be converted to the type of the\n // corresponding template-parameter then the program is\n // ill-formed.\n if (ParamType->isIntegralOrEnumerationType()) {\n // ...\n if (!ArgType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!Arg->isValueDependent()) {\n class TmplArgICEDiagnoser : public VerifyICEDiagnoser {\n // ...\n SemaDiagnosticBuilder diagnoseNotICE(Sema &S, SourceLocation Loc) override { return S.Diag(Loc, diag::err_template_arg_not_ice) << T; }"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/constant-expression.cpp"]={"clang/test/SemaCXX/constant-expression.cpp:103:5: error: non-type template argument of type \'int\' is not an integral constant expression"} | ["clang/test/SemaCXX/constant-expression.cpp"]={"clang/test/SemaCXX/constant-expression.cpp:103:5: error: non-type template argument of type \'int\' is not an integral constant expression"} | ||
Line 5,316: | Line 5,344: | ||
}, | }, | ||
["err_template_arg_not_integral_or_enumeral"]={ | ["err_template_arg_not_integral_or_enumeral"]={ | ||
[ | [i]="err_template_arg_not_integral_or_enumeral", | ||
[ | [h]="non-type template argument of type %0 must have an integral or enumeration type", | ||
[ | [g]="non-type template argument of type A must have an integral or enumeration type", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument of type (.*?) must have an integral or enumeration type", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,7483,"/// Check a template argument against its corresponding\n/// non-type template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.nontype].\n/// If an error occurred, it returns ExprError(); otherwise, it\n/// returns the converted template argument. \\p ParamType is the\n/// type of the non-type template parameter after it has been instantiated.\nExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n // C++ [temp.arg.nontype]p5:\n // The following conversions are performed on each expression used\n // as a non-type template-argument. If a non-type\n // template-argument cannot be converted to the type of the\n // corresponding template-parameter then the program is\n // ill-formed.\n if (ParamType->isIntegralOrEnumerationType()) {\n // ...\n if (!ArgType->isIntegralOrEnumerationType()) {\n Diag(Arg->getBeginLoc(), diag::err_template_arg_not_integral_or_enumeral) << ArgType << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:35:3: error: non-type template argument of type \'X\' must have an integral or enumeration type"} | ["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:35:3: error: non-type template argument of type \'X\' must have an integral or enumeration type"} | ||
Line 5,330: | Line 5,358: | ||
}, | }, | ||
["err_template_arg_not_object_or_func"]={ | ["err_template_arg_not_object_or_func"]={ | ||
[ | [i]="err_template_arg_not_object_or_func", | ||
[ | [h]="non-type template argument does not refer to an object or function", | ||
[ | [g]="non-type template argument does not refer to an object or function", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument does not refer to an object or function", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,6862,"/// 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 // A non-type template argument must refer to an object or function.\n if (!Func && !Var && !Guid) {\n // ...\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_not_object_or_func) << Arg->getSourceRange();"}} | ||
}, | }, | ||
["err_template_arg_not_pointer_to_member_form"]={ | ["err_template_arg_not_pointer_to_member_form"]={ | ||
[ | [i]="err_template_arg_not_pointer_to_member_form", | ||
[ | [h]="non-type template argument is not a pointer to member constant", | ||
[ | [g]="non-type template argument is not a pointer to member constant", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument is not a pointer to member constant", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,7069,"/// 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 if (!DRE)\n return S.Diag(Arg->getBeginLoc(), diag::err_template_arg_not_pointer_to_member_form) << Arg->getSourceRange();"},{r,7097,"/// 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 S.Diag(Arg->getBeginLoc(), diag::err_template_arg_not_pointer_to_member_form) << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/instantiate-member-pointers.cpp"]={"clang/test/SemaTemplate/instantiate-member-pointers.cpp:73:5: error: non-type template argument is not a pointer to member constant"} | ["clang/test/SemaTemplate/instantiate-member-pointers.cpp"]={"clang/test/SemaTemplate/instantiate-member-pointers.cpp:73:5: error: non-type template argument is not a pointer to member constant"} | ||
Line 5,355: | Line 5,383: | ||
}, | }, | ||
["err_template_arg_not_valid_template"]={ | ["err_template_arg_not_valid_template"]={ | ||
[ | [i]="err_template_arg_not_valid_template", | ||
[h]="template argument does not refer to a class or alias template, or template template parameter", | |||
[g]="template argument does not refer to a class or alias template, or template template parameter", | |||
[b]=k, | |||
[e]="template argument does not refer to a class or alias template, or template template parameter", | [e]="template argument does not refer to a class or alias template, or template template parameter", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"b8b04f852637",1459025205,"[NFC] Tweak diagnostic for template template arguments, to include template aliases.","[NFC] Tweak diagnostic for template template arguments, to include template aliases.\n\nThe prior diagnostic (err_template_arg_not_class_template) would state that the template argument to a template template parameter can only be a class template, when it can also be a template alias. The newly renamed diagnostic (err_template_arg_not_valid_template) mentions template aliases.\n\nllvm-svn: 264522"}, | |||
[j]={{r,1683,"/// ActOnTemplateTemplateParameter - Called when a C++ template template\n/// parameter (e.g. T in template <template \\<typename> class T> class array)\n/// has been parsed. S is the current scope.\nNamedDecl *Sema::ActOnTemplateTemplateParameter(Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *Name, SourceLocation NameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument Default) {\n // ...\n if (!Default.isInvalid()) {\n // ...\n if (DefaultArg.getArgument().getAsTemplate().isNull()) {\n Diag(DefaultArg.getLocation(), diag::err_template_arg_not_valid_template) << DefaultArg.getSourceRange();"},{r,7773,"/// Check a template argument against its corresponding\n/// template template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.template].\n/// It returns true if an error occurred, and false otherwise.\nbool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg) {\n // ...\n // C++0x [temp.arg.template]p1:\n // A template-argument for a template template-parameter shall be\n // the name of a class template or an alias template, expressed as an\n // id-expression. When the template-argument names a class template, only\n // primary class templates are considered when matching the\n // template template argument with the corresponding parameter;\n // partial specializations are not considered even if their\n // parameter lists match that of the template template parameter.\n //\n // Note that we also allow template template parameters here, which\n // will happen when we are dealing with, e.g., class template\n // partial specializations.\n if (!isa<ClassTemplateDecl>(Template) && !isa<TemplateTemplateParmDecl>(Template) && !isa<TypeAliasTemplateDecl>(Template) && !isa<BuiltinTemplateDecl>(Template)) {\n // ...\n Diag(Arg.getLocation(), diag::err_template_arg_not_valid_template);"}} | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_template_arg_object_no_linkage"]={ | ["err_template_arg_object_no_linkage"]={ | ||
[ | [i]="err_template_arg_object_no_linkage", | ||
[ | [h]="non-type template argument refers to %select{function|object}0 %1 that does not have linkage", | ||
[ | [g]={{nil,nil,{"non-type template argument refers to ",{W,"object"}," B that does not have linkage"}}}, | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument refers to (?:function|object) (.*?) that does not have linkage", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"9380e0ea236a",1333573890,"Implement C++11 [temp.arg.nontype]\'s permission to use the address of an object","Implement C++11 [temp.arg.nontype]\'s permission to use the address of an object\nor function with internal linkage as a non-type template argument.\n\nllvm-svn: 154053"}, | ||
[j]={{ | [j]={{r,6878,"/// 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 // ...\n } else if (!Entity->hasLinkage()) {\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_object_no_linkage) << !Func << Entity << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:168:9: error: non-type template argument refers to function \'f\' that does not have linkage"} | ["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:168:9: error: non-type template argument refers to function \'f\' that does not have linkage"} | ||
Line 5,380: | Line 5,408: | ||
}, | }, | ||
["err_template_arg_overload_type"]={ | ["err_template_arg_overload_type"]={ | ||
[ | [i]="err_template_arg_overload_type", | ||
[h]="template argument is the type of an unresolved overloaded function", | |||
[g]="template argument is the type of an unresolved overloaded function", | |||
[b]=k, | |||
[e]="template argument is the type of an unresolved overloaded function", | [e]="template argument is the type of an unresolved overloaded function", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"8364e6b56856",1261437444,"When a template-id refers to a single function template, and the","When a template-id refers to a single function template, and the\nexplicitly-specified template arguments are enough to determine the\ninstantiation, and either template argument deduction fails or is not\nperformed in that context, we can resolve the template-id down to a\nfunction template specialization (so sayeth C++0x\n[temp.arg.explicit]p3). Fixes PR5811.\n\nllvm-svn: 91852"}, | |||
[j]={{r,6511,"/// 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 // ...\n } else if (Context.hasSameUnqualifiedType(Arg, Context.OverloadTy)) {\n return Diag(SR.getBegin(), diag::err_template_arg_overload_type) << SR;"}} | |||
[ | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_template_arg_ref_bind_ignores_quals"]={ | ["err_template_arg_ref_bind_ignores_quals"]={ | ||
[ | [i]="err_template_arg_ref_bind_ignores_quals", | ||
[ | [h]="reference binding of non-type template parameter %diff{of type $ to template argument of type $|to template argument}0,1 ignores qualifiers", | ||
[ | [g]={{nil,nil,{"reference binding of non-type template parameter ",{"of type A to template argument of type B","to template argument"}," ignores qualifiers"}}}, | ||
[ | [b]=k, | ||
[ | [e]="reference binding of non\\-type template parameter (?:of type (.*?) to template argument of type (.*?)|to template argument) ignores qualifiers", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,6670,"/// Checks whether the given template argument is compatible with its\n/// template parameter.\nstatic bool CheckTemplateArgumentIsCompatibleWithParameter(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, Expr *Arg, QualType ArgType) {\n // ...\n if (ParamType->isPointerType() && !ParamType->castAs<PointerType>()->getPointeeType()->isFunctionType() && S.IsQualificationConversion(ArgType, ParamType, false, ObjCLifetimeConversion)) {\n // ...\n } else {\n if (const ReferenceType *ParamRef = ParamType->getAs<ReferenceType>()) {\n if (!ParamRef->getPointeeType()->isFunctionType()) {\n // ...\n if ((ParamQuals | ArgQuals) != ParamQuals) {\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_ref_bind_ignores_quals) << ParamType << Arg->getType() << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:119:8: error: reference binding of non-type template parameter of type \'int &\' to template argument of type \'const int\' ignores qualifiers"} | ["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:119:8: error: reference binding of non-type template parameter of type \'int &\' to template argument of type \'const int\' ignores qualifiers"} | ||
Line 5,405: | Line 5,433: | ||
}, | }, | ||
["err_template_arg_reference_var"]={ | ["err_template_arg_reference_var"]={ | ||
[ | [i]="err_template_arg_reference_var", | ||
[ | [h]="non-type template argument of reference type %0 is not an object", | ||
[ | [g]="non-type template argument of reference type A is not an object", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument of reference type (.*?) is not an object", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"b242683d9992",1270146755,"Overhaul checking of non-type template arguments that should refer to","Overhaul checking of non-type template arguments that should refer to\nan object or function. Our previous checking was too lax, and ended up\nallowing missing or extraneous address-of operators, among other\nevils. The new checking provides better diagnostics and adheres more\nclosely to the standard.\n\nFixes PR6563 and PR6749.\n\nllvm-svn: 100125"}, | ||
[j]={{ | [j]={{r,6888,"/// 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 (Var) {\n // A value of reference type is not an object.\n if (Var->getType()->isReferenceType()) {\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_reference_var) << Var->getType() << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp:154:9: error: non-type template argument of reference type \'int &\' is not an object"} | ["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp:154:9: error: non-type template argument of reference type \'int &\' is not an object"} | ||
Line 5,419: | Line 5,447: | ||
}, | }, | ||
["err_template_arg_template_params_mismatch"]={ | ["err_template_arg_template_params_mismatch"]={ | ||
[ | [i]="err_template_arg_template_params_mismatch", | ||
[h]="template template argument has different template parameters than its corresponding template template parameter", | |||
[g]="template template argument has different template parameters than its corresponding template template parameter", | |||
[b]=k, | |||
[e]="template template argument has different template parameters than its corresponding template template parameter", | [e]="template template argument has different template parameters than its corresponding template template parameter", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{r,8018,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // Check the actual kind (type, non-type, template).\n if (Old->getKind() != New->getKind()) {\n if (Complain) {\n // ...\n if (TemplateArgLoc.isValid()) {\n S.Diag(TemplateArgLoc, diag::err_template_arg_template_params_mismatch);"},{r,8041,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n // Check that both are parameter packs or neither are parameter packs.\n // However, if we are matching a template template argument to a\n // template template parameter, the template template parameter can have\n // a parameter pack where the template template argument does not.\n if (Old->isTemplateParameterPack() != New->isTemplateParameterPack() && !(Kind == Sema::TPL_TemplateTemplateArgumentMatch && Old->isTemplateParameterPack())) {\n if (Complain) {\n // ...\n if (TemplateArgLoc.isValid()) {\n S.Diag(TemplateArgLoc, diag::err_template_arg_template_params_mismatch);"},{r,8080,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n // For non-type template parameters, check the type of the parameter.\n if (NonTypeTemplateParmDecl *OldNTTP = dyn_cast<NonTypeTemplateParmDecl>(Old)) {\n // ...\n // If we are matching a template template argument to a template\n // template parameter and one of the non-type template parameter types\n // is dependent, then we must wait until template instantiation time\n // to actually compare the arguments.\n if (Kind != Sema::TPL_TemplateTemplateArgumentMatch || (!OldNTTP->getType()->isDependentType() && !NewNTTP->getType()->isDependentType())) {\n // ...\n if (!S.Context.hasSameType(OldType, NewType)) {\n if (Complain) {\n // ...\n if (TemplateArgLoc.isValid()) {\n S.Diag(TemplateArgLoc, diag::err_template_arg_template_params_mismatch);"},{r,8167,"/// Diagnose a known arity mismatch when comparing template argument\n/// lists.\nstatic void DiagnoseTemplateParameterListArityMismatch(Sema &S, TemplateParameterList *New, TemplateParameterList *Old, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n if (TemplateArgLoc.isValid()) {\n S.Diag(TemplateArgLoc, diag::err_template_arg_template_params_mismatch);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:36:14: error: template template argument has different template parameters than its corresponding template template parameter"} | ["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:36:14: error: template template argument has different template parameters than its corresponding template template parameter"} | ||
Line 5,433: | Line 5,461: | ||
}, | }, | ||
["err_template_arg_thread_local"]={ | ["err_template_arg_thread_local"]={ | ||
[ | [i]="err_template_arg_thread_local", | ||
[ | [h]="non-type template argument refers to thread-local object", | ||
[ | [g]="non-type template argument refers to thread-local object", | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template argument refers to thread\\-local object", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"9380e0ea236a",1333573890,"Implement C++11 [temp.arg.nontype]\'s permission to use the address of an object","Implement C++11 [temp.arg.nontype]\'s permission to use the address of an object\nor function with internal linkage as a non-type template argument.\n\nllvm-svn: 154053"}, | ||
[j]={{ | [j]={{r,6896,"/// 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 (Var) {\n // ...\n // A template argument must have static storage duration.\n if (Var->getTLSKind()) {\n S.Diag(Arg->getBeginLoc(), diag::err_template_arg_thread_local) << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
[ | [Ac]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:33:4: error: non-type template argument refers to thread-local object"} | ||
} | } | ||
}, | }, | ||
["err_template_arg_untyped_null_constant"]={ | ["err_template_arg_untyped_null_constant"]={ | ||
[ | [i]="err_template_arg_untyped_null_constant", | ||
[ | [h]="null non-type template argument must be cast to template parameter type %0", | ||
[ | [g]="null non-type template argument must be cast to template parameter type A", | ||
[ | [b]=k, | ||
[ | [e]="null non\\-type template argument must be cast to template parameter type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"31f55dced546",1333752038,"Implement support for null non-type template arguments for non-type","Implement support for null non-type template arguments for non-type\ntemplate parameters of pointer, pointer-to-member, or nullptr_t\ntype in C++11. Fixes PR9700 / <rdar://problem/11193097>.\n\nllvm-svn: 154219"}, | ||
[j]={{ | [j]={{r,6627,"/// Determine whether the given template argument is a null pointer\n/// value of the appropriate type.\nstatic NullPointerValueKind isNullPointerValueTemplateArgument(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, Decl *Entity = nullptr) {\n // ...\n // If we don\'t have a null pointer value, but we do have a NULL pointer\n // constant, suggest a cast to the appropriate type.\n if (Arg->isNullPointerConstant(S.Context, Expr::NPC_NeverValueDependent)) {\n // ...\n S.Diag(Arg->getExprLoc(), diag::err_template_arg_untyped_null_constant) << ParamType << FixItHint::CreateInsertion(Arg->getBeginLoc(), Code) << FixItHint::CreateInsertion(S.getLocForEndOfToken(Arg->getEndLoc()), \")\");"}}, | ||
[l]={ | [l]={ | ||
[ | [Ac]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:21:4: error: null non-type template argument must be cast to template parameter type \'int *\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:22:4: error: null non-type template argument must be cast to template parameter type \'int *\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:40:4: error: null non-type template argument must be cast to template parameter type \'int X::*\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:41:4: error: null non-type template argument must be cast to template parameter type \'int X::*\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:51:5: error: null non-type template argument must be cast to template parameter type \'int (X::*)(int)\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:52:5: error: null non-type template argument must be cast to template parameter type \'int (X::*)(int)\'","clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:66:4: error: null non-type template argument must be cast to template parameter type \'std::nullptr_t\'"} | ||
} | } | ||
}, | }, | ||
["err_template_arg_wrongtype_null_constant"]={ | ["err_template_arg_wrongtype_null_constant"]={ | ||
[ | [i]="err_template_arg_wrongtype_null_constant", | ||
[ | [h]="null non-type template argument of type %0 does not match template parameter of type %1", | ||
[ | [g]="null non-type template argument of type A does not match template parameter of type B", | ||
[ | [b]=k, | ||
[ | [e]="null non\\-type template argument of type (.*?) does not match template parameter of type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"20fdef32dd31",1334077705,"Rework implementation of null non-type template arguments based on","Rework implementation of null non-type template arguments based on\nRichard\'s feedback, to properly catch non-constant expressions and\ntype mismatches. Finishes <rdar://problem/11193097>.\n\nllvm-svn: 154407"}, | ||
[j]={{ | [j]={{r,6607,"/// Determine whether the given template argument is a null pointer\n/// value of the appropriate type.\nstatic NullPointerValueKind isNullPointerValueTemplateArgument(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, Decl *Entity = nullptr) {\n // ...\n // - a constant expression that evaluates to a null pointer value (4.10); or\n // - a constant expression that evaluates to a null member pointer value\n // (4.11); or\n if ((EvalResult.Val.isLValue() && EvalResult.Val.isNullPointer()) || (EvalResult.Val.isMemberPointer() && !EvalResult.Val.getMemberPointerDecl())) {\n // ...\n S.Diag(Arg->getExprLoc(), diag::err_template_arg_wrongtype_null_constant) << Arg->getType() << ParamType << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
[ | [Ac]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:29:4: error: null non-type template argument of type \'float *\' does not match template parameter of type \'int *\'"} | ||
} | } | ||
}, | }, | ||
["err_template_defn_explicit_instantiation"]={ | ["err_template_defn_explicit_instantiation"]={ | ||
[ | [i]="err_template_defn_explicit_instantiation", | ||
[ | [h]="%select{function|class|variable}0 cannot be defined in an explicit instantiation; if this declaration is meant to be a %select{function|class|variable}0 definition, remove the \'template\' keyword", | ||
[ | [g]={{nil,nil,{{W,mc,"variable"}," cannot be defined in an explicit instantiation; if this declaration is meant to be a ",{W,mc,"variable"}," definition, remove the \'template\' keyword"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:function|class|variable) cannot be defined in an explicit instantiation; if this declaration is meant to be a (?:function|class|variable) definition, remove the \'template\' keyword", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"725de3e14ff2",1371773326,"Bug Fix: Template explicit instantiations should not have definitions (FixIts yet to be tested.)","Bug Fix: Template explicit instantiations should not have definitions (FixIts yet to be tested.)\n\nllvm-svn: 184503"}, | ||
[j]={{ | [j]={{jb,2473,"Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(Declarator &D, const ParsedTemplateInfo &TemplateInfo, ForRangeInit *FRI) {\n // ...\n case ParsedTemplateInfo::ExplicitInstantiation: {\n if (Tok.is(tok::semi)) {\n // ...\n } else {\n // ...\n // Check that this is a valid instantiation\n if (D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {\n // ...\n Diag(Tok, diag::err_template_defn_explicit_instantiation) << 2 << FixItHint::CreateRemoval(TemplateInfo.TemplateLoc);"},{Qb,2085,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (TemplateId) {\n // ...\n } else if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation && TUK == Sema::TUK_Declaration) {\n // ...\n } else if (TUK == Sema::TUK_Friend && TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate) {\n // ...\n } else {\n // ...\n if (TUK == Sema::TUK_Definition && TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation) {\n // ...\n Diag(Tok, diag::err_template_defn_explicit_instantiation) << 1 << FixItHint::CreateRemoval(TemplateInfo.TemplateLoc);"},{xd,334,"/// Parse a single declaration that declares a template,\n/// template specialization, or explicit instantiation of a template.\n///\n/// \\param DeclEnd will receive the source location of the last token\n/// within this declaration.\n///\n/// \\param AS the access specifier associated with this\n/// declaration. Will be AS_none for namespace-scope declarations.\n///\n/// \\returns the new declaration.\nDecl *Parser::ParseSingleDeclarationAfterTemplate(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject &DiagsFromTParams, SourceLocation &DeclEnd, ParsedAttributes &AccessAttrs, AccessSpecifier AS) {\n // ...\n if (DeclaratorInfo.isFunctionDeclarator() && isStartOfFunctionDefinition(DeclaratorInfo)) {\n // ...\n if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation) {\n if (DeclaratorInfo.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {\n // ...\n Diag(Tok, diag::err_template_defn_explicit_instantiation) << 0;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/explicit-instantiation.cpp"]={"clang/test/SemaTemplate/explicit-instantiation.cpp:113:24: error: function cannot be defined in an explicit instantiation; if this declaration is meant to be a function definition, remove the \'template\' keyword","clang/test/SemaTemplate/explicit-instantiation.cpp:117:31: error: function cannot be defined in an explicit instantiation; if this declaration is meant to be a function definition, remove the \'template\' keyword"} | ["clang/test/SemaTemplate/explicit-instantiation.cpp"]={"clang/test/SemaTemplate/explicit-instantiation.cpp:113:24: error: function cannot be defined in an explicit instantiation; if this declaration is meant to be a function definition, remove the \'template\' keyword","clang/test/SemaTemplate/explicit-instantiation.cpp:117:31: error: function cannot be defined in an explicit instantiation; if this declaration is meant to be a function definition, remove the \'template\' keyword"} | ||
Line 5,489: | Line 5,517: | ||
}, | }, | ||
["err_template_different_requires_clause"]={ | ["err_template_different_requires_clause"]={ | ||
[ | [i]={{nil,p,"err_template_different_requires_clause"}}, | ||
[ | [h]={{nil,p,"requires clause differs in template redeclaration"}}, | ||
[ | [g]={{nil,p,"requires clause differs in template redeclaration"}}, | ||
[ | [b]=k, | ||
[ | [e]="requires clause differs in template redeclaration", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, | ||
[j]={{ | [j]={{r,8275,"/// Determine whether the given template parameter lists are\n/// equivalent.\n///\n/// \\param New The new template parameter list, typically written in the\n/// source code as part of a new template declaration.\n///\n/// \\param Old The old template parameter list, typically found via\n/// name lookup of the template declared with this template parameter\n/// list.\n///\n/// \\param Complain If true, this routine will produce a diagnostic if\n/// the template parameter lists are not equivalent.\n///\n/// \\param Kind describes how we are to match the template parameter lists.\n///\n/// \\param TemplateArgLoc If this source location is valid, then we\n/// are actually checking the template parameter list of a template\n/// argument (New) against the template parameter list of its\n/// corresponding template template parameter (Old). We produce\n/// slightly different diagnostics in this scenario.\n///\n/// \\returns True if the template parameter lists are equal, false\n/// otherwise.\nbool Sema::TemplateParameterListsAreEqual(const NamedDecl *NewInstFrom, TemplateParameterList *New, const NamedDecl *OldInstFrom, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n if (Kind != TPL_TemplateTemplateArgumentMatch && Kind != TPL_TemplateParamsEquivalent) {\n // ...\n auto Diagnose = [&] {\n Diag(NewRC ? NewRC->getBeginLoc() : New->getTemplateLoc(), diag::err_template_different_requires_clause);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:24:1: error: requires clause differs in template redeclaration","clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:27:32: error: requires clause differs in template redeclaration","clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:32:32: error: requires clause differs in template redeclaration","clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:76:1: error: requires clause differs in template redeclaration","clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:80:50: error: requires clause differs in template redeclaration"} | ["clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:24:1: error: requires clause differs in template redeclaration","clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:27:32: error: requires clause differs in template redeclaration","clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:32:32: error: requires clause differs in template redeclaration","clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:76:1: error: requires clause differs in template redeclaration","clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:80:50: error: requires clause differs in template redeclaration"} | ||
Line 5,503: | Line 5,531: | ||
}, | }, | ||
["err_template_different_type_constraint"]={ | ["err_template_different_type_constraint"]={ | ||
[ | [i]={{nil,p,"err_template_different_type_constraint"}}, | ||
[ | [h]={{nil,p,"type constraint differs in template redeclaration"}}, | ||
[ | [g]={{nil,p,"type constraint differs in template redeclaration"}}, | ||
[ | [b]=k, | ||
[ | [e]="type constraint differs in template redeclaration", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={vc,1576172311,wc,xc}, | ||
[j]={{ | [j]={{r,8133,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n if (Kind != Sema::TPL_TemplateParamsEquivalent && Kind != Sema::TPL_TemplateTemplateArgumentMatch && !isa<TemplateTemplateParmDecl>(Old)) {\n // ...\n auto Diagnose = [&] {\n S.Diag(NewC ? NewC->getBeginLoc() : New->getBeginLoc(), diag::err_template_different_type_constraint);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:40:11: error: type constraint differs in template redeclaration"} | ["clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp:40:11: error: type constraint differs in template redeclaration"} | ||
Line 5,517: | Line 5,545: | ||
}, | }, | ||
["err_template_expansion_into_fixed_list"]={ | ["err_template_expansion_into_fixed_list"]={ | ||
[ | [i]={{nil,p,"err_template_expansion_into_fixed_list"}}, | ||
[ | [h]={{nil,p,"pack expansion used as argument for non-pack parameter of %select{alias template|concept}0"}}, | ||
[ | [g]={{nil,p,{"pack expansion used as argument for non-pack parameter of ",{"alias template","concept"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="pack expansion used as argument for non\\-pack parameter of (?:alias template|concept)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.","Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on VectorTypes that acts as a\n\'select\' in C++ mode. This patch implements the support. Types are\nconverted as closely to GCC\'s behavior as possible, though in a few\nplaces consistency with our existing vector type support was preferred.\n\nNote that this implementation is different from the OpenCL version in a\nnumber of ways, so it unfortunately required a different implementation.\n\nFirst, the SEMA rules and promotion rules are significantly different.\n\nSecondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in\nthe range 0- VectorSize, for each element). In OpenCL, the condition is\nCOND[i] < 0 ? LHS[i]: RHS[i].\n\nIn the process of implementing this, it was also required to make the\nexpression COND ? LHS : RHS type dependent if COND is type dependent,\nsince the type is now dependent on the condition. For example:\n\n T ? 1 : 2;\n\nIs not typically type dependent, since the result can be deduced from\nthe operands. HOWEVER, if T is a VectorType now, it could change this\nto a \'select\' (basically a swizzle with a non-constant mask) with the 1\nand 2 being promoted to vectors themselves.\n\nWhile this is a change, it is NOT a standards incompatible change. Based\non my (and D. Gregor\'s, at the time of writing the code) reading of the\nstandard, the expression is supposed to be type dependent if ANY\nsub-expression is type dependent.\n\nDifferential Revision: https://reviews.llvm.org/D71463"}, | ||
[j]={{ | [j]={{r,5971,"/// Check that the given template argument list is well-formed\n/// for specializing the given template.\nbool Sema::CheckTemplateArgumentList(TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted, bool UpdateArgsWithConversions, bool *ConstraintsNotSatisfied) {\n // ...\n for (TemplateParameterList::iterator Param = Params->begin(), ParamEnd = Params->end(); Param != ParamEnd; /* increment in loop */) {\n // ...\n if (ArgIdx < NumArgs) {\n // ...\n if (PackExpansionIntoNonPack && (isa<TypeAliasTemplateDecl>(Template) || isa<ConceptDecl>(Template))) {\n // ...\n Diag(NewArgs[ArgIdx].getLocation(), diag::err_template_expansion_into_fixed_list) << (isa<ConceptDecl>(Template) ? 1 : 0) << NewArgs[ArgIdx].getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp:184:24: error: pack expansion used as argument for non-pack parameter of concept"} | ["clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp:184:24: error: pack expansion used as argument for non-pack parameter of concept"} | ||
Line 5,531: | Line 5,559: | ||
}, | }, | ||
["err_template_id_not_a_type"]={ | ["err_template_id_not_a_type"]={ | ||
[ | [i]="err_template_id_not_a_type", | ||
[ | [h]="template name refers to non-type template %0", | ||
[ | [g]="template name refers to non-type template A", | ||
[ | [b]=k, | ||
[ | [e]="template name refers to non\\-type template (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"8b6070bb9df4",1299274634,"Teach Sema::ActOnCXXNestedNameSpecifier and Sema::CheckTemplateIdType","Teach Sema::ActOnCXXNestedNameSpecifier and Sema::CheckTemplateIdType\nto cope with non-type templates by providing appropriate\nerrors. Previously, we would either assert, crash, or silently build a\ndependent type when we shouldn\'t. Fixes PR9226.\n\nllvm-svn: 127037"}, | ||
[j]={{ | [j]={{r,3893,"QualType Sema::CheckTemplateIdType(TemplateName Name, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs) {\n // ...\n if (!Template || isa<FunctionTemplateDecl>(Template) || isa<VarTemplateDecl>(Template) || isa<ConceptDecl>(Template)) {\n // ...\n Diag(TemplateLoc, diag::err_template_id_not_a_type) << Name;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:104:36: error: template name refers to non-type template \'F\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:106:38: error: template name refers to non-type template \'::F\'"} | ["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:104:36: error: template name refers to non-type template \'F\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:106:38: error: template name refers to non-type template \'::F\'"} | ||
Line 5,545: | Line 5,573: | ||
}, | }, | ||
["err_template_inside_local_class"]={ | ["err_template_inside_local_class"]={ | ||
[ | [i]="err_template_inside_local_class", | ||
[h]="templates cannot be declared inside of a local class", | |||
[g]="templates cannot be declared inside of a local class", | |||
[b]=k, | |||
[e]="templates cannot be declared inside of a local class", | [e]="templates cannot be declared inside of a local class", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"766e259e38e5",1382415258,"Sema: Do not allow template declarations inside local classes","Sema: Do not allow template declarations inside local classes\n\nSummary:\nEnforce the rule in C++11 [temp.mem]p2 that local classes cannot have\nmember templates.\n\nThis fixes PR16947.\n\nN.B. C++14 has slightly different wording to afford generic lambdas\ndeclared inside of functions.\n\nFun fact: Some formulations of local classes with member templates\nwould cause clang to crash during Itanium mangling, such as the\nfollowing:\n\nvoid outer_mem() {\n struct Inner {\n template <typename = void>\n struct InnerTemplateClass {\n static void itc_mem() {}\n };\n };\n Inner::InnerTemplateClass<>::itc_mem();\n}\n\nReviewers: eli.friedman, rsmith, doug.gregor, faisalv\n\nReviewed By: doug.gregor\n\nCC: cfe-commits, ygao\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1866\n\nllvm-svn: 193144"}, | |||
[j]={{r,8343,"/// Check whether a template can be declared within this scope.\n///\n/// If the template declaration is valid in this scope, returns\n/// false. Otherwise, issues a diagnostic and returns true.\nbool Sema::CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams) {\n // ...\n // C++ [temp]p2:\n // A template-declaration can appear only as a namespace scope or\n // class scope declaration.\n // C++ [temp.expl.spec]p3:\n // An explicit specialization may be declared in any scope in which the\n // corresponding primary template may be defined.\n // C++ [temp.class.spec]p6: [P2096]\n // A partial specialization may be declared in any scope in which the\n // corresponding primary template may be defined.\n if (Ctx) {\n // ...\n if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Ctx)) {\n // C++ [temp.mem]p2:\n // A local class shall not have member templates.\n if (RD->isLocalClass())\n return Diag(TemplateParams->getTemplateLoc(), diag::err_template_inside_local_class) << TemplateParams->getSourceRange();"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp"]={"clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:8:5: error: templates cannot be declared inside of a local class","clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:9:5: error: templates cannot be declared inside of a local class","clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:10:5: error: templates cannot be declared inside of a local class","clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:11:5: error: templates cannot be declared inside of a local class","clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:12:5: error: templates cannot be declared inside of a local class"} | ["clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp"]={"clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:8:5: error: templates cannot be declared inside of a local class","clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:9:5: error: templates cannot be declared inside of a local class","clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:10:5: error: templates cannot be declared inside of a local class","clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:11:5: error: templates cannot be declared inside of a local class","clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp:12:5: error: templates cannot be declared inside of a local class"} | ||
Line 5,559: | Line 5,587: | ||
}, | }, | ||
["err_template_instantiate_undefined"]={ | ["err_template_instantiate_undefined"]={ | ||
[ | [i]="err_template_instantiate_undefined", | ||
[ | [h]="%select{implicit|explicit}0 instantiation of undefined template %1", | ||
[ | [g]={{nil,nil,{{"implicit","explicit"}," instantiation of undefined template B"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:implicit|explicit) instantiation of undefined template (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"a1f499736818",1242174359,"Semantic analysis for explicit instantiation of class templates. We","Semantic analysis for explicit instantiation of class templates. We\nstill aren\'t instantiating the definitions of class template members,\nand core issues 275 and 259 will both affect the checking that we do\nfor explicit instantiations (but are not yet implemented).\n\nllvm-svn: 71613"}, | ||
[j]={{ | [j]={{r,854,"/// Determine whether we would be unable to instantiate this template (because\n/// it either has no definition, or is in the process of being instantiated).\nbool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain /*= true*/) {\n // ...\n if (PatternDef) {\n // ...\n } else if (InstantiatedFromMember) {\n // ...\n } else {\n if (isa<FunctionDecl>(Instantiation)) {\n // ...\n } else if (isa<TagDecl>(Instantiation)) {\n Diag(PointOfInstantiation, diag::err_template_instantiate_undefined) << (TSK != TSK_ImplicitInstantiation) << InstantiationTy;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/dependent-class-member-operator.cpp"]={"clang/test/SemaTemplate/dependent-class-member-operator.cpp:10:8: error: implicit instantiation of undefined template \'C2<int>\'"} | ["clang/test/SemaTemplate/dependent-class-member-operator.cpp"]={"clang/test/SemaTemplate/dependent-class-member-operator.cpp:10:8: error: implicit instantiation of undefined template \'C2<int>\'"} | ||
Line 5,573: | Line 5,601: | ||
}, | }, | ||
["err_template_instantiate_within_definition"]={ | ["err_template_instantiate_within_definition"]={ | ||
[ | [i]="err_template_instantiate_within_definition", | ||
[ | [h]="%select{implicit|explicit}0 instantiation of template %1 within its own definition", | ||
[ | [g]={{nil,nil,{{"implicit","explicit"}," instantiation of template B within its own definition"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:implicit|explicit) instantiation of template (.*?) within its own definition", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"5476666d1738",1303886791,"Diagnose attempts to implicitly instantiate a template before it is","Diagnose attempts to implicitly instantiate a template before it is\nfully defined. Somehow this escaped notice for a very long time.\n\nllvm-svn: 130298"}, | ||
[j]={{ | [j]={{r,827,"/// Determine whether we would be unable to instantiate this template (because\n/// it either has no definition, or is in the process of being instantiated).\nbool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain /*= true*/) {\n // ...\n if (PatternDef) {\n Diag(PointOfInstantiation, diag::err_template_instantiate_within_definition) << /*implicit|explicit*/ (TSK != TSK_ImplicitInstantiation) << InstantiationTy;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/class/class.mem/p2.cpp"]={"clang/test/CXX/class/class.mem/p2.cpp:21:12: error: implicit instantiation of template \'test1::A<int>\' within its own definition"} | ["clang/test/CXX/class/class.mem/p2.cpp"]={"clang/test/CXX/class/class.mem/p2.cpp:21:12: error: implicit instantiation of template \'test1::A<int>\' within its own definition"} | ||
Line 5,587: | Line 5,615: | ||
}, | }, | ||
["err_template_kernel"]={ | ["err_template_kernel"]={ | ||
[ | [i]={{nil,D,"err_template_kernel"}}, | ||
[ | [h]={{nil,D,"kernel functions cannot be used in a template declaration, instantiation or specialization"}}, | ||
[ | [g]={{nil,D,"kernel functions cannot be used in a template declaration, instantiation or specialization"}}, | ||
[ | [b]=k, | ||
[ | [e]="kernel functions cannot be used in a template declaration, instantiation or specialization", | ||
[ | [f]=a, | ||
[ | [d]={{nil,D,m}}, | ||
[ | [c]={"d6865b7d71bc",1557238954,"[OpenCL] Prevent mangling kernel functions.","[OpenCL] Prevent mangling kernel functions.\n\nKernel function names have to be preserved as in the original\nsource to be able to access them from the host API side. \n\nThis commit also adds restriction to kernels that prevents them\nfrom being used in overloading, templates, etc.\n\nDifferential Revision: https://reviews.llvm.org/D60454\n\nllvm-svn: 360152"}, | ||
[j]={{ | [j]={{w,10714,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().OpenCL && NewFD->hasAttr<OpenCLKernelAttr>()) {\n // ...\n if (getLangOpts().OpenCLCPlusPlus) {\n // ...\n if (FunctionTemplate) {\n Diag(D.getIdentifierLoc(), diag::err_template_kernel);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaOpenCLCXX/invalid-kernel.clcpp"]={"clang/test/SemaOpenCLCXX/invalid-kernel.clcpp:14:13: error: kernel functions cannot be used in a template declaration, instantiation or specialization","clang/test/SemaOpenCLCXX/invalid-kernel.clcpp:18:13: error: kernel functions cannot be used in a template declaration, instantiation or specialization"} | ["clang/test/SemaOpenCLCXX/invalid-kernel.clcpp"]={"clang/test/SemaOpenCLCXX/invalid-kernel.clcpp:14:13: error: kernel functions cannot be used in a template declaration, instantiation or specialization","clang/test/SemaOpenCLCXX/invalid-kernel.clcpp:18:13: error: kernel functions cannot be used in a template declaration, instantiation or specialization"} | ||
Line 5,601: | Line 5,629: | ||
}, | }, | ||
["err_template_kw_missing"]={ | ["err_template_kw_missing"]={ | ||
[ | [i]="err_template_kw_missing", | ||
[ | [h]="missing \'template\' keyword prior to dependent template name \'%0%1\'", | ||
[ | [g]="missing \'template\' keyword prior to dependent template name \'AB\'", | ||
[ | [b]=k, | ||
[ | [e]="missing \'template\' keyword prior to dependent template name \'(.*?)(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"18473f329dbd",1263331724,"Improve recovery for template-ids whose template-name doesn\'t actually","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"}, | ||
[j]={{n,16153,"ExprResult Sema::BuildBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n // Handle pseudo-objects in the LHS.\n if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) {\n // ...\n // If we\'re instantiating \"a.x < b\" or \"A::x < b\" and \'x\' names a function\n // template, diagnose the missing \'template\' keyword instead of diagnosing\n // an invalid use of a bound member function.\n //\n // Note that \"A::x < b\" might be valid if \'b\' has an overloadable type due\n // to C++1z [over.over]/1.4, but we already checked for that case above.\n if (Opc == BO_LT && inTemplateInstantiation() && (pty->getKind() == BuiltinType::BoundMember || pty->getKind() == BuiltinType::Overload)) {\n // ...\n if (OE && !OE->hasTemplateKeyword() && !OE->hasExplicitTemplateArgs() && llvm::any_of(OE->decls(), [](NamedDecl *ND) { return isa<FunctionTemplateDecl>(ND); })) {\n Diag(OE->getQualifier() ? OE->getQualifierLoc().getBeginLoc() : OE->getNameLoc(), diag::err_template_kw_missing) << OE->getName().getAsString() << \"\";"},{ | [j]={{n,16153,"ExprResult Sema::BuildBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n // Handle pseudo-objects in the LHS.\n if (const BuiltinType *pty = LHSExpr->getType()->getAsPlaceholderType()) {\n // ...\n // If we\'re instantiating \"a.x < b\" or \"A::x < b\" and \'x\' names a function\n // template, diagnose the missing \'template\' keyword instead of diagnosing\n // an invalid use of a bound member function.\n //\n // Note that \"A::x < b\" might be valid if \'b\' has an overloadable type due\n // to C++1z [over.over]/1.4, but we already checked for that case above.\n if (Opc == BO_LT && inTemplateInstantiation() && (pty->getKind() == BuiltinType::BoundMember || pty->getKind() == BuiltinType::Overload)) {\n // ...\n if (OE && !OE->hasTemplateKeyword() && !OE->hasExplicitTemplateArgs() && llvm::any_of(OE->decls(), [](NamedDecl *ND) { return isa<FunctionTemplateDecl>(ND); })) {\n Diag(OE->getQualifier() ? OE->getQualifierLoc().getBeginLoc() : OE->getNameLoc(), diag::err_template_kw_missing) << OE->getName().getAsString() << \"\";"},{r,367,"bool Sema::DiagnoseUnknownTemplateName(const IdentifierInfo &II, SourceLocation IILoc, Scope *S, const CXXScopeSpec *SS, TemplateTy &SuggestedTemplate, TemplateNameKind &SuggestedKind) {\n // ...\n Diag(IILoc, diag::err_template_kw_missing) << Qualifier << II.getName() << FixItHint::CreateInsertion(IILoc, \"template \");"},{r,666,"void Sema::diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, SourceLocation Less, SourceLocation Greater) {\n // ...\n // If this is a dependent-scope lookup, diagnose that the \'template\' keyword\n // was missing.\n if (MissingTemplateKeyword) {\n Diag(NameInfo.getBeginLoc(), diag::err_template_kw_missing) << \"\" << NameInfo.getName().getAsString() << SourceRange(Less, Greater);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/dependent-template-recover.cpp"]={"clang/test/SemaTemplate/dependent-template-recover.cpp:10:8: error: missing \'template\' keyword prior to dependent template name \'f1\'","clang/test/SemaTemplate/dependent-template-recover.cpp:15:10: error: missing \'template\' keyword prior to dependent template name \'f2\'","clang/test/SemaTemplate/dependent-template-recover.cpp:16:10: error: missing \'template\' keyword prior to dependent template name \'f2\'","clang/test/SemaTemplate/dependent-template-recover.cpp:17:8: error: missing \'template\' keyword prior to dependent template name \'f2\'","clang/test/SemaTemplate/dependent-template-recover.cpp:18:8: error: missing \'template\' keyword prior to dependent template name \'f2\'","clang/test/SemaTemplate/dependent-template-recover.cpp:20:8: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:24:8: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:25:17: error: missing \'template\' keyword prior to dependent template name \'bar\'","clang/test/SemaTemplate/dependent-template-recover.cpp:28:14: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:29:8: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:33:12: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:34:8: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:36:15: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:37:10: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:38:10: error: missing \'template\' keyword prior to dependent template name \'bar\'","clang/test/SemaTemplate/dependent-template-recover.cpp:42:10: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:68:15: error: missing \'template\' keyword prior to dependent template name \'t\'","clang/test/SemaTemplate/dependent-template-recover.cpp:86:6: error: missing \'template\' keyword prior to dependent template name \'g\'","clang/test/SemaTemplate/dependent-template-recover.cpp:77:5: error: missing \'template\' keyword prior to dependent template name \'f\'","clang/test/SemaTemplate/dependent-template-recover.cpp:78:5: error: missing \'template\' keyword prior to dependent template name \'f\'","clang/test/SemaTemplate/dependent-template-recover.cpp:79:3: error: missing \'template\' keyword prior to dependent template name \'g\'"} | ["clang/test/SemaTemplate/dependent-template-recover.cpp"]={"clang/test/SemaTemplate/dependent-template-recover.cpp:10:8: error: missing \'template\' keyword prior to dependent template name \'f1\'","clang/test/SemaTemplate/dependent-template-recover.cpp:15:10: error: missing \'template\' keyword prior to dependent template name \'f2\'","clang/test/SemaTemplate/dependent-template-recover.cpp:16:10: error: missing \'template\' keyword prior to dependent template name \'f2\'","clang/test/SemaTemplate/dependent-template-recover.cpp:17:8: error: missing \'template\' keyword prior to dependent template name \'f2\'","clang/test/SemaTemplate/dependent-template-recover.cpp:18:8: error: missing \'template\' keyword prior to dependent template name \'f2\'","clang/test/SemaTemplate/dependent-template-recover.cpp:20:8: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:24:8: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:25:17: error: missing \'template\' keyword prior to dependent template name \'bar\'","clang/test/SemaTemplate/dependent-template-recover.cpp:28:14: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:29:8: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:33:12: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:34:8: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:36:15: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:37:10: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:38:10: error: missing \'template\' keyword prior to dependent template name \'bar\'","clang/test/SemaTemplate/dependent-template-recover.cpp:42:10: error: missing \'template\' keyword prior to dependent template name \'foo\'","clang/test/SemaTemplate/dependent-template-recover.cpp:68:15: error: missing \'template\' keyword prior to dependent template name \'t\'","clang/test/SemaTemplate/dependent-template-recover.cpp:86:6: error: missing \'template\' keyword prior to dependent template name \'g\'","clang/test/SemaTemplate/dependent-template-recover.cpp:77:5: error: missing \'template\' keyword prior to dependent template name \'f\'","clang/test/SemaTemplate/dependent-template-recover.cpp:78:5: error: missing \'template\' keyword prior to dependent template name \'f\'","clang/test/SemaTemplate/dependent-template-recover.cpp:79:3: error: missing \'template\' keyword prior to dependent template name \'g\'"} | ||
Line 5,615: | Line 5,643: | ||
}, | }, | ||
["err_template_kw_refers_to_dependent_non_template"]={ | ["err_template_kw_refers_to_dependent_non_template"]={ | ||
[ | [i]={{nil,q,"err_template_kw_refers_to_dependent_non_template"}}, | ||
[ | [h]={{nil,q,"%0%select{| following the \'template\' keyword}1 cannot refer to a dependent template"}}, | ||
[ | [g]={{nil,q,{"A",{a," following the \'template\' keyword"}," cannot refer to a dependent template"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(.*?)(?:| following the \'template\' keyword) cannot refer to a dependent template", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{ | [j]={{r,5193,"/// 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 Diag(Name.getBeginLoc(), diag::err_template_kw_refers_to_dependent_non_template) << GetNameFromUnqualifiedId(Name).getName() << Name.getSourceRange() << TemplateKWLoc.isValid() << TemplateKWLoc;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/literal-operators.cpp"]={"clang/test/SemaCXX/literal-operators.cpp:52:16: error: \'operator\"\"_foo\' following the \'template\' keyword cannot refer to a dependent template"} | ["clang/test/SemaCXX/literal-operators.cpp"]={"clang/test/SemaCXX/literal-operators.cpp:52:16: error: \'operator\"\"_foo\' following the \'template\' keyword cannot refer to a dependent template"} | ||
Line 5,629: | Line 5,657: | ||
}, | }, | ||
["err_template_kw_refers_to_non_template"]={ | ["err_template_kw_refers_to_non_template"]={ | ||
[ | [i]="err_template_kw_refers_to_non_template", | ||
[ | [h]={{nil,q,"%0%select{| following the \'template\' keyword}1 does not refer to a template"},{p,nil,"%0 following the \'template\' keyword does not refer to a template"}}, | ||
[ | [g]={{nil,q,{"A",{a," following the \'template\' keyword"}," does not refer to a template"}},{p,nil,"A following the \'template\' keyword does not refer to a template"}}, | ||
[ | [b]=k, | ||
[ | [e]="(.*?)(?:| following the \'template\' keyword) does not refer to a template", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"b67535d1b6d7",1238460238,"Parsing and AST representation for dependent template names that occur","Parsing and AST representation for dependent template names that occur\nwithin nested-name-specifiers, e.g., for the \"apply\" in\n\n typename MetaFun::template apply<T1, T2>::type\n\nAt present, we can\'t instantiate these nested-name-specifiers, so our\ntesting is sketchy.\n\nllvm-svn: 68081"}, | ||
[j]={{ | [j]={{r,557,"bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate, AssumedTemplateKind *ATK, bool AllowTypoCorrection) {\n // ...\n if (Found.empty()) {\n // ...\n // If a \'template\' keyword was used, a lookup that finds only non-template\n // names is an error.\n if (ExampleLookupResult && RequiredTemplate) {\n Diag(Found.getNameLoc(), diag::err_template_kw_refers_to_non_template) << Found.getLookupName() << SS.getRange() << RequiredTemplate.hasTemplateKeyword() << RequiredTemplate.getTemplateKeywordLoc();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/metafun-apply.cpp"]={"clang/test/SemaTemplate/metafun-apply.cpp:25:38: error: \'apply\' following the \'template\' keyword does not refer to a template"} | ["clang/test/SemaTemplate/metafun-apply.cpp"]={"clang/test/SemaTemplate/metafun-apply.cpp:25:38: error: \'apply\' following the \'template\' keyword does not refer to a template"} | ||
Line 5,643: | Line 5,671: | ||
}, | }, | ||
["err_template_kw_refers_to_type_template"]={ | ["err_template_kw_refers_to_type_template"]={ | ||
[ | [i]="err_template_kw_refers_to_type_template", | ||
[ | [h]="\'%0%1\' is expected to be a non-type template, but instantiated to a %select{class|type alias}2 template", | ||
[ | [g]={{nil,nil,{"\'AB\' is expected to be a non-type template, but instantiated to a ",{mc,Ic}," template"}}}, | ||
[ | [b]=k, | ||
[ | [e]="\'(.*?)(.*?)\' is expected to be a non\\-type template, but instantiated to a (?:class|type alias) template", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{r,5042,"// We actually only call this from template instantiation.\nExprResult Sema::BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs) {\n // ...\n auto DiagnoseTypeTemplateDecl = [&](TemplateDecl *Temp, bool isTypeAliasTemplateDecl) {\n Diag(NameInfo.getLoc(), diag::err_template_kw_refers_to_type_template) << SS.getScopeRep() << NameInfo.getName().getAsString() << SS.getRange() << isTypeAliasTemplateDecl;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp"]={"clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:54:61: error: \'Q::U\' is expected to be a non-type template, but instantiated to a class template"} | ["clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp"]={"clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:54:61: error: \'Q::U\' is expected to be a non-type template, but instantiated to a class template"} | ||
Line 5,657: | Line 5,685: | ||
}, | }, | ||
["err_template_linkage"]={ | ["err_template_linkage"]={ | ||
[ | [i]="err_template_linkage", | ||
[ | [h]="templates must have C++ linkage", | ||
[ | [g]="templates must have C++ linkage", | ||
[ | [b]=k, | ||
[ | [e]="templates must have C\\+\\+ linkage", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,8318,"/// Check whether a template can be declared within this scope.\n///\n/// If the template declaration is valid in this scope, returns\n/// false. Otherwise, issues a diagnostic and returns true.\nbool Sema::CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams) {\n // ...\n if (Ctx && Ctx->isExternCContext()) {\n Diag(TemplateParams->getTemplateLoc(), diag::err_template_linkage) << TemplateParams->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/over/over.oper/over.literal/p6.cpp"]={"clang/test/CXX/over/over.oper/over.literal/p6.cpp:5:12: error: templates must have C++ linkage","clang/test/CXX/over/over.oper/over.literal/p6.cpp:10:3: error: templates must have C++ linkage","clang/test/CXX/over/over.oper/over.literal/p6.cpp:13:5: error: templates must have C++ linkage"} | ["clang/test/CXX/over/over.oper/over.literal/p6.cpp"]={"clang/test/CXX/over/over.oper/over.literal/p6.cpp:5:12: error: templates must have C++ linkage","clang/test/CXX/over/over.oper/over.literal/p6.cpp:10:3: error: templates must have C++ linkage","clang/test/CXX/over/over.oper/over.literal/p6.cpp:13:5: error: templates must have C++ linkage"} | ||
Line 5,671: | Line 5,699: | ||
}, | }, | ||
["err_template_member"]={ | ["err_template_member"]={ | ||
[ | [i]="err_template_member", | ||
[ | [h]="member %0 declared as a template", | ||
[ | [g]="member A declared as a template", | ||
[ | [b]=k, | ||
[ | [e]="member (.*?) declared as a template", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"7c26c04ba95c",1316616046,"Diagnose attempts to write a templated data member, from Stepan","Diagnose attempts to write a templated data member, from Stepan\nDyatkovskiy! Fixes PR10896.\n\nllvm-svn: 140250"}, | ||
[j]={{ | [j]={{H,3558,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n // ...\n if (isInstField) {\n // ...\n // Member field could not be with \"template\" keyword.\n // So TemplateParameterLists should be empty in this case.\n if (TemplateParameterLists.size()) {\n // ...\n if (TemplateParams->size()) {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_template_member) << II << SourceRange(TemplateParams->getTemplateLoc(), TemplateParams->getRAngleLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/nested-template.cpp"]={"clang/test/SemaTemplate/nested-template.cpp:137:7: error: member \'SomeField\' declared as a template"} | ["clang/test/SemaTemplate/nested-template.cpp"]={"clang/test/SemaTemplate/nested-template.cpp:137:7: error: member \'SomeField\' declared as a template"} | ||
Line 5,685: | Line 5,713: | ||
}, | }, | ||
["err_template_member_noparams"]={ | ["err_template_member_noparams"]={ | ||
[ | [i]="err_template_member_noparams", | ||
[ | [h]="extraneous \'template<>\' in declaration of member %0", | ||
[ | [g]="extraneous \'template<>\' in declaration of member A", | ||
[ | [b]=k, | ||
[ | [e]="extraneous \'template\\<\\>\' in declaration of member (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"7c26c04ba95c",1316616046,"Diagnose attempts to write a templated data member, from Stepan","Diagnose attempts to write a templated data member, from Stepan\nDyatkovskiy! Fixes PR10896.\n\nllvm-svn: 140250"}, | ||
[j]={{ | [j]={{H,3565,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n // ...\n if (isInstField) {\n // ...\n // Member field could not be with \"template\" keyword.\n // So TemplateParameterLists should be empty in this case.\n if (TemplateParameterLists.size()) {\n // ...\n if (TemplateParams->size()) {\n // ...\n } else {\n // ...\n Diag(TemplateParams->getTemplateLoc(), diag::err_template_member_noparams) << II << SourceRange(TemplateParams->getTemplateLoc(), TemplateParams->getRAngleLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/nested-template.cpp"]={"clang/test/SemaTemplate/nested-template.cpp:138:5: error: extraneous \'template<>\' in declaration of member \'SomeField2\'"} | ["clang/test/SemaTemplate/nested-template.cpp"]={"clang/test/SemaTemplate/nested-template.cpp:138:5: error: extraneous \'template<>\' in declaration of member \'SomeField2\'"} | ||
Line 5,699: | Line 5,727: | ||
}, | }, | ||
["err_template_missing_args"]={ | ["err_template_missing_args"]={ | ||
[ | [i]="err_template_missing_args", | ||
[ | [h]="use of class template %0 requires template arguments", | ||
[ | [g]="use of class template A requires template arguments", | ||
[ | [b]=k, | ||
[ | [e]="use of (?:class template|function template|variable template|alias template|template template parameter|concept|template) (.*?) requires template arguments", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"823015d627b8",1270684986,"When a template (without arguments) is passed as a template type","When a template (without arguments) is passed as a template type\nparameter, explicitly ask the user to give it arguments. We used to\ncomplain that it wasn\'t a type and expect the user to figure it out.\n\nllvm-svn: 100729"}, | ||
[j]={{ | [j]={{r,4899,"void Sema::diagnoseMissingTemplateArguments(TemplateName Name, SourceLocation Loc) {\n Diag(Loc, diag::err_template_missing_args) << (int)getTemplateNameKindForDiagnostics(Name) << Name;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/cxx2a-constrained-template-param.cpp"]={"clang/test/Parser/cxx2a-constrained-template-param.cpp:49:27: error: use of class template \'test1\' requires template arguments"} | ["clang/test/Parser/cxx2a-constrained-template-param.cpp"]={"clang/test/Parser/cxx2a-constrained-template-param.cpp:49:27: error: use of class template \'test1\' requires template arguments"} | ||
Line 5,713: | Line 5,741: | ||
}, | }, | ||
["err_template_nontype_parm_bad_structural_type"]={ | ["err_template_nontype_parm_bad_structural_type"]={ | ||
[ | [i]={{nil,v,"err_template_nontype_parm_bad_structural_type"}}, | ||
[ | [h]={{nil,v,"a non-type template parameter cannot have type %0 before C++20"}}, | ||
[ | [g]={{nil,v,"a non-type template parameter cannot have type A before C++20"}}, | ||
[ | [b]=k, | ||
[ | [e]="a non\\-type template parameter cannot have type (.*?) before C\\+\\+20", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{r,1484,"QualType Sema::CheckNonTypeTemplateParameterType(QualType T, SourceLocation Loc) {\n // ...\n if (!getLangOpts().CPlusPlus20) {\n // ...\n Diag(Loc, diag::err_template_nontype_parm_bad_structural_type) << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p4.cpp"]={"clang/test/CXX/temp/temp.param/p4.cpp:18:16: error: a non-type template parameter cannot have type \'float\' before C++20"} | ["clang/test/CXX/temp/temp.param/p4.cpp"]={"clang/test/CXX/temp/temp.param/p4.cpp:18:16: error: a non-type template parameter cannot have type \'float\' before C++20"} | ||
Line 5,727: | Line 5,755: | ||
}, | }, | ||
["err_template_nontype_parm_bad_type"]={ | ["err_template_nontype_parm_bad_type"]={ | ||
[ | [i]="err_template_nontype_parm_bad_type", | ||
[ | [h]="a non-type template parameter cannot have type %0", | ||
[ | [g]="a non-type template parameter cannot have type A", | ||
[ | [b]=k, | ||
[ | [e]="a non\\-type template parameter cannot have type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,1349,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n // Don\'t mention structural types in our diagnostic prior to C++20. Also,\n // there\'s not much more we can say about non-scalar non-class types --\n // because we can\'t see functions or arrays here, those can only be language\n // extensions.\n if (!getLangOpts().CPlusPlus20 || (!T->isScalarType() && !T->isRecordType())) {\n Diag(Loc, diag::err_template_nontype_parm_bad_type) << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:36:24: error: a non-type template parameter cannot have type \'_Atomic(float)\'","clang/test/CXX/temp/temp.param/p7.cpp:37:22: error: a non-type template parameter cannot have type \'_Atomic(int)\'"} | ["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:36:24: error: a non-type template parameter cannot have type \'_Atomic(float)\'","clang/test/CXX/temp/temp.param/p7.cpp:37:22: error: a non-type template parameter cannot have type \'_Atomic(int)\'"} | ||
Line 5,741: | Line 5,769: | ||
}, | }, | ||
["err_template_nontype_parm_different_type"]={ | ["err_template_nontype_parm_different_type"]={ | ||
[ | [i]="err_template_nontype_parm_different_type", | ||
[ | [h]="template non-type parameter has a different type %0 in template %select{|template parameter }1redeclaration", | ||
[ | [g]={{nil,nil,{"template non-type parameter has a different type A in template ",{a,"template parameter "},"redeclaration"}}}, | ||
[ | [b]=k, | ||
[ | [e]="template non\\-type parameter has a different type (.*?) in template (?:|template parameter )redeclaration", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,8077,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n // For non-type template parameters, check the type of the parameter.\n if (NonTypeTemplateParmDecl *OldNTTP = dyn_cast<NonTypeTemplateParmDecl>(Old)) {\n // ...\n // If we are matching a template template argument to a template\n // template parameter and one of the non-type template parameter types\n // is dependent, then we must wait until template instantiation time\n // to actually compare the arguments.\n if (Kind != Sema::TPL_TemplateTemplateArgumentMatch || (!OldNTTP->getType()->isDependentType() && !NewNTTP->getType()->isDependentType())) {\n // ...\n if (!S.Context.hasSameType(OldType, NewType)) {\n if (Complain) {\n unsigned NextDiag = diag::err_template_nontype_parm_different_type;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/friend-template.cpp"]={"clang/test/SemaTemplate/friend-template.cpp:80:28: error: template non-type parameter has a different type \'long\' in template redeclaration","clang/test/SemaTemplate/friend-template.cpp:305:15: error: template non-type parameter has a different type \'char\' in template redeclaration"} | ["clang/test/SemaTemplate/friend-template.cpp"]={"clang/test/SemaTemplate/friend-template.cpp:80:28: error: template non-type parameter has a different type \'long\' in template redeclaration","clang/test/SemaTemplate/friend-template.cpp:305:15: error: template non-type parameter has a different type \'char\' in template redeclaration"} | ||
Line 5,755: | Line 5,783: | ||
}, | }, | ||
["err_template_nontype_parm_incomplete"]={ | ["err_template_nontype_parm_incomplete"]={ | ||
[ | [i]={{nil,v,"err_template_nontype_parm_incomplete"}}, | ||
[ | [h]={{nil,v,"non-type template parameter has incomplete type %0"}}, | ||
[ | [g]={{nil,v,"non-type template parameter has incomplete type A"}}, | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template parameter has incomplete type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{r,1331,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n if (RequireCompleteType(Loc, T, diag::err_template_nontype_parm_incomplete))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/invalid-template-params.cpp"]={"clang/test/SemaCXX/invalid-template-params.cpp:7:3: error: non-type template parameter has incomplete type \'class UBar\'"} | ["clang/test/SemaCXX/invalid-template-params.cpp"]={"clang/test/SemaCXX/invalid-template-params.cpp:7:3: error: non-type template parameter has incomplete type \'class UBar\'"} | ||
Line 5,769: | Line 5,797: | ||
}, | }, | ||
["err_template_nontype_parm_not_literal"]={ | ["err_template_nontype_parm_not_literal"]={ | ||
[ | [i]={{nil,v,"err_template_nontype_parm_not_literal"}}, | ||
[ | [h]={{nil,v,"non-type template parameter has non-literal type %0"}}, | ||
[ | [g]={{nil,v,"non-type template parameter has non-literal type A"}}, | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template parameter has non\\-literal type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{r,1354,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n if (RequireLiteralType(Loc, T, diag::err_template_nontype_parm_not_literal))"}} | ||
}, | }, | ||
["err_template_nontype_parm_not_structural"]={ | ["err_template_nontype_parm_not_structural"]={ | ||
[ | [i]={{nil,v,"err_template_nontype_parm_not_structural"}}, | ||
[ | [h]={{nil,v,"type %0 of non-type template parameter is not a structural type"}}, | ||
[ | [g]={{nil,v,"type A of non-type template parameter is not a structural type"}}, | ||
[ | [b]=k, | ||
[ | [e]="type (.*?) of non\\-type template parameter is not a structural type", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{r,1357,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n Diag(Loc, diag::err_template_nontype_parm_not_structural) << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:73:14: error: type \'RRef\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:78:17: error: type \'BadBase\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:83:18: error: type \'BadField\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:88:23: error: type \'BadFieldArray\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:92:23: error: type \'ProtectedBase\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:96:21: error: type \'PrivateBase\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:100:22: error: type \'Private2Base\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:106:24: error: type \'ProtectedField\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:112:22: error: type \'PrivateField\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:117:23: error: type \'Private2Field\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:122:22: error: type \'MutableField\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:125:36: error: type \'BadExtType<_Atomic(float)>\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:126:34: error: type \'BadExtType<_Atomic(int)>\' of non-type template parameter is not a structural type"} | ["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:73:14: error: type \'RRef\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:78:17: error: type \'BadBase\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:83:18: error: type \'BadField\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:88:23: error: type \'BadFieldArray\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:92:23: error: type \'ProtectedBase\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:96:21: error: type \'PrivateBase\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:100:22: error: type \'Private2Base\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:106:24: error: type \'ProtectedField\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:112:22: error: type \'PrivateField\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:117:23: error: type \'Private2Field\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:122:22: error: type \'MutableField\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:125:36: error: type \'BadExtType<_Atomic(float)>\' of non-type template parameter is not a structural type","clang/test/CXX/temp/temp.param/p7.cpp:126:34: error: type \'BadExtType<_Atomic(int)>\' of non-type template parameter is not a structural type"} | ||
Line 5,794: | Line 5,822: | ||
}, | }, | ||
["err_template_nontype_parm_rvalue_ref"]={ | ["err_template_nontype_parm_rvalue_ref"]={ | ||
[ | [i]={{nil,v,"err_template_nontype_parm_rvalue_ref"}}, | ||
[ | [h]={{nil,v,"non-type template parameter has rvalue reference type %0"}}, | ||
[ | [g]={{nil,v,"non-type template parameter has rvalue reference type A"}}, | ||
[ | [b]=k, | ||
[ | [e]="non\\-type template parameter has rvalue reference type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{r,1339,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n // Structural types are required to be object types or lvalue references.\n if (T->isRValueReferenceType()) {\n Diag(Loc, diag::err_template_nontype_parm_rvalue_ref) << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:26:16: error: non-type template parameter has rvalue reference type \'int &&\'"} | ["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:26:16: error: non-type template parameter has rvalue reference type \'int &&\'"} | ||
Line 5,808: | Line 5,836: | ||
}, | }, | ||
["err_template_outside_namespace_or_class_scope"]={ | ["err_template_outside_namespace_or_class_scope"]={ | ||
[ | [i]="err_template_outside_namespace_or_class_scope", | ||
[h]="templates can only be declared in namespace or class scope", | |||
[g]="templates can only be declared in namespace or class scope", | |||
[b]=k, | |||
[e]="templates can only be declared in namespace or class scope", | [e]="templates can only be declared in namespace or class scope", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{r,8351,"/// Check whether a template can be declared within this scope.\n///\n/// If the template declaration is valid in this scope, returns\n/// false. Otherwise, issues a diagnostic and returns true.\nbool Sema::CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams) {\n // ...\n return Diag(TemplateParams->getTemplateLoc(), diag::err_template_outside_namespace_or_class_scope) << TemplateParams->getSourceRange();"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/extern-c.cpp"]={"clang/test/SemaCXX/extern-c.cpp:265:5: error: templates can only be declared in namespace or class scope"} | ["clang/test/SemaCXX/extern-c.cpp"]={"clang/test/SemaCXX/extern-c.cpp:265:5: error: templates can only be declared in namespace or class scope"} | ||
Line 5,822: | Line 5,850: | ||
}, | }, | ||
["err_template_param_default_arg_inconsistent_redefinition"]={ | ["err_template_param_default_arg_inconsistent_redefinition"]={ | ||
[ | [i]={{nil,y,"err_template_param_default_arg_inconsistent_redefinition"}}, | ||
[ | [h]={{nil,y,"template parameter default argument is inconsistent with previous definition"}}, | ||
[ | [g]={{nil,y,"template parameter default argument is inconsistent with previous definition"}}, | ||
[ | [b]=k, | ||
[ | [e]="template parameter default argument is inconsistent with previous definition", | ||
[ | [f]=a, | ||
[ | [d]={{nil,y,m}}, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{r,3048,"/// Checks the validity of a template parameter list, possibly\n/// considering the template parameter list from a previous\n/// declaration.\n///\n/// If an \"old\" template parameter list is provided, it must be\n/// equivalent (per TemplateParameterListsAreEqual) to the \"new\"\n/// template parameter list.\n///\n/// \\param NewParams Template parameter list for a new template\n/// declaration. This template parameter list will be updated with any\n/// default arguments that are carried through from the previous\n/// template parameter list.\n///\n/// \\param OldParams If provided, template parameter list from a\n/// previous declaration of the same template. Default template\n/// arguments will be merged from the old template parameter list to\n/// the new template parameter list.\n///\n/// \\param TPC Describes the context in which we are checking the given\n/// template parameter list.\n///\n/// \\param SkipBody If we might have already made a prior merged definition\n/// of this template visible, the corresponding body-skipping information.\n/// Default argument redefinition is not an error when skipping such a body,\n/// because (under the ODR) we can assume the default arguments are the same\n/// as the prior merged definition.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody) {\n // ...\n for (TemplateParameterList::iterator NewParam = NewParams->begin(), NewParamEnd = NewParams->end(); NewParam != NewParamEnd; ++NewParam) {\n // ...\n // [basic.def.odr]/13:\n // There can be more than one definition of a\n // ...\n // default template argument\n // ...\n // in a program provided that each definition appears in a different\n // translation unit and the definitions satisfy the [same-meaning\n // criteria of the ODR].\n //\n // Simply, the design of modules allows the definition of template default\n // argument to be repeated across translation unit. Note that the ODR is\n // checked elsewhere. But it is still not allowed to repeat template default\n // argument in the same translation unit.\n if (RedundantDefaultArg) {\n // ...\n } else if (InconsistentDefaultArg) {\n // ...\n Diag(NewDefaultLoc, diag::err_template_param_default_arg_inconsistent_redefinition);"}} | ||
}, | }, | ||
["err_template_param_default_arg_missing"]={ | ["err_template_param_default_arg_missing"]={ | ||
[ | [i]="err_template_param_default_arg_missing", | ||
[h]="template parameter missing a default argument", | |||
[g]="template parameter missing a default argument", | |||
[b]=k, | |||
[e]="template parameter missing a default argument", | [e]="template parameter missing a default argument", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={u,1237025389,s,t}, | |||
[j]={{r,3060,"/// Checks the validity of a template parameter list, possibly\n/// considering the template parameter list from a previous\n/// declaration.\n///\n/// If an \"old\" template parameter list is provided, it must be\n/// equivalent (per TemplateParameterListsAreEqual) to the \"new\"\n/// template parameter list.\n///\n/// \\param NewParams Template parameter list for a new template\n/// declaration. This template parameter list will be updated with any\n/// default arguments that are carried through from the previous\n/// template parameter list.\n///\n/// \\param OldParams If provided, template parameter list from a\n/// previous declaration of the same template. Default template\n/// arguments will be merged from the old template parameter list to\n/// the new template parameter list.\n///\n/// \\param TPC Describes the context in which we are checking the given\n/// template parameter list.\n///\n/// \\param SkipBody If we might have already made a prior merged definition\n/// of this template visible, the corresponding body-skipping information.\n/// Default argument redefinition is not an error when skipping such a body,\n/// because (under the ODR) we can assume the default arguments are the same\n/// as the prior merged definition.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody) {\n // ...\n for (TemplateParameterList::iterator NewParam = NewParams->begin(), NewParamEnd = NewParams->end(); NewParam != NewParamEnd; ++NewParam) {\n // ...\n // [basic.def.odr]/13:\n // There can be more than one definition of a\n // ...\n // default template argument\n // ...\n // in a program provided that each definition appears in a different\n // translation unit and the definitions satisfy the [same-meaning\n // criteria of the ODR].\n //\n // Simply, the design of modules allows the definition of template default\n // argument to be repeated across translation unit. Note that the ODR is\n // checked elsewhere. But it is still not allowed to repeat template default\n // argument in the same translation unit.\n if (RedundantDefaultArg) {\n // ...\n } else if (InconsistentDefaultArg) {\n // ...\n } else if (MissingDefaultArg && TPC != TPC_FunctionTemplate) {\n // ...\n Diag((*NewParam)->getLocation(), diag::err_template_param_default_arg_missing);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p11.cpp"]={"clang/test/CXX/temp/temp.param/p11.cpp:6:16: error: template parameter missing a default argument","clang/test/CXX/temp/temp.param/p11.cpp:10:31: error: template parameter missing a default argument","clang/test/CXX/temp/temp.param/p11.cpp:14:14: error: template parameter missing a default argument"} | ["clang/test/CXX/temp/temp.param/p11.cpp"]={"clang/test/CXX/temp/temp.param/p11.cpp:6:16: error: template parameter missing a default argument","clang/test/CXX/temp/temp.param/p11.cpp:10:31: error: template parameter missing a default argument","clang/test/CXX/temp/temp.param/p11.cpp:14:14: error: template parameter missing a default argument"} | ||
Line 5,847: | Line 5,875: | ||
}, | }, | ||
["err_template_param_default_arg_redefinition"]={ | ["err_template_param_default_arg_redefinition"]={ | ||
[ | [i]="err_template_param_default_arg_redefinition", | ||
[h]="template parameter redefines default argument", | |||
[g]="template parameter redefines default argument", | |||
[b]=k, | |||
[e]="template parameter redefines default argument", | [e]="template parameter redefines default argument", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{r,3041,"/// Checks the validity of a template parameter list, possibly\n/// considering the template parameter list from a previous\n/// declaration.\n///\n/// If an \"old\" template parameter list is provided, it must be\n/// equivalent (per TemplateParameterListsAreEqual) to the \"new\"\n/// template parameter list.\n///\n/// \\param NewParams Template parameter list for a new template\n/// declaration. This template parameter list will be updated with any\n/// default arguments that are carried through from the previous\n/// template parameter list.\n///\n/// \\param OldParams If provided, template parameter list from a\n/// previous declaration of the same template. Default template\n/// arguments will be merged from the old template parameter list to\n/// the new template parameter list.\n///\n/// \\param TPC Describes the context in which we are checking the given\n/// template parameter list.\n///\n/// \\param SkipBody If we might have already made a prior merged definition\n/// of this template visible, the corresponding body-skipping information.\n/// Default argument redefinition is not an error when skipping such a body,\n/// because (under the ODR) we can assume the default arguments are the same\n/// as the prior merged definition.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody) {\n // ...\n for (TemplateParameterList::iterator NewParam = NewParams->begin(), NewParamEnd = NewParams->end(); NewParam != NewParamEnd; ++NewParam) {\n // ...\n // [basic.def.odr]/13:\n // There can be more than one definition of a\n // ...\n // default template argument\n // ...\n // in a program provided that each definition appears in a different\n // translation unit and the definitions satisfy the [same-meaning\n // criteria of the ODR].\n //\n // Simply, the design of modules allows the definition of template default\n // argument to be repeated across translation unit. Note that the ODR is\n // checked elsewhere. But it is still not allowed to repeat template default\n // argument in the same translation unit.\n if (RedundantDefaultArg) {\n Diag(NewDefaultLoc, diag::err_template_param_default_arg_redefinition);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:11:24: error: template parameter redefines default argument","clang/test/CXX/temp/temp.param/p12.cpp:21:34: error: template parameter redefines default argument","clang/test/CXX/temp/temp.param/p12.cpp:31:18: error: template parameter redefines default argument"} | ["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:11:24: error: template parameter redefines default argument","clang/test/CXX/temp/temp.param/p12.cpp:21:34: error: template parameter redefines default argument","clang/test/CXX/temp/temp.param/p12.cpp:31:18: error: template parameter redefines default argument"} | ||
Line 5,861: | Line 5,889: | ||
}, | }, | ||
["err_template_param_different_kind"]={ | ["err_template_param_different_kind"]={ | ||
[ | [i]="err_template_param_different_kind", | ||
[ | [h]="template parameter has a different kind in template %select{|template parameter }0redeclaration", | ||
[ | [g]={{nil,nil,{"template parameter has a different kind in template ",{a,"template parameter "},"redeclaration"}}}, | ||
[ | [b]=k, | ||
[ | [e]="template parameter has a different kind in template (?:|template parameter )redeclaration", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,8016,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // Check the actual kind (type, non-type, template).\n if (Old->getKind() != New->getKind()) {\n if (Complain) {\n unsigned NextDiag = diag::err_template_param_different_kind;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/class-template-decl.cpp"]={"clang/test/SemaTemplate/class-template-decl.cpp:35:14: error: template parameter has a different kind in template redeclaration","clang/test/SemaTemplate/class-template-decl.cpp:50:18: error: template parameter has a different kind in template redeclaration"} | ["clang/test/SemaTemplate/class-template-decl.cpp"]={"clang/test/SemaTemplate/class-template-decl.cpp:35:14: error: template parameter has a different kind in template redeclaration","clang/test/SemaTemplate/class-template-decl.cpp:50:18: error: template parameter has a different kind in template redeclaration"} | ||
Line 5,875: | Line 5,903: | ||
}, | }, | ||
["err_template_param_list_different_arity"]={ | ["err_template_param_list_different_arity"]={ | ||
[ | [i]="err_template_param_list_different_arity", | ||
[ | [h]="%select{too few|too many}0 template parameters in template %select{|template parameter }1redeclaration", | ||
[ | [g]={{nil,nil,{{"too few","too many"}," template parameters in template ",{a,"template parameter "},"redeclaration"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:too few|too many) template parameters in template (?:|template parameter )redeclaration", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,8165,"/// Diagnose a known arity mismatch when comparing template argument\n/// lists.\nstatic void DiagnoseTemplateParameterListArityMismatch(Sema &S, TemplateParameterList *New, TemplateParameterList *Old, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n unsigned NextDiag = diag::err_template_param_list_different_arity;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/libstdcxx_map_base_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_map_base_hack.cpp:20:5: error: too few template parameters in template redeclaration"} | ["clang/test/SemaCXX/libstdcxx_map_base_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_map_base_hack.cpp:20:5: error: too few template parameters in template redeclaration"} | ||
Line 5,889: | Line 5,917: | ||
}, | }, | ||
["err_template_param_list_matches_nontemplate"]={ | ["err_template_param_list_matches_nontemplate"]={ | ||
[ | [i]="err_template_param_list_matches_nontemplate", | ||
[ | [h]="template parameter list matching the non-templated nested type %0 should be empty (\'template<>\')", | ||
[ | [g]="template parameter list matching the non-templated nested type A should be empty (\'template<>\')", | ||
[ | [b]=k, | ||
[ | [e]="template parameter list matching the non\\-templated nested type (.*?) should be empty \\(\'template\\<\\>\'\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"1530138fd04d",1248975651,"Support out-of-line definitions of the members of class template","Support out-of-line definitions of the members of class template\npartial specializations.\n\nllvm-svn: 77606"}, | ||
[j]={{ | [j]={{r,3487,"/// Match the given template parameter lists to the given scope\n/// specifier, returning the template parameter list that applies to the\n/// name.\n///\n/// \\param DeclStartLoc the start of the declaration that has a scope\n/// specifier or a template parameter list.\n///\n/// \\param DeclLoc The location of the declaration itself.\n///\n/// \\param SS the scope specifier that will be matched to the given template\n/// parameter lists. This scope specifier precedes a qualified name that is\n/// being declared.\n///\n/// \\param TemplateId The template-id following the scope specifier, if there\n/// is one. Used to check for a missing \'template<>\'.\n///\n/// \\param ParamLists the template parameter lists, from the outermost to the\n/// innermost template parameter lists.\n///\n/// \\param IsFriend Whether to apply the slightly different rules for\n/// matching template parameters to scope specifiers in friend\n/// declarations.\n///\n/// \\param IsMemberSpecialization will be set true if the scope specifier\n/// denotes a fully-specialized type, and therefore this is a declaration of\n/// a member specialization.\n///\n/// \\returns the template parameter list, if any, that corresponds to the\n/// name that is preceded by the scope specifier @p SS. This template\n/// parameter list may have template parameters (if we\'re declaring a\n/// template) or may have no template parameters (if we\'re declaring a\n/// template specialization), or may be NULL (if what we\'re declaring isn\'t\n/// itself a template).\nTemplateParameterList *Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef<TemplateParameterList *> ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic) {\n // ...\n for (unsigned TypeIdx = 0, NumTypes = NestedTypes.size(); TypeIdx != NumTypes; ++TypeIdx) {\n // ...\n if (NeedEmptyTemplateHeader) {\n // ...\n if (ParamIdx < ParamLists.size()) {\n if (ParamLists[ParamIdx]->size() > 0) {\n // The header has template parameters when it shouldn\'t. Complain.\n if (!SuppressDiagnostic)\n Diag(ParamLists[ParamIdx]->getTemplateLoc(), diag::err_template_param_list_matches_nontemplate) << T << SourceRange(ParamLists[ParamIdx]->getLAngleLoc(), ParamLists[ParamIdx]->getRAngleLoc()) << getRangeOfTypeInNestedNameSpecifier(Context, T, SS);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p5-example.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p5-example.cpp:34:1: error: template parameter list matching the non-templated nested type \'A<short>\' should be empty (\'template<>\')"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p5-example.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p5-example.cpp:34:1: error: template parameter list matching the non-templated nested type \'A<short>\' should be empty (\'template<>\')"} | ||
Line 5,903: | Line 5,931: | ||
}, | }, | ||
["err_template_param_pack_default_arg"]={ | ["err_template_param_pack_default_arg"]={ | ||
[ | [i]="err_template_param_pack_default_arg", | ||
[h]="template parameter pack cannot have a default argument", | |||
[g]="template parameter pack cannot have a default argument", | |||
[b]=k, | |||
[e]="template parameter pack cannot have a default argument", | [e]="template parameter pack cannot have a default argument", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"d382435014c5",1244845813,"Parameter packs can\'t have default arguments.","Parameter packs can\'t have default arguments.\n\nllvm-svn: 73262"}, | |||
[j]={{r,1072,"/// ActOnTypeParameter - Called when a C++ template type parameter\n/// (e.g., \"typename T\") has been parsed. Typename specifies whether\n/// the keyword \"typename\" was used to declare the type parameter\n/// (otherwise, \"class\" was used), and KeyLoc is the location of the\n/// \"class\" or \"typename\" keyword. ParamName is the name of the\n/// parameter (NULL indicates an unnamed template parameter) and\n/// ParamNameLoc is the location of the parameter name (if any).\n/// If the type parameter has a default argument, it will be added\n/// later via ActOnTypeParameterDefault.\nNamedDecl *Sema::ActOnTypeParameter(Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg, bool HasTypeConstraint) {\n // ...\n // C++0x [temp.param]p9:\n // A default template-argument may be specified for any kind of\n // template-parameter that is not a template parameter pack.\n if (DefaultArg && IsParameterPack) {\n Diag(EqualLoc, diag::err_template_param_pack_default_arg);"},{r,1604,"NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *Default) {\n // ...\n // C++0x [temp.param]p9:\n // A default template-argument may be specified for any kind of\n // template-parameter that is not a template parameter pack.\n if (Default && IsParameterPack) {\n Diag(EqualLoc, diag::err_template_param_pack_default_arg);"},{r,1668,"/// ActOnTemplateTemplateParameter - Called when a C++ template template\n/// parameter (e.g. T in template <template \\<typename> class T> class array)\n/// has been parsed. S is the current scope.\nNamedDecl *Sema::ActOnTemplateTemplateParameter(Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *Name, SourceLocation NameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument Default) {\n // ...\n // C++0x [temp.param]p9:\n // A default template-argument may be specified for any kind of\n // template-parameter that is not a template parameter pack.\n if (IsParameterPack && !Default.isInvalid()) {\n Diag(EqualLoc, diag::err_template_param_pack_default_arg);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p9-0x.cpp"]={"clang/test/CXX/temp/temp.param/p9-0x.cpp:5:28: error: template parameter pack cannot have a default argument","clang/test/CXX/temp/temp.param/p9-0x.cpp:8:24: error: template parameter pack cannot have a default argument","clang/test/CXX/temp/temp.param/p9-0x.cpp:13:45: error: template parameter pack cannot have a default argument"} | ["clang/test/CXX/temp/temp.param/p9-0x.cpp"]={"clang/test/CXX/temp/temp.param/p9-0x.cpp:5:28: error: template parameter pack cannot have a default argument","clang/test/CXX/temp/temp.param/p9-0x.cpp:8:24: error: template parameter pack cannot have a default argument","clang/test/CXX/temp/temp.param/p9-0x.cpp:13:45: error: template parameter pack cannot have a default argument"} | ||
Line 5,917: | Line 5,945: | ||
}, | }, | ||
["err_template_param_pack_must_be_last_template_parameter"]={ | ["err_template_param_pack_must_be_last_template_parameter"]={ | ||
[ | [i]="err_template_param_pack_must_be_last_template_parameter", | ||
[h]="template parameter pack must be the last template parameter", | |||
[g]="template parameter pack must be the last template parameter", | |||
[b]=k, | |||
[e]="template parameter pack must be the last template parameter", | [e]="template parameter pack must be the last template parameter", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"327865db5323",1244848815,"A parameter pack must always come last in a class template.","A parameter pack must always come last in a class template.\n\nllvm-svn: 73269"}, | |||
[j]={{r,3023,"/// Checks the validity of a template parameter list, possibly\n/// considering the template parameter list from a previous\n/// declaration.\n///\n/// If an \"old\" template parameter list is provided, it must be\n/// equivalent (per TemplateParameterListsAreEqual) to the \"new\"\n/// template parameter list.\n///\n/// \\param NewParams Template parameter list for a new template\n/// declaration. This template parameter list will be updated with any\n/// default arguments that are carried through from the previous\n/// template parameter list.\n///\n/// \\param OldParams If provided, template parameter list from a\n/// previous declaration of the same template. Default template\n/// arguments will be merged from the old template parameter list to\n/// the new template parameter list.\n///\n/// \\param TPC Describes the context in which we are checking the given\n/// template parameter list.\n///\n/// \\param SkipBody If we might have already made a prior merged definition\n/// of this template visible, the corresponding body-skipping information.\n/// Default argument redefinition is not an error when skipping such a body,\n/// because (under the ODR) we can assume the default arguments are the same\n/// as the prior merged definition.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody) {\n // ...\n for (TemplateParameterList::iterator NewParam = NewParams->begin(), NewParamEnd = NewParams->end(); NewParam != NewParamEnd; ++NewParam) {\n // ...\n // C++11 [temp.param]p11:\n // If a template parameter of a primary class template or alias template\n // is a template parameter pack, it shall be the last template parameter.\n if (SawParameterPack && (NewParam + 1) != NewParamEnd && (TPC == TPC_ClassTemplate || TPC == TPC_VarTemplate || TPC == TPC_TypeAliasTemplate)) {\n Diag((*NewParam)->getLocation(), diag::err_template_param_pack_must_be_last_template_parameter);"},{r,9016,"Decl *Sema::ActOnConceptDefinition(Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr) {\n // ...\n // Ensure that the parameter pack, if present, is the last parameter in the\n // template.\n for (TemplateParameterList::const_iterator ParamIt = Params->begin(), ParamEnd = Params->end(); ParamIt != ParamEnd; ++ParamIt) {\n // ...\n if (Param->isParameterPack()) {\n // ...\n Diag(Param->getLocation(), diag::err_template_param_pack_must_be_last_template_parameter);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p11-0x.cpp"]={"clang/test/CXX/temp/temp.param/p11-0x.cpp:26:22: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:30:22: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:34:17: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:37:17: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:41:38: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:44:38: error: template parameter pack must be the last template parameter"} | ["clang/test/CXX/temp/temp.param/p11-0x.cpp"]={"clang/test/CXX/temp/temp.param/p11-0x.cpp:26:22: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:30:22: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:34:17: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:37:17: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:41:38: error: template parameter pack must be the last template parameter","clang/test/CXX/temp/temp.param/p11-0x.cpp:44:38: error: template parameter pack must be the last template parameter"} | ||
Line 5,931: | Line 5,959: | ||
}, | }, | ||
["err_template_param_shadow"]={ | ["err_template_param_shadow"]={ | ||
[ | [i]="err_template_param_shadow", | ||
[ | [h]="declaration of %0 shadows template parameter", | ||
[ | [g]="declaration of A shadows template parameter", | ||
[ | [b]=k, | ||
[ | [e]="declaration of (.*?) shadows template parameter", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{kd,1381,"void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, Declarator &ParamInfo, const DeclSpec &DS) {\n // ...\n if (TemplateParams) {\n for (const auto *TP : TemplateParams->asArray()) {\n // ...\n for (const auto &Capture : Intro.Captures) {\n if (Capture.Id == TP->getIdentifier()) {\n Diag(Capture.Loc, diag::err_template_param_shadow) << Capture.Id;"},{r,898,"/// DiagnoseTemplateParameterShadow - Produce a diagnostic complaining\n/// that the template parameter \'PrevDecl\' is being shadowed by a new\n/// declaration at location Loc. Returns true to indicate that this is\n/// an error, and false otherwise.\nvoid Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) {\n // ...\n unsigned DiagId = getLangOpts().MSVCCompat ? diag::ext_template_param_shadow : diag::err_template_param_shadow;"}}, | ||
[l]={ | [l]={ | ||
[ | [dd]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:80:11: error: declaration of \'T\' shadows template parameter","clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:98:11: error: declaration of \'T\' shadows template parameter"} | ||
} | } | ||
}, | }, | ||
["err_template_parameter_default_friend_template"]={ | ["err_template_parameter_default_friend_template"]={ | ||
[ | [i]="err_template_parameter_default_friend_template", | ||
[h]="default template argument not permitted on a friend template", | |||
[g]="default template argument not permitted on a friend template", | |||
[b]=k, | |||
[e]="default template argument not permitted on a friend template", | [e]="default template argument not permitted on a friend template", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"ed5731f68a8b",1259171439,"Diagnose ill-formed uses of default template arguments in","Diagnose ill-formed uses of default template arguments in\nfunction templates (in C++98), friend function templates, and\nout-of-line definitions of members of class templates.\n\nAlso handles merging of default template arguments from previous\ndeclarations of function templates, for C++0x. However, we don\'t yet\nmake use of those default template arguments.\n\nllvm-svn: 89872"}, | |||
[j]={{r,2742,"/// 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_FriendClassTemplate:\n case Sema::TPC_FriendFunctionTemplate:\n // ...\n S.Diag(ParamLoc, diag::err_template_parameter_default_friend_template) << DefArgRange;"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p9-0x.cpp"]={"clang/test/CXX/temp/temp.param/p9-0x.cpp:17:21: error: default template argument not permitted on a friend template"} | ["clang/test/CXX/temp/temp.param/p9-0x.cpp"]={"clang/test/CXX/temp/temp.param/p9-0x.cpp:17:21: error: default template argument not permitted on a friend template"} | ||
Line 5,959: | Line 5,987: | ||
}, | }, | ||
["err_template_parameter_default_template_member"]={ | ["err_template_parameter_default_template_member"]={ | ||
[ | [i]="err_template_parameter_default_template_member", | ||
[h]="cannot add a default template argument to the definition of a member of a class template", | |||
[g]="cannot add a default template argument to the definition of a member of a class template", | |||
[b]=k, | |||
[e]="cannot add a default template argument to the definition of a member of a class template", | [e]="cannot add a default template argument to the definition of a member of a class template", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"ed5731f68a8b",1259171439,"Diagnose ill-formed uses of default template arguments in","Diagnose ill-formed uses of default template arguments in\nfunction templates (in C++98), friend function templates, and\nout-of-line definitions of members of class templates.\n\nAlso handles merging of default template arguments from previous\ndeclarations of function templates, for C++0x. However, we don\'t yet\nmake use of those default template arguments.\n\nllvm-svn: 89872"}, | |||
[j]={{r,2733,"/// 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_ClassTemplateMember:\n // ...\n S.Diag(ParamLoc, diag::err_template_parameter_default_template_member) << DefArgRange;"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p9-0x.cpp"]={"clang/test/CXX/temp/temp.param/p9-0x.cpp:32:42: error: cannot add a default template argument to the definition of a member of a class template","clang/test/CXX/temp/temp.param/p9-0x.cpp:41:21: error: cannot add a default template argument to the definition of a member of a class template","clang/test/CXX/temp/temp.param/p9-0x.cpp:42:42: error: cannot add a default template argument to the definition of a member of a class template"} | ["clang/test/CXX/temp/temp.param/p9-0x.cpp"]={"clang/test/CXX/temp/temp.param/p9-0x.cpp:32:42: error: cannot add a default template argument to the definition of a member of a class template","clang/test/CXX/temp/temp.param/p9-0x.cpp:41:21: error: cannot add a default template argument to the definition of a member of a class template","clang/test/CXX/temp/temp.param/p9-0x.cpp:42:42: error: cannot add a default template argument to the definition of a member of a class template"} | ||
Line 5,973: | Line 6,001: | ||
}, | }, | ||
["err_template_parameter_pack_non_pack"]={ | ["err_template_parameter_pack_non_pack"]={ | ||
[ | [i]="err_template_parameter_pack_non_pack", | ||
[ | [h]="%select{template type|non-type template|template template}0 parameter%select{| pack}1 conflicts with previous %select{template type|non-type template|template template}0 parameter%select{ pack|}1", | ||
[ | [g]={{nil,nil,{{"template type","non-type template","template template"}," parameter",{a," pack"}," conflicts with previous ",{"template type","non-type template","template template"}," parameter",{" pack",a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:template type|non\\-type template|template template) parameter(?:| pack) conflicts with previous (?:template type|non\\-type template|template template) parameter(?: pack|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"2e87ca218f5d",1275640472,"When checking for equality of template parameter lists, a template","When checking for equality of template parameter lists, a template\ntype parameter pack is distinct from a template type parameter.\n\nllvm-svn: 105464"}, | ||
[j]={{ | [j]={{r,8038,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n // Check that both are parameter packs or neither are parameter packs.\n // However, if we are matching a template template argument to a\n // template template parameter, the template template parameter can have\n // a parameter pack where the template template argument does not.\n if (Old->isTemplateParameterPack() != New->isTemplateParameterPack() && !(Kind == Sema::TPL_TemplateTemplateArgumentMatch && Old->isTemplateParameterPack())) {\n if (Complain) {\n unsigned NextDiag = diag::err_template_parameter_pack_non_pack;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp"]={"clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:9:19: error: template type parameter conflicts with previous template type parameter pack","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:12:22: error: template type parameter pack conflicts with previous template type parameter","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:18:28: error: template type parameter conflicts with previous template type parameter pack","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:21:31: error: template type parameter pack conflicts with previous template type parameter","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:24:14: error: non-type template parameter conflicts with previous non-type template parameter pack","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:27:36: error: template template parameter pack conflicts with previous template template parameter"} | ["clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp"]={"clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:9:19: error: template type parameter conflicts with previous template type parameter pack","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:12:22: error: template type parameter pack conflicts with previous template type parameter","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:18:28: error: template type parameter conflicts with previous template type parameter pack","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:21:31: error: template type parameter pack conflicts with previous template type parameter","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:24:14: error: non-type template parameter conflicts with previous non-type template parameter pack","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:27:36: error: template template parameter pack conflicts with previous template template parameter"} | ||
Line 5,987: | Line 6,015: | ||
}, | }, | ||
["err_template_qualified_declarator_no_match"]={ | ["err_template_qualified_declarator_no_match"]={ | ||
[ | [i]="err_template_qualified_declarator_no_match", | ||
[ | [h]="nested name specifier \'%0\' for declaration does not refer into a class, class template or class template partial specialization", | ||
[ | [g]="nested name specifier \'A\' for declaration does not refer into a class, class template or class template partial specialization", | ||
[ | [b]=k, | ||
[ | [e]="nested name specifier \'(.*?)\' for declaration does not refer into a class, class template or class template partial specialization", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"168190d82254",1248222489,"Complain if we\'re entering the context of a dependent nested-name-specifier but","Complain if we\'re entering the context of a dependent nested-name-specifier but\ncannot match that nested-name-specifier to a class template or class template\npartial specialization.\n\nllvm-svn: 76704"}, | ||
[j]={{ | [j]={{w,6289,"NamedDecl *Sema::HandleDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n // ...\n if (D.getCXXScopeSpec().isInvalid())\n // ...\n else if (D.getCXXScopeSpec().isSet()) {\n // ...\n if (!DC || isa<EnumDecl>(DC)) {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_template_qualified_declarator_no_match) << D.getCXXScopeSpec().getScopeRep() << D.getCXXScopeSpec().getRange();"},{r,1862,"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 (SS.isNotEmpty() && !SS.isInvalid()) {\n // ...\n if (!SemanticContext) {\n // ...\n Diag(NameLoc, TUK == TUK_Friend ? diag::warn_template_qualified_friend_ignored : diag::err_template_qualified_declarator_no_match) << SS.getScopeRep() << SS.getRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/pr25181-crash-on-invalid.cpp"]={"clang/test/SemaCXX/pr25181-crash-on-invalid.cpp:6:16: error: nested name specifier \'Foo<T>::\' for declaration does not refer into a class, class template or class template partial specialization"} | ["clang/test/SemaCXX/pr25181-crash-on-invalid.cpp"]={"clang/test/SemaCXX/pr25181-crash-on-invalid.cpp:6:16: error: nested name specifier \'Foo<T>::\' for declaration does not refer into a class, class template or class template partial specialization"} | ||
Line 6,001: | Line 6,029: | ||
}, | }, | ||
["err_template_recursion_depth_exceeded"]={ | ["err_template_recursion_depth_exceeded"]={ | ||
[ | [i]="err_template_recursion_depth_exceeded", | ||
[ | [h]="recursive template instantiation exceeded maximum depth of %0", | ||
[ | [g]="recursive template instantiation exceeded maximum depth of A", | ||
[ | [b]="fatal error\\: ", | ||
[ | [e]="recursive template instantiation exceeded maximum depth of (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{"clang/lib/Sema/SemaTemplateInstantiate.cpp",723,"bool Sema::InstantiatingTemplate::CheckInstantiationDepth(SourceLocation PointOfInstantiation, SourceRange InstantiationRange) {\n // ...\n SemaRef.Diag(PointOfInstantiation, diag::err_template_recursion_depth_exceeded) << SemaRef.getLangOpts().InstantiationDepth << InstantiationRange;"}}, | [j]={{"clang/lib/Sema/SemaTemplateInstantiate.cpp",723,"bool Sema::InstantiatingTemplate::CheckInstantiationDepth(SourceLocation PointOfInstantiation, SourceRange InstantiationRange) {\n // ...\n SemaRef.Diag(PointOfInstantiation, diag::err_template_recursion_depth_exceeded) << SemaRef.getLangOpts().InstantiationDepth << InstantiationRange;"}}, | ||
[l]={ | [l]={ | ||
Line 6,015: | Line 6,043: | ||
}, | }, | ||
["err_template_spec_decl_friend"]={ | ["err_template_spec_decl_friend"]={ | ||
[ | [i]="err_template_spec_decl_friend", | ||
[h]="cannot declare an explicit specialization in a friend", | |||
[g]="cannot declare an explicit specialization in a friend", | |||
[b]=k, | |||
[e]="cannot declare an explicit specialization in a friend", | [e]="cannot declare an explicit specialization in a friend", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"816d75b7012a",1269416766,"Support friend function specializations.","Support friend function specializations.\n\nllvm-svn: 99389"}, | |||
[j]={{w,9845,"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 (TemplateParams) {\n // ...\n if (TemplateParams->size() > 0) {\n // ...\n } else {\n // ...\n // C++0x [temp.expl.spec]p20 forbids \"template<> friend void foo(int);\".\n if (isFriend) {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_template_spec_decl_friend) << Name << RemoveRange << FixItHint::CreateRemoval(RemoveRange) << FixItHint::CreateInsertion(InsertLoc, \"<>\");"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:9:26: error: cannot declare an explicit specialization in a friend","clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:18:27: error: cannot declare an explicit specialization in a friend"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:9:26: error: cannot declare an explicit specialization in a friend","clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:18:27: error: cannot declare an explicit specialization in a friend"} | ||
Line 6,029: | Line 6,057: | ||
}, | }, | ||
["err_template_spec_decl_function_scope"]={ | ["err_template_spec_decl_function_scope"]={ | ||
[ | [i]="err_template_spec_decl_function_scope", | ||
[ | [h]="explicit specialization of %0 in function scope", | ||
[ | [g]="explicit specialization of A in function scope", | ||
[ | [b]=k, | ||
[ | [e]="explicit specialization of (.*?) in function scope", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,8428,"/// 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 // C++ [temp.expl.spec]p2:\n // An explicit specialization may be declared in any scope in which\n // the corresponding primary template may be defined.\n if (S.CurContext->getRedeclContext()->isFunctionOrMethod()) {\n S.Diag(Loc, diag::err_template_spec_decl_function_scope) << Specialized;"}} | ||
}, | }, | ||
["err_template_spec_default_arg"]={ | ["err_template_spec_default_arg"]={ | ||
[ | [i]="err_template_spec_default_arg", | ||
[ | [h]="default argument not permitted on an explicit %select{instantiation|specialization}0 of function %1", | ||
[ | [g]={{nil,nil,{"default argument not permitted on an explicit ",{"instantiation","specialization"}," of function B"}}}, | ||
[ | [b]=k, | ||
[ | [e]="default argument not permitted on an explicit (?:instantiation|specialization) of function (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"62e10f0bdcaa",1255453374,"Diagnose attempts to add default function arguments to a","Diagnose attempts to add default function arguments to a\nspecialization. This completes C++ [temp.expl.spec]!\n\nllvm-svn: 83980"}, | ||
[j]={{ | [j]={{H,618,"/// 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 } else if (OldParamHasDfl) {\n // ...\n } else if (NewParamHasDfl) {\n if (New->getDescribedFunctionTemplate()) {\n // ...\n } else if (New->getTemplateSpecializationKind() != TSK_ImplicitInstantiation && New->getTemplateSpecializationKind() != TSK_Undeclared) {\n // ...\n Diag(NewParam->getLocation(), diag::err_template_spec_default_arg) << (New->getTemplateSpecializationKind() == TSK_ExplicitSpecialization) << New->getDeclName() << NewParam->getDefaultArgRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp:10:22: error: default argument not permitted on an explicit specialization of function \'mf1\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp:15:27: error: default argument not permitted on an explicit specialization of function \'mf2\'"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp:10:22: error: default argument not permitted on an explicit specialization of function \'mf1\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp:15:27: error: default argument not permitted on an explicit specialization of function \'mf2\'"} | ||
Line 6,054: | Line 6,082: | ||
}, | }, | ||
["err_template_spec_extra_headers"]={ | ["err_template_spec_extra_headers"]={ | ||
[ | [i]="err_template_spec_extra_headers", | ||
[ | [h]="extraneous template parameter list in template specialization or out-of-line template definition", | ||
[ | [g]="extraneous template parameter list in template specialization or out-of-line template definition", | ||
[ | [b]=k, | ||
[ | [e]="extraneous template parameter list in template specialization or out\\-of\\-line template definition", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,3581,"/// Match the given template parameter lists to the given scope\n/// specifier, returning the template parameter list that applies to the\n/// name.\n///\n/// \\param DeclStartLoc the start of the declaration that has a scope\n/// specifier or a template parameter list.\n///\n/// \\param DeclLoc The location of the declaration itself.\n///\n/// \\param SS the scope specifier that will be matched to the given template\n/// parameter lists. This scope specifier precedes a qualified name that is\n/// being declared.\n///\n/// \\param TemplateId The template-id following the scope specifier, if there\n/// is one. Used to check for a missing \'template<>\'.\n///\n/// \\param ParamLists the template parameter lists, from the outermost to the\n/// innermost template parameter lists.\n///\n/// \\param IsFriend Whether to apply the slightly different rules for\n/// matching template parameters to scope specifiers in friend\n/// declarations.\n///\n/// \\param IsMemberSpecialization will be set true if the scope specifier\n/// denotes a fully-specialized type, and therefore this is a declaration of\n/// a member specialization.\n///\n/// \\returns the template parameter list, if any, that corresponds to the\n/// name that is preceded by the scope specifier @p SS. This template\n/// parameter list may have template parameters (if we\'re declaring a\n/// template) or may have no template parameters (if we\'re declaring a\n/// template specialization), or may be NULL (if what we\'re declaring isn\'t\n/// itself a template).\nTemplateParameterList *Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef<TemplateParameterList *> ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic) {\n // ...\n // If there were too many template parameter lists, complain about that now.\n if (ParamIdx < ParamLists.size() - 1) {\n // ...\n if (!SuppressDiagnostic)\n Diag(ParamLists[ParamIdx]->getTemplateLoc(), AllExplicitSpecHeaders ? diag::warn_template_spec_extra_headers : diag::err_template_spec_extra_headers) << SourceRange(ParamLists[ParamIdx]->getTemplateLoc(), ParamLists[ParamLists.size() - 2]->getRAngleLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/crash-8204126.cpp"]={"clang/test/SemaTemplate/crash-8204126.cpp:4:3: error: extraneous template parameter list in template specialization or out-of-line template definition"} | ["clang/test/SemaTemplate/crash-8204126.cpp"]={"clang/test/SemaTemplate/crash-8204126.cpp:4:3: error: extraneous template parameter list in template specialization or out-of-line template definition"} | ||
Line 6,068: | Line 6,096: | ||
}, | }, | ||
["err_template_spec_friend"]={ | ["err_template_spec_friend"]={ | ||
[ | [i]="err_template_spec_friend", | ||
[h]="template specialization declaration cannot be a friend", | |||
[g]="template specialization declaration cannot be a friend", | |||
[b]=k, | |||
[e]="template specialization declaration cannot be a friend", | [e]="template specialization declaration cannot be a friend", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"3a88c1d784d8",1255444781,"Improve the internal representation and semantic analysis of friend","Improve the internal representation and semantic analysis of friend\nfunction templates.\n\nThis commit ensures that friend function templates are constructed as\nFunctionTemplateDecls rather than partial FunctionDecls (as they\npreviously were). It then implements template instantiation for friend\nfunction templates, injecting the friend function template only when\nno previous declaration exists at the time of instantiation. \n\nOh, and make sure that explicit specialization declarations are not\nfriends.\n\nllvm-svn: 83970"}, | |||
[j]={{r,8698,"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 (TemplateParams && TemplateParams->size() > 0) {\n // ...\n } else if (TemplateParams) {\n if (TUK == TUK_Friend)\n Diag(KWLoc, diag::err_template_spec_friend) << FixItHint::CreateRemoval(SourceRange(TemplateParams->getTemplateLoc(), TemplateParams->getRAngleLoc())) << SourceRange(LAngleLoc, RAngleLoc);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:10:21: error: template specialization declaration cannot be a friend","clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:22:22: error: template specialization declaration cannot be a friend"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:10:21: error: template specialization declaration cannot be a friend","clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp:22:22: error: template specialization declaration cannot be a friend"} | ||
Line 6,082: | Line 6,110: | ||
}, | }, | ||
["err_template_spec_needs_header"]={ | ["err_template_spec_needs_header"]={ | ||
[ | [i]="err_template_spec_needs_header", | ||
[ | [h]="template specialization requires \'template<>\'", | ||
[ | [g]="template specialization requires \'template<>\'", | ||
[ | [b]=k, | ||
[ | [e]="template specialization requires \'template\\<\\>\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,3393,"/// Match the given template parameter lists to the given scope\n/// specifier, returning the template parameter list that applies to the\n/// name.\n///\n/// \\param DeclStartLoc the start of the declaration that has a scope\n/// specifier or a template parameter list.\n///\n/// \\param DeclLoc The location of the declaration itself.\n///\n/// \\param SS the scope specifier that will be matched to the given template\n/// parameter lists. This scope specifier precedes a qualified name that is\n/// being declared.\n///\n/// \\param TemplateId The template-id following the scope specifier, if there\n/// is one. Used to check for a missing \'template<>\'.\n///\n/// \\param ParamLists the template parameter lists, from the outermost to the\n/// innermost template parameter lists.\n///\n/// \\param IsFriend Whether to apply the slightly different rules for\n/// matching template parameters to scope specifiers in friend\n/// declarations.\n///\n/// \\param IsMemberSpecialization will be set true if the scope specifier\n/// denotes a fully-specialized type, and therefore this is a declaration of\n/// a member specialization.\n///\n/// \\returns the template parameter list, if any, that corresponds to the\n/// name that is preceded by the scope specifier @p SS. This template\n/// parameter list may have template parameters (if we\'re declaring a\n/// template) or may have no template parameters (if we\'re declaring a\n/// template specialization), or may be NULL (if what we\'re declaring isn\'t\n/// itself a template).\nTemplateParameterList *Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef<TemplateParameterList *> ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic) {\n // ...\n auto DiagnoseMissingExplicitSpecialization = [&](SourceRange Range) {\n // ...\n if (!SuppressDiagnostic)\n Diag(DeclLoc, diag::err_template_spec_needs_header) << Range << FixItHint::CreateInsertion(ExpectedTemplateLoc, \"template<> \");"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:12:34: error: template specialization requires \'template<>\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:22:11: error: template specialization requires \'template<>\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:23:17: error: template specialization requires \'template<>\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:42:14: error: template specialization requires \'template<>\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:44:8: error: template specialization requires \'template<>\'"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:12:34: error: template specialization requires \'template<>\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:22:11: error: template specialization requires \'template<>\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:23:17: error: template specialization requires \'template<>\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:42:14: error: template specialization requires \'template<>\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:44:8: error: template specialization requires \'template<>\'"} | ||
Line 6,096: | Line 6,124: | ||
}, | }, | ||
["err_template_spec_needs_template_parameters"]={ | ["err_template_spec_needs_template_parameters"]={ | ||
[ | [i]="err_template_spec_needs_template_parameters", | ||
[ | [h]="template specialization or definition requires a template parameter list corresponding to the nested type %0", | ||
[ | [g]="template specialization or definition requires a template parameter list corresponding to the nested type A", | ||
[ | [b]=k, | ||
[ | [e]="template specialization or definition requires a template parameter list corresponding to the nested type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d8d297c0ac88",1248220411,"Basic parsing and semantic analysis for out-of-line definitions of the","Basic parsing and semantic analysis for out-of-line definitions of the\nmember functions of class templates, e.g.,\n\n template<typename T> \n struct X {\n void f(T);\n };\n\n template<typename T> X<T>::f(T) { /* ... */ }\n\nllvm-svn: 76692"}, | ||
[j]={{ | [j]={{r,3540,"/// Match the given template parameter lists to the given scope\n/// specifier, returning the template parameter list that applies to the\n/// name.\n///\n/// \\param DeclStartLoc the start of the declaration that has a scope\n/// specifier or a template parameter list.\n///\n/// \\param DeclLoc The location of the declaration itself.\n///\n/// \\param SS the scope specifier that will be matched to the given template\n/// parameter lists. This scope specifier precedes a qualified name that is\n/// being declared.\n///\n/// \\param TemplateId The template-id following the scope specifier, if there\n/// is one. Used to check for a missing \'template<>\'.\n///\n/// \\param ParamLists the template parameter lists, from the outermost to the\n/// innermost template parameter lists.\n///\n/// \\param IsFriend Whether to apply the slightly different rules for\n/// matching template parameters to scope specifiers in friend\n/// declarations.\n///\n/// \\param IsMemberSpecialization will be set true if the scope specifier\n/// denotes a fully-specialized type, and therefore this is a declaration of\n/// a member specialization.\n///\n/// \\returns the template parameter list, if any, that corresponds to the\n/// name that is preceded by the scope specifier @p SS. This template\n/// parameter list may have template parameters (if we\'re declaring a\n/// template) or may have no template parameters (if we\'re declaring a\n/// template specialization), or may be NULL (if what we\'re declaring isn\'t\n/// itself a template).\nTemplateParameterList *Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef<TemplateParameterList *> ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic) {\n // ...\n for (unsigned TypeIdx = 0, NumTypes = NestedTypes.size(); TypeIdx != NumTypes; ++TypeIdx) {\n // ...\n if (NeedNonemptyTemplateHeader) {\n // ...\n if (!SuppressDiagnostic)\n Diag(DeclLoc, diag::err_template_spec_needs_template_parameters) << T << getRangeOfTypeInNestedNameSpecifier(Context, T, SS);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:283:13: error: template specialization or definition requires a template parameter list corresponding to the nested type \'A<T>\'"} | ["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:283:13: error: template specialization or definition requires a template parameter list corresponding to the nested type \'A<T>\'"} | ||
Line 6,110: | Line 6,138: | ||
}, | }, | ||
["err_template_spec_redecl_global_scope"]={ | ["err_template_spec_redecl_global_scope"]={ | ||
[ | [i]="err_template_spec_redecl_global_scope", | ||
[ | [h]="%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 must occur at global scope", | ||
[ | [g]={{nil,nil,{{tc,"class template partial",Fc,"variable template partial",pc,"member function","static data member","member class","member enumeration"}," specialization of B must occur at global scope"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:class template|class template partial|variable template|variable template partial|function template|member function|static data member|member class|member enumeration) specialization of (.*?) must occur at global scope", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,8445,"/// 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 S.Diag(Loc, diag::err_template_spec_redecl_global_scope) << EntityKind << Specialized;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:121:18: error: variable template specialization of \'v1\' must occur at global scope","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:122:16: error: variable template specialization of \'v1\' must occur at global scope","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:126:18: error: variable template specialization of \'v1\' must occur at global scope","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:127:16: error: variable template specialization of \'v1\' must occur at global scope"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:121:18: error: variable template specialization of \'v1\' must occur at global scope","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:122:16: error: variable template specialization of \'v1\' must occur at global scope","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:126:18: error: variable template specialization of \'v1\' must occur at global scope","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:127:16: error: variable template specialization of \'v1\' must occur at global scope"} | ||
Line 6,124: | Line 6,152: | ||
}, | }, | ||
["err_template_spec_redecl_out_of_scope"]={ | ["err_template_spec_redecl_out_of_scope"]={ | ||
[ | [i]="err_template_spec_redecl_out_of_scope", | ||
[ | [h]={{nil,O,"%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"},{A,nil,"%select{class template|class template partial|variable template|variable template partial|function template|member function|static data member|member class|member enumeration}0 specialization of %1 not in a namespace enclosing %2"}}, | ||
[ | [g]={{nil,O,{{tc,"class template partial",Fc,"variable template partial",pc,"member function","static data member","member class","member enumeration"}," specialization of B not in ",{"a namespace enclosing C","class C or an enclosing namespace"}}},{A,nil,{{tc,"class template partial",Fc,"variable template partial",pc,"member function","static data member","member class","member enumeration"}," specialization of B not in a namespace enclosing C"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?: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)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{r,8449,"/// 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 int Diag = diag::err_template_spec_redecl_out_of_scope;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:81:25: error: class template specialization of \'X0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:119:20: error: variable template specialization of \'v0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:120:16: error: variable template specialization of \'v0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:124:20: error: variable template specialization of \'v0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:125:16: error: variable template specialization of \'v0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:199:28: error: member class specialization of \'Inner\' not in class \'X0\' or an enclosing namespace","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:202:33: error: member class specialization of \'Inner\' not in class \'X0\' or an enclosing namespace","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:235:23: error: class template specialization of \'InnerTemplate\' not in class \'X0<int>\' or an enclosing namespace"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:81:25: error: class template specialization of \'X0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:119:20: error: variable template specialization of \'v0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:120:16: error: variable template specialization of \'v0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:124:20: error: variable template specialization of \'v0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:125:16: error: variable template specialization of \'v0\' not in a namespace enclosing \'N0\'","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:199:28: error: member class specialization of \'Inner\' not in class \'X0\' or an enclosing namespace","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:202:33: error: member class specialization of \'Inner\' not in class \'X0\' or an enclosing namespace","clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp:235:23: error: class template specialization of \'InnerTemplate\' not in class \'X0<int>\' or an enclosing namespace"} | ||
Line 6,138: | Line 6,166: | ||
}, | }, | ||
["err_template_spec_syntax_non_template"]={ | ["err_template_spec_syntax_non_template"]={ | ||
[ | [i]="err_template_spec_syntax_non_template", | ||
[ | [h]={{nil,M,"identifier followed by \'<\' indicates a class template specialization but %0 %select{does not refer to a template|refers to a function template|<unused>|refers to a variable template|<unused>|<unused>|refers to a concept}1"},{y,D,"identifier followed by \'<\' indicates a class template specialization but %0 %select{does not refer to a template|refers to a function template|<unused>|refers to a variable template|<unused>|refers to a concept}1"},{E,nil,"identifier followed by \'<\' indicates a class template specialization but %0 %select{does not refer to a template|refers to a function template|<unused>|refers to a variable template|<unused>}1"}}, | ||
[ | [g]={{nil,M,{"identifier followed by \'<\' indicates a class template specialization but A ",{"does not refer to a template","refers to a function template",sc,"refers to a variable template",sc,sc,"refers to a concept"}}},{y,D,{"identifier followed by \'<\' indicates a class template specialization but A ",{"does not refer to a template","refers to a function template",sc,"refers to a variable template",sc,"refers to a concept"}}},{E,nil,{"identifier followed by \'<\' indicates a class template specialization but A ",{"does not refer to a template","refers to a function template",sc,"refers to a variable template",sc}}}}, | ||
[ | [b]=k, | ||
[ | [e]="identifier followed by \'\\<\' indicates a class template specialization but (.*?) (?:does not refer to a template|refers to a function template|\\<unused\\>|refers to a variable template|\\<unused\\>|\\<unused\\>|refers to a concept)", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{Qb,1802,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.is(tok::annot_template_id)) {\n // ...\n if (TemplateId && !TemplateId->mightBeType()) {\n // ...\n Diag(TemplateId->LAngleLoc, diag::err_template_spec_syntax_non_template) << TemplateId->Name << static_cast<int>(TemplateId->Kind) << Range;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp:13:14: error: identifier followed by \'<\' indicates a class template specialization but \'Ident\' refers to a function template"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp:13:14: error: identifier followed by \'<\' indicates a class template specialization but \'Ident\' refers to a function template"} | ||
Line 6,152: | Line 6,180: | ||
}, | }, | ||
["err_template_spec_unknown_kind"]={ | ["err_template_spec_unknown_kind"]={ | ||
[ | [i]="err_template_spec_unknown_kind", | ||
[ | [h]="can only provide an explicit specialization for a class template, function template, variable template, or a member function, static data member, %select{or member class|member class, or member enumeration}0 of a class template", | ||
[ | [g]={{nil,nil,{"can only provide an explicit specialization for a class template, function template, variable template, or a member function, static data member, ",{"or member class","member class, or member enumeration"}," of a class template"}}}, | ||
[ | [b]=k, | ||
[ | [e]="can only provide an explicit specialization for a class template, function template, variable template, or a member function, static data member, (?:or member class|member class, or member enumeration) of a class template", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"548886518d08",1254874412,"Refactor checking of the scope of explicit template specialization","Refactor checking of the scope of explicit template specialization\ndeclarations and explicit template instantiations, improving\ndiagnostics and making the code usable for function template\nspecializations (as well as class template specializations and partial\nspecializations). \n\nllvm-svn: 83436"}, | ||
[j]={{ | [j]={{r,8418,"/// 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 if (isa<ClassTemplateDecl>(Specialized))\n // ...\n else if (isa<VarTemplateDecl>(Specialized))\n // ...\n else if (isa<FunctionTemplateDecl>(Specialized))\n // ...\n else if (isa<CXXMethodDecl>(Specialized))\n // ...\n else if (isa<VarDecl>(Specialized))\n // ...\n else if (isa<RecordDecl>(Specialized))\n // ...\n else if (isa<EnumDecl>(Specialized) && S.getLangOpts().CPlusPlus11)\n // ...\n else {\n S.Diag(Loc, diag::err_template_spec_unknown_kind) << S.getLangOpts().CPlusPlus11;"}} | ||
}, | }, | ||
["err_template_tag_noparams"]={ | ["err_template_tag_noparams"]={ | ||
[ | [i]="err_template_tag_noparams", | ||
[ | [h]="extraneous \'template<>\' in declaration of %0 %1", | ||
[ | [g]="extraneous \'template<>\' in declaration of A B", | ||
[ | [b]=k, | ||
[ | [e]="extraneous \'template\\<\\>\' in declaration of (.*?) (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"bbe8f4662117",1255014873,"Improve checking for specializations of member classes of class","Improve checking for specializations of member classes of class\ntemplates, and keep track of how those member classes were\ninstantiated or specialized. \n\nMake sure that we don\'t try to instantiate an explicitly-specialized\nmember class of a class template, when that explicit specialization\nwas a declaration rather than a definition.\n\nllvm-svn: 83547"}, | ||
[j]={{ | [j]={{w,16817,"/// 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 // We only need to do this matching if we have template parameters\n // or a scope specifier, which also conveniently avoids this work\n // for non-C++ cases.\n if (TemplateParameterLists.size() > 0 || (SS.isNotEmpty() && TUK != TUK_Reference)) {\n if (TemplateParameterList *TemplateParams = MatchTemplateParametersToScopeSpecifier(KWLoc, NameLoc, SS, nullptr, TemplateParameterLists, TUK == TUK_Friend, isMemberSpecialization, Invalid)) {\n // ...\n if (TemplateParams->size() > 0) {\n // ...\n } else {\n // ...\n Diag(TemplateParams->getTemplateLoc(), diag::err_template_tag_noparams) << TypeWithKeyword::getTagTypeKindName(Kind) << Name;"},{H,17279,"/// Handle a friend tag declaration where the scope specifier was\n/// templated.\nDeclResult Sema::ActOnTemplatedFriendTag(Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, MultiTemplateParamsArg TempParamLists) {\n // ...\n if (TemplateParameterList *TemplateParams = MatchTemplateParametersToScopeSpecifier(TagLoc, NameLoc, SS, nullptr, TempParamLists, /*friend*/ true, IsMemberSpecialization, Invalid)) {\n if (TemplateParams->size() > 0) {\n // ...\n } else {\n // ...\n Diag(TemplateParams->getTemplateLoc(), diag::err_template_tag_noparams) << TypeWithKeyword::getTagTypeKindName(Kind) << Name;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/friend-template.cpp"]={"clang/test/SemaTemplate/friend-template.cpp:230:5: error: extraneous \'template<>\' in declaration of class \'B\'"} | ["clang/test/SemaTemplate/friend-template.cpp"]={"clang/test/SemaTemplate/friend-template.cpp:230:5: error: extraneous \'template<>\' in declaration of class \'B\'"} | ||
Line 6,177: | Line 6,205: | ||
}, | }, | ||
["err_template_template_parameter_not_at_least_as_constrained"]={ | ["err_template_template_parameter_not_at_least_as_constrained"]={ | ||
[ | [i]={{nil,p,"err_template_template_parameter_not_at_least_as_constrained"}}, | ||
[ | [h]={{nil,p,"template template argument %0 is more constrained than template template parameter %1"}}, | ||
[ | [g]={{nil,p,"template template argument A is more constrained than template template parameter B"}}, | ||
[ | [b]=k, | ||
[ | [e]="template template argument (.*?) is more constrained than template template parameter (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={vc,1576172311,wc,xc}, | ||
[j]={{ | [j]={{r,7820,"/// Check a template argument against its corresponding\n/// template template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.template].\n/// It returns true if an error occurred, and false otherwise.\nbool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg) {\n // ...\n // C++1z [temp.arg.template]p3: (DR 150)\n // A template-argument matches a template template-parameter P when P\n // is at least as specialized as the template-argument A.\n // FIXME: We should enable RelaxedTemplateTemplateArgs by default as it is a\n // defect report resolution from C++17 and shouldn\'t be introduced by\n // concepts.\n if (getLangOpts().RelaxedTemplateTemplateArgs) {\n // ...\n if (isTemplateTemplateParameterAtLeastAsSpecializedAs(Params, Template, Arg.getLocation())) {\n // ...\n if (!IsParamAtLeastAsConstrained) {\n Diag(Arg.getLocation(), diag::err_template_template_parameter_not_at_least_as_constrained) << Template << Param << Arg.getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp:14:4: error: template template argument \'Y\' is more constrained than template template parameter \'P\'","clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp:19:4: error: template template argument \'W\' is more constrained than template template parameter \'P\'","clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp:44:4: error: template template argument \'Y\' is more constrained than template template parameter \'P\'","clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp:49:4: error: template template argument \'W\' is more constrained than template template parameter \'P\'"} | ["clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp:14:4: error: template template argument \'Y\' is more constrained than template template parameter \'P\'","clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp:19:4: error: template template argument \'W\' is more constrained than template template parameter \'P\'","clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp:44:4: error: template template argument \'Y\' is more constrained than template template parameter \'P\'","clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp:49:4: error: template template argument \'W\' is more constrained than template template parameter \'P\'"} | ||
Line 6,191: | Line 6,219: | ||
}, | }, | ||
["err_template_template_parm_no_parms"]={ | ["err_template_template_parm_no_parms"]={ | ||
[ | [i]="err_template_template_parm_no_parms", | ||
[h]="template template parameter must have its own template parameters", | |||
[g]="template template parameter must have its own template parameters", | |||
[b]=k, | |||
[e]="template template parameter must have its own template parameters", | [e]="template template parameter must have its own template parameters", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"a02bb37a8c37",1287682009,"Diagnose the declaration of template template parameters that","Diagnose the declaration of template template parameters that\nthemselves have no template parameters. This is actually a restriction\ndue to the grammar of template template parameters, but we choose to\ndiagnose it in Sema to provide better recovery.\n\nllvm-svn: 117032"}, | |||
[j]={{r,1659,"/// ActOnTemplateTemplateParameter - Called when a C++ template template\n/// parameter (e.g. T in template <template \\<typename> class T> class array)\n/// has been parsed. S is the current scope.\nNamedDecl *Sema::ActOnTemplateTemplateParameter(Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *Name, SourceLocation NameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument Default) {\n // ...\n if (Params->size() == 0) {\n Diag(Param->getLocation(), diag::err_template_template_parm_no_parms) << SourceRange(Params->getLAngleLoc(), Params->getRAngleLoc());"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p1.cpp"]={"clang/test/CXX/temp/temp.param/p1.cpp:4:27: error: template template parameter must have its own template parameters"} | ["clang/test/CXX/temp/temp.param/p1.cpp"]={"clang/test/CXX/temp/temp.param/p1.cpp:4:27: error: template template parameter must have its own template parameters"} | ||
Line 6,205: | Line 6,233: | ||
}, | }, | ||
["err_template_typedef"]={ | ["err_template_typedef"]={ | ||
[ | [i]="err_template_typedef", | ||
[h]="a typedef cannot be a template", | |||
[g]="a typedef cannot be a template", | |||
[b]=k, | |||
[e]="a typedef cannot be a template", | [e]="a typedef cannot be a template", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"b52fabb2a8c2",1245798688,"Start propagating template parameter lists to the right places to","Start propagating template parameter lists to the right places to\nhandle function templates. There\'s no actual code for function\ntemplates yet, but at least we complain about typedef templates.\n\nllvm-svn: 74021"}, | |||
[j]={{w,6430,"NamedDecl *Sema::HandleDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n // ...\n if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef) {\n if (TemplateParamLists.size()) {\n Diag(D.getIdentifierLoc(), diag::err_template_typedef);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/template-decl-fail.cpp"]={"clang/test/SemaTemplate/template-decl-fail.cpp:3:32: error: a typedef cannot be a template"} | ["clang/test/SemaTemplate/template-decl-fail.cpp"]={"clang/test/SemaTemplate/template-decl-fail.cpp:3:32: error: a typedef cannot be a template"} | ||
Line 6,219: | Line 6,247: | ||
}, | }, | ||
["err_template_unnamed_class"]={ | ["err_template_unnamed_class"]={ | ||
[ | [i]="err_template_unnamed_class", | ||
[h]="cannot declare a class template with no name", | |||
[g]="cannot declare a class template with no name", | |||
[b]=k, | |||
[e]="cannot declare a class template with no name", | [e]="cannot declare a class template with no name", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={u,1237025389,s,t}, | |||
[j]={{r,1842,"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 // There is no such thing as an unnamed class template.\n if (!Name) {\n Diag(KWLoc, diag::err_template_unnamed_class);"}} | |||
[ | |||
[j]={{ | |||
}, | }, | ||
["err_template_variable_noparams"]={ | ["err_template_variable_noparams"]={ | ||
[ | [i]="err_template_variable_noparams", | ||
[ | [h]="extraneous \'template<>\' in declaration of variable %0", | ||
[ | [g]="extraneous \'template<>\' in declaration of variable A", | ||
[ | [b]=k, | ||
[ | [e]="extraneous \'template\\<\\>\' in declaration of variable (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"b09f3d82cc7e",1248283117,"Implement parsing and semantic analysis for out-of-line definitions of static","Implement parsing and semantic analysis for out-of-line definitions of static\ndata members of class templates. We don\'t instantiate the definitions yet,\nhowever.\n\nllvm-svn: 76756"}, | ||
[j]={{ | [j]={{w,7631,"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 Diag(TemplateParams->getTemplateLoc(), diag::err_template_variable_noparams) << II << SourceRange(TemplateParams->getTemplateLoc(), TemplateParams->getRAngleLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:32:3: error: extraneous \'template<>\' in declaration of variable \'foo\'"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp:32:3: error: extraneous \'template<>\' in declaration of variable \'foo\'"} | ||
Line 6,244: | Line 6,272: | ||
}, | }, | ||
["err_templated_invalid_declaration"]={ | ["err_templated_invalid_declaration"]={ | ||
[ | [i]="err_templated_invalid_declaration", | ||
[h]="a static_assert declaration cannot be a template", | |||
[g]="a static_assert declaration cannot be a template", | |||
[b]=k, | |||
[e]="a static_assert declaration cannot be a template", | [e]="a static_assert declaration cannot be a template", | ||
[f]= | [f]=a, | ||
[ | [d]=x, | ||
[c]={"e7c544d38800",1407184115,"A static_assert declaration cannot be a template; adding the diagnostic for this instead of silently...","A static_assert declaration cannot be a template; adding the diagnostic for this instead of silently accepting and producing possibly-unexpected behavior.\n\nllvm-svn: 214770"}, | |||
[j]={{xd,197,"/// Parse a single declaration that declares a template,\n/// template specialization, or explicit instantiation of a template.\n///\n/// \\param DeclEnd will receive the source location of the last token\n/// within this declaration.\n///\n/// \\param AS the access specifier associated with this\n/// declaration. Will be AS_none for namespace-scope declarations.\n///\n/// \\returns the new declaration.\nDecl *Parser::ParseSingleDeclarationAfterTemplate(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject &DiagsFromTParams, SourceLocation &DeclEnd, ParsedAttributes &AccessAttrs, AccessSpecifier AS) {\n // ...\n if (Tok.is(tok::kw_static_assert)) {\n // ...\n Diag(Tok.getLocation(), diag::err_templated_invalid_declaration) << TemplateInfo.getSourceRange();"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Parser/cxx11-templates.cpp"]={"clang/test/Parser/cxx11-templates.cpp:5:3: error: a static_assert declaration cannot be a template","clang/test/Parser/cxx11-templates.cpp:9:1: error: a static_assert declaration cannot be a template"} | ["clang/test/Parser/cxx11-templates.cpp"]={"clang/test/Parser/cxx11-templates.cpp:5:3: error: a static_assert declaration cannot be a template","clang/test/Parser/cxx11-templates.cpp:9:1: error: a static_assert declaration cannot be a template"} | ||
Line 6,258: | Line 6,286: | ||
}, | }, | ||
["err_templated_using_directive_declaration"]={ | ["err_templated_using_directive_declaration"]={ | ||
[ | [i]="err_templated_using_directive_declaration", | ||
[ | [h]="cannot template a using %select{directive|declaration}0", | ||
[ | [g]={{nil,nil,{"cannot template a using ",{"directive","declaration"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot template a using (?:directive|declaration)", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"54a6a68c706b",1447524968,"Merge some similar diagnostics using %select.","Merge some similar diagnostics using %select.\n\nllvm-svn: 253136"}, | ||
[j]={{ | [j]={{Qb,503,"/// 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 // \'using namespace\' means this is a using-directive.\n if (Tok.is(tok::kw_namespace)) {\n // Template parameters are always an error here.\n if (TemplateInfo.Kind) {\n // ...\n Diag(UsingLoc, diag::err_templated_using_directive_declaration) << 0 /* directive */ << R << FixItHint::CreateRemoval(R);"},{Qb,708,"/// 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 (TemplateInfo.Kind) {\n // ...\n Diag(UsingLoc, diag::err_templated_using_directive_declaration) << 1 /* declaration */ << R << FixItHint::CreateRemoval(R);"},{Qb,806,"/// 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 // Diagnose an attempt to declare a templated using-declaration.\n // In C++11, alias-declarations can be templates:\n // template <...> using id = type;\n if (TemplateInfo.Kind) {\n // ...\n Diag(UsingLoc, diag::err_templated_using_directive_declaration) << 1 /* declaration */ << R << FixItHint::CreateRemoval(R);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/using-directive.cpp"]={"clang/test/SemaCXX/using-directive.cpp:131:22: error: cannot template a using directive"} | ["clang/test/SemaCXX/using-directive.cpp"]={"clang/test/SemaCXX/using-directive.cpp:131:22: error: cannot template a using directive"} | ||
Line 6,272: | Line 6,300: | ||
}, | }, | ||
["err_tentative_def_incomplete_type"]={ | ["err_tentative_def_incomplete_type"]={ | ||
[ | [i]="err_tentative_def_incomplete_type", | ||
[ | [h]="tentative definition has type %0 that is never completed", | ||
[ | [g]="tentative definition has type A that is never completed", | ||
[ | [b]=k, | ||
[ | [e]="tentative definition has type (.*?) that is never completed", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{qc,1314,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n for (TentativeDefinitionsType::iterator T = TentativeDefinitions.begin(ExternalSource.get()), TEnd = TentativeDefinitions.end(); T != TEnd; ++T) {\n // ...\n } else if (RequireCompleteType(VD->getLocation(), VD->getType(), diag::err_tentative_def_incomplete_type))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Misc/verify.c"]={"clang/test/Misc/verify.c:6:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:7:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:10:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:11:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:12:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:13:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:14:10: error: tentative definition has type \'struct s\' that is never completed"} | ["clang/test/Misc/verify.c"]={"clang/test/Misc/verify.c:6:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:7:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:10:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:11:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:12:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:13:10: error: tentative definition has type \'struct s\' that is never completed","clang/test/Misc/verify.c:14:10: error: tentative definition has type \'struct s\' that is never completed"} | ||
Line 6,286: | Line 6,314: | ||
}, | }, | ||
["err_test_module_file_extension_format"]={ | ["err_test_module_file_extension_format"]={ | ||
[ | [i]="err_test_module_file_extension_format", | ||
[ | [h]="-ftest-module-file-extension argument \'%0\' is not of the required form \'blockname:major:minor:hashed:user info\'", | ||
[ | [g]="-ftest-module-file-extension argument \'A\' is not of the required form \'blockname:major:minor:hashed:user info\'", | ||
[ | [b]=k, | ||
[ | [e]="\\-ftest\\-module\\-file\\-extension argument \'(.*?)\' is not of the required form \'blockname\\:major\\:minor\\:hashed\\:user info\'", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"6623e1f10f95",1446575587,"Introduce module file extensions to piggy-back data onto module files.","Introduce module file extensions to piggy-back data onto module files.\n\nIntroduce the notion of a module file extension, which introduces\nadditional information into a module file at the time it is built that\ncan then be queried when the module file is read. Module file\nextensions are identified by a block name (which must be unique to the\nextension) and can write any bitstream records into their own\nextension block within the module file. When a module file is loaded,\nany extension blocks are matched up with module file extension\nreaders, that are per-module-file and are given access to the input\nbitstream.\n\nNote that module file extensions can only be introduced by\nprogrammatic clients that have access to the CompilerInvocation. There\nis only one such extension at the moment, which is used for testing\nthe module file extension harness. As a future direction, one could\nimagine allowing the plugin mechanism to introduce new module file\nextensions.\n\nllvm-svn: 251955"}, | ||
[j]={{"clang/lib/Frontend/CompilerInvocation.cpp",2765,"#include \"clang/Driver/Options.inc\"\n // ...\n for (const std::string &Arg : Args.getAllArgValues(OPT_ftest_module_file_extension_EQ)) {\n // ...\n if (parseTestModuleFileExtensionArg(Arg, BlockName, MajorVersion, MinorVersion, Hashed, UserInfo)) {\n Diags.Report(diag::err_test_module_file_extension_format) << Arg;"}} | [j]={{"clang/lib/Frontend/CompilerInvocation.cpp",2765,"#include \"clang/Driver/Options.inc\"\n // ...\n for (const std::string &Arg : Args.getAllArgValues(OPT_ftest_module_file_extension_EQ)) {\n // ...\n if (parseTestModuleFileExtensionArg(Arg, BlockName, MajorVersion, MinorVersion, Hashed, UserInfo)) {\n Diags.Report(diag::err_test_module_file_extension_format) << Arg;"}} | ||
}, | }, | ||
["err_test_module_file_extension_version"]={ | ["err_test_module_file_extension_version"]={ | ||
[ | [i]="err_test_module_file_extension_version", | ||
[ | [h]="test module file extension \'%0\' has different version (%1.%2) than expected (%3.%4)", | ||
[ | [g]="test module file extension \'A\' has different version (B.C) than expected (D.E)", | ||
[ | [b]=k, | ||
[ | [e]="test module file extension \'(.*?)\' has different version \\((.*?)\\.(.*?)\\) than expected \\((.*?)\\.(.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={"6623e1f10f95",1446575587,"Introduce module file extensions to piggy-back data onto module files.","Introduce module file extensions to piggy-back data onto module files.\n\nIntroduce the notion of a module file extension, which introduces\nadditional information into a module file at the time it is built that\ncan then be queried when the module file is read. Module file\nextensions are identified by a block name (which must be unique to the\nextension) and can write any bitstream records into their own\nextension block within the module file. When a module file is loaded,\nany extension blocks are matched up with module file extension\nreaders, that are per-module-file and are given access to the input\nbitstream.\n\nNote that module file extensions can only be introduced by\nprogrammatic clients that have access to the CompilerInvocation. There\nis only one such extension at the moment, which is used for testing\nthe module file extension harness. As a future direction, one could\nimagine allowing the plugin mechanism to introduce new module file\nextensions.\n\nllvm-svn: 251955"}, | ||
[j]={{"clang/lib/Frontend/TestModuleFileExtension.cpp",122,"std::unique_ptr<ModuleFileExtensionReader> TestModuleFileExtension::createExtensionReader(const ModuleFileExtensionMetadata &Metadata, ASTReader &Reader, serialization::ModuleFile &Mod, const llvm::BitstreamCursor &Stream) {\n // ...\n if (std::make_pair(Metadata.MajorVersion, Metadata.MinorVersion) != std::make_pair(MajorVersion, MinorVersion)) {\n Reader.getDiags().Report(Mod.ImportLoc, diag::err_test_module_file_extension_version) << BlockName << Metadata.MajorVersion << Metadata.MinorVersion << MajorVersion << MinorVersion;"}}, | [j]={{"clang/lib/Frontend/TestModuleFileExtension.cpp",122,"std::unique_ptr<ModuleFileExtensionReader> TestModuleFileExtension::createExtensionReader(const ModuleFileExtensionMetadata &Metadata, ASTReader &Reader, serialization::ModuleFile &Mod, const llvm::BitstreamCursor &Stream) {\n // ...\n if (std::make_pair(Metadata.MajorVersion, Metadata.MinorVersion) != std::make_pair(MajorVersion, MinorVersion)) {\n Reader.getDiags().Report(Mod.ImportLoc, diag::err_test_module_file_extension_version) << BlockName << Metadata.MajorVersion << Metadata.MinorVersion << MajorVersion << MinorVersion;"}}, | ||
[l]={ | [l]={ | ||
Line 6,311: | Line 6,339: | ||
}, | }, | ||
["err_this_capture"]={ | ["err_this_capture"]={ | ||
[ | [i]="err_this_capture", | ||
[ | [h]="\'this\' cannot be %select{implicitly |}0captured in this context", | ||
[ | [g]={{nil,nil,{"\'this\' cannot be ",{"implicitly ",a},"captured in this context"}}}, | ||
[ | [b]=k, | ||
[ | [e]="\'this\' cannot be (?:implicitly |)captured in this context", | ||
[ | [f]=a, | ||
[ | [d]="Lambda Issue", | ||
[ | [c]={"cdd11d4e7ef7",1328115861,"Introduce the lambda scope before determining explicit captures, which","Introduce the lambda scope before determining explicit captures, which\ncleans up and improves a few things:\n - We get rid of the ugly dance of computing all of the captures in\n data structures that clone those of CapturingScopeInfo, centralizing\n the logic for accessing/updating these data structures\n - We re-use the existing capture logic for \'this\', which actually\n works now.\n\nCleaned up some diagnostic wording in minor ways as well.\n\nllvm-svn: 149516"}, | ||
[j]={{ | [j]={{P,1330,"bool Sema::CheckCXXThisCapture(SourceLocation Loc, const bool Explicit, bool BuildAndDiagnose, const unsigned *const FunctionScopeIndexToStopAt, const bool ByCopy) {\n // ...\n for (int idx = MaxFunctionScopesIndex; idx >= 0; idx--) {\n if (CapturingScopeInfo *CSI = dyn_cast<CapturingScopeInfo>(FunctionScopes[idx])) {\n // ...\n if (LSI && isGenericLambdaCallOperatorSpecialization(LSI->CallOperator)) {\n // This context can\'t implicitly capture \'this\'; fail out.\n if (BuildAndDiagnose) {\n Diag(Loc, diag::err_this_capture) << (Explicit && idx == MaxFunctionScopesIndex);"},{P,1352,"bool Sema::CheckCXXThisCapture(SourceLocation Loc, const bool Explicit, bool BuildAndDiagnose, const unsigned *const FunctionScopeIndexToStopAt, const bool ByCopy) {\n // ...\n for (int idx = MaxFunctionScopesIndex; idx >= 0; idx--) {\n if (CapturingScopeInfo *CSI = dyn_cast<CapturingScopeInfo>(FunctionScopes[idx])) {\n // ...\n // This context can\'t implicitly capture \'this\'; fail out.\n if (BuildAndDiagnose)\n Diag(Loc, diag::err_this_capture) << (Explicit && idx == MaxFunctionScopesIndex);"},{kd,1051,"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 if (ThisCaptureType.isNull()) {\n Diag(C->Loc, diag::err_this_capture) << true;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/lambda-misplaced-capture-default.cpp"]={"clang/test/Parser/lambda-misplaced-capture-default.cpp:20:7: error: \'this\' cannot be captured in this context"} | ["clang/test/Parser/lambda-misplaced-capture-default.cpp"]={"clang/test/Parser/lambda-misplaced-capture-default.cpp:20:7: error: \'this\' cannot be captured in this context"} | ||
Line 6,325: | Line 6,353: | ||
}, | }, | ||
["err_this_captured_by_reference"]={ | ["err_this_captured_by_reference"]={ | ||
[ | [i]="err_this_captured_by_reference", | ||
[h]="\'this\' cannot be captured by reference", | |||
[g]="\'this\' cannot be captured by reference", | |||
[b]=k, | |||
[e]="\'this\' cannot be captured by reference", | [e]="\'this\' cannot be captured by reference", | ||
[f | [f]=a, | ||
[d]=x, | |||
[c]={"db0b9f126459",1312471847,"Parsing of C++0x lambda expressions, from John Freeman with help from","Parsing of C++0x lambda expressions, from John Freeman with help from\nDavid Blaikie!\n\nllvm-svn: 136876"}, | |||
[j]={{Vb,969,"/// Parse a lambda introducer.\n/// \\param Intro A LambdaIntroducer filled in with information about the\n/// contents of the lambda-introducer.\n/// \\param Tentative If non-null, we are disambiguating between a\n/// lambda-introducer and some other construct. In this mode, we do not\n/// produce any diagnostics or take any other irreversible action unless\n/// we\'re sure that this is a lambda-expression.\n/// \\return \\c true if parsing (or disambiguation) failed with a diagnostic and\n/// the caller should bail out / recover.\nbool Parser::ParseLambdaIntroducer(LambdaIntroducer &Intro, LambdaIntroducerTentativeParse *Tentative) {\n // ...\n while (Tok.isNot(tok::r_square)) {\n // ...\n if (Tok.is(tok::star)) {\n // ...\n } else if (Tok.is(tok::kw_this)) {\n // ...\n } else if (Tok.isOneOf(tok::amp, tok::equal) && NextToken().isOneOf(tok::comma, tok::r_square) && Intro.Default == LCD_None) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.is(tok::kw_this)) {\n return Invalid([&] {\n // ...\n Diag(Tok.getLocation(), diag::err_this_captured_by_reference);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Parser/cxx0x-lambda-expressions.cpp"]={"clang/test/Parser/cxx0x-lambda-expressions.cpp:17:11: error: \'this\' cannot be captured by reference","clang/test/Parser/cxx0x-lambda-expressions.cpp:18:7: error: \'this\' cannot be captured by reference"} | ["clang/test/Parser/cxx0x-lambda-expressions.cpp"]={"clang/test/Parser/cxx0x-lambda-expressions.cpp:17:11: error: \'this\' cannot be captured by reference","clang/test/Parser/cxx0x-lambda-expressions.cpp:18:7: error: \'this\' cannot be captured by reference"} | ||
Line 6,339: | Line 6,367: | ||
}, | }, | ||
["err_this_static_member_func"]={ | ["err_this_static_member_func"]={ | ||
[ | [i]="err_this_static_member_func", | ||
[ | [h]="\'this\' cannot be%select{| implicitly}0 used in a static member function declaration", | ||
[ | [g]={{nil,nil,{"\'this\' cannot be",{a," implicitly"}," used in a static member function declaration"}}}, | ||
[ | [b]=k, | ||
[ | [e]="\'this\' cannot be(?:| implicitly) used in a static member function declaration", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"3024f07c1232",1334559922,"Implement C++11 [expr.prim.general]p3, which permits the use of \'this\'","Implement C++11 [expr.prim.general]p3, which permits the use of \'this\'\nin the declaration of a non-static member function after the\n(optional) cv-qualifier-seq, which in practice means in the exception\nspecification and late-specified return type. \n\nThe new scheme here used to manage \'this\' outside of a member function\nscope is more general than the Scope-based mechanism previously used\nfor non-static data member initializers and late-parsesd attributes,\nbecause it can also handle the cv-qualifiers on the member\nfunction. Note, however, that a separate pass is required for static\nmember functions to determine whether \'this\' was used, because we\nmight not know that we have a static function until after declaration\nmatching.\n\nFinally, this introduces name mangling for \'this\' and for the implicit\n\'this\', which is intended to match GCC\'s mangling. Independent\nverification for the new mangling test case would be appreciated.\n\nFixes PR10036 and PR12450.\n\nllvm-svn: 154799"}, | ||
[j]={{ | [j]={{H,18588,"/// AST visitor that finds references to the \'this\' expression.\nclass FindCXXThisExpr : public RecursiveASTVisitor<FindCXXThisExpr> {\n // ...\n bool VisitCXXThisExpr(CXXThisExpr *E) {\n S.Diag(E->getLocation(), diag::err_this_static_member_func) << E->isImplicit();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp:112:33: error: \'this\' cannot be implicitly used in a static member function declaration","clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp:113:33: error: \'this\' cannot be used in a static member function declaration","clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp:117:38: error: \'this\' cannot be implicitly used in a static member function declaration","clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp:120:28: error: \'this\' cannot be implicitly used in a static member function declaration"} | ["clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp:112:33: error: \'this\' cannot be implicitly used in a static member function declaration","clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp:113:33: error: \'this\' cannot be used in a static member function declaration","clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp:117:38: error: \'this\' cannot be implicitly used in a static member function declaration","clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp:120:28: error: \'this\' cannot be implicitly used in a static member function declaration"} | ||
Line 6,353: | Line 6,381: | ||
}, | }, | ||
["err_thread_dynamic_init"]={ | ["err_thread_dynamic_init"]={ | ||
[ | [i]="err_thread_dynamic_init", | ||
[ | [h]="initializer for thread-local variable must be a constant expression", | ||
[ | [g]="initializer for thread-local variable must be a constant expression", | ||
[ | [b]=k, | ||
[ | [e]="initializer for thread\\-local variable must be a constant expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"6ea1a4d1dcd6",1365970291,"Diagnose if a __thread or _Thread_local variable has a non-constant initializer","Diagnose if a __thread or _Thread_local variable has a non-constant initializer\nor non-trivial destructor.\n\nllvm-svn: 179491"}, | ||
[j]={{ | [j]={{w,14108,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n if (var->getTLSKind() == VarDecl::TLS_Static) {\n if (var->getType().isDestructedType()) {\n // ...\n } else if (getLangOpts().CPlusPlus && var->hasInit()) {\n if (!checkConstInit()) {\n // ...\n Diag(CacheCulprit->getExprLoc(), diag::err_thread_dynamic_init) << CacheCulprit->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/declspec-thread.cpp"]={"clang/test/SemaCXX/declspec-thread.cpp:12:28: error: initializer for thread-local variable must be a constant expression","clang/test/SemaCXX/declspec-thread.cpp:19:28: error: initializer for thread-local variable must be a constant expression","clang/test/SemaCXX/declspec-thread.cpp:26:28: error: initializer for thread-local variable must be a constant expression"} | ["clang/test/SemaCXX/declspec-thread.cpp"]={"clang/test/SemaCXX/declspec-thread.cpp:12:28: error: initializer for thread-local variable must be a constant expression","clang/test/SemaCXX/declspec-thread.cpp:19:28: error: initializer for thread-local variable must be a constant expression","clang/test/SemaCXX/declspec-thread.cpp:26:28: error: initializer for thread-local variable must be a constant expression"} | ||
Line 6,367: | Line 6,395: | ||
}, | }, | ||
["err_thread_non_global"]={ | ["err_thread_non_global"]={ | ||
[ | [i]="err_thread_non_global", | ||
[ | [h]="\'%0\' variables must have global storage", | ||
[ | [g]="\'A\' variables must have global storage", | ||
[ | [b]=k, | ||
[ | [e]="\'(.*?)\' variables must have global storage", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d5c0eeda7285",1240172875,"Add more thorough/correct checking for invalid __thread specifiers.","Add more thorough/correct checking for invalid __thread specifiers.\n\nllvm-svn: 69542"}, | ||
[j]={{ | [j]={{w,7764,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (DeclSpec::TSCS TSCS = D.getDeclSpec().getThreadStorageClassSpec()) {\n // C++11 [dcl.stc]p4:\n // When thread_local is applied to a variable of block scope the\n // storage-class-specifier static is implied if it does not appear\n // explicitly.\n // Core issue: \'static\' is not implied if the variable is declared\n // \'extern\'.\n if (NewVD->hasLocalStorage() && (SCSpec != DeclSpec::SCS_unspecified || TSCS != DeclSpec::TSCS_thread_local || !DC->isFunctionOrMethod()))\n Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(), diag::err_thread_non_global) << DeclSpec::getSpecifierName(TSCS);"},{db,7314,"static void handleDeclspecThreadAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (VD->hasLocalStorage()) {\n S.Diag(AL.getLoc(), diag::err_thread_non_global) << \"__declspec(thread)\";"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:46:3: error: \'_Thread_local\' variables must have global storage","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:54:3: error: \'__thread\' variables must have global storage"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:46:3: error: \'_Thread_local\' variables must have global storage","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:54:3: error: \'__thread\' variables must have global storage"} | ||
Line 6,381: | Line 6,409: | ||
}, | }, | ||
["err_thread_non_thread"]={ | ["err_thread_non_thread"]={ | ||
[ | [i]="err_thread_non_thread", | ||
[ | [h]="thread-local declaration of %0 follows non-thread-local declaration", | ||
[ | [g]="thread-local declaration of A follows non-thread-local declaration", | ||
[ | [b]=k, | ||
[ | [e]="thread\\-local declaration of (.*?) follows non\\-thread\\-local declaration", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d5c0eeda7285",1240172875,"Add more thorough/correct checking for invalid __thread specifiers.","Add more thorough/correct checking for invalid __thread specifiers.\n\nllvm-svn: 69542"}, | ||
[j]={{ | [j]={{w,4707,"/// 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 if (New->getTLSKind() != Old->getTLSKind()) {\n if (!Old->getTLSKind()) {\n Diag(New->getLocation(), diag::err_thread_non_thread) << New->getDeclName();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/cxx11-thread-local.cpp"]={"clang/test/SemaCXX/cxx11-thread-local.cpp:11:21: error: thread-local declaration of \'b\' follows non-thread-local declaration"} | ["clang/test/SemaCXX/cxx11-thread-local.cpp"]={"clang/test/SemaCXX/cxx11-thread-local.cpp:11:21: error: thread-local declaration of \'b\' follows non-thread-local declaration"} | ||
Line 6,395: | Line 6,423: | ||
}, | }, | ||
["err_thread_nontrivial_dtor"]={ | ["err_thread_nontrivial_dtor"]={ | ||
[ | [i]="err_thread_nontrivial_dtor", | ||
[ | [h]="type of thread-local variable has non-trivial destruction", | ||
[ | [g]="type of thread-local variable has non-trivial destruction", | ||
[ | [b]=k, | ||
[ | [e]="type of thread\\-local variable has non\\-trivial destruction", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"6ea1a4d1dcd6",1365970291,"Diagnose if a __thread or _Thread_local variable has a non-constant initializer","Diagnose if a __thread or _Thread_local variable has a non-constant initializer\nor non-trivial destructor.\n\nllvm-svn: 179491"}, | ||
[j]={{ | [j]={{w,14099,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n if (var->getTLSKind() == VarDecl::TLS_Static) {\n if (var->getType().isDestructedType()) {\n // ...\n Diag(var->getLocation(), diag::err_thread_nontrivial_dtor);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/thread-specifier.c"]={"clang/test/Sema/thread-specifier.c:109:12: error: type of thread-local variable has non-trivial destruction"} | ["clang/test/Sema/thread-specifier.c"]={"clang/test/Sema/thread-specifier.c:109:12: error: type of thread-local variable has non-trivial destruction"} | ||
Line 6,409: | Line 6,437: | ||
}, | }, | ||
["err_thread_thread_different_kind"]={ | ["err_thread_thread_different_kind"]={ | ||
[ | [i]="err_thread_thread_different_kind", | ||
[ | [h]="thread-local declaration of %0 with %select{static|dynamic}1 initialization follows declaration with %select{dynamic|static}1 initialization", | ||
[ | [g]={{nil,nil,{"thread-local declaration of A with ",{"static","dynamic"}," initialization follows declaration with ",{"dynamic","static"}," initialization"}}}, | ||
[ | [b]=k, | ||
[ | [e]="thread\\-local declaration of (.*?) with (?:static|dynamic) initialization follows declaration with (?:dynamic|static) initialization", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"fd3834f7a1cc",1365821034,"Annotate flavor of TLS variable (statically or dynamically initialized) onto the AST.","Annotate flavor of TLS variable (statically or dynamically initialized) onto the AST.\n\nllvm-svn: 179447"}, | ||
[j]={{ | [j]={{w,4717,"/// 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 if (New->getTLSKind() != Old->getTLSKind()) {\n if (!Old->getTLSKind()) {\n // ...\n } else if (!New->getTLSKind()) {\n // ...\n } else {\n // ...\n Diag(New->getLocation(), diag::err_thread_thread_different_kind) << New->getDeclName() << (New->getTLSKind() == VarDecl::TLS_Dynamic);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/thread-specifier.c"]={"clang/test/Sema/thread-specifier.c:74:19: error: thread-local declaration of \'t17\' with static initialization follows declaration with dynamic initialization","clang/test/Sema/thread-specifier.c:78:18: error: thread-local declaration of \'t18\' with dynamic initialization follows declaration with static initialization"} | ["clang/test/Sema/thread-specifier.c"]={"clang/test/Sema/thread-specifier.c:74:19: error: thread-local declaration of \'t17\' with static initialization follows declaration with dynamic initialization","clang/test/Sema/thread-specifier.c:78:18: error: thread-local declaration of \'t18\' with dynamic initialization follows declaration with static initialization"} | ||
Line 6,423: | Line 6,451: | ||
}, | }, | ||
["err_thread_unsupported"]={ | ["err_thread_unsupported"]={ | ||
[ | [i]="err_thread_unsupported", | ||
[ | [h]="thread-local storage is not supported for the current target", | ||
[ | [g]="thread-local storage is not supported for the current target", | ||
[ | [b]=k, | ||
[ | [e]="thread\\-local storage is not supported for the current target", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"daea3f62b561",1240177713,"Print an error for uses of __thread on targets which don\'t support it.","Print an error for uses of __thread on targets which don\'t support it.\n\nllvm-svn: 69553"}, | ||
[j]={{ | [j]={{w,7779,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (DeclSpec::TSCS TSCS = D.getDeclSpec().getThreadStorageClassSpec()) {\n // C++11 [dcl.stc]p4:\n // When thread_local is applied to a variable of block scope the\n // storage-class-specifier static is implied if it does not appear\n // explicitly.\n // Core issue: \'static\' is not implied if the variable is declared\n // \'extern\'.\n if (NewVD->hasLocalStorage() && (SCSpec != DeclSpec::SCS_unspecified || TSCS != DeclSpec::TSCS_thread_local || !DC->isFunctionOrMethod()))\n // ...\n else if (!Context.getTargetInfo().isTLSSupported()) {\n if (getLangOpts().CUDA || getLangOpts().OpenMPIsTargetDevice || getLangOpts().SYCLIsDevice) {\n // ...\n } else\n Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(), diag::err_thread_unsupported);"},{w,7903,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (getLangOpts().CUDA || getLangOpts().OpenMPIsTargetDevice || getLangOpts().SYCLIsDevice) {\n if (EmitTLSUnsupportedError && ((getLangOpts().CUDA && DeclAttrsMatchCUDAMode(getLangOpts(), NewVD)) || (getLangOpts().OpenMPIsTargetDevice && OMPDeclareTargetDeclAttr::isDeclareTargetDeclaration(NewVD))))\n Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(), diag::err_thread_unsupported);"},{w,7908,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (getLangOpts().CUDA || getLangOpts().OpenMPIsTargetDevice || getLangOpts().SYCLIsDevice) {\n // ...\n if (EmitTLSUnsupportedError && (LangOpts.SYCLIsDevice || (LangOpts.OpenMP && LangOpts.OpenMPIsTargetDevice)))\n targetDiag(D.getIdentifierLoc(), diag::err_thread_unsupported);"},{db,7306,"static void handleDeclspecThreadAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!S.Context.getTargetInfo().isTLSSupported()) {\n S.Diag(AL.getLoc(), diag::err_thread_unsupported);"},{n,396,"/// 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 (LangOpts.SYCLIsDevice || (LangOpts.OpenMP && LangOpts.OpenMPIsTargetDevice)) {\n if (!Context.getTargetInfo().isTLSSupported())\n if (const auto *VD = dyn_cast<VarDecl>(D))\n if (VD->getTLSKind() != VarDecl::TLS_None)\n targetDiag(*Locs.begin(), diag::err_thread_unsupported);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaSYCL/prohibit-thread-local.cpp"]={"clang/test/SemaSYCL/prohibit-thread-local.cpp:29:9: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:31:9: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:33:12: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:35:12: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:18:26: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:20:20: error: thread-local storage is not supported for the current target"} | ["clang/test/SemaSYCL/prohibit-thread-local.cpp"]={"clang/test/SemaSYCL/prohibit-thread-local.cpp:29:9: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:31:9: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:33:12: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:35:12: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:18:26: error: thread-local storage is not supported for the current target","clang/test/SemaSYCL/prohibit-thread-local.cpp:20:20: error: thread-local storage is not supported for the current target"} | ||
Line 6,437: | Line 6,465: | ||
}, | }, | ||
["err_three_way_vector_comparison"]={ | ["err_three_way_vector_comparison"]={ | ||
[ | [i]={{nil,p,"err_three_way_vector_comparison"}}, | ||
[ | [h]={{nil,p,"three-way comparison between vectors is not supported"}}, | ||
[ | [g]={{nil,p,"three-way comparison between vectors is not supported"}}, | ||
[ | [b]=k, | ||
[ | [e]="three\\-way comparison between vectors is not supported", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,a}}, | ||
[ | [c]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | ||
[j]={{n,13510,"/// CheckVectorCompareOperands - vector comparisons are a clang extension that\n/// operates on extended vector types. Instead of producing an IntTy result,\n/// like a scalar comparison, a vector comparison produces a vector of integer\n/// types.\nQualType Sema::CheckVectorCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n if (Opc == BO_Cmp) {\n Diag(Loc, diag::err_three_way_vector_comparison);"},{n,13671,"QualType Sema::CheckSizelessVectorCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n if (Opc == BO_Cmp) {\n Diag(Loc, diag::err_three_way_vector_comparison);"}}, | [j]={{n,13510,"/// CheckVectorCompareOperands - vector comparisons are a clang extension that\n/// operates on extended vector types. Instead of producing an IntTy result,\n/// like a scalar comparison, a vector comparison produces a vector of integer\n/// types.\nQualType Sema::CheckVectorCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n if (Opc == BO_Cmp) {\n Diag(Loc, diag::err_three_way_vector_comparison);"},{n,13671,"QualType Sema::CheckSizelessVectorCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n if (Opc == BO_Cmp) {\n Diag(Loc, diag::err_three_way_vector_comparison);"}}, | ||
[l]={ | [l]={ | ||
Line 6,451: | Line 6,479: | ||
}, | }, | ||
["err_throw_abstract_type"]={ | ["err_throw_abstract_type"]={ | ||
[ | [i]="err_throw_abstract_type", | ||
[ | [h]="cannot throw an object of abstract type %0", | ||
[ | [g]="cannot throw an object of abstract type A", | ||
[ | [b]=k, | ||
[ | [e]="cannot throw an object of abstract type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e8154339f46e",1271354739,"Diagnose attempts to throw an abstract class type.","Diagnose attempts to throw an abstract class type.\n\nllvm-svn: 101381"}, | ||
[j]={{ | [j]={{P,1011,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // ...\n if (!isPointer || !Ty->isVoidType()) {\n // ...\n if (RequireNonAbstractType(ThrowLoc, ExceptionObjectTy, diag::err_throw_abstract_type, E))"}}, | ||
[l]={ | [l]={ | ||
[ | [ed]={"clang/test/SemaCXX/exceptions.cpp:112:5: error: cannot throw an object of abstract type \'foo\'"} | ||
} | } | ||
}, | }, | ||
["err_throw_incomplete"]={ | ["err_throw_incomplete"]={ | ||
[ | [i]="err_throw_incomplete", | ||
[ | [h]="cannot throw object of incomplete type %0", | ||
[ | [g]="cannot throw object of incomplete type A", | ||
[ | [b]=k, | ||
[ | [e]="cannot throw object of incomplete type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"4de47b445b96",1240864051,"Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into prot...","Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.\n\nllvm-svn: 70242"}, | ||
[j]={{ | [j]={{P,1001,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // ...\n if (!isPointer || !Ty->isVoidType()) {\n if (RequireCompleteType(ThrowLoc, Ty, isPointer ? diag::err_throw_incomplete_ptr : diag::err_throw_incomplete, E->getSourceRange()))"}}, | ||
[l]={ | [l]={ | ||
[ | [ed]={"clang/test/SemaCXX/exceptions.cpp:37:3: error: cannot throw object of incomplete type \'void\'"} | ||
} | } | ||
}, | }, | ||
["err_throw_incomplete_ptr"]={ | ["err_throw_incomplete_ptr"]={ | ||
[ | [i]="err_throw_incomplete_ptr", | ||
[ | [h]="cannot throw pointer to object of incomplete type %0", | ||
[ | [g]="cannot throw pointer to object of incomplete type A", | ||
[ | [b]=k, | ||
[ | [e]="cannot throw pointer to object of incomplete type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"4de47b445b96",1240864051,"Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into prot...","Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.\n\nllvm-svn: 70242"}, | ||
[j]={{ | [j]={{P,1000,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // ...\n if (!isPointer || !Ty->isVoidType()) {\n if (RequireCompleteType(ThrowLoc, Ty, isPointer ? diag::err_throw_incomplete_ptr : diag::err_throw_incomplete, E->getSourceRange()))"}}, | ||
[l]={ | [l]={ | ||
[ | [ed]={"clang/test/SemaCXX/exceptions.cpp:38:3: error: cannot throw pointer to object of incomplete type \'A\'"} | ||
} | } | ||
}, | }, | ||
["err_throw_sizeless"]={ | ["err_throw_sizeless"]={ | ||
[ | [i]={{nil,q,"err_throw_sizeless"}}, | ||
[ | [h]={{nil,q,"cannot throw object of sizeless type %0"}}, | ||
[ | [g]={{nil,q,"cannot throw object of sizeless type A"}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot throw object of sizeless type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{ | [j]={{P,1006,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // ...\n if (!isPointer || !Ty->isVoidType()) {\n // ...\n if (!isPointer && Ty->isSizelessType()) {\n Diag(ThrowLoc, diag::err_throw_sizeless) << Ty << E->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/sizeless-1.cpp"]={"clang/test/SemaCXX/sizeless-1.cpp:361:3: error: cannot throw object of sizeless type \'svint8_t\' (aka \'__SVInt8_t\')"} | ["clang/test/SemaCXX/sizeless-1.cpp"]={"clang/test/SemaCXX/sizeless-1.cpp:361:3: error: cannot throw object of sizeless type \'svint8_t\' (aka \'__SVInt8_t\')"} | ||
Line 6,507: | Line 6,535: | ||
}, | }, | ||
["err_tls_var_aligned_over_maximum"]={ | ["err_tls_var_aligned_over_maximum"]={ | ||
[ | [i]="err_tls_var_aligned_over_maximum", | ||
[ | [h]="alignment (%0) of thread-local variable %1 is greater than the maximum supported alignment (%2) for a thread-local variable on this target", | ||
[ | [g]="alignment (A) of thread-local variable B is greater than the maximum supported alignment (C) for a thread-local variable on this target", | ||
[ | [b]=k, | ||
[ | [e]="alignment \\((.*?)\\) of thread\\-local variable (.*?) is greater than the maximum supported alignment \\((.*?)\\) for a thread\\-local variable on this target", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d30e2eefc3cf",1436907152,"Add a \"maximum TLS alignment\" characteristic to the target info, so it","Add a \"maximum TLS alignment\" characteristic to the target info, so it\ncan be different from the normal variable maximum.\nAdd an error diagnostic for when TLS variables exceed maximum TLS alignment.\nCurrenty only PS4 sets an explicit maximum TLS alignment.\n\nPatch by Charles Li!\n\nllvm-svn: 242198"}, | ||
[j]={{ | [j]={{w,14367,"void Sema::CheckThreadLocalForLargeAlignment(VarDecl *VD) {\n // ...\n // Perform TLS alignment check here after attributes attached to the variable\n // which may affect the alignment have been processed. Only perform the check\n // if the target has a maximum TLS alignment (zero means no constraints).\n if (unsigned MaxAlign = Context.getTargetInfo().getMaxTLSAlign()) {\n // Protect the check so that it\'s not performed on dependent types and\n // dependent alignments (we can\'t determine the alignment in that case).\n if (!VD->hasDependentAlignment()) {\n // ...\n if (Context.getDeclAlign(VD) > MaxAlignChars) {\n Diag(VD->getLocation(), diag::err_tls_var_aligned_over_maximum) << (unsigned)Context.getDeclAlign(VD).getQuantity() << VD << (unsigned)MaxAlignChars.getQuantity();"},{db,4507,"void Sema::AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion) {\n // ...\n if (VD) {\n // ...\n if (MaxTLSAlign && AlignVal > MaxTLSAlign && VD->getTLSKind() != VarDecl::TLS_None) {\n Diag(VD->getLocation(), diag::err_tls_var_aligned_over_maximum) << (unsigned)AlignVal << VD << MaxTLSAlign;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/tls_alignment.cpp"]={"clang/test/Sema/tls_alignment.cpp:37:44: error: alignment (64) of thread-local variable \'bar\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:40:44: error: alignment (64) of thread-local variable \'bar2\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:43:44: error: alignment (64) of thread-local variable \'bar3\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:46:44: error: alignment (64) of thread-local variable \'bar4\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:49:44: error: alignment (64) of thread-local variable \'bar5\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:65:30: error: alignment (64) of thread-local variable \'blah\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:76:51: error: alignment (64) of thread-local variable \'x\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:75:50: error: alignment (64) of thread-local variable \'b<64>\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:72:20: error: alignment (64) of thread-local variable \'b\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:73:20: error: alignment (64) of thread-local variable \'c\' is greater than the maximum supported alignment (32) for a thread-local variable on this target"} | ["clang/test/Sema/tls_alignment.cpp"]={"clang/test/Sema/tls_alignment.cpp:37:44: error: alignment (64) of thread-local variable \'bar\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:40:44: error: alignment (64) of thread-local variable \'bar2\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:43:44: error: alignment (64) of thread-local variable \'bar3\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:46:44: error: alignment (64) of thread-local variable \'bar4\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:49:44: error: alignment (64) of thread-local variable \'bar5\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:65:30: error: alignment (64) of thread-local variable \'blah\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:76:51: error: alignment (64) of thread-local variable \'x\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:75:50: error: alignment (64) of thread-local variable \'b<64>\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:72:20: error: alignment (64) of thread-local variable \'b\' is greater than the maximum supported alignment (32) for a thread-local variable on this target","clang/test/Sema/tls_alignment.cpp:73:20: error: alignment (64) of thread-local variable \'c\' is greater than the maximum supported alignment (32) for a thread-local variable on this target"} | ||
Line 6,521: | Line 6,549: | ||
}, | }, | ||
["err_too_few_args_in_macro_invoc"]={ | ["err_too_few_args_in_macro_invoc"]={ | ||
[ | [i]="err_too_few_args_in_macro_invoc", | ||
[ | [h]="too few arguments provided to function-like macro invocation", | ||
[ | [g]="too few arguments provided to function-like macro invocation", | ||
[ | [b]=k, | ||
[ | [e]="too few arguments provided to function\\-like macro invocation", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{Ec,1015,"/// 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 } else if (!ContainsCodeCompletionTok) {\n // ...\n Diag(Tok, diag::err_too_few_args_in_macro_invoc);"},{Ec,1357,"/// 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::r_paren:\n // ...\n // The last \')\' has been reached; return the value if one found or\n // a diagnostic and a dummy value.\n if (Result) {\n // ...\n } else {\n // ...\n if (!SuppressDiagnostic)\n PP.Diag(Tok.getLocation(), diag::err_too_few_args_in_macro_invoc);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:20:5: error: too few arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:21:6: error: too few arguments provided to function-like macro invocation"} | ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:20:5: error: too few arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:21:6: error: too few arguments provided to function-like macro invocation"} | ||
Line 6,535: | Line 6,563: | ||
}, | }, | ||
["err_too_large_for_fixed_point"]={ | ["err_too_large_for_fixed_point"]={ | ||
[ | [i]={{nil,O,"err_too_large_for_fixed_point"}}, | ||
[ | [h]={{nil,O,"this value is too large for this fixed point type"}}, | ||
[ | [g]={{nil,O,"this value is too large for this fixed point type"}}, | ||
[ | [b]=k, | ||
[ | [e]="this value is too large for this fixed point type", | ||
[ | [f]=a, | ||
[ | [d]={{nil,O,a}}, | ||
[ | [c]={"db01c3adc6f9",1529515180,"[Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals","[Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals\n\nThis diff includes the logic for setting the precision bits for each primary fixed point type in the target info and logic for initializing a fixed point literal.\n\nFixed point literals are declared using the suffixes\n\n```\nhr: short _Fract\nuhr: unsigned short _Fract\nr: _Fract\nur: unsigned _Fract\nlr: long _Fract\nulr: unsigned long _Fract\nhk: short _Accum\nuhk: unsigned short _Accum\nk: _Accum\nuk: unsigned _Accum\n```\nErrors are also thrown for illegal literal values\n\n```\nunsigned short _Accum u_short_accum = 256.0uhk; // expected-error{{the integral part of this literal is too large for this unsigned _Accum type}}\n```\n\nDifferential Revision: https://reviews.llvm.org/D46915\n\nllvm-svn: 335148"}, | ||
[j]={{n,4010,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n if (Literal.isFract && Val == MaxVal + 1 && !ValIsZero)\n // ...\n else if (Val.ugt(MaxVal) || Overflowed)\n Diag(Tok.getLocation(), diag::err_too_large_for_fixed_point);"}}, | [j]={{n,4010,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n if (Literal.isFract && Val == MaxVal + 1 && !ValIsZero)\n // ...\n else if (Val.ugt(MaxVal) || Overflowed)\n Diag(Tok.getLocation(), diag::err_too_large_for_fixed_point);"}}, | ||
[l]={ | [l]={ | ||
Line 6,549: | Line 6,577: | ||
}, | }, | ||
["err_too_many_args_in_macro_invoc"]={ | ["err_too_many_args_in_macro_invoc"]={ | ||
[ | [i]="err_too_many_args_in_macro_invoc", | ||
[ | [h]="too many arguments provided to function-like macro invocation", | ||
[ | [g]="too many arguments provided to function-like macro invocation", | ||
[ | [b]=k, | ||
[ | [e]="too many arguments provided to function\\-like macro invocation", | ||
[ | [f]=a, | ||
[ | [d]=G, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{Ec,929,"/// 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 this is not a variadic macro, and too many args were specified, emit\n // an error.\n if (!isVariadic && NumActuals > MinArgsExpected && !ContainsCodeCompletionTok) {\n // ...\n Diag(TooManyArgsLoc, diag::err_too_many_args_in_macro_invoc);"},{Ec,1037,"/// 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 // ...\n } else if (NumActuals > MinArgsExpected && !MI->isVariadic() && !ContainsCodeCompletionTok) {\n // ...\n Diag(MacroName, diag::err_too_many_args_in_macro_invoc);"},{Ec,1327,"/// 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::comma:\n if (!SuppressDiagnostic) {\n PP.Diag(Tok.getLocation(), diag::err_too_many_args_in_macro_invoc);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:11:6: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:12:6: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:16:6: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:18:8: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:24:9: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:27:5: error: too many arguments provided to function-like macro invocation"} | ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:11:6: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:12:6: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:16:6: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:18:8: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:24:9: error: too many arguments provided to function-like macro invocation","clang/test/Preprocessor/macro_fn.c:27:5: error: too many arguments provided to function-like macro invocation"} | ||
Line 6,563: | Line 6,591: | ||
}, | }, | ||
["err_toomany_element_decls"]={ | ["err_toomany_element_decls"]={ | ||
[ | [i]="err_toomany_element_decls", | ||
[h]="only one element declaration is allowed", | |||
[g]="only one element declaration is allowed", | |||
[b]=k, | |||
[e]="only one element declaration is allowed", | [e]="only one element declaration is allowed", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{Z,2296,"StmtResult Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc) {\n // ...\n if (First) {\n // ...\n if (DeclStmt *DS = dyn_cast<DeclStmt>(First)) {\n if (!DS->isSingleDecl())\n return StmtError(Diag((*DS->decl_begin())->getLocation(), diag::err_toomany_element_decls));"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Parser/objc-forcollection-neg-2.m"]={"clang/test/Parser/objc-forcollection-neg-2.m:28:17: error: only one element declaration is allowed"} | ["clang/test/Parser/objc-forcollection-neg-2.m"]={"clang/test/Parser/objc-forcollection-neg-2.m:28:17: error: only one element declaration is allowed"} | ||
Line 6,577: | Line 6,605: | ||
}, | }, | ||
["err_trailing_requires_clause_on_deduction_guide"]={ | ["err_trailing_requires_clause_on_deduction_guide"]={ | ||
[ | [i]={{nil,p,"err_trailing_requires_clause_on_deduction_guide"}}, | ||
[ | [h]={{nil,p,"deduction guide cannot have a requires clause"}}, | ||
[ | [g]={{nil,p,"deduction guide cannot have a requires clause"}}, | ||
[ | [b]=k, | ||
[ | [e]="deduction guide cannot have a requires clause", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.","Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on VectorTypes that acts as a\n\'select\' in C++ mode. This patch implements the support. Types are\nconverted as closely to GCC\'s behavior as possible, though in a few\nplaces consistency with our existing vector type support was preferred.\n\nNote that this implementation is different from the OpenCL version in a\nnumber of ways, so it unfortunately required a different implementation.\n\nFirst, the SEMA rules and promotion rules are significantly different.\n\nSecondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in\nthe range 0- VectorSize, for each element). In OpenCL, the condition is\nCOND[i] < 0 ? LHS[i]: RHS[i].\n\nIn the process of implementing this, it was also required to make the\nexpression COND ? LHS : RHS type dependent if COND is type dependent,\nsince the type is now dependent on the condition. For example:\n\n T ? 1 : 2;\n\nIs not typically type dependent, since the result can be deduced from\nthe operands. HOWEVER, if T is a VectorType now, it could change this\nto a \'select\' (basically a swizzle with a non-constant mask) with the 1\nand 2 being promoted to vectors themselves.\n\nWhile this is a change, it is NOT a standards incompatible change. Based\non my (and D. Gregor\'s, at the time of writing the code) reading of the\nstandard, the expression is supposed to be type dependent if ANY\nsub-expression is type dependent.\n\nDifferential Revision: https://reviews.llvm.org/D71463"}, | ||
[j]={{ | [j]={{w,9257,"static FunctionDecl *CreateNewFunctionDecl(Sema &SemaRef, Declarator &D, DeclContext *DC, QualType &R, TypeSourceInfo *TInfo, StorageClass SC, bool &IsVirtualOkay) {\n // ...\n if (Name.getNameKind() == DeclarationName::CXXConstructorName) {\n // ...\n } else if (Name.getNameKind() == DeclarationName::CXXDestructorName) {\n // ...\n } else if (Name.getNameKind() == DeclarationName::CXXConversionFunctionName) {\n // ...\n } else if (Name.getNameKind() == DeclarationName::CXXDeductionGuideName) {\n if (TrailingRequiresClause)\n SemaRef.Diag(TrailingRequiresClause->getBeginLoc(), diag::err_trailing_requires_clause_on_deduction_guide) << TrailingRequiresClause->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:68:23: error: deduction guide cannot have a requires clause"} | ["clang/test/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:68:23: error: deduction guide cannot have a requires clause"} | ||
Line 6,591: | Line 6,619: | ||
}, | }, | ||
["err_trailing_return_in_parens"]={ | ["err_trailing_return_in_parens"]={ | ||
[ | [i]="err_trailing_return_in_parens", | ||
[h]="trailing return type may not be nested within parentheses", | |||
[g]="trailing return type may not be nested within parentheses", | |||
[b]=k, | |||
[e]="trailing return type may not be nested within parentheses", | [e]="trailing return type may not be nested within parentheses", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"59006e4338ce",1298335013,"Fix a few auto-related issues:","Fix a few auto-related issues:\n\n * \'auto\' was being rejected on abstract-declarators with trailing return\ntypes and on typedefs with trailing return types. \'auto\' is always\nallowed in these cases. This was found while testing the fix for PR 9278.\n\n * A very poor diagnostic was being issued for auto (f() -> int): \"return\ntype must be \'auto\', not \'auto\'\". This is closely related to PR 9060.\n\n * Trailing return type handling was happening slightly too late,\nresulting in the checks for functions returning arrays and functions\nreturning functions being missed.\n\nllvm-svn: 126166"}, | |||
[j]={{R,5210,"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 // Check for auto functions and trailing return type and adjust the\n // return type accordingly.\n if (!D.isInvalidType()) {\n // trailing-return-type is only required if we\'re declaring a function,\n // and not, for instance, a pointer to a function.\n if (D.getDeclSpec().hasAutoTypeSpec() && !FTI.hasTrailingReturnType() && chunkIndex == 0) {\n // ...\n } else if (FTI.hasTrailingReturnType()) {\n // T must be exactly \'auto\' at this point. See CWG issue 681.\n if (isa<ParenType>(T)) {\n S.Diag(D.getBeginLoc(), diag::err_trailing_return_in_parens) << T << D.getSourceRange();"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp:6:1: error: trailing return type may not be nested within parentheses"} | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp:6:1: error: trailing return type may not be nested within parentheses"} | ||
Line 6,605: | Line 6,633: | ||
}, | }, | ||
["err_trailing_return_without_auto"]={ | ["err_trailing_return_without_auto"]={ | ||
[ | [i]="err_trailing_return_without_auto", | ||
[ | [h]="function with trailing return type must specify return type \'auto\', not %0", | ||
[ | [g]="function with trailing return type must specify return type \'auto\', not A", | ||
[ | [b]=k, | ||
[ | [e]="function with trailing return type must specify return type \'auto\', not (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"7fb25418ed72",1285958690,"Implement the C++0x \"trailing return type\" feature, e.g.,","Implement the C++0x \"trailing return type\" feature, e.g.,\n\n auto f(int) -> int\n\nfrom Daniel Wallin!\n\n(With a few minor bug fixes from me).\n\nllvm-svn: 115322"}, | ||
[j]={{ | [j]={{R,5231,"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 // Check for auto functions and trailing return type and adjust the\n // return type accordingly.\n if (!D.isInvalidType()) {\n // trailing-return-type is only required if we\'re declaring a function,\n // and not, for instance, a pointer to a function.\n if (D.getDeclSpec().hasAutoTypeSpec() && !FTI.hasTrailingReturnType() && chunkIndex == 0) {\n // ...\n } else if (FTI.hasTrailingReturnType()) {\n // T must be exactly \'auto\' at this point. See CWG issue 681.\n if (isa<ParenType>(T)) {\n // ...\n } else if (D.getName().getKind() == UnqualifiedIdKind::IK_DeductionGuideName) {\n // ...\n } else if (D.getContext() != DeclaratorContext::LambdaExpr && (T.hasQualifiers() || !isa<AutoType>(T) || cast<AutoType>(T)->getKeyword() != AutoTypeKeyword::Auto || cast<AutoType>(T)->isConstrained())) {\n S.Diag(D.getDeclSpec().getTypeSpecTypeLoc(), diag::err_trailing_return_without_auto) << T << D.getDeclSpec().getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp"]={"clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:41:7: error: function with trailing return type must specify return type \'auto\', not \'Large auto\'"} | ["clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp"]={"clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:41:7: error: function with trailing return type must specify return type \'auto\', not \'Large auto\'"} | ||
Line 6,619: | Line 6,647: | ||
}, | }, | ||
["err_two_right_angle_brackets_need_space"]={ | ["err_two_right_angle_brackets_need_space"]={ | ||
[ | [i]="err_two_right_angle_brackets_need_space", | ||
[ | [h]="a space is required between consecutive right angle brackets (use \'> >\')", | ||
[ | [g]="a space is required between consecutive right angle brackets (use \'> >\')", | ||
[ | [b]=k, | ||
[ | [e]="a space is required between consecutive right angle brackets \\(use \'\\> \\>\'\\)", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{ | [j]={{xd,1204,"/// Parses a \'>\' at the end of a template list.\n///\n/// If this function encounters \'>>\', \'>>>\', \'>=\', or \'>>=\', it tries\n/// to determine if these tokens were supposed to be a \'>\' followed by\n/// \'>\', \'>>\', \'>=\', or \'>=\'. It emits an appropriate diagnostic if necessary.\n///\n/// \\param RAngleLoc the location of the consumed \'>\'.\n///\n/// \\param ConsumeLastToken if true, the \'>\' is consumed.\n///\n/// \\param ObjCGenericList if true, this is the \'>\' closing an Objective-C\n/// type parameter or type argument list, rather than a C++ template parameter\n/// or argument list.\n///\n/// \\returns true, if current token does not start with \'>\', false otherwise.\nbool Parser::ParseGreaterThanInTemplateList(SourceLocation LAngleLoc, SourceLocation &RAngleLoc, bool ConsumeLastToken, bool ObjCGenericList) {\n // ...\n // Diagnose this situation as appropriate.\n if (!ObjCGenericList) {\n // ...\n unsigned DiagId = diag::err_two_right_angle_brackets_need_space;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.param/p15.cpp"]={"clang/test/CXX/temp/temp.param/p15.cpp:6:8: error: a space is required between consecutive right angle brackets (use \'> >\')","clang/test/CXX/temp/temp.param/p15.cpp:8:12: error: a space is required between consecutive right angle brackets (use \'> >\')","clang/test/CXX/temp/temp.param/p15.cpp:9:5: error: a space is required between consecutive right angle brackets (use \'> >\')"} | ["clang/test/CXX/temp/temp.param/p15.cpp"]={"clang/test/CXX/temp/temp.param/p15.cpp:6:8: error: a space is required between consecutive right angle brackets (use \'> >\')","clang/test/CXX/temp/temp.param/p15.cpp:8:12: error: a space is required between consecutive right angle brackets (use \'> >\')","clang/test/CXX/temp/temp.param/p15.cpp:9:5: error: a space is required between consecutive right angle brackets (use \'> >\')"} | ||
Line 6,633: | Line 6,661: | ||
}, | }, | ||
["err_type_attribute_wrong_type"]={ | ["err_type_attribute_wrong_type"]={ | ||
[ | [i]="err_type_attribute_wrong_type", | ||
[ | [h]="\'%0\' only applies to %select{function|pointer|Objective-C object or block pointer}1 types; type here is %2", | ||
[ | [g]={{nil,nil,{"\'A\' only applies to ",{W,"pointer","Objective-C object or block pointer"}," types; type here is C"}}}, | ||
[ | [b]=k, | ||
[ | [e]="\'(.*?)\' only applies to (?:function|pointer|Objective\\-C object or block pointer) types; type here is (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{R,108,"/// diagnoseBadTypeAttribute - Diagnoses a type attribute which\n/// doesn\'t apply to the given type.\nstatic void diagnoseBadTypeAttribute(Sema &S, const ParsedAttr &attr, QualType type) {\n // ...\n S.Diag(loc, attr.isRegularKeywordAttribute() ? diag::err_type_attribute_wrong_type : diag::warn_type_attribute_wrong_type) << name << WhichType << type;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/cxx0x-keyword-attributes.cpp"]={"clang/test/Parser/cxx0x-keyword-attributes.cpp:38:1: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:39:5: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:41:16: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:42:7: error: \'__arm_streaming\' only applies to function types; type here is \'int *\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:43:7: error: \'__arm_streaming\' only applies to function types; type here is \'int &\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:44:8: error: \'__arm_streaming\' only applies to function types; type here is \'int &&\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:45:20: error: \'__arm_streaming\' only applies to function types; type here is \'int[1]\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:72:9: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:72:25: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:73:9: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:73:25: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:73:43: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:73:59: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:91:1: error: \'__arm_streaming\' only applies to function types; type here is \'struct with_init_declarators\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:95:3: error: \'__arm_streaming\' only applies to function types; type here is \'struct with_init_declarators\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:107:14: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:37: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:53: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:1: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:17: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:80: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:96: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:135:7: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:135:34: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:140:9: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:141:30: error: \'__arm_streaming\' only applies to function types; type here is \'T\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:162:9: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:166:30: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:167:41: error: \'__arm_streaming\' only applies to function types; type here is \'struct struct_attr\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:212:15: error: \'__arm_streaming\' only applies to function types; type here is \'void\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:238:29: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:238:52: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:240:26: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:248:32: error: \'__arm_streaming\' only applies to function types; type here is \'int[5]\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:253:7: error: \'__arm_streaming\' only applies to function types; type here is \'bool\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:254:13: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:256:12: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:256:39: error: \'__arm_streaming\' only applies to function types; type here is \'char\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:266:10: error: \'__arm_streaming\' only applies to function types; type here is \'bool\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:273:8: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:283:37: error: \'__arm_streaming\' only applies to function types; type here is \'unsigned int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:285:39: error: \'__arm_streaming\' only applies to function types; type here is \'unsigned long\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:287:29: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:287:5: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:292:5: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:294:6: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:313:10: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:318:15: error: \'__arm_streaming\' only applies to function types; type here is \'int\'"} | ["clang/test/Parser/cxx0x-keyword-attributes.cpp"]={"clang/test/Parser/cxx0x-keyword-attributes.cpp:38:1: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:39:5: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:41:16: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:42:7: error: \'__arm_streaming\' only applies to function types; type here is \'int *\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:43:7: error: \'__arm_streaming\' only applies to function types; type here is \'int &\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:44:8: error: \'__arm_streaming\' only applies to function types; type here is \'int &&\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:45:20: error: \'__arm_streaming\' only applies to function types; type here is \'int[1]\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:72:9: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:72:25: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:73:9: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:73:25: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:73:43: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:73:59: error: \'__arm_streaming\' only applies to function types; type here is \'class c\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:91:1: error: \'__arm_streaming\' only applies to function types; type here is \'struct with_init_declarators\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:95:3: error: \'__arm_streaming\' only applies to function types; type here is \'struct with_init_declarators\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:107:14: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:37: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:53: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:1: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:17: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:80: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:109:96: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:135:7: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:135:34: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:140:9: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:141:30: error: \'__arm_streaming\' only applies to function types; type here is \'T\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:162:9: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:166:30: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:167:41: error: \'__arm_streaming\' only applies to function types; type here is \'struct struct_attr\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:212:15: error: \'__arm_streaming\' only applies to function types; type here is \'void\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:238:29: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:238:52: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:240:26: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:248:32: error: \'__arm_streaming\' only applies to function types; type here is \'int[5]\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:253:7: error: \'__arm_streaming\' only applies to function types; type here is \'bool\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:254:13: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:256:12: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:256:39: error: \'__arm_streaming\' only applies to function types; type here is \'char\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:266:10: error: \'__arm_streaming\' only applies to function types; type here is \'bool\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:273:8: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:283:37: error: \'__arm_streaming\' only applies to function types; type here is \'unsigned int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:285:39: error: \'__arm_streaming\' only applies to function types; type here is \'unsigned long\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:287:29: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:287:5: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:292:5: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:294:6: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:313:10: error: \'__arm_streaming\' only applies to function types; type here is \'int\'","clang/test/Parser/cxx0x-keyword-attributes.cpp:318:15: error: \'__arm_streaming\' only applies to function types; type here is \'int\'"} | ||
Line 6,647: | Line 6,675: | ||
}, | }, | ||
["err_type_available_only_in_default_eval_method"]={ | ["err_type_available_only_in_default_eval_method"]={ | ||
[ | [i]="err_type_available_only_in_default_eval_method", | ||
[ | [h]="cannot use type \'%0\' within \'#pragma clang fp eval_method\'; type is set according to the default eval method for the translation unit", | ||
[ | [g]="cannot use type \'A\' within \'#pragma clang fp eval_method\'; type is set according to the default eval method for the translation unit", | ||
[ | [b]=k, | ||
[ | [e]="cannot use type \'(.*?)\' within \'\\#pragma clang fp eval_method\'; type is set according to the default eval method for the translation unit", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{n,384,"/// 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 (D->hasAttr<AvailableOnlyInDefaultEvalMethodAttr>()) {\n if (getLangOpts().getFPEvalMethod() != LangOptions::FPEvalMethodKind::FEM_UnsetOnCommandLine && PP.getLastFPEvalPragmaLocation().isValid() && PP.getCurrentFPEvalMethod() != getLangOpts().getFPEvalMethod())\n Diag(D->getLocation(), diag::err_type_available_only_in_default_eval_method) << D->getName();"}}, | [j]={{n,384,"/// 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 (D->hasAttr<AvailableOnlyInDefaultEvalMethodAttr>()) {\n if (getLangOpts().getFPEvalMethod() != LangOptions::FPEvalMethodKind::FEM_UnsetOnCommandLine && PP.getLastFPEvalPragmaLocation().isValid() && PP.getCurrentFPEvalMethod() != getLangOpts().getFPEvalMethod())\n Diag(D->getLocation(), diag::err_type_available_only_in_default_eval_method) << D->getName();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/fp-eval-pragma-with-float-double_t-1.c"]={ | ["clang/test/Sema/fp-eval-pragma-with-float-double_t-1.c"]={Tb,Ub,Tb,Ub,Tb,Ub,Tb,Ub,Tb,Ub,Tb,Ub,Tb,Ub,Tb,Ub,Tb,Ub} | ||
} | } | ||
}, | }, | ||
["err_type_constraint_missing_arguments"]={ | ["err_type_constraint_missing_arguments"]={ | ||
[ | [i]={{nil,p,"err_type_constraint_missing_arguments"}}, | ||
[ | [h]={{nil,p,"%0 requires more than 1 template argument; provide the remaining arguments explicitly to use it here"}}, | ||
[ | [g]={{nil,p,"A requires more than 1 template argument; provide the remaining arguments explicitly to use it here"}}, | ||
[ | [b]=k, | ||
[ | [e]="(.*?) requires more than 1 template argument; provide the remaining arguments explicitly to use it here", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={vc,1576172311,wc,xc}, | ||
[j]={{ | [j]={{r,1130,"bool Sema::CheckTypeConstraint(TemplateIdAnnotation *TypeConstr) {\n // ...\n if (!WereArgsSpecified && CD->getTemplateParameters()->getMinRequiredArguments() > 1) {\n Diag(TypeConstr->TemplateNameLoc, diag::err_type_constraint_missing_arguments) << CD;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/cxx2a-placeholder-type-constraint.cpp"]={"clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:65:15: error: \'C1\' requires more than 1 template argument; provide the remaining arguments explicitly to use it here","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:66:10: error: \'C1\' requires more than 1 template argument; provide the remaining arguments explicitly to use it here","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:67:3: error: \'C1\' requires more than 1 template argument; provide the remaining arguments explicitly to use it here","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:68:3: error: \'C1\' requires more than 1 template argument; provide the remaining arguments explicitly to use it here"} | ["clang/test/Parser/cxx2a-placeholder-type-constraint.cpp"]={"clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:65:15: error: \'C1\' requires more than 1 template argument; provide the remaining arguments explicitly to use it here","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:66:10: error: \'C1\' requires more than 1 template argument; provide the remaining arguments explicitly to use it here","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:67:3: error: \'C1\' requires more than 1 template argument; provide the remaining arguments explicitly to use it here","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:68:3: error: \'C1\' requires more than 1 template argument; provide the remaining arguments explicitly to use it here"} | ||
Line 6,675: | Line 6,703: | ||
}, | }, | ||
["err_type_constraint_non_type_concept"]={ | ["err_type_constraint_non_type_concept"]={ | ||
[ | [i]={{nil,p,"err_type_constraint_non_type_concept"}}, | ||
[ | [h]={{nil,p,"concept named in type constraint is not a type concept"}}, | ||
[ | [g]={{nil,p,"concept named in type constraint is not a type concept"}}, | ||
[ | [b]=k, | ||
[ | [e]="concept named in type constraint is not a type concept", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={vc,1576172311,wc,xc}, | ||
[j]={{ | [j]={{r,1121,"bool Sema::CheckTypeConstraint(TemplateIdAnnotation *TypeConstr) {\n // ...\n // C++2a [temp.param]p4:\n // [...] The concept designated by a type-constraint shall be a type\n // concept ([temp.concept]).\n if (!CD->isTypeConcept()) {\n Diag(TypeConstr->TemplateNameLoc, diag::err_type_constraint_non_type_concept);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/cxx2a-placeholder-type-constraint.cpp"]={"clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:55:15: error: concept named in type constraint is not a type concept","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:56:10: error: concept named in type constraint is not a type concept","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:57:3: error: concept named in type constraint is not a type concept","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:58:3: error: concept named in type constraint is not a type concept"} | ["clang/test/Parser/cxx2a-placeholder-type-constraint.cpp"]={"clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:55:15: error: concept named in type constraint is not a type concept","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:56:10: error: concept named in type constraint is not a type concept","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:57:3: error: concept named in type constraint is not a type concept","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:58:3: error: concept named in type constraint is not a type concept"} | ||
Line 6,689: | Line 6,717: | ||
}, | }, | ||
["err_type_defined_in_alias_template"]={ | ["err_type_defined_in_alias_template"]={ | ||
[ | [i]="err_type_defined_in_alias_template", | ||
[ | [h]="%0 cannot be defined in a type alias template", | ||
[ | [g]="A cannot be defined in a type alias template", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) cannot be defined in a type alias template", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"3f1b5d077b7e",1304632627,"Implement support for C++0x alias templates.","Implement support for C++0x alias templates.\n\nllvm-svn: 130953"}, | ||
[j]={{ | [j]={{R,3782,"static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, TypeSourceInfo *&ReturnTypeInfo) {\n // ...\n if (SemaRef.getLangOpts().CPlusPlus && OwnedTagDecl && OwnedTagDecl->isCompleteDefinition()) {\n // ...\n case DeclaratorContext::AliasTemplate:\n DiagID = diag::err_type_defined_in_alias_template;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp:5:32: error: \'(unnamed struct at clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp:5:32)\' cannot be defined in a type alias template"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp:5:32: error: \'(unnamed struct at clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp:5:32)\' cannot be defined in a type alias template"} | ||
Line 6,703: | Line 6,731: | ||
}, | }, | ||
["err_type_defined_in_condition"]={ | ["err_type_defined_in_condition"]={ | ||
[ | [i]="err_type_defined_in_condition", | ||
[ | [h]="%0 cannot be defined in a condition", | ||
[ | [g]="A cannot be defined in a condition", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) cannot be defined in a condition", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{R,3810,"static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, TypeSourceInfo *&ReturnTypeInfo) {\n // ...\n if (SemaRef.getLangOpts().CPlusPlus && OwnedTagDecl && OwnedTagDecl->isCompleteDefinition()) {\n // ...\n case DeclaratorContext::Condition:\n // ...\n DiagID = diag::err_type_defined_in_condition;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/condition.cpp"]={"clang/test/SemaCXX/condition.cpp:20:17: error: \'S\' cannot be defined in a condition","clang/test/SemaCXX/condition.cpp:21:10: error: \'(unnamed struct at clang/test/SemaCXX/condition.cpp:21:10)\' cannot be defined in a condition","clang/test/SemaCXX/condition.cpp:22:11: error: \'(unnamed enum at clang/test/SemaCXX/condition.cpp:22:11)\' cannot be defined in a condition","clang/test/SemaCXX/condition.cpp:64:14: error: \'S\' cannot be defined in a condition"} | ["clang/test/SemaCXX/condition.cpp"]={"clang/test/SemaCXX/condition.cpp:20:17: error: \'S\' cannot be defined in a condition","clang/test/SemaCXX/condition.cpp:21:10: error: \'(unnamed struct at clang/test/SemaCXX/condition.cpp:21:10)\' cannot be defined in a condition","clang/test/SemaCXX/condition.cpp:22:11: error: \'(unnamed enum at clang/test/SemaCXX/condition.cpp:22:11)\' cannot be defined in a condition","clang/test/SemaCXX/condition.cpp:64:14: error: \'S\' cannot be defined in a condition"} | ||
Line 6,717: | Line 6,745: | ||
}, | }, | ||
["err_type_defined_in_enum"]={ | ["err_type_defined_in_enum"]={ | ||
[ | [i]={{nil,A,"err_type_defined_in_enum"}}, | ||
[ | [h]={{nil,A,"%0 cannot be defined in an enumeration"}}, | ||
[ | [g]={{nil,A,"A cannot be defined in an enumeration"}}, | ||
[ | [b]=k, | ||
[ | [e]="(.*?) cannot be defined in an enumeration", | ||
[ | [f]=a, | ||
[ | [d]={{nil,A,m}}, | ||
[ | [c]={"8b0bbc6fe03b",1505505102,"[Sema] Error out early for tags defined inside an enumeration.","[Sema] Error out early for tags defined inside an enumeration.\n\nThis fixes PR28903 by avoiding access check for inner enum constant. We\nare performing access check because one enum constant references another\nand because enum is defined in CXXRecordDecl. But access check doesn\'t\nwork because FindDeclaringClass doesn\'t expect more than one EnumDecl\nand because inner enum has access AS_none due to not being an immediate\nchild of a record.\n\nThe change detects an enum is defined in wrong place and allows to skip\nparsing its body. Access check is skipped together with body parsing.\nThere was no crash in C, added test case to cover the new error.\n\nrdar://problem/28530809\n\nReviewers: rnk, doug.gregor, rsmith\n\nReviewed By: doug.gregor\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D37089\n\nllvm-svn: 313386"}, | ||
[j]={{ | [j]={{w,17563,"CreateNewDecl:\n // ...\n if (!Invalid && getLangOpts().CPlusPlus && TUK == TUK_Definition && DC->getDeclKind() == Decl::Enum) {\n Diag(New->getLocation(), diag::err_type_defined_in_enum) << Context.getTagDeclType(New);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/enum.cpp"]={"clang/test/SemaCXX/enum.cpp:123:18: error: \'PR28903::(unnamed enum at clang/test/SemaCXX/enum.cpp:123:18)\' cannot be defined in an enumeration"} | ["clang/test/SemaCXX/enum.cpp"]={"clang/test/SemaCXX/enum.cpp:123:18: error: \'PR28903::(unnamed enum at clang/test/SemaCXX/enum.cpp:123:18)\' cannot be defined in an enumeration"} | ||
Line 6,731: | Line 6,759: | ||
}, | }, | ||
["err_type_defined_in_for_range"]={ | ["err_type_defined_in_for_range"]={ | ||
[ | [i]="err_type_defined_in_for_range", | ||
[h]="types may not be defined in a for range declaration", | |||
[g]="types may not be defined in a for range declaration", | |||
[b]=k, | |||
[e]="types may not be defined in a for range declaration", | [e]="types may not be defined in a for range declaration", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"02e85f3bc5fc",1302818966,"Add support for C++0x\'s range-based for loops, as specified by the C++11 draft standard (N3291).","Add support for C++0x\'s range-based for loops, as specified by the C++11 draft standard (N3291).\n\nllvm-svn: 129541"}, | |||
[j]={{Z,2504,"/// ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.\n///\n/// C++11 [stmt.ranged]:\n/// A range-based for statement is equivalent to\n///\n/// {\n/// auto && __range = range-init;\n/// for ( auto __begin = begin-expr,\n/// __end = end-expr;\n/// __begin != __end;\n/// ++__begin ) {\n/// for-range-declaration = *__begin;\n/// statement\n/// }\n/// }\n///\n/// The body of the loop is not available yet, since it cannot be analysed until\n/// we have determined the type of the for-range-declaration.\nStmtResult Sema::ActOnCXXForRangeStmt(Scope *S, SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, Stmt *First, SourceLocation ColonLoc, Expr *Range, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (!DS->isSingleDecl()) {\n Diag(DS->getBeginLoc(), diag::err_type_defined_in_for_range);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp:18:8: error: types may not be defined in a for range declaration","clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp:21:8: error: types may not be defined in a for range declaration"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp:18:8: error: types may not be defined in a for range declaration","clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp:21:8: error: types may not be defined in a for range declaration"} | ||
Line 6,745: | Line 6,773: | ||
}, | }, | ||
["err_type_defined_in_param_type"]={ | ["err_type_defined_in_param_type"]={ | ||
[ | [i]="err_type_defined_in_param_type", | ||
[ | [h]="%0 cannot be defined in a parameter type", | ||
[ | [g]="A cannot be defined in a parameter type", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) cannot be defined in a parameter type", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d6ab8744dc68",1243553519,"When we parse a tag specifier, keep track of whether that tag","When we parse a tag specifier, keep track of whether that tag\nspecifier resulted in the creation of a new TagDecl node, which\nhappens either when the tag specifier was a definition or when the tag\nspecifier was the first declaration of that tag type. This information\nhas several uses, the first of which is implemented in this commit:\n\n 1) In C++, one is not allowed to define tag types within a type\n specifier (e.g., static_cast<struct S { int x; } *>(0) is\n ill-formed) or within the result or parameter types of a\n function. We now diagnose this.\n\n 2) We can extend DeclGroups to contain information about any tags\n that are declared/defined within the declaration specifiers of a\n variable, e.g.,\n\n struct Point { int x, y, z; } p;\n\n This will help improve AST printing and template instantiation,\n among other things.\n\n 3) For C99, we can keep track of whether a tag type is defined\n within the type of a parameter, to properly cope with cases like,\n e.g.,\n\n int bar(struct T2 { int x; } y) {\n struct T2 z;\n }\n\n We can also do similar things wherever there is a type specifier,\n e.g., to keep track of where the definition of S occurs in this\n legal C99 code:\n\n (struct S { int x, y; } *)0\n\n \n\nllvm-svn: 72555"}, | ||
[j]={{ | [j]={{w,17629,"CreateNewDecl:\n // ...\n // If we\'re declaring or defining a tag in function prototype scope in C,\n // note that this type can only be used within the function and add it to\n // the list of decls to inject into the function definition scope.\n if ((Name || Kind == TTK_Enum) && getNonFieldDeclScope(S)->isFunctionPrototypeScope()) {\n if (getLangOpts().CPlusPlus) {\n // C++ [dcl.fct]p6:\n // Types shall not be defined in return or parameter types.\n if (TUK == TUK_Definition && !IsTypeSpecifier) {\n Diag(Loc, diag::err_type_defined_in_param_type) << Name;"},{R,3804,"static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, TypeSourceInfo *&ReturnTypeInfo) {\n // ...\n if (SemaRef.getLangOpts().CPlusPlus && OwnedTagDecl && OwnedTagDecl->isCompleteDefinition()) {\n // ...\n case DeclaratorContext::Prototype:\n case DeclaratorContext::LambdaExprParameter:\n case DeclaratorContext::ObjCParameter:\n case DeclaratorContext::ObjCResult:\n case DeclaratorContext::KNRTypeList:\n case DeclaratorContext::RequiresExpr:\n // ...\n DiagID = diag::err_type_defined_in_param_type;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp:4:7: error: (null) cannot be defined in a parameter type","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp:5:11: error: (null) cannot be defined in a parameter type"} | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp:4:7: error: (null) cannot be defined in a parameter type","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp:5:11: error: (null) cannot be defined in a parameter type"} | ||
Line 6,759: | Line 6,787: | ||
}, | }, | ||
["err_type_defined_in_result_type"]={ | ["err_type_defined_in_result_type"]={ | ||
[ | [i]="err_type_defined_in_result_type", | ||
[ | [h]="%0 cannot be defined in the result type of a function", | ||
[ | [g]="A cannot be defined in the result type of a function", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) cannot be defined in the result type of a function", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d6ab8744dc68",1243553519,"When we parse a tag specifier, keep track of whether that tag","When we parse a tag specifier, keep track of whether that tag\nspecifier resulted in the creation of a new TagDecl node, which\nhappens either when the tag specifier was a definition or when the tag\nspecifier was the first declaration of that tag type. This information\nhas several uses, the first of which is implemented in this commit:\n\n 1) In C++, one is not allowed to define tag types within a type\n specifier (e.g., static_cast<struct S { int x; } *>(0) is\n ill-formed) or within the result or parameter types of a\n function. We now diagnose this.\n\n 2) We can extend DeclGroups to contain information about any tags\n that are declared/defined within the declaration specifiers of a\n variable, e.g.,\n\n struct Point { int x, y, z; } p;\n\n This will help improve AST printing and template instantiation,\n among other things.\n\n 3) For C99, we can keep track of whether a tag type is defined\n within the type of a parameter, to properly cope with cases like,\n e.g.,\n\n int bar(struct T2 { int x; } y) {\n struct T2 z;\n }\n\n We can also do similar things wherever there is a type specifier,\n e.g., to keep track of where the definition of S occurs in this\n legal C99 code:\n\n (struct S { int x, y; } *)0\n\n \n\nllvm-svn: 72555"}, | ||
[j]={{ | [j]={{R,5411,"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 if (LangOpts.CPlusPlus && D.getDeclSpec().hasTagDefinition()) {\n // ...\n S.Diag(Tag->getLocation(), diag::err_type_defined_in_result_type) << Context.getTypeDeclType(Tag);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp:7:1: error: \'(unnamed enum at clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp:7:1)\' cannot be defined in the result type of a function"} | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp:7:1: error: \'(unnamed enum at clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp:7:1)\' cannot be defined in the result type of a function"} | ||
Line 6,773: | Line 6,801: | ||
}, | }, | ||
["err_type_defined_in_type_specifier"]={ | ["err_type_defined_in_type_specifier"]={ | ||
[ | [i]="err_type_defined_in_type_specifier", | ||
[ | [h]="%0 cannot be defined in a type specifier", | ||
[ | [g]="A cannot be defined in a type specifier", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) cannot be defined in a type specifier", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d6ab8744dc68",1243553519,"When we parse a tag specifier, keep track of whether that tag","When we parse a tag specifier, keep track of whether that tag\nspecifier resulted in the creation of a new TagDecl node, which\nhappens either when the tag specifier was a definition or when the tag\nspecifier was the first declaration of that tag type. This information\nhas several uses, the first of which is implemented in this commit:\n\n 1) In C++, one is not allowed to define tag types within a type\n specifier (e.g., static_cast<struct S { int x; } *>(0) is\n ill-formed) or within the result or parameter types of a\n function. We now diagnose this.\n\n 2) We can extend DeclGroups to contain information about any tags\n that are declared/defined within the declaration specifiers of a\n variable, e.g.,\n\n struct Point { int x, y, z; } p;\n\n This will help improve AST printing and template instantiation,\n among other things.\n\n 3) For C99, we can keep track of whether a tag type is defined\n within the type of a parameter, to properly cope with cases like,\n e.g.,\n\n int bar(struct T2 { int x; } y) {\n struct T2 z;\n }\n\n We can also do similar things wherever there is a type specifier,\n e.g., to keep track of where the definition of S occurs in this\n legal C99 code:\n\n (struct S { int x, y; } *)0\n\n \n\nllvm-svn: 72555"}, | ||
[j]={{ | [j]={{w,17556,"CreateNewDecl:\n // ...\n // C++11 [dcl.type]p3:\n // A type-specifier-seq shall not define a class or enumeration [...].\n if (!Invalid && getLangOpts().CPlusPlus && (IsTypeSpecifier || IsTemplateParamOrArg) && TUK == TUK_Definition) {\n Diag(New->getLocation(), diag::err_type_defined_in_type_specifier) << Context.getTagDeclType(New);"},{R,3794,"static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, TypeSourceInfo *&ReturnTypeInfo) {\n // ...\n if (SemaRef.getLangOpts().CPlusPlus && OwnedTagDecl && OwnedTagDecl->isCompleteDefinition()) {\n // ...\n case DeclaratorContext::TypeName:\n case DeclaratorContext::FunctionalCast:\n case DeclaratorContext::ConversionId:\n case DeclaratorContext::TemplateParam:\n case DeclaratorContext::CXXNew:\n case DeclaratorContext::CXXCatch:\n case DeclaratorContext::ObjCCatch:\n case DeclaratorContext::TemplateArg:\n case DeclaratorContext::TemplateTypeArg:\n case DeclaratorContext::Association:\n DiagID = diag::err_type_defined_in_type_specifier;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/PR16677.cpp"]={"clang/test/SemaCXX/PR16677.cpp:11:7: error: \'Derived\' cannot be defined in a type specifier"} | ["clang/test/SemaCXX/PR16677.cpp"]={"clang/test/SemaCXX/PR16677.cpp:11:7: error: \'Derived\' cannot be defined in a type specifier"} | ||
Line 6,787: | Line 6,815: | ||
}, | }, | ||
["err_type_mismatch_continuation_class"]={ | ["err_type_mismatch_continuation_class"]={ | ||
[ | [i]="err_type_mismatch_continuation_class", | ||
[ | [h]="type of property %0 in class extension does not match property type in primary class", | ||
[ | [g]="type of property A in class extension does not match property type in primary class", | ||
[ | [b]=k, | ||
[ | [e]="type of property (.*?) in class extension does not match property type in primary class", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"22b405c7aa40",1322505507,"objc: turn warning for property type mismatch in ","objc: turn warning for property type mismatch in \nprimary and its continuation class into error.\n// rdar://10142679\n\nllvm-svn: 145255"}, | ||
[j]={{hb,544,"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 if (!Context.hasSameType(PIDecl->getType(), PDecl->getType())) {\n // ...\n if (!isa<ObjCObjectPointerType>(PrimaryClassPropertyT) || !isa<ObjCObjectPointerType>(ClassExtPropertyT) || (!isObjCPointerConversion(ClassExtPropertyT, PrimaryClassPropertyT, ConvertedType, IncompatibleObjC)) || IncompatibleObjC) {\n Diag(AtLoc, diag::err_type_mismatch_continuation_class) << PDecl->getType();"}}, | [j]={{hb,544,"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 if (!Context.hasSameType(PIDecl->getType(), PDecl->getType())) {\n // ...\n if (!isa<ObjCObjectPointerType>(PrimaryClassPropertyT) || !isa<ObjCObjectPointerType>(ClassExtPropertyT) || (!isObjCPointerConversion(ClassExtPropertyT, PrimaryClassPropertyT, ConvertedType, IncompatibleObjC)) || IncompatibleObjC) {\n Diag(AtLoc, diag::err_type_mismatch_continuation_class) << PDecl->getType();"}}, | ||
[l]={ | [l]={ | ||
Line 6,801: | Line 6,829: | ||
}, | }, | ||
["err_type_pack_element_out_of_bounds"]={ | ["err_type_pack_element_out_of_bounds"]={ | ||
[ | [i]="err_type_pack_element_out_of_bounds", | ||
[h]="a parameter pack may not be accessed at an out of bounds index", | |||
[g]="a parameter pack may not be accessed at an out of bounds index", | |||
[b]=k, | |||
[e]="a parameter pack may not be accessed at an out of bounds index", | [e]="a parameter pack may not be accessed at an out of bounds index", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"6ad68551c3fb",1467336249,"[Feature] Add a builtin for indexing into parameter packs. Patch by Louis Dionne.","[Feature] Add a builtin for indexing into parameter packs. Patch by Louis Dionne.\n\nThis patch adds a __nth_element builtin that allows fetching the n-th type of a\nparameter pack with very little compile-time overhead. The patch was inspired by\nr252036 and r252115 by David Majnemer, which add a similar __make_integer_seq\nbuiltin for efficiently creating a std::integer_sequence.\n\nReviewed as D15421. http://reviews.llvm.org/D15421\n\nllvm-svn: 274316"}, | |||
[j]={{r,3717,"static QualType checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, ArrayRef<TemplateArgument> Converted, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs) {\n // ...\n case BTK__type_pack_element:\n // ...\n // If the Index is out of bounds, the program is ill-formed.\n if (Index >= Ts.pack_size()) {\n SemaRef.Diag(TemplateArgs[0].getLocation(), diag::err_type_pack_element_out_of_bounds);"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/type_pack_element.cpp"]={"clang/test/SemaCXX/type_pack_element.cpp:44:51: error: a parameter pack may not be accessed at an out of bounds index"} | ["clang/test/SemaCXX/type_pack_element.cpp"]={"clang/test/SemaCXX/type_pack_element.cpp:44:51: error: a parameter pack may not be accessed at an out of bounds index"} | ||
Line 6,815: | Line 6,843: | ||
}, | }, | ||
["err_type_safety_unknown_flag"]={ | ["err_type_safety_unknown_flag"]={ | ||
[ | [i]="err_type_safety_unknown_flag", | ||
[ | [h]="invalid comparison flag %0; use \'layout_compatible\' or \'must_be_null\'", | ||
[ | [g]="invalid comparison flag A; use \'layout_compatible\' or \'must_be_null\'", | ||
[ | [b]=k, | ||
[ | [e]="invalid comparison flag (.*?); use \'layout_compatible\' or \'must_be_null\'", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"e4a5a90e8d6b",1345162118,"Add support for \"type safety\" attributes that allow checking that \'void *\'","Add support for \"type safety\" attributes that allow checking that \'void *\'\nfunction arguments and arguments for variadic functions are of a particular\ntype which is determined by some other argument to the same function call.\n\nUsecases include:\n* MPI library implementations, where these attributes enable checking that\n buffer type matches the passed MPI_Datatype;\n* for HDF5 library there is a similar usecase as MPI;\n* checking types of variadic functions\' arguments for functions like\n fcntl() and ioctl().\n\nllvm-svn: 162067"}, | ||
[j]={{ | [j]={{jb,1639,"void Parser::ParseTypeTagForDatatypeAttribute(IdentifierInfo &AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n while (TryConsumeToken(tok::comma)) {\n // ...\n if (Flag->isStr(\"layout_compatible\"))\n // ...\n else if (Flag->isStr(\"must_be_null\"))\n // ...\n else {\n Diag(Tok, diag::err_type_safety_unknown_flag) << Flag;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/attr-type-safety.c"]={"clang/test/Sema/attr-type-safety.c:15:72: error: invalid comparison flag \'not_a_flag\'; use \'layout_compatible\' or \'must_be_null\'","clang/test/Sema/attr-type-safety.c:17:90: error: invalid comparison flag \'not_a_flag\'; use \'layout_compatible\' or \'must_be_null\'"} | ["clang/test/Sema/attr-type-safety.c"]={"clang/test/Sema/attr-type-safety.c:15:72: error: invalid comparison flag \'not_a_flag\'; use \'layout_compatible\' or \'must_be_null\'","clang/test/Sema/attr-type-safety.c:17:90: error: invalid comparison flag \'not_a_flag\'; use \'layout_compatible\' or \'must_be_null\'"} | ||
Line 6,829: | Line 6,857: | ||
}, | }, | ||
["err_type_tag_for_datatype_not_ice"]={ | ["err_type_tag_for_datatype_not_ice"]={ | ||
[ | [i]="err_type_tag_for_datatype_not_ice", | ||
[ | [h]="\'type_tag_for_datatype\' attribute requires the initializer to be an %select{integer|integral}0 constant expression", | ||
[ | [g]={{nil,nil,{"\'type_tag_for_datatype\' attribute requires the initializer to be an ",{"integer","integral"}," constant expression"}}}, | ||
[ | [b]=k, | ||
[ | [e]="\'type_tag_for_datatype\' attribute requires the initializer to be an (?:integer|integral) constant expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e4a5a90e8d6b",1345162118,"Add support for \"type safety\" attributes that allow checking that \'void *\'","Add support for \"type safety\" attributes that allow checking that \'void *\'\nfunction arguments and arguments for variadic functions are of a particular\ntype which is determined by some other argument to the same function call.\n\nUsecases include:\n* MPI library implementations, where these attributes enable checking that\n buffer type matches the passed MPI_Datatype;\n* for HDF5 library there is a similar usecase as MPI;\n* checking types of variadic functions\' arguments for functions like\n fcntl() and ioctl().\n\nllvm-svn: 162067"}, | ||
[j]={{ | [j]={{w,14508,"/// FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform\n/// any semantic actions necessary after any initializer has been attached.\nvoid Sema::FinalizeDeclaration(Decl *ThisDecl) {\n // ...\n for (const auto *I : ThisDecl->specific_attrs<TypeTagForDatatypeAttr>()) {\n // ...\n if (!(MagicValueInt = MagicValueExpr->getIntegerConstantExpr(Context))) {\n Diag(I->getRange().getBegin(), diag::err_type_tag_for_datatype_not_ice) << LangOpts.CPlusPlus << MagicValueExpr->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/warn-type-safety.cpp"]={"clang/test/Sema/warn-type-safety.cpp:16:45: error: \'type_tag_for_datatype\' attribute requires the initializer to be an integral constant expression"} | ["clang/test/Sema/warn-type-safety.cpp"]={"clang/test/Sema/warn-type-safety.cpp:16:45: error: \'type_tag_for_datatype\' attribute requires the initializer to be an integral constant expression"} | ||
Line 6,843: | Line 6,871: | ||
}, | }, | ||
["err_type_tag_for_datatype_too_large"]={ | ["err_type_tag_for_datatype_too_large"]={ | ||
[ | [i]="err_type_tag_for_datatype_too_large", | ||
[ | [h]="\'type_tag_for_datatype\' attribute requires the initializer to be an %select{integer|integral}0 constant expression that can be represented by a 64 bit integer", | ||
[ | [g]={{nil,nil,{"\'type_tag_for_datatype\' attribute requires the initializer to be an ",{"integer","integral"}," constant expression that can be represented by a 64 bit integer"}}}, | ||
[ | [b]=k, | ||
[ | [e]="\'type_tag_for_datatype\' attribute requires the initializer to be an (?:integer|integral) constant expression that can be represented by a 64 bit integer", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e4a5a90e8d6b",1345162118,"Add support for \"type safety\" attributes that allow checking that \'void *\'","Add support for \"type safety\" attributes that allow checking that \'void *\'\nfunction arguments and arguments for variadic functions are of a particular\ntype which is determined by some other argument to the same function call.\n\nUsecases include:\n* MPI library implementations, where these attributes enable checking that\n buffer type matches the passed MPI_Datatype;\n* for HDF5 library there is a similar usecase as MPI;\n* checking types of variadic functions\' arguments for functions like\n fcntl() and ioctl().\n\nllvm-svn: 162067"}, | ||
[j]={{ | [j]={{w,14514,"/// FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform\n/// any semantic actions necessary after any initializer has been attached.\nvoid Sema::FinalizeDeclaration(Decl *ThisDecl) {\n // ...\n for (const auto *I : ThisDecl->specific_attrs<TypeTagForDatatypeAttr>()) {\n // ...\n if (MagicValueInt->getActiveBits() > 64) {\n Diag(I->getRange().getBegin(), diag::err_type_tag_for_datatype_too_large) << LangOpts.CPlusPlus << MagicValueExpr->getSourceRange();"}} | ||
}, | }, | ||
["err_type_trait_arity"]={ | ["err_type_trait_arity"]={ | ||
[ | [i]="err_type_trait_arity", | ||
[ | [h]="type trait requires %0%select{| or more}1 argument%select{|s}2; have %3 argument%s3", | ||
[ | [g]={{nil,nil,{"type trait requires A",{a," or more"}," argument",{a,kc},"; have D argumentD"}}}, | ||
[ | [b]=k, | ||
[ | [e]="type trait requires (.*?)(?:| or more) argument(?:|s); have (.*?) argument(.*?)", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"29c42f2a25d6",1330069114,"Implement a new type trait __is_trivially_constructible(T, Args...)","Implement a new type trait __is_trivially_constructible(T, Args...)\nthat provides the behavior of the C++11 library trait\nstd::is_trivially_constructible<T, Args...>, which can\'t be\nimplemented purely as a library.\n\nSince __is_trivially_constructible can have zero or more arguments, I\nneeded to add Yet Another Type Trait Expression Class, this one\nhandling arbitrary arguments. The next step will be to migrate\nUnaryTypeTrait and BinaryTypeTrait over to this new, more general\nTypeTrait class.\n\nFixes the Clang side of <rdar://problem/10895483> / PR12038.\n\nllvm-svn: 151352"}, | ||
[j]={{ | [j]={{P,5565,"bool Sema::CheckTypeTraitArity(unsigned Arity, SourceLocation Loc, size_t N) {\n if (Arity && N != Arity) {\n Diag(Loc, diag::err_type_trait_arity) << Arity << 0 << (Arity > 1) << (int)N << SourceRange(Loc);"},{P,5571,"bool Sema::CheckTypeTraitArity(unsigned Arity, SourceLocation Loc, size_t N) {\n // ...\n if (!Arity && N == 0) {\n Diag(Loc, diag::err_type_trait_arity) << 1 << 1 << 1 << (int)N << SourceRange(Loc);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/type-trait-eval-crash-issue-57008.cpp"]={"clang/test/SemaCXX/type-trait-eval-crash-issue-57008.cpp:5:32: error: type trait requires 1 or more arguments; have 0 arguments"} | ["clang/test/SemaCXX/type-trait-eval-crash-issue-57008.cpp"]={"clang/test/SemaCXX/type-trait-eval-crash-issue-57008.cpp:5:32: error: type trait requires 1 or more arguments; have 0 arguments"} | ||
Line 6,868: | Line 6,896: | ||
}, | }, | ||
["err_type_unsupported"]={ | ["err_type_unsupported"]={ | ||
[ | [i]="err_type_unsupported", | ||
[ | [h]="%0 is not supported on this target", | ||
[ | [g]="A is not supported on this target", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) is not supported on this target", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"50f29e06a1b6",1460540985,"Enable support for __float128 in Clang","Enable support for __float128 in Clang\n\nThis patch corresponds to review:\nhttp://reviews.llvm.org/D15120\n\nIt adds support for the __float128 keyword, literals and a target feature to\nenable it. This support is disabled by default on all targets and any target\nthat has support for this type is free to add it.\n\nBased on feedback that I\'ve received from target maintainers, this appears to\nbe the right thing for most targets. I have not heard from the maintainers of\nX86 which I believe supports this type. I will subsequently investigate the\nimpact of enabling this on X86.\n\nllvm-svn: 266186"}, | ||
[j]={{ | [j]={{R,1447,"/// 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_bitint: {\n if (!S.Context.getTargetInfo().hasBitIntType())\n S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << \"_BitInt\";"},{R,1507,"/// 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_int128:\n if (!S.Context.getTargetInfo().hasInt128Type() && !(S.getLangOpts().SYCLIsDevice || S.getLangOpts().CUDAIsDevice || (S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsTargetDevice)))\n S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << \"__int128\";"},{R,1520,"/// 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_float16:\n // CUDA host and device may have different _Float16 support, therefore\n // do not diagnose _Float16 usage to avoid false alarm.\n // ToDo: more precise diagnostics for CUDA.\n if (!S.Context.getTargetInfo().hasFloat16Type() && !S.getLangOpts().CUDA && !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsTargetDevice))\n S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << \"_Float16\";"},{R,1529,"/// 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_BFloat16:\n if (!S.Context.getTargetInfo().hasBFloat16Type() && !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsTargetDevice) && !S.getLangOpts().SYCLIsDevice)\n S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << \"__bf16\";"},{R,1553,"/// 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_float128:\n if (!S.Context.getTargetInfo().hasFloat128Type() && !S.getLangOpts().SYCLIsDevice && !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsTargetDevice))\n S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << \"__float128\";"},{R,1561,"/// 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_ibm128:\n if (!S.Context.getTargetInfo().hasIbm128Type() && !S.getLangOpts().SYCLIsDevice && !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsTargetDevice))\n S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << \"__ibm128\";"}} | ||
}, | }, | ||
["err_typecheck_address_of"]={ | ["err_typecheck_address_of"]={ | ||
[ | [i]="err_typecheck_address_of", | ||
[ | [h]={{nil,q,"address of %select{bit-field|vector element|property expression|register variable|matrix element}0 requested"},{p,nil,"address of %select{bit-field|vector element|property expression|register variable}0 requested"}}, | ||
[ | [g]={{nil,q,{"address of ",{"bit-field","vector element","property expression","register variable","matrix element"}," requested"}},{p,nil,{"address of ",{"bit-field","vector element","property expression","register variable"}," requested"}}}, | ||
[ | [b]=k, | ||
[ | [e]="address of (?:bit\\-field|vector element|property expression|register variable|matrix element) requested", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{qc,688,"#endif\n // ...\n if (Kind == CK_ArrayToPointerDecay) {\n // ...\n // C17 6.7.1p6 footnote 124: The implementation can treat any register\n // declaration simply as an auto declaration. However, whether or not\n // addressable storage is actually used, the address of any part of an\n // object declared with storage-class specifier register cannot be\n // computed, either explicitly(by use of the unary & operator as discussed\n // in 6.5.3.2) or implicitly(by converting an array name to a pointer as\n // discussed in 6.3.2.1).Thus, the only operator that can be applied to an\n // array declared with storage-class specifier register is sizeof.\n if (VK == VK_PRValue && !getLangOpts().CPlusPlus && !E->isPRValue()) {\n if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) {\n if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) {\n if (VD->getStorageClass() == SC_Register) {\n Diag(E->getExprLoc(), diag::err_typecheck_address_of) << /*register variable*/ 3 << E->getSourceRange();"},{n,14861,"static void diagnoseAddressOfInvalidType(Sema &S, SourceLocation Loc, Expr *E, unsigned Type) { S.Diag(Loc, diag::err_typecheck_address_of) << Type << E->getSourceRange(); }"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/property-expression-error.m"]={"clang/test/SemaObjC/property-expression-error.m:16:2: error: address of property expression requested"} | ["clang/test/SemaObjC/property-expression-error.m"]={"clang/test/SemaObjC/property-expression-error.m:16:2: error: address of property expression requested"} | ||
Line 6,893: | Line 6,921: | ||
}, | }, | ||
["err_typecheck_addrof_dtor"]={ | ["err_typecheck_addrof_dtor"]={ | ||
[ | [i]="err_typecheck_addrof_dtor", | ||
[h]="taking the address of a destructor", | |||
[g]="taking the address of a destructor", | |||
[b]=k, | |||
[e]="taking the address of a destructor", | [e]="taking the address of a destructor", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"915d169c6a73",1381398281,"Sema: Taking the address of a dtor is illegal per C++ [class.dtor]p2.","Sema: Taking the address of a dtor is illegal per C++ [class.dtor]p2.\n\nEmit a proper error instead of crashing in CodeGen. PR16892.\n\nllvm-svn: 192345"}, | |||
[ | |||
[j]={{n,14994,"/// 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 // Taking the address of a dtor is illegal per C++ [class.dtor]p2.\n if (isa<CXXDestructorDecl>(MD))\n Diag(OpLoc, diag::err_typecheck_addrof_dtor) << op->getSourceRange();"}} | [j]={{n,14994,"/// 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 // Taking the address of a dtor is illegal per C++ [class.dtor]p2.\n if (isa<CXXDestructorDecl>(MD))\n Diag(OpLoc, diag::err_typecheck_addrof_dtor) << op->getSourceRange();"}} | ||
}, | }, | ||
["err_typecheck_addrof_temporary"]={ | ["err_typecheck_addrof_temporary"]={ | ||
[ | [i]="err_typecheck_addrof_temporary", | ||
[ | [h]="taking the address of a temporary object of type %0", | ||
[ | [g]="taking the address of a temporary object of type A", | ||
[ | [b]=k, | ||
[ | [e]="taking the address of a temporary object of type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c084bd288815",1359771285,"PR15132: Replace \"address expression must be an lvalue or a function","PR15132: Replace \"address expression must be an lvalue or a function\ndesignator\" diagnostic with more correct and more human-friendly \"cannot take\naddress of rvalue of type \'T\'\".\n\nFor the case of & &T::f, provide a custom diagnostic, rather than unhelpfully\nsaying \"cannot take address of rvalue of type \'<overloaded function type>\'\".\n\nFor the case of &array_temporary, treat it just like a class temporary\n(including allowing it as an extension); the existing diagnostic wording\nfor the class temporary case works fine.\n\nllvm-svn: 174262"}, | ||
[j]={{n,14935,"/// 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();"}} | [j]={{n,14935,"/// 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();"}} | ||
}, | }, | ||
["err_typecheck_ambiguous_condition"]={ | ["err_typecheck_ambiguous_condition"]={ | ||
[ | [i]="err_typecheck_ambiguous_condition", | ||
[ | [h]="conversion %diff{from $ to $|between types}0,1 is ambiguous", | ||
[ | [g]={{nil,nil,{"conversion ",{"from A to B","between types"}," is ambiguous"}}}, | ||
[ | [b]=k, | ||
[ | [e]="conversion (?:from (.*?) to (.*?)|between types) is ambiguous", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"0b51c729c9c3",1253649195,"Issue good ambiguity diagnostic when convesion fails.","Issue good ambiguity diagnostic when convesion fails.\n\nllvm-svn: 82565"}, | ||
[j]={{ | [j]={{P,4248,"/// PerformImplicitConversion - Perform an implicit conversion of the\n/// expression From to the type ToType using the pre-computed implicit\n/// conversion sequence ICS. Returns the converted\n/// expression. Action is the kind of conversion we\'re performing,\n/// used in the error message.\nExprResult Sema::PerformImplicitConversion(Expr *From, QualType ToType, const ImplicitConversionSequence &ICS, AssignmentAction Action, CheckedConversionKind CCK) {\n // ...\n case ImplicitConversionSequence::AmbiguousConversion:\n ICS.DiagnoseAmbiguousConversion(*this, From->getExprLoc(), PDiag(diag::err_typecheck_ambiguous_condition) << From->getSourceRange());"},{Q,9648,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitOverloadFailed:\n case FK_UserConversionOverloadFailed:\n // ...\n case OR_Ambiguous:\n FailedCandidateSet.NoteCandidates(PartialDiagnosticAt(Kind.getLocation(), Failure == FK_UserConversionOverloadFailed ? (S.PDiag(diag::err_typecheck_ambiguous_condition) << OnlyArg->getType() << DestType << Args[0]->getSourceRange()) : (S.PDiag(diag::err_ref_init_ambiguous) << DestType << OnlyArg->getType() << Args[0]->getSourceRange())), S, OCD_AmbiguousCandidates, Args);"},{Pb,3774,"bool Sema::DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType) {\n // ...\n if (OvResult == OR_Ambiguous)\n Diag(From->getBeginLoc(), diag::err_typecheck_ambiguous_condition) << From->getType() << ToType << From->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.dcl/p4-0x.cpp"]={"clang/test/CXX/dcl.dcl/p4-0x.cpp:19:15: error: conversion from \'U\' to \'bool\' is ambiguous"} | ["clang/test/CXX/dcl.dcl/p4-0x.cpp"]={"clang/test/CXX/dcl.dcl/p4-0x.cpp:19:15: error: conversion from \'U\' to \'bool\' is ambiguous"} | ||
Line 6,929: | Line 6,957: | ||
}, | }, | ||
["err_typecheck_arc_assign_externally_retained"]={ | ["err_typecheck_arc_assign_externally_retained"]={ | ||
[ | [i]={{nil,E,"err_typecheck_arc_assign_externally_retained"}}, | ||
[ | [h]={{nil,E,"variable declared with \'objc_externally_retained\' cannot be modified in ARC"}}, | ||
[ | [g]={{nil,E,"variable declared with \'objc_externally_retained\' cannot be modified in ARC"}}, | ||
[ | [b]=k, | ||
[ | [e]="variable declared with \'objc_externally_retained\' cannot be modified in ARC", | ||
[ | [f]=a, | ||
[ | [d]={{nil,E,"ARC Semantic Issue"}}, | ||
[ | [c]={"1e36882b5291",1546626786,"[ObjCARC] Add an new attribute, objc_externally_retained","[ObjCARC] Add an new attribute, objc_externally_retained\n\nThis attribute, called \"objc_externally_retained\", exposes clang\'s\nnotion of pseudo-__strong variables in ARC. Pseudo-strong variables\n\"borrow\" their initializer, meaning that they don\'t retain/release\nit, instead assuming that someone else is keeping their value alive.\n\nIf a function is annotated with this attribute, implicitly strong\nparameters of that function aren\'t implicitly retained/released in\nthe function body, and are implicitly const. This is useful to expose\nfor performance reasons, most functions don\'t need the extra safety\nof the retain/release, so programmers can opt out as needed.\n\nThis attribute can also apply to declarations of local variables,\nwith similar effect.\n\nDifferential revision: https://reviews.llvm.org/D55865\n\nllvm-svn: 350422"}, | ||
[j]={{n,14313,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ConstQualified:\n // ...\n // In ARC, use some specialized diagnostics for occasions where we\n // infer \'const\'. These are always pseudo-strong variables.\n if (S.getLangOpts().ObjCAutoRefCount) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n // Use the normal diagnostic if it\'s pseudo-__strong but the\n // user actually wrote \'const\'.\n if (var->isARCPseudoStrong() && (!var->getTypeSourceInfo() || !var->getTypeSourceInfo()->getType().isConstQualified())) {\n // ...\n if (method && var == method->getSelfDecl()) {\n // ...\n } else if (var->hasAttr<ObjCExternallyRetainedAttr>() || isa<ParmVarDecl>(var)) {\n DiagID = diag::err_typecheck_arc_assign_externally_retained;"}}, | [j]={{n,14313,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ConstQualified:\n // ...\n // In ARC, use some specialized diagnostics for occasions where we\n // infer \'const\'. These are always pseudo-strong variables.\n if (S.getLangOpts().ObjCAutoRefCount) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n // Use the normal diagnostic if it\'s pseudo-__strong but the\n // user actually wrote \'const\'.\n if (var->isARCPseudoStrong() && (!var->getTypeSourceInfo() || !var->getTypeSourceInfo()->getType().isConstQualified())) {\n // ...\n if (method && var == method->getSelfDecl()) {\n // ...\n } else if (var->hasAttr<ObjCExternallyRetainedAttr>() || isa<ParmVarDecl>(var)) {\n DiagID = diag::err_typecheck_arc_assign_externally_retained;"}}, | ||
[l]={ | [l]={ | ||
Line 6,943: | Line 6,971: | ||
}, | }, | ||
["err_typecheck_arc_assign_self"]={ | ["err_typecheck_arc_assign_self"]={ | ||
[ | [i]="err_typecheck_arc_assign_self", | ||
[h]="cannot assign to \'self\' outside of a method in the init family", | |||
[g]="cannot assign to \'self\' outside of a method in the init family", | |||
[b]=k, | |||
[e]="cannot assign to \'self\' outside of a method in the init family", | [e]="cannot assign to \'self\' outside of a method in the init family", | ||
[f]= | [f]=a, | ||
[ | [d]="ARC Semantic Issue", | ||
[c]={"1fcdaa9c058e",1321307965,"ARC: make assignment to \'self\' within class methods illegal. Fixes <rdar://problem/10416568>.","ARC: make assignment to \'self\' within class methods illegal. Fixes <rdar://problem/10416568>.\n\nllvm-svn: 144572"}, | |||
[ | |||
[j]={{n,14309,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ConstQualified:\n // ...\n // In ARC, use some specialized diagnostics for occasions where we\n // infer \'const\'. These are always pseudo-strong variables.\n if (S.getLangOpts().ObjCAutoRefCount) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n // Use the normal diagnostic if it\'s pseudo-__strong but the\n // user actually wrote \'const\'.\n if (var->isARCPseudoStrong() && (!var->getTypeSourceInfo() || !var->getTypeSourceInfo()->getType().isConstQualified())) {\n // ...\n if (method && var == method->getSelfDecl()) {\n DiagID = method->isClassMethod() ? diag::err_typecheck_arc_assign_self_class_method : diag::err_typecheck_arc_assign_self;"}}, | [j]={{n,14309,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ConstQualified:\n // ...\n // In ARC, use some specialized diagnostics for occasions where we\n // infer \'const\'. These are always pseudo-strong variables.\n if (S.getLangOpts().ObjCAutoRefCount) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n // Use the normal diagnostic if it\'s pseudo-__strong but the\n // user actually wrote \'const\'.\n if (var->isARCPseudoStrong() && (!var->getTypeSourceInfo() || !var->getTypeSourceInfo()->getType().isConstQualified())) {\n // ...\n if (method && var == method->getSelfDecl()) {\n DiagID = method->isClassMethod() ? diag::err_typecheck_arc_assign_self_class_method : diag::err_typecheck_arc_assign_self;"}}, | ||
[l]={ | [l]={ | ||
Line 6,957: | Line 6,985: | ||
}, | }, | ||
["err_typecheck_arc_assign_self_class_method"]={ | ["err_typecheck_arc_assign_self_class_method"]={ | ||
[ | [i]="err_typecheck_arc_assign_self_class_method", | ||
[h]="cannot assign to \'self\' in a class method", | |||
[g]="cannot assign to \'self\' in a class method", | |||
[b]=k, | |||
[e]="cannot assign to \'self\' in a class method", | [e]="cannot assign to \'self\' in a class method", | ||
[f]= | [f]=a, | ||
[ | [d]="ARC Semantic Issue", | ||
[c]={"1fcdaa9c058e",1321307965,"ARC: make assignment to \'self\' within class methods illegal. Fixes <rdar://problem/10416568>.","ARC: make assignment to \'self\' within class methods illegal. Fixes <rdar://problem/10416568>.\n\nllvm-svn: 144572"}, | |||
[ | |||
[j]={{n,14304,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ConstQualified:\n // ...\n // In ARC, use some specialized diagnostics for occasions where we\n // infer \'const\'. These are always pseudo-strong variables.\n if (S.getLangOpts().ObjCAutoRefCount) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n // Use the normal diagnostic if it\'s pseudo-__strong but the\n // user actually wrote \'const\'.\n if (var->isARCPseudoStrong() && (!var->getTypeSourceInfo() || !var->getTypeSourceInfo()->getType().isConstQualified())) {\n // ...\n if (method && var == method->getSelfDecl()) {\n DiagID = method->isClassMethod() ? diag::err_typecheck_arc_assign_self_class_method : diag::err_typecheck_arc_assign_self;"}} | [j]={{n,14304,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ConstQualified:\n // ...\n // In ARC, use some specialized diagnostics for occasions where we\n // infer \'const\'. These are always pseudo-strong variables.\n if (S.getLangOpts().ObjCAutoRefCount) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n // Use the normal diagnostic if it\'s pseudo-__strong but the\n // user actually wrote \'const\'.\n if (var->isARCPseudoStrong() && (!var->getTypeSourceInfo() || !var->getTypeSourceInfo()->getType().isConstQualified())) {\n // ...\n if (method && var == method->getSelfDecl()) {\n DiagID = method->isClassMethod() ? diag::err_typecheck_arc_assign_self_class_method : diag::err_typecheck_arc_assign_self;"}} | ||
}, | }, | ||
["err_typecheck_arithmetic_incomplete_or_sizeless_type"]={ | ["err_typecheck_arithmetic_incomplete_or_sizeless_type"]={ | ||
[ | [i]={{nil,q,"err_typecheck_arithmetic_incomplete_or_sizeless_type"}}, | ||
[ | [h]={{nil,q,"arithmetic on a pointer to %select{an incomplete|sizeless}0 type %1"}}, | ||
[ | [g]={{nil,q,{"arithmetic on a pointer to ",{"an incomplete","sizeless"}," type B"}}}, | ||
[ | [b]=k, | ||
[ | [e]="arithmetic on a pointer to (?:an incomplete|sizeless) type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,11577,"/// Emit error if Operand is incomplete pointer type\n///\n/// \\returns True if pointer has incomplete type\nstatic bool checkArithmeticIncompletePointerType(Sema &S, SourceLocation Loc, Expr *Operand) {\n // ...\n return S.RequireCompleteSizedType(Loc, PointeeTy, diag::err_typecheck_arithmetic_incomplete_or_sizeless_type, Operand->getSourceRange());"}}, | [j]={{n,11577,"/// Emit error if Operand is incomplete pointer type\n///\n/// \\returns True if pointer has incomplete type\nstatic bool checkArithmeticIncompletePointerType(Sema &S, SourceLocation Loc, Expr *Operand) {\n // ...\n return S.RequireCompleteSizedType(Loc, PointeeTy, diag::err_typecheck_arithmetic_incomplete_or_sizeless_type, Operand->getSourceRange());"}}, | ||
[l]={ | [l]={ | ||
Line 6,982: | Line 7,010: | ||
}, | }, | ||
["err_typecheck_arr_assign_enumeration"]={ | ["err_typecheck_arr_assign_enumeration"]={ | ||
[ | [i]="err_typecheck_arr_assign_enumeration", | ||
[h]="fast enumeration variables cannot be modified in ARC by default; declare the variable __strong to allow this", | |||
[g]="fast enumeration variables cannot be modified in ARC by default; declare the variable __strong to allow this", | |||
[b]=k, | |||
[e]="fast enumeration variables cannot be modified in ARC by default; declare the variable __strong to allow this", | [e]="fast enumeration variables cannot be modified in ARC by default; declare the variable __strong to allow this", | ||
[f | [f]=a, | ||
[d]="ARC Semantic Issue", | |||
[c]={"31168b077c36",1308178962,"Automatic Reference Counting.","Automatic Reference Counting.\n\nLanguage-design credit goes to a lot of people, but I particularly want\nto single out Blaine Garst and Patrick Beard for their contributions.\n\nCompiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,\nin no particular order.\n\nllvm-svn: 133103"}, | |||
[ | |||
[ | |||
[j]={{"clang/lib/ARCMigrate/TransARCAssign.cpp",58,"class ARCAssignChecker : public RecursiveASTVisitor<ARCAssignChecker> {\n // ...\n bool VisitBinaryOperator(BinaryOperator *Exp) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n if (var->isARCPseudoStrong()) {\n // ...\n if (Pass.TA.clearDiagnostic(diag::err_typecheck_arr_assign_enumeration, Exp->getOperatorLoc())) {"},{n,14343,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ConstQualified:\n // ...\n // In ARC, use some specialized diagnostics for occasions where we\n // infer \'const\'. These are always pseudo-strong variables.\n if (S.getLangOpts().ObjCAutoRefCount) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n // Use the normal diagnostic if it\'s pseudo-__strong but the\n // user actually wrote \'const\'.\n if (var->isARCPseudoStrong() && (!var->getTypeSourceInfo() || !var->getTypeSourceInfo()->getType().isConstQualified())) {\n // ...\n if (method && var == method->getSelfDecl()) {\n // ...\n } else if (var->hasAttr<ObjCExternallyRetainedAttr>() || isa<ParmVarDecl>(var)) {\n // ...\n } else {\n DiagID = diag::err_typecheck_arr_assign_enumeration;"}}, | [j]={{"clang/lib/ARCMigrate/TransARCAssign.cpp",58,"class ARCAssignChecker : public RecursiveASTVisitor<ARCAssignChecker> {\n // ...\n bool VisitBinaryOperator(BinaryOperator *Exp) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n if (var->isARCPseudoStrong()) {\n // ...\n if (Pass.TA.clearDiagnostic(diag::err_typecheck_arr_assign_enumeration, Exp->getOperatorLoc())) {"},{n,14343,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ConstQualified:\n // ...\n // In ARC, use some specialized diagnostics for occasions where we\n // infer \'const\'. These are always pseudo-strong variables.\n if (S.getLangOpts().ObjCAutoRefCount) {\n // ...\n if (declRef && isa<VarDecl>(declRef->getDecl())) {\n // ...\n // Use the normal diagnostic if it\'s pseudo-__strong but the\n // user actually wrote \'const\'.\n if (var->isARCPseudoStrong() && (!var->getTypeSourceInfo() || !var->getTypeSourceInfo()->getType().isConstQualified())) {\n // ...\n if (method && var == method->getSelfDecl()) {\n // ...\n } else if (var->hasAttr<ObjCExternallyRetainedAttr>() || isa<ParmVarDecl>(var)) {\n // ...\n } else {\n DiagID = diag::err_typecheck_arr_assign_enumeration;"}}, | ||
[l]={ | [l]={ | ||
Line 6,996: | Line 7,024: | ||
}, | }, | ||
["err_typecheck_array_not_modifiable_lvalue"]={ | ["err_typecheck_array_not_modifiable_lvalue"]={ | ||
[ | [i]="err_typecheck_array_not_modifiable_lvalue", | ||
[ | [h]="array type %0 is not assignable", | ||
[ | [g]="array type A is not assignable", | ||
[ | [b]=k, | ||
[ | [e]="array type (.*?) is not assignable", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,14347,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ArrayType:\n case Expr::MLV_ArrayTemporary:\n DiagID = diag::err_typecheck_array_not_modifiable_lvalue;"}} | [j]={{n,14347,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_ArrayType:\n case Expr::MLV_ArrayTemporary:\n DiagID = diag::err_typecheck_array_not_modifiable_lvalue;"}} | ||
}, | }, | ||
["err_typecheck_assign_const"]={ | ["err_typecheck_assign_const"]={ | ||
[ | [i]="err_typecheck_assign_const", | ||
[ | [h]={{nil,A,"%select{cannot assign to return value because function %1 returns a const value|cannot assign to variable %1 with const-qualified type %2|cannot assign to %select{non-|}1static data member %2 with const-qualified type %3|cannot assign to non-static data member within const member function %1|cannot assign to %select{variable %2|non-static data member %2|lvalue}1 with %select{|nested }3const-qualified data member %4|read-only variable is not assignable}0"},{o,nil,"%select{cannot assign to return value because function %1 returns a const value|cannot assign to variable %1 with const-qualified type %2|cannot assign to %select{non-|}1static data member %2 with const-qualified type %3|cannot assign to non-static data member within const member function %1|read-only variable is not assignable}0"}}, | ||
[ | [g]={{nil,A,{{"cannot assign to return value because function B returns a const value","cannot assign to variable B with const-qualified type C",{"cannot assign to ",{"non-",a},"static data member C with const-qualified type D"},"cannot assign to non-static data member within const member function B",{"cannot assign to ",{"variable C","non-static data member C",id}," with ",{a,"nested "},"const-qualified data member E"},"read-only variable is not assignable"}}},{o,nil,{{"cannot assign to return value because function B returns a const value","cannot assign to variable B with const-qualified type C",{"cannot assign to ",{"non-",a},"static data member C with const-qualified type D"},"cannot assign to non-static data member within const member function B","read-only variable is not assignable"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:cannot assign to return value because function (.*?) returns a const value|cannot assign to variable (.*?) with const\\-qualified type (.*?)|cannot assign to (?:non\\-|)static data member (.*?) with const\\-qualified type (.*?)|cannot assign to non\\-static data member within const member function (.*?)|cannot assign to (?:variable (.*?)|non\\-static data member (.*?)|lvalue) with (?:|nested )const\\-qualified data member (.*?)|read\\-only variable is not assignable)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,14105,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n // Loop to process MemberExpr chains.\n while (true) {\n // ...\n if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {\n // ...\n if (const FieldDecl *Field = dyn_cast<FieldDecl>(VD)) {\n // ...\n if (!IsTypeModifiable(Field->getType(), IsDereference)) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstMember << false /*static*/ << Field << Field->getType();"},{n,14119,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n // Loop to process MemberExpr chains.\n while (true) {\n // ...\n if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {\n // ...\n if (const FieldDecl *Field = dyn_cast<FieldDecl>(VD)) {\n // ...\n } else if (const VarDecl *VDecl = dyn_cast<VarDecl>(VD)) {\n if (VDecl->getType().isConstQualified()) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstMember << true /*static*/ << VDecl << VDecl->getType();"},{n,14149,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n if (FD && !IsTypeModifiable(FD->getReturnType(), IsDereference)) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstFunction << FD;"},{n,14162,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n } else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {\n // Point to variable declaration.\n if (const ValueDecl *VD = DRE->getDecl()) {\n if (!IsTypeModifiable(VD->getType(), IsDereference)) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstVariable << VD << VD->getType();"},{n,14175,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n } else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {\n // ...\n } else if (isa<CXXThisExpr>(E)) {\n if (const DeclContext *DC = S.getFunctionLevelDeclContext()) {\n if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(DC)) {\n if (MD->isConst()) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstMethod << MD;"},{n,14213,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstUnknown;"},{n,14218,"static void DiagnoseRecursiveConstFields(Sema &S, const ValueDecl *VD, const RecordType *Ty, SourceLocation Loc, SourceRange Range, OriginalExprKind OEK, bool &DiagnosticEmitted) {\n // ...\n // We walk the record hierarchy breadth-first to ensure that we print\n // diagnostics in field nesting order.\n while (RecordTypeList.size() > NextToCheckIndex) {\n // ...\n for (const FieldDecl *Field : RecordTypeList[NextToCheckIndex]->getDecl()->fields()) {\n // ...\n if (FieldTy.isConstQualified()) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << Range << NestedConstMember << OEK << VD << IsNested << Field;"}}, | [j]={{n,14105,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n // Loop to process MemberExpr chains.\n while (true) {\n // ...\n if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {\n // ...\n if (const FieldDecl *Field = dyn_cast<FieldDecl>(VD)) {\n // ...\n if (!IsTypeModifiable(Field->getType(), IsDereference)) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstMember << false /*static*/ << Field << Field->getType();"},{n,14119,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n // Loop to process MemberExpr chains.\n while (true) {\n // ...\n if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {\n // ...\n if (const FieldDecl *Field = dyn_cast<FieldDecl>(VD)) {\n // ...\n } else if (const VarDecl *VDecl = dyn_cast<VarDecl>(VD)) {\n if (VDecl->getType().isConstQualified()) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstMember << true /*static*/ << VDecl << VDecl->getType();"},{n,14149,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n if (FD && !IsTypeModifiable(FD->getReturnType(), IsDereference)) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstFunction << FD;"},{n,14162,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n } else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {\n // Point to variable declaration.\n if (const ValueDecl *VD = DRE->getDecl()) {\n if (!IsTypeModifiable(VD->getType(), IsDereference)) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstVariable << VD << VD->getType();"},{n,14175,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n } else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {\n // ...\n } else if (isa<CXXThisExpr>(E)) {\n if (const DeclContext *DC = S.getFunctionLevelDeclContext()) {\n if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(DC)) {\n if (MD->isConst()) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstMethod << MD;"},{n,14213,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstUnknown;"},{n,14218,"static void DiagnoseRecursiveConstFields(Sema &S, const ValueDecl *VD, const RecordType *Ty, SourceLocation Loc, SourceRange Range, OriginalExprKind OEK, bool &DiagnosticEmitted) {\n // ...\n // We walk the record hierarchy breadth-first to ensure that we print\n // diagnostics in field nesting order.\n while (RecordTypeList.size() > NextToCheckIndex) {\n // ...\n for (const FieldDecl *Field : RecordTypeList[NextToCheckIndex]->getDecl()->fields()) {\n // ...\n if (FieldTy.isConstQualified()) {\n if (!DiagnosticEmitted) {\n S.Diag(Loc, diag::err_typecheck_assign_const) << Range << NestedConstMember << OEK << VD << IsNested << Field;"}}, | ||
[l]={ | [l]={ | ||
Line 7,021: | Line 7,049: | ||
}, | }, | ||
["err_typecheck_bool_condition"]={ | ["err_typecheck_bool_condition"]={ | ||
[ | [i]="err_typecheck_bool_condition", | ||
[ | [h]="value of type %0 is not contextually convertible to \'bool\'", | ||
[ | [g]="value of type A is not contextually convertible to \'bool\'", | ||
[ | [b]=k, | ||
[ | [e]="value of type (.*?) is not contextually convertible to \'bool\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{Pb,5744,"/// PerformContextuallyConvertToBool - Perform a contextual conversion\n/// of the expression From to bool (C++0x [conv]p3).\nExprResult Sema::PerformContextuallyConvertToBool(Expr *From) {\n // ...\n if (!DiagnoseMultipleUserDefinedConversion(From, Context.BoolTy))\n return Diag(From->getBeginLoc(), diag::err_typecheck_bool_condition) << From->getType() << From->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/decomposed-condition.cpp"]={"clang/test/Parser/decomposed-condition.cpp:38:12: error: value of type \'Na\' is not contextually convertible to \'bool\'","clang/test/Parser/decomposed-condition.cpp:49:15: error: value of type \'Na\' is not contextually convertible to \'bool\'","clang/test/Parser/decomposed-condition.cpp:60:15: error: value of type \'Na\' is not contextually convertible to \'bool\'"} | ["clang/test/Parser/decomposed-condition.cpp"]={"clang/test/Parser/decomposed-condition.cpp:38:12: error: value of type \'Na\' is not contextually convertible to \'bool\'","clang/test/Parser/decomposed-condition.cpp:49:15: error: value of type \'Na\' is not contextually convertible to \'bool\'","clang/test/Parser/decomposed-condition.cpp:60:15: error: value of type \'Na\' is not contextually convertible to \'bool\'"} | ||
Line 7,035: | Line 7,063: | ||
}, | }, | ||
["err_typecheck_call_different_arg_types"]={ | ["err_typecheck_call_different_arg_types"]={ | ||
[ | [i]={{nil,v,"err_typecheck_call_different_arg_types"}}, | ||
[ | [h]={{nil,v,"arguments are of different types%diff{ ($ vs $)|}0,1"}}, | ||
[ | [g]={{nil,v,{"arguments are of different types",{" (A vs B)",a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="arguments are of different types(?: \\((.*?) vs (.*?)\\)|)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{z,2724,"#include \"clang/Basic/Builtins.def\"\n // ...\n case Builtin::BI__builtin_elementwise_copysign: {\n // ...\n if (MagnitudeTy.getCanonicalType() != SignTy.getCanonicalType()) {\n return Diag(Sign.get()->getBeginLoc(), diag::err_typecheck_call_different_arg_types) << MagnitudeTy << SignTy;"},{z,8368,"/// Perform semantic analysis for a call to __builtin_complex.\nbool Sema::SemaBuiltinComplex(CallExpr *TheCall) {\n // ...\n if (!Context.hasSameType(Real->getType(), Imag->getType())) {\n return Diag(Real->getBeginLoc(), diag::err_typecheck_call_different_arg_types) << Real->getType() << Imag->getType() << Real->getSourceRange() << Imag->getSourceRange();"},{z,18659,"bool Sema::SemaBuiltinElementwiseMath(CallExpr *TheCall) {\n // ...\n if (Res.isNull() || TyA.getCanonicalType() != TyB.getCanonicalType())\n return Diag(A.get()->getBeginLoc(), diag::err_typecheck_call_different_arg_types) << TyA << TyB;"},{z,18694,"bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr *TheCall) {\n // ...\n for (int I = 1; I < 3; ++I) {\n if (Args[0]->getType().getCanonicalType() != Args[I]->getType().getCanonicalType()) {\n return Diag(Args[0]->getBeginLoc(), diag::err_typecheck_call_different_arg_types) << Args[0]->getType() << Args[I]->getType();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtins-elementwise-math.c"]={"clang/test/Sema/builtins-elementwise-math.c:47:37: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:62:37: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:65:37: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:105:37: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:120:37: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:123:37: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:163:33: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:178:33: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:181:33: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:218:33: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:233:33: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:236:33: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:442:33: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:457:33: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:460:33: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:690:53: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:693:50: error: arguments are of different types (\'float\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:697:55: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:700:50: error: arguments are of different types (\'float\' vs \'float4\' (vector of 4 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:705:56: error: arguments are of different types (\'double4\' (vector of 4 \'double\' values) vs \'float4\' (vector of 4 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:708:55: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'double4\' (vector of 4 \'double\' values))","clang/test/Sema/builtins-elementwise-math.c:711:55: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'float2\' (vector of 2 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:714:55: error: arguments are of different types (\'float2\' (vector of 2 \'float\' values) vs \'float4\' (vector of 4 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:739:35: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:742:35: error: arguments are of different types (\'float\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:745:35: error: arguments are of different types (\'float\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:748:35: error: arguments are of different types (\'float\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:751:35: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:754:35: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:757:35: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:760:37: error: arguments are of different types (\'float2\' (vector of 2 \'float\' values) vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:763:37: error: arguments are of different types (\'float2\' (vector of 2 \'float\' values) vs \'double2\' (vector of 2 \'double\' values))","clang/test/Sema/builtins-elementwise-math.c:766:37: error: arguments are of different types (\'float2\' (vector of 2 \'float\' values) vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:769:37: error: arguments are of different types (\'double\' vs \'float2\' (vector of 2 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:772:37: error: arguments are of different types (\'double\' vs \'double2\' (vector of 2 \'double\' values))"} | ["clang/test/Sema/builtins-elementwise-math.c"]={"clang/test/Sema/builtins-elementwise-math.c:47:37: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:62:37: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:65:37: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:105:37: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:120:37: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:123:37: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:163:33: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:178:33: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:181:33: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:218:33: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:233:33: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:236:33: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:442:33: error: arguments are of different types (\'int *\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:457:33: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:460:33: error: arguments are of different types (\'unsigned3\' (vector of 3 \'unsigned int\' values) vs \'int3\' (vector of 3 \'int\' values))","clang/test/Sema/builtins-elementwise-math.c:690:53: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:693:50: error: arguments are of different types (\'float\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:697:55: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:700:50: error: arguments are of different types (\'float\' vs \'float4\' (vector of 4 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:705:56: error: arguments are of different types (\'double4\' (vector of 4 \'double\' values) vs \'float4\' (vector of 4 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:708:55: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'double4\' (vector of 4 \'double\' values))","clang/test/Sema/builtins-elementwise-math.c:711:55: error: arguments are of different types (\'float4\' (vector of 4 \'float\' values) vs \'float2\' (vector of 2 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:714:55: error: arguments are of different types (\'float2\' (vector of 2 \'float\' values) vs \'float4\' (vector of 4 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:739:35: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:742:35: error: arguments are of different types (\'float\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:745:35: error: arguments are of different types (\'float\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:748:35: error: arguments are of different types (\'float\' vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:751:35: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:754:35: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:757:35: error: arguments are of different types (\'double\' vs \'float\')","clang/test/Sema/builtins-elementwise-math.c:760:37: error: arguments are of different types (\'float2\' (vector of 2 \'float\' values) vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:763:37: error: arguments are of different types (\'float2\' (vector of 2 \'float\' values) vs \'double2\' (vector of 2 \'double\' values))","clang/test/Sema/builtins-elementwise-math.c:766:37: error: arguments are of different types (\'float2\' (vector of 2 \'float\' values) vs \'double\')","clang/test/Sema/builtins-elementwise-math.c:769:37: error: arguments are of different types (\'double\' vs \'float2\' (vector of 2 \'float\' values))","clang/test/Sema/builtins-elementwise-math.c:772:37: error: arguments are of different types (\'double\' vs \'double2\' (vector of 2 \'double\' values))"} | ||
Line 7,049: | Line 7,077: | ||
}, | }, | ||
["err_typecheck_call_invalid_ordered_compare"]={ | ["err_typecheck_call_invalid_ordered_compare"]={ | ||
[ | [i]="err_typecheck_call_invalid_ordered_compare", | ||
[ | [h]="ordered compare requires two args of floating point type%diff{ ($ and $)|}0,1", | ||
[ | [g]={{nil,nil,{"ordered compare requires two args of floating point type",{rc,a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="ordered compare requires two args of floating point type(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{z,8269,"/// SemaBuiltinUnorderedCompare - Handle functions like __builtin_isgreater and\n/// friends. This is declared to take (...), so we have to check everything.\nbool Sema::SemaBuiltinUnorderedCompare(CallExpr *TheCall) {\n // ...\n // If the common type isn\'t a real floating type, then the arguments were\n // invalid for this operation.\n if (Res.isNull() || !Res->isRealFloatingType())\n return Diag(OrigArg0.get()->getBeginLoc(), diag::err_typecheck_call_invalid_ordered_compare) << OrigArg0.get()->getType() << OrigArg1.get()->getType() << SourceRange(OrigArg0.get()->getBeginLoc(), OrigArg1.get()->getEndLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtins.c"]={"clang/test/Sema/builtins.c:8:32: error: ordered compare requires two args of floating point type (\'int\' and \'int\')","clang/test/Sema/builtins.c:15:32: error: ordered compare requires two args of floating point type (\'int *\' and \'double\')"} | ["clang/test/Sema/builtins.c"]={"clang/test/Sema/builtins.c:8:32: error: ordered compare requires two args of floating point type (\'int\' and \'int\')","clang/test/Sema/builtins.c:15:32: error: ordered compare requires two args of floating point type (\'int *\' and \'double\')"} | ||
Line 7,063: | Line 7,091: | ||
}, | }, | ||
["err_typecheck_call_invalid_unary_fp"]={ | ["err_typecheck_call_invalid_unary_fp"]={ | ||
[ | [i]="err_typecheck_call_invalid_unary_fp", | ||
[ | [h]="floating point classification requires argument of floating point type (passed in %0)", | ||
[ | [g]="floating point classification requires argument of floating point type (passed in A)", | ||
[ | [b]=k, | ||
[ | [e]="floating point classification requires argument of floating point type \\(passed in (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"7e4faaccda69",1251749160,"PR4836, part 1: add Sema support for __builtin_isnan and friends; they ","PR4836, part 1: add Sema support for __builtin_isnan and friends; they \nare apparently used by Solaris libc despite the fact that clang claims \nto be compatible with gcc 4.2, which doesn\'t support them.\n\nllvm-svn: 80610"}, | ||
[j]={{ | [j]={{z,8320,"/// SemaBuiltinSemaBuiltinFPClassification - Handle functions like\n/// __builtin_isnan and friends. This is declared to take (...), so we have\n/// to check everything. We expect the last argument to be a floating point\n/// value.\nbool Sema::SemaBuiltinFPClassification(CallExpr *TheCall, unsigned NumArgs) {\n // ...\n // This operation requires a non-_Complex floating-point number.\n if (!OrigArg->getType()->isRealFloatingType())\n return Diag(OrigArg->getBeginLoc(), diag::err_typecheck_call_invalid_unary_fp) << OrigArg->getType() << OrigArg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtin-unary-fp.c"]={"clang/test/Sema/builtin-unary-fp.c:9:28: error: floating point classification requires argument of floating point type (passed in \'int\')","clang/test/Sema/builtin-unary-fp.c:13:45: error: floating point classification requires argument of floating point type (passed in \'int\')"} | ["clang/test/Sema/builtin-unary-fp.c"]={"clang/test/Sema/builtin-unary-fp.c:9:28: error: floating point classification requires argument of floating point type (passed in \'int\')","clang/test/Sema/builtin-unary-fp.c:13:45: error: floating point classification requires argument of floating point type (passed in \'int\')"} | ||
Line 7,077: | Line 7,105: | ||
}, | }, | ||
["err_typecheck_call_not_function"]={ | ["err_typecheck_call_not_function"]={ | ||
[ | [i]="err_typecheck_call_not_function", | ||
[ | [h]="called object type %0 is not a function or function pointer", | ||
[ | [g]="called object type A is not a function or function pointer", | ||
[ | [b]=k, | ||
[ | [e]="called object type (.*?) is not a function or function pointer", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,7417,"/// 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 retry:\n if (const PointerType *PT = Fn->getType()->getAs<PointerType>()) {\n // ...\n if (!FuncT)\n return ExprError(Diag(LParenLoc, diag::err_typecheck_call_not_function) << Fn->getType() << Fn->getSourceRange());"},{n,7483,"/// 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 retry:\n if (const PointerType *PT = Fn->getType()->getAs<PointerType>()) {\n // ...\n } else if (const BlockPointerType *BPT = Fn->getType()->getAs<BlockPointerType>()) {\n // ...\n } else {\n // ...\n return ExprError(Diag(LParenLoc, diag::err_typecheck_call_not_function) << Fn->getType() << Fn->getSourceRange());"}}, | [j]={{n,7417,"/// 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 retry:\n if (const PointerType *PT = Fn->getType()->getAs<PointerType>()) {\n // ...\n if (!FuncT)\n return ExprError(Diag(LParenLoc, diag::err_typecheck_call_not_function) << Fn->getType() << Fn->getSourceRange());"},{n,7483,"/// 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 retry:\n if (const PointerType *PT = Fn->getType()->getAs<PointerType>()) {\n // ...\n } else if (const BlockPointerType *BPT = Fn->getType()->getAs<BlockPointerType>()) {\n // ...\n } else {\n // ...\n return ExprError(Diag(LParenLoc, diag::err_typecheck_call_not_function) << Fn->getType() << Fn->getSourceRange());"}}, | ||
[l]={ | [l]={ | ||
Line 7,091: | Line 7,119: | ||
}, | }, | ||
["err_typecheck_call_requires_real_fp"]={ | ["err_typecheck_call_requires_real_fp"]={ | ||
[ | [i]={{nil,v,"err_typecheck_call_requires_real_fp"}}, | ||
[ | [h]={{nil,v,"argument type %0 is not a real floating point type"}}, | ||
[ | [g]={{nil,v,"argument type A is not a real floating point type"}}, | ||
[ | [b]=k, | ||
[ | [e]="argument type (.*?) is not a real floating point type", | ||
[ | [f]=a, | ||
[ | [d]={{nil,v,m}}, | ||
[ | [c]={lb,1582847864,mb,nb}, | ||
[j]={{ | [j]={{z,8349,"/// Perform semantic analysis for a call to __builtin_complex.\nbool Sema::SemaBuiltinComplex(CallExpr *TheCall) {\n // ...\n for (unsigned I = 0; I != 2; ++I) {\n // ...\n // Despite supporting _Complex int, GCC requires a real floating point type\n // for the operands of __builtin_complex.\n if (!T->isRealFloatingType()) {\n return Diag(Arg->getBeginLoc(), diag::err_typecheck_call_requires_real_fp) << Arg->getType() << Arg->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtins.c"]={"clang/test/Sema/builtins.c:373:21: error: argument type \'int\' is not a real floating point type","clang/test/Sema/builtins.c:374:21: error: argument type \'int\' is not a real floating point type","clang/test/Sema/builtins.c:375:26: error: argument type \'int\' is not a real floating point type"} | ["clang/test/Sema/builtins.c"]={"clang/test/Sema/builtins.c:373:21: error: argument type \'int\' is not a real floating point type","clang/test/Sema/builtins.c:374:21: error: argument type \'int\' is not a real floating point type","clang/test/Sema/builtins.c:375:26: error: argument type \'int\' is not a real floating point type"} | ||
Line 7,105: | Line 7,133: | ||
}, | }, | ||
["err_typecheck_call_too_few_args"]={ | ["err_typecheck_call_too_few_args"]={ | ||
[ | [i]="err_typecheck_call_too_few_args", | ||
[ | [h]="too few %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected %1, have %2", | ||
[ | [g]={{nil,nil,{Cc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected B, have C"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too few (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected (.*?), have (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{z,127,"/// Checks that a call expression\'s argument count is at least the desired\n/// number. This is useful when doing custom type-checking on a variadic\n/// function. Returns true on error.\nstatic bool checkArgCountAtLeast(Sema &S, CallExpr *Call, unsigned MinArgCount) {\n // ...\n return S.Diag(Call->getEndLoc(), diag::err_typecheck_call_too_few_args) << 0 /*function call*/ << MinArgCount << ArgCount << Call->getSourceRange();"},{z,7132,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n // ...\n // Check we have the right number of arguments.\n if (Args.size() < AdjustedNumArgs) {\n Diag(CallRange.getEnd(), diag::err_typecheck_call_too_few_args) << 0 << AdjustedNumArgs << static_cast<unsigned>(Args.size()) << ExprRange;"},{z,8700,"bool Sema::SemaBuiltinOSLogFormat(CallExpr *TheCall) {\n // ...\n if (NumArgs < NumRequiredArgs) {\n return Diag(TheCall->getEndLoc(), diag::err_typecheck_call_too_few_args) << 0 /* function call */ << NumRequiredArgs << NumArgs << TheCall->getSourceRange();"},{n,6471,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (MinArgs == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n // ...\n else\n Diag(RParenLoc, MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args : diag::err_typecheck_call_too_few_args_at_least) << FnKind << MinArgs << static_cast<unsigned>(Args.size()) << Fn->getSourceRange();"},{ac,1803,"bool Sema::CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef<SourceLocation> SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) {\n // ...\n // FIXME. This need be cleaned up.\n if (Args.size() < NumNamedArgs) {\n Diag(SelLoc, diag::err_typecheck_call_too_few_args) << 2 << NumNamedArgs << static_cast<unsigned>(Args.size());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtin-unary-fp.c"]={"clang/test/Sema/builtin-unary-fp.c:10:25: error: too few arguments to function call, expected 1, have 0","clang/test/Sema/builtin-unary-fp.c:15:43: error: too few arguments to function call, expected 6, have 5"} | ["clang/test/Sema/builtin-unary-fp.c"]={"clang/test/Sema/builtin-unary-fp.c:10:25: error: too few arguments to function call, expected 1, have 0","clang/test/Sema/builtin-unary-fp.c:15:43: error: too few arguments to function call, expected 6, have 5"} | ||
Line 7,119: | Line 7,147: | ||
}, | }, | ||
["err_typecheck_call_too_few_args_at_least"]={ | ["err_typecheck_call_too_few_args_at_least"]={ | ||
[ | [i]="err_typecheck_call_too_few_args_at_least", | ||
[ | [h]="too few %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected at least %1, have %2", | ||
[ | [g]={{nil,nil,{Cc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected at least B, have C"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too few (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected at least (.*?), have (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"abf1e18e32c9",1271393302,"Expand argument diagnostic for too few arguments to give the number","Expand argument diagnostic for too few arguments to give the number\nof arguments both seen and expected.\n\nFixes PR6501.\n\nllvm-svn: 101441"}, | ||
[j]={{ | [j]={{z,219,"static bool SemaBuiltinMSVCAnnotation(Sema &S, CallExpr *TheCall) {\n // We need at least one argument.\n if (TheCall->getNumArgs() < 1) {\n S.Diag(TheCall->getEndLoc(), diag::err_typecheck_call_too_few_args_at_least) << 0 << 1 << TheCall->getNumArgs() << TheCall->getCallee()->getSourceRange();"},{z,1533,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n if (NumArgs < 4) {\n S.Diag(TheCall->getBeginLoc(), diag::err_typecheck_call_too_few_args_at_least) << 0 << 4 << NumArgs;"},{z,7535,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n // ...\n // Ensure that we have at least one argument to do type inference from.\n if (TheCall->getNumArgs() < 1) {\n Diag(TheCall->getEndLoc(), diag::err_typecheck_call_too_few_args_at_least) << 0 << 1 << TheCall->getNumArgs() << Callee->getSourceRange();"},{z,7811,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n // ...\n // Now that we know how many fixed arguments we expect, first check that we\n // have at least that many.\n if (TheCall->getNumArgs() < 1 + NumFixed) {\n Diag(TheCall->getEndLoc(), diag::err_typecheck_call_too_few_args_at_least) << 0 << 1 + NumFixed << TheCall->getNumArgs() << Callee->getSourceRange();"},{z,8201,"bool Sema::SemaBuiltinVAStartARMMicrosoft(CallExpr *Call) {\n // ...\n if (Call->getNumArgs() < 3)\n return Diag(Call->getEndLoc(), diag::err_typecheck_call_too_few_args_at_least) << 0 /*function call*/ << 3 << Call->getNumArgs();"},{z,8441,"/// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.\n// This is declared to take (...), so we have to check everything.\nExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {\n if (TheCall->getNumArgs() < 2)\n return ExprError(Diag(TheCall->getEndLoc(), diag::err_typecheck_call_too_few_args_at_least) << 0 /*function call*/ << 2 << TheCall->getNumArgs() << TheCall->getSourceRange());"},{n,6477,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (MinArgs == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n // ...\n else\n Diag(RParenLoc, MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args : diag::err_typecheck_call_too_few_args_at_least) << FnKind << MinArgs << static_cast<unsigned>(Args.size()) << Fn->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/exprs.c"]={"clang/test/Sema/exprs.c:182:12: error: too few arguments to function call, expected at least 2, have 0"} | ["clang/test/Sema/exprs.c"]={"clang/test/Sema/exprs.c:182:12: error: too few arguments to function call, expected at least 2, have 0"} | ||
Line 7,133: | Line 7,161: | ||
}, | }, | ||
["err_typecheck_call_too_few_args_at_least_one"]={ | ["err_typecheck_call_too_few_args_at_least_one"]={ | ||
[ | [i]="err_typecheck_call_too_few_args_at_least_one", | ||
[ | [h]="too few %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, at least argument %1 must be specified", | ||
[ | [g]={{nil,nil,{Cc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, at least argument B must be specified"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too few (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, at least argument (.*?) must be specified", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"10ff50d7d8d6",1336713401,"PR11857: When the wrong number of arguments are provided for a function","PR11857: When the wrong number of arguments are provided for a function\nwhich expects exactly one argument, include the name of the argument in\nthe diagnostic text. Patch by Terry Long!\n\nllvm-svn: 156607"}, | ||
[j]={{n,6470,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (MinArgs == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n Diag(RParenLoc, MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args_one : diag::err_typecheck_call_too_few_args_at_least_one) << FnKind << FDecl->getParamDecl(0) << Fn->getSourceRange();"}}, | [j]={{n,6470,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (MinArgs == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n Diag(RParenLoc, MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args_one : diag::err_typecheck_call_too_few_args_at_least_one) << FnKind << FDecl->getParamDecl(0) << Fn->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,147: | Line 7,175: | ||
}, | }, | ||
["err_typecheck_call_too_few_args_at_least_suggest"]={ | ["err_typecheck_call_too_few_args_at_least_suggest"]={ | ||
[ | [i]="err_typecheck_call_too_few_args_at_least_suggest", | ||
[ | [h]="too few %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected at least %1, have %2; did you mean %3?", | ||
[ | [g]={{nil,nil,{Cc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected at least B, have C; did you mean D?"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too few (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected at least (.*?), have (.*?); did you mean (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"476c823ec8fd",1373325224,"Attempt typo correction for function calls with the wrong number of arguments.","Attempt typo correction for function calls with the wrong number of arguments.\n\nCombined with typo correction\'s new ability to apply global/absolute nested\nname specifiers to possible corrections, cases such as in PR12287 where the\ndesired function is being shadowed by a lexically closer function with the\nsame name but a different number of parameters will now include a FixIt.\n\nOn a side note, since the test for this change caused\ntest/SemaCXX/typo-correction.cpp to exceed the typo correction limit for\na single file, I\'ve included a test case for exceeding the limit and added\nsome comments to both the original and part two of typo-correction.cpp\nwarning future editors of the files about the limit.\n\nllvm-svn: 185881"}, | ||
[j]={{n,6465,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n unsigned diag_id = MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args_suggest : diag::err_typecheck_call_too_few_args_at_least_suggest;"}} | [j]={{n,6465,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n unsigned diag_id = MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args_suggest : diag::err_typecheck_call_too_few_args_at_least_suggest;"}} | ||
}, | }, | ||
["err_typecheck_call_too_few_args_one"]={ | ["err_typecheck_call_too_few_args_one"]={ | ||
[ | [i]="err_typecheck_call_too_few_args_one", | ||
[ | [h]="too few %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, single argument %1 was not specified", | ||
[ | [g]={{nil,nil,{Cc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, single argument B was not specified"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too few (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, single argument (.*?) was not specified", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"10ff50d7d8d6",1336713401,"PR11857: When the wrong number of arguments are provided for a function","PR11857: When the wrong number of arguments are provided for a function\nwhich expects exactly one argument, include the name of the argument in\nthe diagnostic text. Patch by Terry Long!\n\nllvm-svn: 156607"}, | ||
[j]={{n,6466,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (MinArgs == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n Diag(RParenLoc, MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args_one : diag::err_typecheck_call_too_few_args_at_least_one) << FnKind << FDecl->getParamDecl(0) << Fn->getSourceRange();"}}, | [j]={{n,6466,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (MinArgs == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n Diag(RParenLoc, MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args_one : diag::err_typecheck_call_too_few_args_at_least_one) << FnKind << FDecl->getParamDecl(0) << Fn->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,172: | Line 7,200: | ||
}, | }, | ||
["err_typecheck_call_too_few_args_suggest"]={ | ["err_typecheck_call_too_few_args_suggest"]={ | ||
[ | [i]="err_typecheck_call_too_few_args_suggest", | ||
[ | [h]="too few %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected %1, have %2; did you mean %3?", | ||
[ | [g]={{nil,nil,{Cc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected B, have C; did you mean D?"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too few (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected (.*?), have (.*?); did you mean (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"476c823ec8fd",1373325224,"Attempt typo correction for function calls with the wrong number of arguments.","Attempt typo correction for function calls with the wrong number of arguments.\n\nCombined with typo correction\'s new ability to apply global/absolute nested\nname specifiers to possible corrections, cases such as in PR12287 where the\ndesired function is being shadowed by a lexically closer function with the\nsame name but a different number of parameters will now include a FixIt.\n\nOn a side note, since the test for this change caused\ntest/SemaCXX/typo-correction.cpp to exceed the typo correction limit for\na single file, I\'ve included a test case for exceeding the limit and added\nsome comments to both the original and part two of typo-correction.cpp\nwarning future editors of the files about the limit.\n\nllvm-svn: 185881"}, | ||
[j]={{n,6458,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n unsigned diag_id = MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args_suggest : diag::err_typecheck_call_too_few_args_at_least_suggest;"}}, | [j]={{n,6458,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n unsigned diag_id = MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_few_args_suggest : diag::err_typecheck_call_too_few_args_at_least_suggest;"}}, | ||
[l]={ | [l]={ | ||
Line 7,186: | Line 7,214: | ||
}, | }, | ||
["err_typecheck_call_too_many_args"]={ | ["err_typecheck_call_too_many_args"]={ | ||
[ | [i]="err_typecheck_call_too_many_args", | ||
[ | [h]="too many %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected %1, have %2", | ||
[ | [g]={{nil,nil,{Pc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected B, have C"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too many (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected (.*?), have (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{z,169,"/// Checks that a call expression\'s argument count is the desired number.\n/// This is useful when doing custom type-checking. Returns true on error.\nstatic bool checkArgCount(Sema &S, CallExpr *Call, unsigned DesiredArgCount) {\n // ...\n return S.Diag(Range.getBegin(), diag::err_typecheck_call_too_many_args) << 0 /*function call*/ << DesiredArgCount << ArgCount << Call->getArg(1)->getSourceRange();"},{z,7138,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n // ...\n // Check we have the right number of arguments.\n if (Args.size() < AdjustedNumArgs) {\n // ...\n } else if (Args.size() > AdjustedNumArgs) {\n Diag(Args[AdjustedNumArgs]->getBeginLoc(), diag::err_typecheck_call_too_many_args) << 0 << AdjustedNumArgs << static_cast<unsigned>(Args.size()) << ExprRange;"},{z,7502,"bool Sema::BuiltinWasmRefNullFunc(CallExpr *TheCall) {\n if (TheCall->getNumArgs() != 0) {\n Diag(TheCall->getBeginLoc(), diag::err_typecheck_call_too_many_args) << 0 /*function call*/ << 0 << TheCall->getNumArgs();"},{n,6515,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (NumParams == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n // ...\n else\n Diag(Args[NumParams]->getBeginLoc(), MinArgs == NumParams ? diag::err_typecheck_call_too_many_args : diag::err_typecheck_call_too_many_args_at_most) << FnKind << NumParams << static_cast<unsigned>(Args.size()) << Fn->getSourceRange() << SourceRange(Args[NumParams]->getBeginLoc(), Args.back()->getEndLoc());"},{ac,1900,"bool Sema::CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef<SourceLocation> SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) {\n // ...\n // Promote additional arguments to variadic methods.\n if (Method->isVariadic()) {\n // ...\n } else {\n // Check for extra arguments to non-variadic methods.\n if (Args.size() != NumNamedArgs) {\n Diag(Args[NumNamedArgs]->getBeginLoc(), diag::err_typecheck_call_too_many_args) << 2 /*method*/ << NumNamedArgs << static_cast<unsigned>(Args.size()) << Method->getSourceRange() << SourceRange(Args[NumNamedArgs]->getBeginLoc(), Args.back()->getEndLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtin-unary-fp.c"]={"clang/test/Sema/builtin-unary-fp.c:11:27: error: too many arguments to function call, expected 1, have 2","clang/test/Sema/builtin-unary-fp.c:16:48: error: too many arguments to function call, expected 6, have 7"} | ["clang/test/Sema/builtin-unary-fp.c"]={"clang/test/Sema/builtin-unary-fp.c:11:27: error: too many arguments to function call, expected 1, have 2","clang/test/Sema/builtin-unary-fp.c:16:48: error: too many arguments to function call, expected 6, have 7"} | ||
Line 7,200: | Line 7,228: | ||
}, | }, | ||
["err_typecheck_call_too_many_args_at_most"]={ | ["err_typecheck_call_too_many_args_at_most"]={ | ||
[ | [i]="err_typecheck_call_too_many_args_at_most", | ||
[ | [h]="too many %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected at most %1, have %2", | ||
[ | [g]={{nil,nil,{Pc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected at most B, have C"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too many (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected at most (.*?), have (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"2a5aafff307a",1271393806,"Expand the argument diagnostics for too many arguments and give","Expand the argument diagnostics for too many arguments and give\nboth number seen and number expected.\n\nFinishes fixing PR6501.\n\nllvm-svn: 101442"}, | ||
[j]={{ | [j]={{z,140,"/// Checks that a call expression\'s argument count is at most the desired\n/// number. This is useful when doing custom type-checking on a variadic\n/// function. Returns true on error.\nstatic bool checkArgCountAtMost(Sema &S, CallExpr *Call, unsigned MaxArgCount) {\n // ...\n return S.Diag(Call->getEndLoc(), diag::err_typecheck_call_too_many_args_at_most) << 0 /*function call*/ << MaxArgCount << ArgCount << Call->getSourceRange();"},{z,8562,"/// SemaBuiltinPrefetch - Handle __builtin_prefetch.\n// This is declared to take (const void*, ...) and can take two\n// optional constant int args.\nbool Sema::SemaBuiltinPrefetch(CallExpr *TheCall) {\n // ...\n if (NumArgs > 3)\n return Diag(TheCall->getEndLoc(), diag::err_typecheck_call_too_many_args_at_most) << 0 /*function call*/ << 3 << NumArgs << TheCall->getSourceRange();"},{z,8706,"bool Sema::SemaBuiltinOSLogFormat(CallExpr *TheCall) {\n // ...\n if (NumArgs >= NumRequiredArgs + 0x100) {\n return Diag(TheCall->getEndLoc(), diag::err_typecheck_call_too_many_args_at_most) << 0 /* function call */ << (NumRequiredArgs + 0xff) << NumArgs << TheCall->getSourceRange();"},{n,6523,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (NumParams == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n // ...\n else\n Diag(Args[NumParams]->getBeginLoc(), MinArgs == NumParams ? diag::err_typecheck_call_too_many_args : diag::err_typecheck_call_too_many_args_at_most) << FnKind << NumParams << static_cast<unsigned>(Args.size()) << Fn->getSourceRange() << SourceRange(Args[NumParams]->getBeginLoc(), Args.back()->getEndLoc());"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/builtin-prefetch.c"]={"clang/test/Sema/builtin-prefetch.c:8:33: error: too many arguments to function call, expected at most 3, have 4"} | ["clang/test/Sema/builtin-prefetch.c"]={"clang/test/Sema/builtin-prefetch.c:8:33: error: too many arguments to function call, expected at most 3, have 4"} | ||
Line 7,214: | Line 7,242: | ||
}, | }, | ||
["err_typecheck_call_too_many_args_at_most_one"]={ | ["err_typecheck_call_too_many_args_at_most_one"]={ | ||
[ | [i]="err_typecheck_call_too_many_args_at_most_one", | ||
[ | [h]="too many %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected at most single argument %1, have %2 arguments", | ||
[ | [g]={{nil,nil,{Pc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected at most single argument B, have C arguments"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too many (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected at most single argument (.*?), have (.*?) arguments", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d72da1513aa9",1337062914,"Further improvement to wording of overload resolution diagnostics, and including","Further improvement to wording of overload resolution diagnostics, and including\nthe sole parameter name in the diagnostic in more cases. Patch by Terry Long!\n\nllvm-svn: 156807"}, | ||
[j]={{n,6514,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (NumParams == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n Diag(Args[NumParams]->getBeginLoc(), MinArgs == NumParams ? diag::err_typecheck_call_too_many_args_one : diag::err_typecheck_call_too_many_args_at_most_one) << FnKind << FDecl->getParamDecl(0) << static_cast<unsigned>(Args.size()) << Fn->getSourceRange() << SourceRange(Args[NumParams]->getBeginLoc(), Args.back()->getEndLoc());"}}, | [j]={{n,6514,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (NumParams == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n Diag(Args[NumParams]->getBeginLoc(), MinArgs == NumParams ? diag::err_typecheck_call_too_many_args_one : diag::err_typecheck_call_too_many_args_at_most_one) << FnKind << FDecl->getParamDecl(0) << static_cast<unsigned>(Args.size()) << Fn->getSourceRange() << SourceRange(Args[NumParams]->getBeginLoc(), Args.back()->getEndLoc());"}}, | ||
[l]={ | [l]={ | ||
Line 7,228: | Line 7,256: | ||
}, | }, | ||
["err_typecheck_call_too_many_args_at_most_suggest"]={ | ["err_typecheck_call_too_many_args_at_most_suggest"]={ | ||
[ | [i]="err_typecheck_call_too_many_args_at_most_suggest", | ||
[ | [h]="too many %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected at most %1, have %2; did you mean %3?", | ||
[ | [g]={{nil,nil,{Pc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected at most B, have C; did you mean D?"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too many (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected at most (.*?), have (.*?); did you mean (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"476c823ec8fd",1373325224,"Attempt typo correction for function calls with the wrong number of arguments.","Attempt typo correction for function calls with the wrong number of arguments.\n\nCombined with typo correction\'s new ability to apply global/absolute nested\nname specifiers to possible corrections, cases such as in PR12287 where the\ndesired function is being shadowed by a lexically closer function with the\nsame name but a different number of parameters will now include a FixIt.\n\nOn a side note, since the test for this change caused\ntest/SemaCXX/typo-correction.cpp to exceed the typo correction limit for\na single file, I\'ve included a test case for exceeding the limit and added\nsome comments to both the original and part two of typo-correction.cpp\nwarning future editors of the files about the limit.\n\nllvm-svn: 185881"}, | ||
[j]={{n,6505,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n unsigned diag_id = MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_many_args_suggest : diag::err_typecheck_call_too_many_args_at_most_suggest;"}} | [j]={{n,6505,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n unsigned diag_id = MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_many_args_suggest : diag::err_typecheck_call_too_many_args_at_most_suggest;"}} | ||
}, | }, | ||
["err_typecheck_call_too_many_args_one"]={ | ["err_typecheck_call_too_many_args_one"]={ | ||
[ | [i]="err_typecheck_call_too_many_args_one", | ||
[ | [h]="too many %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected single argument %1, have %2 arguments", | ||
[ | [g]={{nil,nil,{Pc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected single argument B, have C arguments"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too many (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected single argument (.*?), have (.*?) arguments", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d72da1513aa9",1337062914,"Further improvement to wording of overload resolution diagnostics, and including","Further improvement to wording of overload resolution diagnostics, and including\nthe sole parameter name in the diagnostic in more cases. Patch by Terry Long!\n\nllvm-svn: 156807"}, | ||
[j]={{n,6506,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (NumParams == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n Diag(Args[NumParams]->getBeginLoc(), MinArgs == NumParams ? diag::err_typecheck_call_too_many_args_one : diag::err_typecheck_call_too_many_args_at_most_one) << FnKind << FDecl->getParamDecl(0) << static_cast<unsigned>(Args.size()) << Fn->getSourceRange() << SourceRange(Args[NumParams]->getBeginLoc(), Args.back()->getEndLoc());"}}, | [j]={{n,6506,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n // ...\n } else if (NumParams == 1 && FDecl && FDecl->getParamDecl(0)->getDeclName())\n Diag(Args[NumParams]->getBeginLoc(), MinArgs == NumParams ? diag::err_typecheck_call_too_many_args_one : diag::err_typecheck_call_too_many_args_at_most_one) << FnKind << FDecl->getParamDecl(0) << static_cast<unsigned>(Args.size()) << Fn->getSourceRange() << SourceRange(Args[NumParams]->getBeginLoc(), Args.back()->getEndLoc());"}}, | ||
[l]={ | [l]={ | ||
Line 7,253: | Line 7,281: | ||
}, | }, | ||
["err_typecheck_call_too_many_args_suggest"]={ | ["err_typecheck_call_too_many_args_suggest"]={ | ||
[ | [i]="err_typecheck_call_too_many_args_suggest", | ||
[ | [h]="too many %select{|||execution configuration }0arguments to %select{function|block|method|kernel function}0 call, expected %1, have %2; did you mean %3?", | ||
[ | [g]={{nil,nil,{Pc,{a,a,a,ub},sb,{W,rb,kb,qb}," call, expected B, have C; did you mean D?"}}}, | ||
[ | [b]=k, | ||
[ | [e]="too many (?:|||execution configuration )arguments to (?:function|block|method|kernel function) call, expected (.*?), have (.*?); did you mean (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"476c823ec8fd",1373325224,"Attempt typo correction for function calls with the wrong number of arguments.","Attempt typo correction for function calls with the wrong number of arguments.\n\nCombined with typo correction\'s new ability to apply global/absolute nested\nname specifiers to possible corrections, cases such as in PR12287 where the\ndesired function is being shadowed by a lexically closer function with the\nsame name but a different number of parameters will now include a FixIt.\n\nOn a side note, since the test for this change caused\ntest/SemaCXX/typo-correction.cpp to exceed the typo correction limit for\na single file, I\'ve included a test case for exceeding the limit and added\nsome comments to both the original and part two of typo-correction.cpp\nwarning future editors of the files about the limit.\n\nllvm-svn: 185881"}, | ||
[j]={{n,6497,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n unsigned diag_id = MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_many_args_suggest : diag::err_typecheck_call_too_many_args_at_most_suggest;"}}, | [j]={{n,6497,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n if (FDecl && (TC = TryTypoCorrectionForCall(*this, Fn, FDecl, Args))) {\n unsigned diag_id = MinArgs == NumParams && !Proto->isVariadic() ? diag::err_typecheck_call_too_many_args_suggest : diag::err_typecheck_call_too_many_args_at_most_suggest;"}}, | ||
[l]={ | [l]={ | ||
Line 7,267: | Line 7,295: | ||
}, | }, | ||
["err_typecheck_cast_to_incomplete"]={ | ["err_typecheck_cast_to_incomplete"]={ | ||
[ | [i]="err_typecheck_cast_to_incomplete", | ||
[ | [h]="cast to incomplete type %0", | ||
[ | [g]="cast to incomplete type A", | ||
[ | [b]=k, | ||
[ | [e]="cast to incomplete type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e98194d9e8d2",1279399429,"Check for casts to an incomplete type in C. Improves diagnostics for cast to","Check for casts to an incomplete type in C. Improves diagnostics for cast to\nincomplete union (PR5692) and incomplete enum, and fixes obscure\naccepts-invalid on cast to incomplete struct.\n\nllvm-svn: 108630"}, | ||
[j]={{ | [j]={{jc,2975,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n if (Self.RequireCompleteType(OpRange.getBegin(), DestType, diag::err_typecheck_cast_to_incomplete)) {"},{jc,3257,"void CastOperation::CheckBuiltinBitCast() {\n // ...\n if (Self.RequireCompleteType(OpRange.getBegin(), DestType, diag::err_typecheck_cast_to_incomplete) || Self.RequireCompleteType(OpRange.getBegin(), SrcType, diag::err_incomplete_type)) {"},{n,21464,"/// Check a cast of an unknown-any type. We intentionally only\n/// trigger this for C-style casts.\nExprResult Sema::checkUnknownAnyCast(SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path) {\n // ...\n if (!CastType->isVoidType() && RequireCompleteType(TypeRange.getBegin(), CastType, diag::err_typecheck_cast_to_incomplete))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/cast-incomplete.c"]={"clang/test/Sema/cast-incomplete.c:9:3: error: cast to incomplete type \'enum x\'","clang/test/Sema/cast-incomplete.c:10:3: error: cast to incomplete type \'struct y\'","clang/test/Sema/cast-incomplete.c:11:3: error: cast to incomplete type \'union z\'","clang/test/Sema/cast-incomplete.c:12:3: error: cast to incomplete type \'union z\'"} | ["clang/test/Sema/cast-incomplete.c"]={"clang/test/Sema/cast-incomplete.c:9:3: error: cast to incomplete type \'enum x\'","clang/test/Sema/cast-incomplete.c:10:3: error: cast to incomplete type \'struct y\'","clang/test/Sema/cast-incomplete.c:11:3: error: cast to incomplete type \'union z\'","clang/test/Sema/cast-incomplete.c:12:3: error: cast to incomplete type \'union z\'"} | ||
Line 7,281: | Line 7,309: | ||
}, | }, | ||
["err_typecheck_cast_to_union_no_type"]={ | ["err_typecheck_cast_to_union_no_type"]={ | ||
[ | [i]="err_typecheck_cast_to_union_no_type", | ||
[ | [h]="cast to union type from type %0 not present in union", | ||
[ | [g]="cast to union type from type A not present in union", | ||
[ | [b]=k, | ||
[ | [e]="cast to union type from type (.*?) not present in union", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{jc,3022,"/// 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 // ...\n } else {\n Self.Diag(OpRange.getBegin(), diag::err_typecheck_cast_to_union_no_type) << SrcType << SrcExpr.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/cast-to-union.c"]={"clang/test/Sema/cast-to-union.c:8:5: error: cast to union type from type \'int *\' not present in union","clang/test/Sema/cast-to-union.c:9:5: error: cast to union type from type \'unsigned int\' not present in union","clang/test/Sema/cast-to-union.c:13:14: error: cast to union type from type \'double\' not present in union"} | ["clang/test/Sema/cast-to-union.c"]={"clang/test/Sema/cast-to-union.c:8:5: error: cast to union type from type \'int *\' not present in union","clang/test/Sema/cast-to-union.c:9:5: error: cast to union type from type \'unsigned int\' not present in union","clang/test/Sema/cast-to-union.c:13:14: error: cast to union type from type \'double\' not present in union"} | ||
Line 7,295: | Line 7,323: | ||
}, | }, | ||
["err_typecheck_choose_expr_requires_constant"]={ | ["err_typecheck_choose_expr_requires_constant"]={ | ||
[ | [i]="err_typecheck_choose_expr_requires_constant", | ||
[h]="\'__builtin_choose_expr\' requires a constant expression", | |||
[g]="\'__builtin_choose_expr\' requires a constant expression", | |||
[b]=k, | |||
[e]="\'__builtin_choose_expr\' requires a constant expression", | [e]="\'__builtin_choose_expr\' requires a constant expression", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={u,1237025389,s,t}, | |||
[ | |||
[j]={{n,16896,"ExprResult Sema::ActOnChooseExpr(SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc) {\n // ...\n if (CondExpr->isTypeDependent() || CondExpr->isValueDependent()) {\n // ...\n } else {\n // ...\n ExprResult CondICE = VerifyIntegerConstantExpression(CondExpr, &condEval, diag::err_typecheck_choose_expr_requires_constant);"}}, | [j]={{n,16896,"ExprResult Sema::ActOnChooseExpr(SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc) {\n // ...\n if (CondExpr->isTypeDependent() || CondExpr->isValueDependent()) {\n // ...\n } else {\n // ...\n ExprResult CondICE = VerifyIntegerConstantExpression(CondExpr, &condEval, diag::err_typecheck_choose_expr_requires_constant);"}}, | ||
[l]={ | [l]={ | ||
Line 7,309: | Line 7,337: | ||
}, | }, | ||
["err_typecheck_comparison_of_distinct_blocks"]={ | ["err_typecheck_comparison_of_distinct_blocks"]={ | ||
[ | [i]="err_typecheck_comparison_of_distinct_blocks", | ||
[ | [h]="comparison of distinct block types%diff{ ($ and $)|}0,1", | ||
[ | [g]={{nil,nil,{"comparison of distinct block types",{rc,a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="comparison of distinct block types(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,13258,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n // Handle block pointer types.\n if (!IsOrdered && LHSType->isBlockPointerType() && RHSType->isBlockPointerType()) {\n // ...\n if (!LHSIsNull && !RHSIsNull && !Context.typesAreCompatible(lpointee, rpointee)) {\n Diag(Loc, diag::err_typecheck_comparison_of_distinct_blocks) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,13348,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n // Allow block pointers to be compared with null pointer constants.\n if (!IsOrdered && ((LHSType->isBlockPointerType() && RHSType->isPointerType()) || (LHSType->isPointerType() && RHSType->isBlockPointerType()))) {\n if (!LHSIsNull && !RHSIsNull) {\n if (!((RHSType->isPointerType() && RHSType->castAs<PointerType>()->getPointeeType()->isVoidType()) || (LHSType->isPointerType() && LHSType->castAs<PointerType>()->getPointeeType()->isVoidType())))\n Diag(Loc, diag::err_typecheck_comparison_of_distinct_blocks) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}} | [j]={{n,13258,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n // Handle block pointer types.\n if (!IsOrdered && LHSType->isBlockPointerType() && RHSType->isBlockPointerType()) {\n // ...\n if (!LHSIsNull && !RHSIsNull && !Context.typesAreCompatible(lpointee, rpointee)) {\n Diag(Loc, diag::err_typecheck_comparison_of_distinct_blocks) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,13348,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n // Allow block pointers to be compared with null pointer constants.\n if (!IsOrdered && ((LHSType->isBlockPointerType() && RHSType->isPointerType()) || (LHSType->isPointerType() && RHSType->isBlockPointerType()))) {\n if (!LHSIsNull && !RHSIsNull) {\n if (!((RHSType->isPointerType() && RHSType->castAs<PointerType>()->getPointeeType()->isVoidType()) || (LHSType->isPointerType() && LHSType->castAs<PointerType>()->getPointeeType()->isVoidType())))\n Diag(Loc, diag::err_typecheck_comparison_of_distinct_blocks) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}} | ||
}, | }, | ||
["err_typecheck_comparison_of_distinct_pointers"]={ | ["err_typecheck_comparison_of_distinct_pointers"]={ | ||
[ | [i]="err_typecheck_comparison_of_distinct_pointers", | ||
[ | [h]="comparison of distinct pointer types%diff{ ($ and $)|}0,1", | ||
[ | [g]={{nil,nil,{"comparison of distinct pointer types",{rc,a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="comparison of distinct pointer types(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"5b07c7ec057d",1241417232,"Implement support for comparing pointers with <, >, <=, >=, ==, and !=","Implement support for comparing pointers with <, >, <=, >=, ==, and !=\nin C++, taking into account conversions to the \"composite pointer\ntype\" so that we can compare, e.g., a pointer to a derived class to a\npointer to a base class. \n\nAlso, upgrade the \"comparing distinct pointer types\" from a warning to\nan error for C++, since this is clearly an error. Turns out that we\nhadn\'t gone through and audited this code for C++, ever. \n\nFixes <rdar://problem/6816420>.\n\nllvm-svn: 70829"}, | ||
[j]={{n,12324,"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(); }"}}, | [j]={{n,12324,"static void diagnoseDistinctPointerComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, bool IsError) { S.Diag(Loc, IsError ? diag::err_typecheck_comparison_of_distinct_pointers : diag::ext_typecheck_comparison_of_distinct_pointers) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); }"}}, | ||
[l]={ | [l]={ | ||
Line 7,334: | Line 7,362: | ||
}, | }, | ||
["err_typecheck_comparison_of_fptr_to_void"]={ | ["err_typecheck_comparison_of_fptr_to_void"]={ | ||
[ | [i]="err_typecheck_comparison_of_fptr_to_void", | ||
[ | [h]="equality comparison between function pointer and void pointer (%0 and %1)", | ||
[ | [g]="equality comparison between function pointer and void pointer (A and B)", | ||
[ | [b]=k, | ||
[ | [e]="equality comparison between function pointer and void pointer \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"f267edd8ac6f",1276637920,"Update equality and relationship comparisons of pointers to reflect","Update equality and relationship comparisons of pointers to reflect\nC++ semantics, eliminating an extension diagnostic that doesn\'t match\nC++ semantics (ordered comparison with NULL) and tightening some\nextwarns to errors in C++ to match GCC and maintain conformance in\nSFINAE contexts. Fixes <rdar://problem/7941392>.\n\nllvm-svn: 106050"}, | ||
[j]={{n,12365,"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(); }"}} | [j]={{n,12365,"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(); }"}} | ||
}, | }, | ||
["err_typecheck_comparison_of_pointer_integer"]={ | ["err_typecheck_comparison_of_pointer_integer"]={ | ||
[ | [i]="err_typecheck_comparison_of_pointer_integer", | ||
[ | [h]="comparison between pointer and integer (%0 and %1)", | ||
[ | [g]="comparison between pointer and integer (A and B)", | ||
[ | [b]=k, | ||
[ | [e]="comparison between pointer and integer \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"f267edd8ac6f",1276637920,"Update equality and relationship comparisons of pointers to reflect","Update equality and relationship comparisons of pointers to reflect\nC++ semantics, eliminating an extension diagnostic that doesn\'t match\nC++ semantics (ordered comparison with NULL) and tightening some\nextwarns to errors in C++ to match GCC and maintain conformance in\nSFINAE contexts. Fixes <rdar://problem/7941392>.\n\nllvm-svn: 106050"}, | ||
[j]={{n,13355,"// 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 DiagID = diag::err_typecheck_comparison_of_pointer_integer;"}}, | [j]={{n,13355,"// 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 DiagID = diag::err_typecheck_comparison_of_pointer_integer;"}}, | ||
[l]={ | [l]={ | ||
Line 7,359: | Line 7,387: | ||
}, | }, | ||
["err_typecheck_cond_expect_int_float"]={ | ["err_typecheck_cond_expect_int_float"]={ | ||
[ | [i]="err_typecheck_cond_expect_int_float", | ||
[ | [h]="used type %0 where integer or floating point type is required", | ||
[ | [g]="used type A where integer or floating point type is required", | ||
[ | [b]=k, | ||
[ | [e]="used type (.*?) where integer or floating point type is required", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e8d2aaf32021",1423031898,"OpenCL: handle ternary operator when the condition is a vector","OpenCL: handle ternary operator when the condition is a vector\n\nWhen the condition is a vector, OpenCL specifies additional\nrequirements on the operand types, and also the operations\nrequired to determine the result type of the operator. This is a\ncombination of OpenCL v1.1 s6.3.i and s6.11.6, and the semantics\nremain unchanged in later versions of OpenCL.\n\nllvm-svn: 228118"}, | ||
[j]={{n,8889,"/// Simple conversion between integer and floating point types.\n///\n/// Used when handling the OpenCL conditional operator where the\n/// condition is a vector while the other operands are scalar.\n///\n/// OpenCL v1.1 s6.3.i and s6.11.6 together require that the scalar\n/// types are either integer or floating type. Between the two\n/// operands, the type with the higher rank is defined as the \"result\n/// type\". The other operand needs to be promoted to the same type. No\n/// other type promotion is allowed. We cannot use\n/// UsualArithmeticConversions() for this purpose, since it always\n/// promotes promotable types.\nstatic QualType OpenCLArithmeticConversions(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n // ...\n if (!LHSType->isIntegerType() && !LHSType->isRealFloatingType()) {\n S.Diag(QuestionLoc, diag::err_typecheck_cond_expect_int_float) << LHSType << LHS.get()->getSourceRange();"},{n,8941,"/// Simple conversion between integer and floating point types.\n///\n/// Used when handling the OpenCL conditional operator where the\n/// condition is a vector while the other operands are scalar.\n///\n/// OpenCL v1.1 s6.3.i and s6.11.6 together require that the scalar\n/// types are either integer or floating type. Between the two\n/// operands, the type with the higher rank is defined as the \"result\n/// type\". The other operand needs to be promoted to the same type. No\n/// other type promotion is allowed. We cannot use\n/// UsualArithmeticConversions() for this purpose, since it always\n/// promotes promotable types.\nstatic QualType OpenCLArithmeticConversions(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n // ...\n if (!RHSType->isIntegerType() && !RHSType->isRealFloatingType()) {\n S.Diag(QuestionLoc, diag::err_typecheck_cond_expect_int_float) << RHSType << RHS.get()->getSourceRange();"}}, | [j]={{n,8889,"/// Simple conversion between integer and floating point types.\n///\n/// Used when handling the OpenCL conditional operator where the\n/// condition is a vector while the other operands are scalar.\n///\n/// OpenCL v1.1 s6.3.i and s6.11.6 together require that the scalar\n/// types are either integer or floating type. Between the two\n/// operands, the type with the higher rank is defined as the \"result\n/// type\". The other operand needs to be promoted to the same type. No\n/// other type promotion is allowed. We cannot use\n/// UsualArithmeticConversions() for this purpose, since it always\n/// promotes promotable types.\nstatic QualType OpenCLArithmeticConversions(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n // ...\n if (!LHSType->isIntegerType() && !LHSType->isRealFloatingType()) {\n S.Diag(QuestionLoc, diag::err_typecheck_cond_expect_int_float) << LHSType << LHS.get()->getSourceRange();"},{n,8941,"/// Simple conversion between integer and floating point types.\n///\n/// Used when handling the OpenCL conditional operator where the\n/// condition is a vector while the other operands are scalar.\n///\n/// OpenCL v1.1 s6.3.i and s6.11.6 together require that the scalar\n/// types are either integer or floating type. Between the two\n/// operands, the type with the higher rank is defined as the \"result\n/// type\". The other operand needs to be promoted to the same type. No\n/// other type promotion is allowed. We cannot use\n/// UsualArithmeticConversions() for this purpose, since it always\n/// promotes promotable types.\nstatic QualType OpenCLArithmeticConversions(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n // ...\n if (!RHSType->isIntegerType() && !RHSType->isRealFloatingType()) {\n S.Diag(QuestionLoc, diag::err_typecheck_cond_expect_int_float) << RHSType << RHS.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,373: | Line 7,401: | ||
}, | }, | ||
["err_typecheck_cond_expect_nonfloat"]={ | ["err_typecheck_cond_expect_nonfloat"]={ | ||
[ | [i]="err_typecheck_cond_expect_nonfloat", | ||
[ | [h]="used type %0 where floating point type is not allowed", | ||
[ | [g]="used type A where floating point type is not allowed", | ||
[ | [b]=k, | ||
[ | [e]="used type (.*?) where floating point type is not allowed", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"e8d2aaf32021",1423031898,"OpenCL: handle ternary operator when the condition is a vector","OpenCL: handle ternary operator when the condition is a vector\n\nWhen the condition is a vector, OpenCL specifies additional\nrequirements on the operand types, and also the operations\nrequired to determine the result type of the operator. This is a\ncombination of OpenCL v1.1 s6.3.i and s6.11.6, and the semantics\nremain unchanged in later versions of OpenCL.\n\nllvm-svn: 228118"}, | ||
[j]={{n,8619,"/// Return false if the condition expression is valid, true otherwise.\nstatic bool checkCondition(Sema &S, Expr *Cond, SourceLocation QuestionLoc) {\n // ...\n // OpenCL v1.1 s6.3.i says the condition cannot be a floating point type.\n if (S.getLangOpts().OpenCL && CondTy->isFloatingType()) {\n S.Diag(QuestionLoc, diag::err_typecheck_cond_expect_nonfloat) << CondTy << Cond->getSourceRange();"},{n,8981,"/// Return false if this is a valid OpenCL condition vector\nstatic bool checkOpenCLConditionVector(Sema &S, Expr *Cond, SourceLocation QuestionLoc) {\n // ...\n S.Diag(QuestionLoc, diag::err_typecheck_cond_expect_nonfloat) << Cond->getType() << Cond->getSourceRange();"}}, | [j]={{n,8619,"/// Return false if the condition expression is valid, true otherwise.\nstatic bool checkCondition(Sema &S, Expr *Cond, SourceLocation QuestionLoc) {\n // ...\n // OpenCL v1.1 s6.3.i says the condition cannot be a floating point type.\n if (S.getLangOpts().OpenCL && CondTy->isFloatingType()) {\n S.Diag(QuestionLoc, diag::err_typecheck_cond_expect_nonfloat) << CondTy << Cond->getSourceRange();"},{n,8981,"/// Return false if this is a valid OpenCL condition vector\nstatic bool checkOpenCLConditionVector(Sema &S, Expr *Cond, SourceLocation QuestionLoc) {\n // ...\n S.Diag(QuestionLoc, diag::err_typecheck_cond_expect_nonfloat) << Cond->getType() << Cond->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,387: | Line 7,415: | ||
}, | }, | ||
["err_typecheck_cond_expect_scalar"]={ | ["err_typecheck_cond_expect_scalar"]={ | ||
[ | [i]="err_typecheck_cond_expect_scalar", | ||
[ | [h]="used type %0 where arithmetic or pointer type is required", | ||
[ | [g]="used type A where arithmetic or pointer type is required", | ||
[ | [b]=k, | ||
[ | [e]="used type (.*?) where arithmetic or pointer type is required", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{jc,3047,"/// 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 Self.Diag(OpRange.getBegin(), diag::err_typecheck_cond_expect_scalar) << DestType << SrcExpr.get()->getSourceRange();"},{n,8686,"/// Return false if the condition expression is valid, true otherwise.\nstatic bool checkCondition(Sema &S, Expr *Cond, SourceLocation QuestionLoc) {\n // ...\n S.Diag(QuestionLoc, diag::err_typecheck_cond_expect_scalar) << CondTy << Cond->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/check_cast.c"]={"clang/test/Parser/check_cast.c:10:9: error: used type \'struct foo\' where arithmetic or pointer type is required"} | ["clang/test/Parser/check_cast.c"]={"clang/test/Parser/check_cast.c:10:9: error: used type \'struct foo\' where arithmetic or pointer type is required"} | ||
Line 7,401: | Line 7,429: | ||
}, | }, | ||
["err_typecheck_cond_incompatible_operands"]={ | ["err_typecheck_cond_incompatible_operands"]={ | ||
[ | [i]="err_typecheck_cond_incompatible_operands", | ||
[ | [h]="incompatible operand types%diff{ ($ and $)|}0,1", | ||
[ | [g]={{nil,nil,{"incompatible operand types",{rc,a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="incompatible operand types(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,8845,"/// Return the resulting type when the operands are both block pointers.\nstatic QualType checkConditionalBlockPointerCompatibility(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) {\n // ...\n if (!LHSTy->isBlockPointerType() || !RHSTy->isBlockPointerType()) {\n // ...\n S.Diag(Loc, diag::err_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,9143,"/// 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 // Diagnose attempts to convert between __ibm128, __float128 and long double\n // where such conversions currently can\'t be handled.\n if (unsupportedTypeConversion(*this, LHSTy, RHSTy)) {\n Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,9180,"/// 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 both operands have arithmetic type, do the usual arithmetic conversions\n // to find a common type: C99 6.5.15p3,5.\n if (LHSTy->isArithmeticType() && RHSTy->isArithmeticType()) {\n // Disallow invalid arithmetic conversions, such as those between bit-\n // precise integers types of different sizes, or between a bit-precise\n // integer and another type.\n if (ResTy.isNull() && (LHSTy->isBitIntType() || RHSTy->isBitIntType())) {\n Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,9334,"/// 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 Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{ | [j]={{n,8845,"/// Return the resulting type when the operands are both block pointers.\nstatic QualType checkConditionalBlockPointerCompatibility(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) {\n // ...\n if (!LHSTy->isBlockPointerType() || !RHSTy->isBlockPointerType()) {\n // ...\n S.Diag(Loc, diag::err_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,9143,"/// 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 // Diagnose attempts to convert between __ibm128, __float128 and long double\n // where such conversions currently can\'t be handled.\n if (unsupportedTypeConversion(*this, LHSTy, RHSTy)) {\n Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,9180,"/// 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 both operands have arithmetic type, do the usual arithmetic conversions\n // to find a common type: C99 6.5.15p3,5.\n if (LHSTy->isArithmeticType() && RHSTy->isArithmeticType()) {\n // Disallow invalid arithmetic conversions, such as those between bit-\n // precise integers types of different sizes, or between a bit-precise\n // integer and another type.\n if (ResTy.isNull() && (LHSTy->isBitIntType() || RHSTy->isBitIntType())) {\n Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,9334,"/// 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 Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{P,6261,"/// Try to find a common type for two according to C++0x 5.16p5.\n///\n/// This is part of the parameter validation for the ? operator. If either\n/// value operand is a class type, overload resolution is used to find a\n/// conversion to a common type.\nstatic bool FindConditionalOverload(Sema &Self, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n // ...\n case OR_No_Viable_Function:\n // ...\n Self.Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{P,6766,"/// 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 // -- The second and third operands have arithmetic or enumeration type;\n // the usual arithmetic conversions are performed to bring them to a\n // common type, and the result is of that type.\n if (LTy->isArithmeticType() && RTy->isArithmeticType()) {\n // ...\n if (ResTy.isNull()) {\n Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands) << LTy << RTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{P,6804,"/// 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 Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/block-misc.c"]={"clang/test/Sema/block-misc.c:175:7: error: incompatible operand types (\'void (^)(int)\' and \'void (*)(int)\')"} | ["clang/test/Sema/block-misc.c"]={"clang/test/Sema/block-misc.c:175:7: error: incompatible operand types (\'void (^)(int)\' and \'void (*)(int)\')"} | ||
Line 7,415: | Line 7,443: | ||
}, | }, | ||
["err_typecheck_cond_incompatible_operands_null"]={ | ["err_typecheck_cond_incompatible_operands_null"]={ | ||
[ | [i]="err_typecheck_cond_incompatible_operands_null", | ||
[ | [h]="non-pointer operand type %0 incompatible with %select{NULL|nullptr}1", | ||
[ | [g]={{nil,nil,{"non-pointer operand type A incompatible with ",{"NULL","nullptr"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="non\\-pointer operand type (.*?) incompatible with (?:NULL|nullptr)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"a8bea4b90ec7",1298073290,"Initial steps to improve diagnostics when there is a NULL and","Initial steps to improve diagnostics when there is a NULL and\na non-pointer on the two sides of a conditional expression.\n\nPatch by Stephen Hines and Mihai Rusu.\n\nllvm-svn: 125995"}, | ||
[j]={{n,8611,"/// Emit a specialized diagnostic when one expression is a null pointer\n/// constant and the other is not a pointer. Returns true if a diagnostic is\n/// emitted.\nbool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, SourceLocation QuestionLoc) {\n // ...\n Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands_null) << NonPointerExpr->getType() << DiagType << NonPointerExpr->getSourceRange();"}}, | [j]={{n,8611,"/// Emit a specialized diagnostic when one expression is a null pointer\n/// constant and the other is not a pointer. Returns true if a diagnostic is\n/// emitted.\nbool Sema::DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, SourceLocation QuestionLoc) {\n // ...\n Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands_null) << NonPointerExpr->getType() << DiagType << NonPointerExpr->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,429: | Line 7,457: | ||
}, | }, | ||
["err_typecheck_convert_discards_qualifiers"]={ | ["err_typecheck_convert_discards_qualifiers"]={ | ||
[ | [i]={{nil,q,"err_typecheck_convert_discards_qualifiers"}}, | ||
[ | [h]={{nil,q,"%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"}}, | ||
[ | [g]={{nil,q,{{{{Wb,zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}}," discards qualifiers"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types)) discards qualifiers", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,17631,"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 DiagKind = diag::err_typecheck_convert_discards_qualifiers;"}}, | [j]={{n,17631,"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 DiagKind = diag::err_typecheck_convert_discards_qualifiers;"}}, | ||
[l]={ | [l]={ | ||
Line 7,443: | Line 7,471: | ||
}, | }, | ||
["err_typecheck_convert_incompatible"]={ | ["err_typecheck_convert_incompatible"]={ | ||
[ | [i]="err_typecheck_convert_incompatible", | ||
[ | [h]={{nil,E,"%select{%diff{assigning to $ from incompatible type $|assigning to type from incompatible type}0,1|%diff{passing $ to parameter of incompatible type $|passing type to parameter of incompatible type}0,1|%diff{returning $ from a function with incompatible result type $|returning type from a function with incompatible result type}0,1|%diff{converting $ to incompatible type $|converting type to incompatible type}0,1|%diff{initializing $ with an expression of incompatible type $|initializing type with an expression of incompatible type}0,1|%diff{sending $ to parameter of incompatible type $|sending type to parameter of incompatible type}0,1|%diff{casting $ to incompatible type $|casting type to incompatible type}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3%select{|: different classes%diff{ ($ vs $)|}5,6|: different number of parameters (%5 vs %6)|: type mismatch at %ordinal5 parameter%diff{ ($ vs $)|}6,7|: different return type%diff{ ($ vs $)|}5,6|: different qualifiers (%5 vs %6)|: different exception specifications}4"},{ic,nil,"%select{%diff{assigning to $ from incompatible type $|assigning to type from incompatible type}0,1|%diff{passing $ to parameter of incompatible type $|passing type to parameter of incompatible type}0,1|%diff{returning $ from a function with incompatible result type $|returning type from a function with incompatible result type}0,1|%diff{converting $ to incompatible type $|converting type to incompatible type}0,1|%diff{initializing $ with an expression of incompatible type $|initializing type with an expression of incompatible type}0,1|%diff{sending $ to parameter of incompatible type $|sending type to parameter of incompatible type}0,1|%diff{casting $ to incompatible type $|casting type to incompatible type}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3%select{|: different classes%diff{ ($ vs $)|}5,6|: different number of parameters (%5 vs %6)|: type mismatch at %ordinal5 parameter%diff{ ($ vs $)|}6,7|: different return type%diff{ ($ vs $)|}5,6|: different qualifiers (%select{none|const|restrict|const and restrict|volatile|const and volatile|volatile and restrict|const, volatile, and restrict}5 vs %select{none|const|restrict|const and restrict|volatile|const and volatile|volatile and restrict|const, volatile, and restrict}6)|: different exception specifications}4"}}, | ||
[ | [g]={{nil,E,{{{{"assigning to A from incompatible type B","assigning to type from incompatible type"}},{{"passing A to parameter of incompatible type B","passing type to parameter of incompatible type"}},{{"returning A from a function with incompatible result type B","returning type from a function with incompatible result type"}},{{"converting A to incompatible type B","converting type to incompatible type"}},{{"initializing A with an expression of incompatible type B","initializing type with an expression of incompatible type"}},{{"sending A to parameter of incompatible type B","sending type to parameter of incompatible type"}},{{"casting A to incompatible type B","casting type to incompatible type"}}},{a,Jc,Kc,Qc,Sc},{a,{": different classes",{" (F vs G)",a}},": different number of parameters (F vs G)",{": type mismatch at F parameter",{" (G vs H)",a}},{": different return type",{" (F vs G)",a}},": different qualifiers (F vs G)",": different exception specifications"}}},{ic,nil,{{{{"assigning to A from incompatible type B","assigning to type from incompatible type"}},{{"passing A to parameter of incompatible type B","passing type to parameter of incompatible type"}},{{"returning A from a function with incompatible result type B","returning type from a function with incompatible result type"}},{{"converting A to incompatible type B","converting type to incompatible type"}},{{"initializing A with an expression of incompatible type B","initializing type with an expression of incompatible type"}},{{"sending A to parameter of incompatible type B","sending type to parameter of incompatible type"}},{{"casting A to incompatible type B","casting type to incompatible type"}}},{a,Jc,Kc,Qc,Sc},{a,{": different classes",{" (F vs G)",a}},": different number of parameters (F vs G)",{": type mismatch at F parameter",{" (G vs H)",a}},{": different return type",{" (F vs G)",a}},{": different qualifiers (",{"none","const","restrict","const and restrict",Wc,"const and volatile","volatile and restrict","const, volatile, and restrict"}," vs ",{"none","const","restrict","const and restrict",Wc,"const and volatile","volatile and restrict","const, volatile, and restrict"},")"},": different exception specifications"}}}}, | ||
[b]=k, | |||
[e]="(?:(?:assigning to (.*?) from incompatible type (.*?)|assigning to type from incompatible type)|(?:passing (.*?) to parameter of incompatible type (.*?)|passing type to parameter of incompatible type)|(?:returning (.*?) from a function with incompatible result type (.*?)|returning type from a function with incompatible result type)|(?:converting (.*?) to incompatible type (.*?)|converting type to incompatible type)|(?:initializing (.*?) with an expression of incompatible type (.*?)|initializing type with an expression of incompatible type)|(?:sending (.*?) to parameter of incompatible type (.*?)|sending type to parameter of incompatible type)|(?:casting (.*?) to incompatible type (.*?)|casting type to incompatible type))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)(?:|\\: different classes(?: \\((.*?) vs (.*?)\\)|)|\\: different number of parameters \\((.*?) vs (.*?)\\)|\\: type mismatch at (.*?) parameter(?: \\((.*?) vs (.*?)\\)|)|\\: different return type(?: \\((.*?) vs (.*?)\\)|)|\\: different qualifiers \\((.*?) vs (.*?)\\)|\\: different exception specifications)", | |||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{z,4387,"bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case PPC::BI__builtin_ppc_maxfe:\n case PPC::BI__builtin_ppc_minfe:\n case PPC::BI__builtin_ppc_maxfl:\n case PPC::BI__builtin_ppc_minfl:\n case PPC::BI__builtin_ppc_maxfs:\n case PPC::BI__builtin_ppc_minfs: {\n // ...\n for (unsigned I = 0, E = TheCall->getNumArgs(); I < E; ++I)\n if (TheCall->getArg(I)->getType() != ArgType)\n return Diag(TheCall->getBeginLoc(), diag::err_typecheck_convert_incompatible) << TheCall->getArg(I)->getType() << ArgType << 1 << 0 << 0;"},{z,8223,"bool Sema::SemaBuiltinVAStartARMMicrosoft(CallExpr *Call) {\n // ...\n if (!Arg1Ty->isPointerType() || !IsSuitablyTypedFormatArgument(Arg1))\n Diag(Arg1->getBeginLoc(), diag::err_typecheck_convert_incompatible) << Arg1->getType() << ConstCharPtrTy << 1 /* different class */"},{z,8231,"bool Sema::SemaBuiltinVAStartARMMicrosoft(CallExpr *Call) {\n // ...\n if (Arg2Ty->getCanonicalTypeInternal().withoutLocalFastQualifiers() != SizeTy)\n Diag(Arg2->getBeginLoc(), diag::err_typecheck_convert_incompatible) << Arg2->getType() << SizeTy << 1 /* different class */"},{z,9278,"/// SemaBuiltinPPCMMACall - Check the call to a PPC MMA builtin for validity.\n/// Emit an error and return true on failure; return false on success.\n/// TypeStr is a string containing the type descriptor of the value returned by\n/// the builtin and the descriptors of the expected type of the arguments.\nbool Sema::SemaBuiltinPPCMMACall(CallExpr *TheCall, unsigned BuiltinID, const char *TypeStr) {\n // ...\n while (*TypeStr != \'\\0\') {\n // ...\n // The only case where the argument type and expected type are allowed to\n // mismatch is if the argument type is a non-void pointer (or array) and\n // expected type is a void pointer.\n if (StrippedRVType != ExpectedType)\n if (!(ExpectedType->isVoidPointerType() && (StrippedRVType->isPointerType() || StrippedRVType->isArrayType())))\n return Diag(Arg->getBeginLoc(), diag::err_typecheck_convert_incompatible) << PassedType << ExpectedType << 1 << 0 << 0;"},{n,17742,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case Incompatible:\n // ...\n DiagKind = diag::err_typecheck_convert_incompatible;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/expr/p13.cpp"]={"clang/test/CXX/expr/p13.cpp:17:7: error: assigning to \'C\' (aka \'void (X::*)() noexcept\') from incompatible type \'void (X::*)()\': different exception specifications","clang/test/CXX/expr/p13.cpp:20:7: error: assigning to \'E\' (aka \'void (Y::*)() noexcept\') from incompatible type \'void (Y::*)()\': different exception specifications","clang/test/CXX/expr/p13.cpp:21:7: error: assigning to \'E\' (aka \'void (Y::*)() noexcept\') from incompatible type \'void (Y::*)()\': different exception specifications"} | ["clang/test/CXX/expr/p13.cpp"]={"clang/test/CXX/expr/p13.cpp:17:7: error: assigning to \'C\' (aka \'void (X::*)() noexcept\') from incompatible type \'void (X::*)()\': different exception specifications","clang/test/CXX/expr/p13.cpp:20:7: error: assigning to \'E\' (aka \'void (Y::*)() noexcept\') from incompatible type \'void (Y::*)()\': different exception specifications","clang/test/CXX/expr/p13.cpp:21:7: error: assigning to \'E\' (aka \'void (Y::*)() noexcept\') from incompatible type \'void (Y::*)()\': different exception specifications"} | ||
Line 7,457: | Line 7,485: | ||
}, | }, | ||
["err_typecheck_convert_incompatible_block_pointer"]={ | ["err_typecheck_convert_incompatible_block_pointer"]={ | ||
[ | [i]="err_typecheck_convert_incompatible_block_pointer", | ||
[ | [h]="incompatible block 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", | ||
[ | [g]={{nil,nil,{"incompatible block pointer types ",{{{Wb,zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}}}}}, | ||
[ | [b]=k, | ||
[ | [e]="incompatible block 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))", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d79b5a85b059",1240354302,"Tighten up blocks type checking. This was discussed back in the","Tighten up blocks type checking. This was discussed back in the\nr56595 timeframe, but left undone. Radar 6812711\n\nllvm-svn: 69745"}, | ||
[j]={{n,17679,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatibleBlockPointer:\n DiagKind = diag::err_typecheck_convert_incompatible_block_pointer;"}}, | [j]={{n,17679,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatibleBlockPointer:\n DiagKind = diag::err_typecheck_convert_incompatible_block_pointer;"}}, | ||
[l]={ | [l]={ | ||
Line 7,471: | Line 7,499: | ||
}, | }, | ||
["err_typecheck_convert_incompatible_function_pointer"]={ | ["err_typecheck_convert_incompatible_function_pointer"]={ | ||
[ | [i]={{nil,q,"err_typecheck_convert_incompatible_function_pointer"}}, | ||
[ | [h]={{nil,q,"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"}}, | ||
[ | [g]={{nil,q,{"incompatible function pointer types ",{{{Wb,zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}},{a,Jc,Kc,Qc,Sc}}}}, | ||
[ | [b]=k, | ||
[ | [e]="incompatible function pointer types (?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,17554,"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 DiagKind = diag::err_typecheck_convert_incompatible_function_pointer;"}}, | [j]={{n,17554,"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 DiagKind = diag::err_typecheck_convert_incompatible_function_pointer;"}}, | ||
[l]={ | [l]={ | ||
Line 7,485: | Line 7,513: | ||
}, | }, | ||
["err_typecheck_convert_incompatible_pointer"]={ | ["err_typecheck_convert_incompatible_pointer"]={ | ||
[ | [i]={{nil,q,"err_typecheck_convert_incompatible_pointer"}}, | ||
[ | [h]={{nil,q,"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"}}, | ||
[ | [g]={{nil,q,{"incompatible pointer types ",{{{Wb,zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}},{a,Jc,Kc,Qc,Sc}}}}, | ||
[ | [b]=k, | ||
[ | [e]="incompatible pointer types (?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,17566,"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 DiagKind = diag::err_typecheck_convert_incompatible_pointer;"}}, | [j]={{n,17566,"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 DiagKind = diag::err_typecheck_convert_incompatible_pointer;"}}, | ||
[l]={ | [l]={ | ||
Line 7,499: | Line 7,527: | ||
}, | }, | ||
["err_typecheck_convert_incompatible_pointer_sign"]={ | ["err_typecheck_convert_incompatible_pointer_sign"]={ | ||
[ | [i]={{nil,q,"err_typecheck_convert_incompatible_pointer_sign"}}, | ||
[ | [h]={{nil,v,"%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"},{ib,q,"%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 converts between pointers to integer types with different sign"}}, | ||
[ | [g]={{nil,v,{{{{Wb,zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}}," converts between pointers to integer types ",{"with different sign","where one is of the unique plain \'char\' type and the other is not"}}},{ib,q,{{{{Wb,zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}}," converts between pointers to integer types with different sign"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types)) converts between pointers to integer types (?:with different sign|where one is of the unique plain \'char\' type and the other is not)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,17583,"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 DiagKind = diag::err_typecheck_convert_incompatible_pointer_sign;"},{n,17764,"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) {"}}, | [j]={{n,17583,"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 DiagKind = diag::err_typecheck_convert_incompatible_pointer_sign;"},{n,17764,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n if (DiagKind == diag::ext_typecheck_convert_incompatible_pointer_sign || DiagKind == diag::err_typecheck_convert_incompatible_pointer_sign) {"}}, | ||
[l]={ | [l]={ | ||
Line 7,513: | Line 7,541: | ||
}, | }, | ||
["err_typecheck_convert_int_pointer"]={ | ["err_typecheck_convert_int_pointer"]={ | ||
[ | [i]={{nil,q,"err_typecheck_convert_int_pointer"}}, | ||
[ | [h]={{nil,q,"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"}}, | ||
[ | [g]={{nil,q,{"incompatible integer to pointer conversion ",{{{Wb,zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}},{a,Jc,Kc,Qc,Sc}}}}, | ||
[ | [b]=k, | ||
[ | [e]="incompatible integer to pointer conversion (?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,17538,"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 DiagKind = diag::err_typecheck_convert_int_pointer;"}}, | [j]={{n,17538,"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 DiagKind = diag::err_typecheck_convert_int_pointer;"}}, | ||
[l]={ | [l]={ | ||
Line 7,527: | Line 7,555: | ||
}, | }, | ||
["err_typecheck_convert_pointer_int"]={ | ["err_typecheck_convert_pointer_int"]={ | ||
[ | [i]={{nil,q,"err_typecheck_convert_pointer_int"}}, | ||
[ | [h]={{nil,q,"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"}}, | ||
[ | [g]={{nil,q,{"incompatible pointer to integer conversion ",{{{Wb,zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}},{a,Jc,Kc,Qc,Sc}}}}, | ||
[ | [b]=k, | ||
[ | [e]="incompatible pointer to integer conversion (?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,17528,"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 DiagKind = diag::err_typecheck_convert_pointer_int;"}}, | [j]={{n,17528,"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 DiagKind = diag::err_typecheck_convert_pointer_int;"}}, | ||
[l]={ | [l]={ | ||
Line 7,541: | Line 7,569: | ||
}, | }, | ||
["err_typecheck_convert_pointer_void_func"]={ | ["err_typecheck_convert_pointer_void_func"]={ | ||
[ | [i]={{nil,q,"err_typecheck_convert_pointer_void_func"}}, | ||
[ | [h]={{nil,q,"%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"}}, | ||
[ | [g]={{nil,q,{{{{Wb,zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}}," converts between void pointer and function pointer"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types)) converts between void pointer and function pointer", | ||
[ | [f]=a, | ||
[ | [d]={{nil,q,m}}, | ||
[ | [c]={U,1576908663,T,S}, | ||
[j]={{n,17591,"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 DiagKind = diag::err_typecheck_convert_pointer_void_func;"}} | [j]={{n,17591,"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 DiagKind = diag::err_typecheck_convert_pointer_void_func;"}} | ||
}, | }, | ||
["err_typecheck_converted_constant_expression"]={ | ["err_typecheck_converted_constant_expression"]={ | ||
[ | [i]="err_typecheck_converted_constant_expression", | ||
[ | [h]="value of type %0 is not implicitly convertible to %1", | ||
[ | [g]="value of type A is not implicitly convertible to B", | ||
[ | [b]=k, | ||
[ | [e]="value of type (.*?) is not implicitly convertible to (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"f8379a0fc359",1326930952,"constexpr: converted constant expression handling for enumerator values, case","constexpr: converted constant expression handling for enumerator values, case\nvalues and non-type template arguments of integral and enumeration types.\n\nThis change causes some legal C++98 code to no longer compile in C++11 mode, by\nenforcing the C++11 rule that narrowing integral conversions are not permitted\nin the final implicit conversion sequence for the above cases.\n\nllvm-svn: 148439"}, | ||
[j]={{ | [j]={{Pb,5859,"/// 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 ImplicitConversionSequence::AmbiguousConversion:\n case ImplicitConversionSequence::BadConversion:\n if (!S.DiagnoseMultipleUserDefinedConversion(From, T))\n return S.Diag(From->getBeginLoc(), diag::err_typecheck_converted_constant_expression) << From->getType() << From->getSourceRange() << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Misc/integer-literal-printing.cpp"]={"clang/test/Misc/integer-literal-printing.cpp:71:27: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type3Helper<(boolTy)false>::Ty\' (aka \'boolTy\')","clang/test/Misc/integer-literal-printing.cpp:73:27: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type4Helper<(charTy)\'\\x00\'>::Ty\' (aka \'charTy\')","clang/test/Misc/integer-literal-printing.cpp:74:28: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type5Helper<(scharTy)\'\\x00\'>::Ty\' (aka \'scharTy\')","clang/test/Misc/integer-literal-printing.cpp:75:28: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type6Helper<(ucharTy)\'\\x00\'>::Ty\' (aka \'ucharTy\')","clang/test/Misc/integer-literal-printing.cpp:76:28: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type7Helper<(wcharTy)L\'\\x00\'>::Ty\' (aka \'wcharTy\')","clang/test/Misc/integer-literal-printing.cpp:77:29: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type8Helper<(char16Ty)u\'\\x00\'>::Ty\' (aka \'char16Ty\')","clang/test/Misc/integer-literal-printing.cpp:78:29: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type9Helper<(char32Ty)u\'\\x00\'>::Ty\' (aka \'char32Ty\')"} | ["clang/test/Misc/integer-literal-printing.cpp"]={"clang/test/Misc/integer-literal-printing.cpp:71:27: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type3Helper<(boolTy)false>::Ty\' (aka \'boolTy\')","clang/test/Misc/integer-literal-printing.cpp:73:27: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type4Helper<(charTy)\'\\x00\'>::Ty\' (aka \'charTy\')","clang/test/Misc/integer-literal-printing.cpp:74:28: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type5Helper<(scharTy)\'\\x00\'>::Ty\' (aka \'scharTy\')","clang/test/Misc/integer-literal-printing.cpp:75:28: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type6Helper<(ucharTy)\'\\x00\'>::Ty\' (aka \'ucharTy\')","clang/test/Misc/integer-literal-printing.cpp:76:28: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type7Helper<(wcharTy)L\'\\x00\'>::Ty\' (aka \'wcharTy\')","clang/test/Misc/integer-literal-printing.cpp:77:29: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type8Helper<(char16Ty)u\'\\x00\'>::Ty\' (aka \'char16Ty\')","clang/test/Misc/integer-literal-printing.cpp:78:29: error: value of type \'const char[2]\' is not implicitly convertible to \'typename Type9Helper<(char32Ty)u\'\\x00\'>::Ty\' (aka \'char32Ty\')"} | ||
Line 7,566: | Line 7,594: | ||
}, | }, | ||
["err_typecheck_converted_constant_expression_disallowed"]={ | ["err_typecheck_converted_constant_expression_disallowed"]={ | ||
[ | [i]="err_typecheck_converted_constant_expression_disallowed", | ||
[ | [h]="conversion from %0 to %1 is not allowed in a converted constant expression", | ||
[ | [g]="conversion from A to B is not allowed in a converted constant expression", | ||
[ | [b]=k, | ||
[ | [e]="conversion from (.*?) to (.*?) is not allowed in a converted constant expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"f8379a0fc359",1326930952,"constexpr: converted constant expression handling for enumerator values, case","constexpr: converted constant expression handling for enumerator values, case\nvalues and non-type template arguments of integral and enumeration types.\n\nThis change causes some legal C++98 code to no longer compile in C++11 mode, by\nenforcing the C++11 rule that narrowing integral conversions are not permitted\nin the final implicit conversion sequence for the above cases.\n\nllvm-svn: 148439"}, | ||
[j]={{ | [j]={{Pb,5871,"/// 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 // Check that we would only use permitted conversions.\n if (!CheckConvertedConstantConversions(S, *SCS)) {\n return S.Diag(From->getBeginLoc(), diag::err_typecheck_converted_constant_expression_disallowed) << From->getType() << From->getSourceRange() << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Misc/explicit.cpp"]={"clang/test/Misc/explicit.cpp:5:13: error: conversion from \'void *\' to \'bool\' is not allowed in a converted constant expression"} | ["clang/test/Misc/explicit.cpp"]={"clang/test/Misc/explicit.cpp:5:13: error: conversion from \'void *\' to \'bool\' is not allowed in a converted constant expression"} | ||
Line 7,580: | Line 7,608: | ||
}, | }, | ||
["err_typecheck_converted_constant_expression_indirect"]={ | ["err_typecheck_converted_constant_expression_indirect"]={ | ||
[ | [i]="err_typecheck_converted_constant_expression_indirect", | ||
[ | [h]="conversion from %0 to %1 in converted constant expression would bind reference to a temporary", | ||
[ | [g]="conversion from A to B in converted constant expression would bind reference to a temporary", | ||
[ | [b]=k, | ||
[ | [e]="conversion from (.*?) to (.*?) in converted constant expression would bind reference to a temporary", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"410cc893745e",1416972413,"[c++1z] Most of N4268 (allow constant evaluation for non-type template arguments).","[c++1z] Most of N4268 (allow constant evaluation for non-type template arguments).\n\nWe don\'t yet support pointer-to-member template arguments that have undergone\npointer-to-member conversions, mostly because we don\'t have a mangling for them yet.\n\nllvm-svn: 222807"}, | ||
[j]={{ | [j]={{Pb,5877,"/// 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 // [...] and where the reference binding (if any) binds directly.\n if (SCS->ReferenceBinding && !SCS->DirectBinding) {\n return S.Diag(From->getBeginLoc(), diag::err_typecheck_converted_constant_expression_indirect) << From->getType() << From->getSourceRange() << T;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:231:5: error: conversion from \'int\' to \'const int &\' in converted constant expression would bind reference to a temporary"} | ["clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:231:5: error: conversion from \'int\' to \'const int &\' in converted constant expression would bind reference to a temporary"} | ||
Line 7,594: | Line 7,622: | ||
}, | }, | ||
["err_typecheck_decl_incomplete_type"]={ | ["err_typecheck_decl_incomplete_type"]={ | ||
[ | [i]="err_typecheck_decl_incomplete_type", | ||
[ | [h]="variable has incomplete type %0", | ||
[ | [g]="variable has incomplete type A", | ||
[ | [b]=k, | ||
[ | [e]="variable has incomplete type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{z,16640,"/// 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() && (RequireCompleteType(Param->getLocation(), Param->getType(), diag::err_typecheck_decl_incomplete_type) || RequireNonAbstractType(Param->getBeginLoc(), Param->getOriginalType(), diag::err_abstract_type_in_decl, AbstractParamType))) {"},{w,8734,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (T->isVoidType()) {\n // C++98 [dcl.stc]p5: The extern specifier can be applied only to the names\n // of objects and functions.\n if (NewVD->isThisDeclarationADefinition() || getLangOpts().CPlusPlus) {\n Diag(NewVD->getLocation(), diag::err_typecheck_decl_incomplete_type) << T;"},{w,13202,"/// 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->getType()->isDependentType()) {\n // ...\n if (RequireCompleteType(VDecl->getLocation(), BaseDeclType, diag::err_typecheck_decl_incomplete_type)) {"},{w,13636,"/// ActOnInitializerError - Given that there was an error parsing an\n/// initializer for the given declaration, try to at least re-establish\n/// invariants such as whether a variable\'s type is either dependent or\n/// complete.\nvoid Sema::ActOnInitializerError(Decl *D) {\n // ...\n if (RequireCompleteType(VD->getLocation(), Context.getBaseElementType(Ty), diag::err_typecheck_decl_incomplete_type)) {"},{w,13728,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n if (!Var->isInvalidDecl() && RealDecl->hasAttr<LoaderUninitializedAttr>()) {\n // ...\n if (RequireCompleteType(Var->getLocation(), Var->getType(), diag::err_typecheck_decl_incomplete_type)) {"},{w,13770,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n case VarDecl::DeclarationOnly:\n // ...\n if (!Type->isDependentType() && Var->isLocalVarDecl() && !Var->hasLinkage() && !Var->isInvalidDecl() && RequireCompleteType(Var->getLocation(), Type, diag::err_typecheck_decl_incomplete_type))"},{w,13858,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n if (!Var->hasAttr<AliasAttr>()) {\n if (RequireCompleteType(Var->getLocation(), Context.getBaseElementType(Type), diag::err_typecheck_decl_incomplete_type)) {"},{H,278,"ExprResult Sema::ConvertParamDefaultArgument(ParmVarDecl *Param, Expr *Arg, SourceLocation EqualLoc) {\n if (RequireCompleteType(Param->getLocation(), Param->getType(), diag::err_typecheck_decl_incomplete_type))"},{n,7741,"ExprResult Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr) {\n // ...\n } else if (!literalType->isDependentType() && RequireCompleteType(LParenLoc, literalType, diag::err_typecheck_decl_incomplete_type, SourceRange(LParenLoc, LiteralExpr->getSourceRange().getEnd())))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p10.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p10.cpp:7:8: error: variable has incomplete type \'X<int>\'"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p10.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p10.cpp:7:8: error: variable has incomplete type \'X<int>\'"} | ||
Line 7,608: | Line 7,636: | ||
}, | }, | ||
["err_typecheck_deleted_function"]={ | ["err_typecheck_deleted_function"]={ | ||
[ | [i]="err_typecheck_deleted_function", | ||
[ | [h]="conversion function %diff{from $ to $|between types}0,1 invokes a deleted function", | ||
[ | [g]={{nil,nil,{"conversion function ",{"from A to B","between types"}," invokes a deleted function"}}}, | ||
[ | [b]=k, | ||
[ | [e]="conversion function (?:from (.*?) to (.*?)|between types) invokes a deleted function", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={rd,1260399737,pd,ld}, | ||
[j]={{ | [j]={{Q,9672,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitOverloadFailed:\n case FK_UserConversionOverloadFailed:\n // ...\n case OR_Deleted: {\n S.Diag(Kind.getLocation(), diag::err_typecheck_deleted_function) << OnlyArg->getType() << DestType.getNonReferenceType() << Args[0]->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/deleted-function.cpp"]={"clang/test/SemaCXX/deleted-function.cpp:34:7: error: conversion function from \'WithDel\' to \'int\' invokes a deleted function","clang/test/SemaCXX/deleted-function.cpp:74:9: error: conversion function from \'int\' to \'DelCtor\' invokes a deleted function","clang/test/SemaCXX/deleted-function.cpp:83:19: error: conversion function from \'int\' to \'DelCtor\' invokes a deleted function","clang/test/SemaCXX/deleted-function.cpp:85:19: error: conversion function from \'int\' to \'DelCtor\' invokes a deleted function"} | ["clang/test/SemaCXX/deleted-function.cpp"]={"clang/test/SemaCXX/deleted-function.cpp:34:7: error: conversion function from \'WithDel\' to \'int\' invokes a deleted function","clang/test/SemaCXX/deleted-function.cpp:74:9: error: conversion function from \'int\' to \'DelCtor\' invokes a deleted function","clang/test/SemaCXX/deleted-function.cpp:83:19: error: conversion function from \'int\' to \'DelCtor\' invokes a deleted function","clang/test/SemaCXX/deleted-function.cpp:85:19: error: conversion function from \'int\' to \'DelCtor\' invokes a deleted function"} | ||
Line 7,622: | Line 7,650: | ||
}, | }, | ||
["err_typecheck_duplicate_vector_components_not_mlvalue"]={ | ["err_typecheck_duplicate_vector_components_not_mlvalue"]={ | ||
[ | [i]="err_typecheck_duplicate_vector_components_not_mlvalue", | ||
[ | [h]="vector is not assignable (contains duplicate components)", | ||
[ | [g]="vector is not assignable (contains duplicate components)", | ||
[ | [b]=k, | ||
[ | [e]="vector is not assignable \\(contains duplicate components\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,14370,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_DuplicateVectorComponents:\n DiagID = diag::err_typecheck_duplicate_vector_components_not_mlvalue;"}}, | [j]={{n,14370,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_DuplicateVectorComponents:\n DiagID = diag::err_typecheck_duplicate_vector_components_not_mlvalue;"}}, | ||
[l]={ | [l]={ | ||
Line 7,636: | Line 7,664: | ||
}, | }, | ||
["err_typecheck_expect_flt_or_vector"]={ | ["err_typecheck_expect_flt_or_vector"]={ | ||
[ | [i]={{nil,F,"err_typecheck_expect_flt_or_vector"}}, | ||
[ | [h]={{nil,F,"invalid operand of type %0 where floating, complex or a vector of such types is required"}}, | ||
[ | [g]={{nil,F,"invalid operand of type A where floating, complex or a vector of such types is required"}}, | ||
[ | [b]=k, | ||
[ | [e]="invalid operand of type (.*?) where floating, complex or a vector of such types is required", | ||
[ | [f]=a, | ||
[ | [d]={{nil,F,m}}, | ||
[ | [c]={Vc,1615397021,Zc,ad}, | ||
[j]={{ | [j]={{z,8587,"/// SemaBuiltinArithmeticFence - Handle __arithmetic_fence.\nbool Sema::SemaBuiltinArithmeticFence(CallExpr *TheCall) {\n // ...\n if (!ArgTy->hasFloatingRepresentation())\n return Diag(TheCall->getEndLoc(), diag::err_typecheck_expect_flt_or_vector) << ArgTy;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/arithmetic-fence-builtin.c"]={"clang/test/Sema/arithmetic-fence-builtin.c:21:27: error: invalid operand of type \'stype\' where floating, complex or a vector of such types is required","clang/test/Sema/arithmetic-fence-builtin.c:32:31: error: invalid operand of type \'int\' where floating, complex or a vector of such types is required","clang/test/Sema/arithmetic-fence-builtin.c:9:31: error: invalid operand of type \'float *\' where floating, complex or a vector of such types is required","clang/test/Sema/arithmetic-fence-builtin.c:9:31: error: invalid operand of type \'int *\' where floating, complex or a vector of such types is required","clang/test/Sema/arithmetic-fence-builtin.c:12:34: error: invalid operand of type \'int\' where floating, complex or a vector of such types is required"} | ["clang/test/Sema/arithmetic-fence-builtin.c"]={"clang/test/Sema/arithmetic-fence-builtin.c:21:27: error: invalid operand of type \'stype\' where floating, complex or a vector of such types is required","clang/test/Sema/arithmetic-fence-builtin.c:32:31: error: invalid operand of type \'int\' where floating, complex or a vector of such types is required","clang/test/Sema/arithmetic-fence-builtin.c:9:31: error: invalid operand of type \'float *\' where floating, complex or a vector of such types is required","clang/test/Sema/arithmetic-fence-builtin.c:9:31: error: invalid operand of type \'int *\' where floating, complex or a vector of such types is required","clang/test/Sema/arithmetic-fence-builtin.c:12:34: error: invalid operand of type \'int\' where floating, complex or a vector of such types is required"} | ||
Line 7,650: | Line 7,678: | ||
}, | }, | ||
["err_typecheck_expect_int"]={ | ["err_typecheck_expect_int"]={ | ||
[ | [i]="err_typecheck_expect_int", | ||
[ | [h]="used type %0 where integer is required", | ||
[ | [g]="used type A where integer is required", | ||
[ | [b]=k, | ||
[ | [e]="used type (.*?) where integer is required", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c65605d008dd",1423201495,"OpenCL: handle shift operator with vector operands","OpenCL: handle shift operator with vector operands\n\nIntroduce a number of checks:\n1. If LHS is a scalar, then RHS cannot be a vector.\n2. Operands must be of integer type.\n3. If both are vectors, then the number of elements must match.\n\nRelax the requirement for \"usual arithmetic conversions\":\nWhen LHS is a vector, a scalar RHS can simply be expanded into a\nvector; OpenCL does not require that its rank be lower than the LHS.\nFor example, the following code is not an error even if the implicit\ntype of the constant literal is \"int\".\n\n char2 foo(char2 v) { return v << 1; }\n\nConsolidate existing tests under CodeGenOpenCL, and add more tests\nunder SemaOpenCL.\n\nllvm-svn: 228382"}, | ||
[j]={{ | [j]={{z,316,"/// Check that the value argument for __builtin_is_aligned(value, alignment) and\n/// __builtin_aligned_{up,down}(value, alignment) is an integer or a pointer\n/// type (but not a function pointer) and that the alignment is a power-of-two.\nstatic bool SemaBuiltinAlignment(Sema &S, CallExpr *TheCall, unsigned ID) {\n // ...\n if (!IsValidIntegerType(AlignOp->getType())) {\n S.Diag(AlignOp->getExprLoc(), diag::err_typecheck_expect_int) << AlignOp->getType();"},{z,4441,"bool Sema::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!ArgExpr->EvaluateAsInt(ArgResult, Context))\n return Diag(ArgExpr->getExprLoc(), diag::err_typecheck_expect_int) << ArgExpr->getType();"},{n,12117,"/// Return the resulting type when a vector is shifted\n/// by a scalar or vector shift amount.\nstatic QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n // The operands need to be integers.\n if (!LHSEleType->isIntegerType()) {\n S.Diag(Loc, diag::err_typecheck_expect_int) << LHS.get()->getType() << LHS.get()->getSourceRange();"},{n,12139,"/// Return the resulting type when a vector is shifted\n/// by a scalar or vector shift amount.\nstatic QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (!RHSEleType->isIntegerType()) {\n S.Diag(Loc, diag::err_typecheck_expect_int) << RHS.get()->getType() << RHS.get()->getSourceRange();"},{n,12204,"static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (!LHSEleType->isIntegerType()) {\n S.Diag(Loc, diag::err_typecheck_expect_int) << LHS.get()->getType() << LHS.get()->getSourceRange();"},{n,12212,"static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (!RHSEleType->isIntegerType()) {\n S.Diag(Loc, diag::err_typecheck_expect_int) << RHS.get()->getType() << RHS.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/ext_vector_ops.c"]={"clang/test/Sema/ext_vector_ops.c:129:15: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:130:15: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:131:13: error: used type \'float\' where integer is required","clang/test/Sema/ext_vector_ops.c:132:13: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:133:15: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:134:15: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:135:13: error: used type \'float\' where integer is required","clang/test/Sema/ext_vector_ops.c:136:13: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:146:8: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:147:8: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:157:6: error: used type \'float\' where integer is required","clang/test/Sema/ext_vector_ops.c:158:6: error: used type \'float\' where integer is required"} | ["clang/test/Sema/ext_vector_ops.c"]={"clang/test/Sema/ext_vector_ops.c:129:15: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:130:15: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:131:13: error: used type \'float\' where integer is required","clang/test/Sema/ext_vector_ops.c:132:13: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:133:15: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:134:15: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:135:13: error: used type \'float\' where integer is required","clang/test/Sema/ext_vector_ops.c:136:13: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:146:8: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:147:8: error: used type \'v2f\' (vector of 2 \'float\' values) where integer is required","clang/test/Sema/ext_vector_ops.c:157:6: error: used type \'float\' where integer is required","clang/test/Sema/ext_vector_ops.c:158:6: error: used type \'float\' where integer is required"} | ||
Line 7,664: | Line 7,692: | ||
}, | }, | ||
["err_typecheck_expect_scalar_operand"]={ | ["err_typecheck_expect_scalar_operand"]={ | ||
[ | [i]="err_typecheck_expect_scalar_operand", | ||
[ | [h]="operand of type %0 where arithmetic or pointer type is required", | ||
[ | [g]="operand of type A where arithmetic or pointer type is required", | ||
[ | [b]=k, | ||
[ | [e]="operand of type (.*?) where arithmetic or pointer type is required", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{jc,3059,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n // Require the operand to be a scalar, a vector, or a matrix.\n if (!SrcType->isScalarType() && !SrcType->isVectorType() && !SrcType->isMatrixType()) {\n Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_typecheck_expect_scalar_operand) << SrcType << SrcExpr.get()->getSourceRange();"},{z,309,"/// Check that the value argument for __builtin_is_aligned(value, alignment) and\n/// __builtin_aligned_{up,down}(value, alignment) is an integer or a pointer\n/// type (but not a function pointer) and that the alignment is a power-of-two.\nstatic bool SemaBuiltinAlignment(Sema &S, CallExpr *TheCall, unsigned ID) {\n // ...\n if ((!SrcTy->isPointerType() && !IsValidIntegerType(SrcTy)) || SrcTy->isFunctionPointerType()) {\n // ...\n S.Diag(Source->getExprLoc(), diag::err_typecheck_expect_scalar_operand) << SrcTy;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/check_cast.c"]={"clang/test/Parser/check_cast.c:11:12: error: operand of type \'struct foo\' where arithmetic or pointer type is required"} | ["clang/test/Parser/check_cast.c"]={"clang/test/Parser/check_cast.c:11:12: error: operand of type \'struct foo\' where arithmetic or pointer type is required"} | ||
Line 7,678: | Line 7,706: | ||
}, | }, | ||
["err_typecheck_expression_not_modifiable_lvalue"]={ | ["err_typecheck_expression_not_modifiable_lvalue"]={ | ||
[ | [i]="err_typecheck_expression_not_modifiable_lvalue", | ||
[h]="expression is not assignable", | |||
[g]="expression is not assignable", | |||
[b]=k, | |||
[e]="expression is not assignable", | [e]="expression is not assignable", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[ | |||
[ | |||
[j]={{n,14363,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_InvalidExpression:\n case Expr::MLV_MemberFunction:\n case Expr::MLV_ClassTemporary:\n DiagID = diag::err_typecheck_expression_not_modifiable_lvalue;"}} | [j]={{n,14363,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_InvalidExpression:\n case Expr::MLV_MemberFunction:\n case Expr::MLV_ClassTemporary:\n DiagID = diag::err_typecheck_expression_not_modifiable_lvalue;"}} | ||
}, | }, | ||
["err_typecheck_field_variable_size"]={ | ["err_typecheck_field_variable_size"]={ | ||
[ | [i]="err_typecheck_field_variable_size", | ||
[ | [h]="fields must have a constant size: \'variable length array in structure\' extension will never be supported", | ||
[ | [g]="fields must have a constant size: \'variable length array in structure\' extension will never be supported", | ||
[ | [b]=k, | ||
[ | [e]="fields must have a constant size\\: \'variable length array in structure\' extension will never be supported", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{w,18160,"/// 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 // C99 6.7.2.1p8: A member of a structure or union may have any type other\n // than a variably modified type.\n if (!InvalidDecl && T->isVariablyModifiedType()) {\n if (!tryToFixVariablyModifiedVarType(TInfo, T, Loc, diag::err_typecheck_field_variable_size))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/vla.c"]={"clang/test/Sema/vla.c:17:28: error: fields must have a constant size: \'variable length array in structure\' extension will never be supported","clang/test/Sema/vla.c:74:7: error: fields must have a constant size: \'variable length array in structure\' extension will never be supported"} | ["clang/test/Sema/vla.c"]={"clang/test/Sema/vla.c:17:28: error: fields must have a constant size: \'variable length array in structure\' extension will never be supported","clang/test/Sema/vla.c:74:7: error: fields must have a constant size: \'variable length array in structure\' extension will never be supported"} | ||
Line 7,703: | Line 7,731: | ||
}, | }, | ||
["err_typecheck_illegal_increment_decrement"]={ | ["err_typecheck_illegal_increment_decrement"]={ | ||
[ | [i]="err_typecheck_illegal_increment_decrement", | ||
[ | [h]="cannot %select{decrement|increment}1 value of type %0", | ||
[ | [g]={{nil,nil,{"cannot ",{"decrement","increment"}," value of type A"}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot (?:decrement|increment) value of type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,14751,"/// 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 } else if (ResType->isPlaceholderType()) {\n // ...\n } else if (S.getLangOpts().AltiVec && ResType->isVectorType()) {\n // ...\n } else if (S.getLangOpts().ZVector && ResType->isVectorType() && (ResType->castAs<VectorType>()->getVectorKind() != VectorType::AltiVecBool)) {\n // ...\n } else if (S.getLangOpts().OpenCL && ResType->isVectorType() && ResType->castAs<VectorType>()->getElementType()->isIntegerType()) {\n // ...\n } else {\n S.Diag(OpLoc, diag::err_typecheck_illegal_increment_decrement) << ResType << int(IsInc) << Op->getSourceRange();"}}, | [j]={{n,14751,"/// 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 } else if (ResType->isPlaceholderType()) {\n // ...\n } else if (S.getLangOpts().AltiVec && ResType->isVectorType()) {\n // ...\n } else if (S.getLangOpts().ZVector && ResType->isVectorType() && (ResType->castAs<VectorType>()->getVectorKind() != VectorType::AltiVecBool)) {\n // ...\n } else if (S.getLangOpts().OpenCL && ResType->isVectorType() && ResType->castAs<VectorType>()->getElementType()->isIntegerType()) {\n // ...\n } else {\n S.Diag(OpLoc, diag::err_typecheck_illegal_increment_decrement) << ResType << int(IsInc) << Op->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,717: | Line 7,745: | ||
}, | }, | ||
["err_typecheck_incompatible_address_space"]={ | ["err_typecheck_incompatible_address_space"]={ | ||
[ | [i]="err_typecheck_incompatible_address_space", | ||
[ | [h]="%select{%diff{assigning $ to $|assigning to different types}1,0|%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 changes address space of pointer", | ||
[ | [g]={{nil,nil,{{{{"assigning B to A",zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}}," changes address space of pointer"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:(?:assigning (.*?) to (.*?)|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)) changes address space of pointer", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"4fff8f6cff1c",1296519029,"Perform the bad-address-space conversions check as part of ","Perform the bad-address-space conversions check as part of \nCheckPointerTypesForAssignment.\n\nllvm-svn: 124632"}, | ||
[j]={{ | [j]={{jc,2655,"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 unsigned DiagID = diag::err_typecheck_incompatible_address_space;"},{n,17607,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatiblePointerDiscardsQualifiers: {\n // ...\n if (lhq.getAddressSpace() != rhq.getAddressSpace()) {\n DiagKind = diag::err_typecheck_incompatible_address_space;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaSYCL/address-space-conversions.cpp"]={"clang/test/SemaSYCL/address-space-conversions.cpp:20:10: error: assigning \'__private int *\' to \'__global int *\' changes address space of pointer","clang/test/SemaSYCL/address-space-conversions.cpp:21:10: error: assigning \'__local int *\' to \'__global int *\' changes address space of pointer","clang/test/SemaSYCL/address-space-conversions.cpp:72:15: error: assigning \'__global int *\' to \'__global_host int *\' changes address space of pointer","clang/test/SemaSYCL/address-space-conversions.cpp:78:17: error: assigning \'__global int *\' to \'__global_device int *\' changes address space of pointer"} | ["clang/test/SemaSYCL/address-space-conversions.cpp"]={"clang/test/SemaSYCL/address-space-conversions.cpp:20:10: error: assigning \'__private int *\' to \'__global int *\' changes address space of pointer","clang/test/SemaSYCL/address-space-conversions.cpp:21:10: error: assigning \'__local int *\' to \'__global int *\' changes address space of pointer","clang/test/SemaSYCL/address-space-conversions.cpp:72:15: error: assigning \'__global int *\' to \'__global_host int *\' changes address space of pointer","clang/test/SemaSYCL/address-space-conversions.cpp:78:17: error: assigning \'__global int *\' to \'__global_device int *\' changes address space of pointer"} | ||
Line 7,731: | Line 7,759: | ||
}, | }, | ||
["err_typecheck_incompatible_nested_address_space"]={ | ["err_typecheck_incompatible_nested_address_space"]={ | ||
[ | [i]={{nil,D,"err_typecheck_incompatible_nested_address_space"}}, | ||
[ | [h]={{nil,D,"%select{%diff{assigning $ to $|assigning to different types}1,0|%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 changes address space of nested pointer"}}, | ||
[ | [g]={{nil,D,{{{{"assigning B to A",zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}}," changes address space of nested pointer"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:(?:assigning (.*?) to (.*?)|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)) changes address space of nested pointer", | ||
[ | [f]=a, | ||
[ | [d]={{nil,D,m}}, | ||
[ | [c]={"5b6dda33d122",1557325429,"[Sema][OpenCL] Make address space conversions a bit stricter.","[Sema][OpenCL] Make address space conversions a bit stricter.\n\nThe semantics for converting nested pointers between address\nspaces are not very well defined. Some conversions which do not\nreally carry any meaning only produce warnings, and in some cases\nwarnings hide invalid conversions, such as \'global int*\' to\n\'local float*\'!\n\nThis patch changes the logic in checkPointerTypesForAssignment\nand checkAddressSpaceCast to fail properly on implicit conversions\nthat should definitely not be permitted. We also dig deeper into the\npointer types and warn on explicit conversions where the address\nspace in a nested pointer changes, regardless of whether the address\nspace is compatible with the corresponding pointer nesting level\non the destination type.\n\nFixes PR39674!\n\nPatch by ebevhan (Bevin Hansson)!\n\nDifferential Revision: https://reviews.llvm.org/D58236\n\nllvm-svn: 360258"}, | ||
[j]={{n,17648,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatibleNestedPointerAddressSpaceMismatch:\n DiagKind = diag::err_typecheck_incompatible_nested_address_space;"}}, | [j]={{n,17648,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatibleNestedPointerAddressSpaceMismatch:\n DiagKind = diag::err_typecheck_incompatible_nested_address_space;"}}, | ||
[l]={ | [l]={ | ||
Line 7,745: | Line 7,773: | ||
}, | }, | ||
["err_typecheck_incompatible_ownership"]={ | ["err_typecheck_incompatible_ownership"]={ | ||
[ | [i]="err_typecheck_incompatible_ownership", | ||
[ | [h]="%select{%diff{assigning $ to $|assigning to different types}1,0|%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 changes retain/release properties of pointer", | ||
[ | [g]={{nil,nil,{{{{"assigning B to A",zb}},{{xb,yb}},{{pb,Ab}},{{Bb,Cb}},{{Db,Eb}},{{Fb,Gb}},{{Hb,Ib}}}," changes retain/release properties of pointer"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:(?:assigning (.*?) to (.*?)|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)) changes retain\\/release properties of pointer", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"cff00d9c127c",1308874139,"Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about \'ownership\', not \'lifet...","Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about \'ownership\', not \'lifetime\'.\n\nrdar://9477613.\n\nllvm-svn: 133779"}, | ||
[j]={{ | [j]={{jc,3206,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n // ARC imposes extra restrictions on casts.\n if (Self.getLangOpts().allowsNonTrivialObjCLifetimeQualifiers()) {\n // ...\n if (Self.getLangOpts().ObjCAutoRefCount && CastPtr) {\n if (const PointerType *ExprPtr = SrcType->getAs<PointerType>()) {\n // ...\n if (CastPtr->getPointeeType()->isObjCLifetimeType() && ExprPtr->getPointeeType()->isObjCLifetimeType() && !CastQuals.compatiblyIncludesObjCLifetime(ExprQuals)) {\n Self.Diag(SrcExpr.get()->getBeginLoc(), diag::err_typecheck_incompatible_ownership) << SrcType << DestType << Sema::AA_Casting << SrcExpr.get()->getSourceRange();"},{n,17628,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatiblePointerDiscardsQualifiers: {\n // ...\n if (lhq.getAddressSpace() != rhq.getAddressSpace()) {\n // ...\n } else if (lhq.getObjCLifetime() != rhq.getObjCLifetime()) {\n DiagKind = diag::err_typecheck_incompatible_ownership;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/mrc-weak.m"]={"clang/test/SemaObjC/mrc-weak.m:53:7: error: initializing \'id *\' with an expression of type \'__weak id *\' changes retain/release properties of pointer","clang/test/SemaObjC/mrc-weak.m:54:14: error: initializing \'__weak id *\' with an expression of type \'id *\' changes retain/release properties of pointer","clang/test/SemaObjC/mrc-weak.m:65:27: error: initializing \'id *\' with an expression of type \'__weak id *\' changes retain/release properties of pointer"} | ["clang/test/SemaObjC/mrc-weak.m"]={"clang/test/SemaObjC/mrc-weak.m:53:7: error: initializing \'id *\' with an expression of type \'__weak id *\' changes retain/release properties of pointer","clang/test/SemaObjC/mrc-weak.m:54:14: error: initializing \'__weak id *\' with an expression of type \'id *\' changes retain/release properties of pointer","clang/test/SemaObjC/mrc-weak.m:65:27: error: initializing \'id *\' with an expression of type \'__weak id *\' changes retain/release properties of pointer"} | ||
Line 7,759: | Line 7,787: | ||
}, | }, | ||
["err_typecheck_incomplete_array_needs_initializer"]={ | ["err_typecheck_incomplete_array_needs_initializer"]={ | ||
[ | [i]="err_typecheck_incomplete_array_needs_initializer", | ||
[h]="definition of variable with array type needs an explicit size or an initializer", | |||
[g]="definition of variable with array type needs an explicit size or an initializer", | |||
[b]=k, | |||
[e]="definition of variable with array type needs an explicit size or an initializer", | [e]="definition of variable with array type needs an explicit size or an initializer", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"1060067dd11a",1257450467,"Don\'t allow definitions of array variables without some size information in C++. Fixed PR5401","Don\'t allow definitions of array variables without some size information in C++. Fixed PR5401\n\nllvm-svn: 86165"}, | |||
[j]={{w,13834,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n // Provide a specific diagnostic for uninitialized variable\n // definitions with incomplete array type.\n if (Type->isIncompleteArrayType()) {\n if (Var->isConstexpr())\n // ...\n else\n Diag(Var->getLocation(), diag::err_typecheck_incomplete_array_needs_initializer);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp:23:5: error: definition of variable with array type needs an explicit size or an initializer"} | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp:23:5: error: definition of variable with array type needs an explicit size or an initializer"} | ||
Line 7,773: | Line 7,801: | ||
}, | }, | ||
["err_typecheck_incomplete_tag"]={ | ["err_typecheck_incomplete_tag"]={ | ||
[ | [i]="err_typecheck_incomplete_tag", | ||
[ | [h]="incomplete definition of type %0", | ||
[ | [g]="incomplete definition of type A", | ||
[ | [b]=k, | ||
[ | [e]="incomplete definition of type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{V,655,"static bool LookupMemberExprInRecord(Sema &SemaRef, LookupResult &R, Expr *BaseExpr, const RecordType *RTy, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, bool HasTemplateArgs, SourceLocation TemplateKWLoc, TypoExpr *&TE) {\n // ...\n if (!SemaRef.isThisOutsideMemberFunctionBody(QualType(RTy, 0)) && SemaRef.RequireCompleteType(OpLoc, QualType(RTy, 0), diag::err_typecheck_incomplete_tag, BaseRange))"},{V,675,"static bool LookupMemberExprInRecord(Sema &SemaRef, LookupResult &R, Expr *BaseExpr, const RecordType *RTy, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, bool HasTemplateArgs, SourceLocation TemplateKWLoc, TypoExpr *&TE) {\n // ...\n if (SS.isSet()) {\n // ...\n if (SemaRef.RequireCompleteDeclContext(SS, DC)) {\n SemaRef.Diag(SS.getRange().getEnd(), diag::err_typecheck_incomplete_tag) << SS.getRange() << DC;"},{V,1361,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (S.RequireCompleteType(OpLoc, BaseType, diag::err_typecheck_incomplete_tag, BaseExpr.get()))"},{Pb,15242,"/// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->\n/// (if one exists), where @c Base is an expression of class type and\n/// @c Member is the name of the member we\'re trying to find.\nExprResult Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound) {\n // ...\n if (RequireCompleteType(Loc, Base->getType(), diag::err_typecheck_incomplete_tag, Base))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Parser/recovery.c"]={"clang/test/Parser/recovery.c:70:36: error: incomplete definition of type \'struct forward\'"} | ["clang/test/Parser/recovery.c"]={"clang/test/Parser/recovery.c:70:36: error: incomplete definition of type \'struct forward\'"} | ||
Line 7,787: | Line 7,815: | ||
}, | }, | ||
["err_typecheck_incomplete_type_not_modifiable_lvalue"]={ | ["err_typecheck_incomplete_type_not_modifiable_lvalue"]={ | ||
[ | [i]="err_typecheck_incomplete_type_not_modifiable_lvalue", | ||
[ | [h]="incomplete type %0 is not assignable", | ||
[ | [g]="incomplete type A is not assignable", | ||
[ | [b]=k, | ||
[ | [e]="incomplete type (.*?) is not assignable", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,14365,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_IncompleteType:\n case Expr::MLV_IncompleteVoidType:\n return S.RequireCompleteType(Loc, E->getType(), diag::err_typecheck_incomplete_type_not_modifiable_lvalue, E);"}}, | [j]={{n,14365,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_IncompleteType:\n case Expr::MLV_IncompleteVoidType:\n return S.RequireCompleteType(Loc, E->getType(), diag::err_typecheck_incomplete_type_not_modifiable_lvalue, E);"}}, | ||
[l]={ | [l]={ | ||
Line 7,801: | Line 7,829: | ||
}, | }, | ||
["err_typecheck_indirection_requires_pointer"]={ | ["err_typecheck_indirection_requires_pointer"]={ | ||
[ | [i]="err_typecheck_indirection_requires_pointer", | ||
[ | [h]="indirection requires pointer operand (%0 invalid)", | ||
[ | [g]="indirection requires pointer operand (A invalid)", | ||
[ | [b]=k, | ||
[ | [e]="indirection requires pointer operand \\((.*?) invalid\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,15152,"/// CheckIndirectionOperand - Type check unary indirection (prefix \'*\').\nstatic QualType CheckIndirectionOperand(Sema &S, Expr *Op, ExprValueKind &VK, SourceLocation OpLoc, bool IsAfterAmp = false) {\n // ...\n if (Result.isNull()) {\n S.Diag(OpLoc, diag::err_typecheck_indirection_requires_pointer) << OpTy << Op->getSourceRange();"}}, | [j]={{n,15152,"/// CheckIndirectionOperand - Type check unary indirection (prefix \'*\').\nstatic QualType CheckIndirectionOperand(Sema &S, Expr *Op, ExprValueKind &VK, SourceLocation OpLoc, bool IsAfterAmp = false) {\n // ...\n if (Result.isNull()) {\n S.Diag(OpLoc, diag::err_typecheck_indirection_requires_pointer) << OpTy << Op->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,815: | Line 7,843: | ||
}, | }, | ||
["err_typecheck_indirection_through_void_pointer_cpp"]={ | ["err_typecheck_indirection_through_void_pointer_cpp"]={ | ||
[ | [i]="err_typecheck_indirection_through_void_pointer_cpp", | ||
[ | [h]="indirection not permitted on operand of type %0", | ||
[ | [g]="indirection not permitted on operand of type A", | ||
[ | [b]=k, | ||
[ | [e]="indirection not permitted on operand of type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{n,15155,"/// 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 S.Diag(OpLoc, diag::err_typecheck_indirection_through_void_pointer_cpp) << OpTy << Op->getSourceRange();"}}, | [j]={{n,15155,"/// 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 S.Diag(OpLoc, diag::err_typecheck_indirection_through_void_pointer_cpp) << OpTy << Op->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,829: | Line 7,857: | ||
}, | }, | ||
["err_typecheck_invalid_lvalue_addrof"]={ | ["err_typecheck_invalid_lvalue_addrof"]={ | ||
[ | [i]="err_typecheck_invalid_lvalue_addrof", | ||
[ | [h]="cannot take the address of an rvalue of type %0", | ||
[ | [g]="cannot take the address of an rvalue of type A", | ||
[ | [b]=k, | ||
[ | [e]="cannot take the address of an rvalue of type (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,15031,"/// 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 } else if (lval != Expr::LV_Valid && lval != Expr::LV_IncompleteVoidType) {\n // C99 6.5.3.2p1\n // The operand must be either an l-value or a function designator\n if (!op->getType()->isFunctionType()) {\n // Use a special diagnostic for loads from property references.\n if (isa<PseudoObjectExpr>(op)) {\n // ...\n } else {\n Diag(OpLoc, diag::err_typecheck_invalid_lvalue_addrof) << op->getType() << op->getSourceRange();"}}, | [j]={{n,15031,"/// 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 } else if (lval != Expr::LV_Valid && lval != Expr::LV_IncompleteVoidType) {\n // C99 6.5.3.2p1\n // The operand must be either an l-value or a function designator\n if (!op->getType()->isFunctionType()) {\n // Use a special diagnostic for loads from property references.\n if (isa<PseudoObjectExpr>(op)) {\n // ...\n } else {\n Diag(OpLoc, diag::err_typecheck_invalid_lvalue_addrof) << op->getType() << op->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,843: | Line 7,871: | ||
}, | }, | ||
["err_typecheck_invalid_lvalue_addrof_addrof_function"]={ | ["err_typecheck_invalid_lvalue_addrof_addrof_function"]={ | ||
[ | [i]="err_typecheck_invalid_lvalue_addrof_addrof_function", | ||
[h]="extra \'&\' taking address of overloaded function", | |||
[g]="extra \'&\' taking address of overloaded function", | |||
[b]=k, | |||
[e]="extra \'&\' taking address of overloaded function", | [e]="extra \'&\' taking address of overloaded function", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"c084bd288815",1359771285,"PR15132: Replace \"address expression must be an lvalue or a function","PR15132: Replace \"address expression must be an lvalue or a function\ndesignator\" diagnostic with more correct and more human-friendly \"cannot take\naddress of rvalue of type \'T\'\".\n\nFor the case of & &T::f, provide a custom diagnostic, rather than unhelpfully\nsaying \"cannot take address of rvalue of type \'<overloaded function type>\'\".\n\nFor the case of &array_temporary, treat it just like a class temporary\n(including allowing it as an extension); the existing diagnostic wording\nfor the class temporary case works fine.\n\nllvm-svn: 174262"}, | |||
[ | |||
[ | |||
[j]={{n,14869,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n if (const BuiltinType *PTy = OrigOp.get()->getType()->getAsPlaceholderType()) {\n if (PTy->getKind() == BuiltinType::Overload) {\n // ...\n if (!isa<OverloadExpr>(E)) {\n // ...\n Diag(OpLoc, diag::err_typecheck_invalid_lvalue_addrof_addrof_function) << OrigOp.get()->getSourceRange();"}}, | [j]={{n,14869,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n if (const BuiltinType *PTy = OrigOp.get()->getType()->getAsPlaceholderType()) {\n if (PTy->getKind() == BuiltinType::Overload) {\n // ...\n if (!isa<OverloadExpr>(E)) {\n // ...\n Diag(OpLoc, diag::err_typecheck_invalid_lvalue_addrof_addrof_function) << OrigOp.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,857: | Line 7,885: | ||
}, | }, | ||
["err_typecheck_invalid_operands"]={ | ["err_typecheck_invalid_operands"]={ | ||
[ | [i]="err_typecheck_invalid_operands", | ||
[ | [h]="invalid operands to binary expression (%0 and %1)", | ||
[ | [g]="invalid operands to binary expression (A and B)", | ||
[ | [b]=k, | ||
[ | [e]="invalid operands to binary expression \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,10632,"QualType Sema::InvalidOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) {\n // ...\n Diag(Loc, diag::err_typecheck_invalid_operands) << OrigLHS.getType() << OrigRHS.getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,11218,"QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind) {\n // ...\n unsigned DiagID = diag::err_typecheck_invalid_operands;"},{n,12111,"/// Return the resulting type when a vector is shifted\n/// by a scalar or vector shift amount.\nstatic QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n // Do not allow shifts for boolean vectors.\n if ((LHSVecTy && LHSVecTy->isExtVectorBoolType()) || (RHSVecTy && RHSVecTy->isExtVectorBoolType())) {\n S.Diag(Loc, diag::err_typecheck_invalid_operands) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange();"},{n,12198,"static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if ((LHSBuiltinTy && LHSBuiltinTy->isSVEBool()) || (RHSBuiltinTy && RHSBuiltinTy->isSVEBool())) {\n S.Diag(Loc, diag::err_typecheck_invalid_operands) << LHSType << RHSType << LHS.get()->getSourceRange();"},{n,12235,"static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (LHSType->isVLSTBuiltinType() && RHSType->isVLSTBuiltinType() && (S.Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC != S.Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC)) {\n S.Diag(Loc, diag::err_typecheck_invalid_operands) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | [j]={{n,10632,"QualType Sema::InvalidOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) {\n // ...\n Diag(Loc, diag::err_typecheck_invalid_operands) << OrigLHS.getType() << OrigRHS.getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,11218,"QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind) {\n // ...\n unsigned DiagID = diag::err_typecheck_invalid_operands;"},{n,12111,"/// Return the resulting type when a vector is shifted\n/// by a scalar or vector shift amount.\nstatic QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n // Do not allow shifts for boolean vectors.\n if ((LHSVecTy && LHSVecTy->isExtVectorBoolType()) || (RHSVecTy && RHSVecTy->isExtVectorBoolType())) {\n S.Diag(Loc, diag::err_typecheck_invalid_operands) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange();"},{n,12198,"static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if ((LHSBuiltinTy && LHSBuiltinTy->isSVEBool()) || (RHSBuiltinTy && RHSBuiltinTy->isSVEBool())) {\n S.Diag(Loc, diag::err_typecheck_invalid_operands) << LHSType << RHSType << LHS.get()->getSourceRange();"},{n,12235,"static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (LHSType->isVLSTBuiltinType() && RHSType->isVLSTBuiltinType() && (S.Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC != S.Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC)) {\n S.Diag(Loc, diag::err_typecheck_invalid_operands) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,871: | Line 7,899: | ||
}, | }, | ||
["err_typecheck_invalid_restrict_invalid_pointee"]={ | ["err_typecheck_invalid_restrict_invalid_pointee"]={ | ||
[ | [i]="err_typecheck_invalid_restrict_invalid_pointee", | ||
[ | [h]="pointer to function type %0 may not be \'restrict\' qualified", | ||
[ | [g]="pointer to function type A may not be \'restrict\' qualified", | ||
[ | [b]=k, | ||
[ | [e]="pointer to function type (.*?) may not be \'restrict\' qualified", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{R,1965,"QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS) {\n // ...\n // Enforce C99 6.7.3p2: \"Types other than pointer types derived from\n // object or incomplete types shall not be restrict-qualified.\"\n if (Qs.hasRestrict()) {\n // ...\n if (T->isAnyPointerType() || T->isReferenceType() || T->isMemberPointerType()) {\n // ...\n // If we have a pointer or reference, the pointee must have an object\n // incomplete type.\n if (!EltTy->isIncompleteOrObjectType()) {\n DiagID = diag::err_typecheck_invalid_restrict_invalid_pointee;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/declspec.c"]={"clang/test/Sema/declspec.c:23:1: error: pointer to function type \'f\' (aka \'int (void)\') may not be \'restrict\' qualified","clang/test/Sema/declspec.c:24:3: error: pointer to function type \'f\' (aka \'int (void)\') may not be \'restrict\' qualified"} | ["clang/test/Sema/declspec.c"]={"clang/test/Sema/declspec.c:23:1: error: pointer to function type \'f\' (aka \'int (void)\') may not be \'restrict\' qualified","clang/test/Sema/declspec.c:24:3: error: pointer to function type \'f\' (aka \'int (void)\') may not be \'restrict\' qualified"} | ||
Line 7,885: | Line 7,913: | ||
}, | }, | ||
["err_typecheck_invalid_restrict_not_pointer"]={ | ["err_typecheck_invalid_restrict_not_pointer"]={ | ||
[ | [i]="err_typecheck_invalid_restrict_not_pointer", | ||
[ | [h]="restrict requires a pointer or reference (%0 is invalid)", | ||
[ | [g]="restrict requires a pointer or reference (A is invalid)", | ||
[ | [b]=k, | ||
[ | [e]="restrict requires a pointer or reference \\((.*?) is invalid\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{R,1972,"QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS) {\n // ...\n // Enforce C99 6.7.3p2: \"Types other than pointer types derived from\n // object or incomplete types shall not be restrict-qualified.\"\n if (Qs.hasRestrict()) {\n // ...\n if (T->isAnyPointerType() || T->isReferenceType() || T->isMemberPointerType()) {\n // ...\n } else if (!isDependentOrGNUAutoType(T)) {\n // ...\n DiagID = diag::err_typecheck_invalid_restrict_not_pointer;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/declspec.c"]={"clang/test/Sema/declspec.c:22:1: error: restrict requires a pointer or reference (\'f\' (aka \'int (void)\') is invalid)"} | ["clang/test/Sema/declspec.c"]={"clang/test/Sema/declspec.c:22:1: error: restrict requires a pointer or reference (\'f\' (aka \'int (void)\') is invalid)"} | ||
Line 7,899: | Line 7,927: | ||
}, | }, | ||
["err_typecheck_invalid_restrict_not_pointer_noarg"]={ | ["err_typecheck_invalid_restrict_not_pointer_noarg"]={ | ||
[ | [i]="err_typecheck_invalid_restrict_not_pointer_noarg", | ||
[h]="restrict requires a pointer or reference", | |||
[g]="restrict requires a pointer or reference", | |||
[b]=k, | |||
[e]="restrict requires a pointer or reference", | [e]="restrict requires a pointer or reference", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={"e9823fab83ac",1261049726,"implement PR3962: diagnose more faulty cases of usage of the restrict qualifier. this also removes a...","implement PR3962: diagnose more faulty cases of usage of the restrict qualifier. this also removes a FIXME\n\nllvm-svn: 91601"}, | |||
[j]={{w,5109,"/// 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 (unsigned TypeQuals = DS.getTypeQualifiers()) {\n // Enforce C99 6.7.3p2: \"Types other than pointer types derived from object\n // or incomplete types shall not be restrict-qualified.\"\n if (TypeQuals & DeclSpec::TQ_restrict)\n Diag(DS.getRestrictSpecLoc(), diag::err_typecheck_invalid_restrict_not_pointer_noarg) << DS.getSourceRange();"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp"]={"clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:66:10: error: restrict requires a pointer or reference"} | ["clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp"]={"clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:66:10: error: restrict requires a pointer or reference"} | ||
Line 7,913: | Line 7,941: | ||
}, | }, | ||
["err_typecheck_ivar_variable_size"]={ | ["err_typecheck_ivar_variable_size"]={ | ||
[ | [i]="err_typecheck_ivar_variable_size", | ||
[h]="instance variables must have a constant size", | |||
[g]="instance variables must have a constant size", | |||
[b]=k, | |||
[e]="instance variables must have a constant size", | [e]="instance variables must have a constant size", | ||
[f]= | [f]=a, | ||
[ | [d]=m, | ||
[c]={u,1237025389,s,t}, | |||
[j]={{w,18386,"/// ActOnIvar - Each ivar field of an objective-c class is passed into this\n/// in order to create an IvarDecl object for it.\nDecl *Sema::ActOnIvar(Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind Visibility) {\n // ...\n }\n // C99 6.7.2.1p8: A member of a structure or union may have any type other\n // than a variably modified type.\n else if (T->isVariablyModifiedType()) {\n if (!tryToFixVariablyModifiedVarType(TInfo, T, Loc, diag::err_typecheck_ivar_variable_size))"}}, | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/variable-size-ivar.m"]={"clang/test/SemaObjC/variable-size-ivar.m:9:7: error: instance variables must have a constant size"} | ["clang/test/SemaObjC/variable-size-ivar.m"]={"clang/test/SemaObjC/variable-size-ivar.m:9:7: error: instance variables must have a constant size"} | ||
Line 7,927: | Line 7,955: | ||
}, | }, | ||
["err_typecheck_logical_vector_expr_gnu_cpp_restrict"]={ | ["err_typecheck_logical_vector_expr_gnu_cpp_restrict"]={ | ||
[ | [i]={{nil,o,"err_typecheck_logical_vector_expr_gnu_cpp_restrict"}}, | ||
[ | [h]={{nil,o,"logical expression with vector %select{type %1 and non-vector type %2|types %1 and %2}0 is only supported in C++"}}, | ||
[ | [g]={{nil,o,{"logical expression with vector ",{"type B and non-vector type C","types B and C"}," is only supported in C++"}}}, | ||
[ | [b]=k, | ||
[ | [e]="logical expression with vector (?:type (.*?) and non\\-vector type (.*?)|types (.*?) and (.*?)) is only supported in C\\+\\+", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,m}}, | ||
[ | [c]={"7cd5876e6031",1494616266,"[Sema] Support implicit scalar to vector conversions","[Sema] Support implicit scalar to vector conversions\n\nThis patch teaches clang to perform implicit scalar to vector conversions\nwhen one of the operands of a binary vector expression is a scalar which\ncan be converted to the element type of the vector without truncation\nfollowing GCC\'s implementation.\n\nIf the (constant) scalar is can be casted safely, it is implicitly casted to the\nvector elements type and splatted to produce a vector of the same type.\n\nContributions from: Petar Jovanovic\n\nReviewers: bruno, vkalintiris\n\nDifferential Revision: https://reviews.llvm.org/D25866\n\nllvm-svn: 302935"}, | ||
[j]={{n,10664,"// Diagnose cases where a scalar was implicitly converted to a vector and\n// diagnose the underlying types. Otherwise, diagnose the error\n// as invalid vector logical operands for non-C++ cases.\nQualType Sema::InvalidLogicalVectorOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) {\n // ...\n if (!(LHSNatVec && RHSNatVec)) {\n // ...\n Diag(Loc, diag::err_typecheck_logical_vector_expr_gnu_cpp_restrict) << 0 << Vector->getType() << NonVector->IgnoreImpCasts()->getType() << Vector->getSourceRange();"},{n,10696,"// Diagnose cases where a scalar was implicitly converted to a vector and\n// diagnose the underlying types. Otherwise, diagnose the error\n// as invalid vector logical operands for non-C++ cases.\nQualType Sema::InvalidLogicalVectorOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) {\n // ...\n Diag(Loc, diag::err_typecheck_logical_vector_expr_gnu_cpp_restrict) << 1 << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | [j]={{n,10664,"// Diagnose cases where a scalar was implicitly converted to a vector and\n// diagnose the underlying types. Otherwise, diagnose the error\n// as invalid vector logical operands for non-C++ cases.\nQualType Sema::InvalidLogicalVectorOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) {\n // ...\n if (!(LHSNatVec && RHSNatVec)) {\n // ...\n Diag(Loc, diag::err_typecheck_logical_vector_expr_gnu_cpp_restrict) << 0 << Vector->getType() << NonVector->IgnoreImpCasts()->getType() << Vector->getSourceRange();"},{n,10696,"// Diagnose cases where a scalar was implicitly converted to a vector and\n// diagnose the underlying types. Otherwise, diagnose the error\n// as invalid vector logical operands for non-C++ cases.\nQualType Sema::InvalidLogicalVectorOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) {\n // ...\n Diag(Loc, diag::err_typecheck_logical_vector_expr_gnu_cpp_restrict) << 1 << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 7,996: | Line 8,024: | ||
}, | }, | ||
["err_typecheck_lvalue_casts_not_supported"]={ | ["err_typecheck_lvalue_casts_not_supported"]={ | ||
[ | [i]="err_typecheck_lvalue_casts_not_supported", | ||
[h]="assignment to cast is illegal, lvalue casts are not supported", | |||
[g]="assignment to cast is illegal, lvalue casts are not supported", | |||
[b]=k, | |||
[e]="assignment to cast is illegal, lvalue casts are not supported", | [e]="assignment to cast is illegal, lvalue casts are not supported", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[ | |||
[ | |||
[j]={{n,14358,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_LValueCast:\n DiagID = diag::err_typecheck_lvalue_casts_not_supported;"}}, | [j]={{n,14358,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_LValueCast:\n DiagID = diag::err_typecheck_lvalue_casts_not_supported;"}}, | ||
[l]={ | [l]={ | ||
Line 8,010: | Line 8,038: | ||
}, | }, | ||
["err_typecheck_member_reference_arrow"]={ | ["err_typecheck_member_reference_arrow"]={ | ||
[ | [i]="err_typecheck_member_reference_arrow", | ||
[ | [h]="member reference type %0 is not a pointer", | ||
[ | [g]="member reference type A is not a pointer", | ||
[ | [b]=k, | ||
[ | [e]="member reference type (.*?) is not a pointer", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{P,7614,"ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor) {\n // ...\n // C++ [over.match.oper]p8:\n // [...] When operator->returns, the operator-> is applied to the value\n // returned, with the original second operand.\n if (OpKind == tok::arrow) {\n // ...\n while (BaseType->isRecordType()) {\n // ...\n if (Result.isInvalid()) {\n if (NoArrowOperatorFound) {\n // ...\n Diag(OpLoc, diag::err_typecheck_member_reference_arrow) << BaseType << Base->getSourceRange();"},{V,1293,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // For later type-checking purposes, turn arrow accesses into dot\n // accesses. The only access type we support that doesn\'t follow\n // the C equivalence \"a->b === (*a).b\" is ObjC property accesses,\n // and those never use arrows, so this is unaffected.\n if (IsArrow) {\n if (const PointerType *Ptr = BaseType->getAs<PointerType>())\n // ...\n else if (const ObjCObjectPointerType *Ptr = BaseType->getAs<ObjCObjectPointerType>())\n // ...\n else if (BaseType->isRecordType()) {\n // ...\n } else if (BaseType->isFunctionType()) {\n // ...\n } else {\n S.Diag(MemberLoc, diag::err_typecheck_member_reference_arrow) << BaseType << BaseExpr.get()->getSourceRange();"},{Pb,15275,"/// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->\n/// (if one exists), where @c Base is an expression of class type and\n/// @c Member is the name of the member we\'re trying to find.\nExprResult Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound) {\n // ...\n case OR_No_Viable_Function: {\n // ...\n if (CandidateSet.empty()) {\n // ...\n Diag(OpLoc, diag::err_typecheck_member_reference_arrow) << BaseType << Base->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaHLSL/prohibit_pointer.hlsl"]={"clang/test/SemaHLSL/prohibit_pointer.hlsl:79:14: error: member reference type \'Fins\' is not a pointer"} | ["clang/test/SemaHLSL/prohibit_pointer.hlsl"]={"clang/test/SemaHLSL/prohibit_pointer.hlsl:79:14: error: member reference type \'Fins\' is not a pointer"} | ||
Line 8,024: | Line 8,052: | ||
}, | }, | ||
["err_typecheck_member_reference_ivar"]={ | ["err_typecheck_member_reference_ivar"]={ | ||
[ | [i]="err_typecheck_member_reference_ivar", | ||
[ | [h]="%0 does not have a member named %1", | ||
[ | [g]="A does not have a member named B", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) does not have a member named (.*?)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{V,1404,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (!IV) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), Sema::LookupMemberName, nullptr, nullptr, Validator, Sema::CTK_ErrorRecovery, IDecl)) {\n // ...\n } else {\n // ...\n S.Diag(MemberLoc, diag::err_typecheck_member_reference_ivar) << IDecl->getDeclName() << MemberName << BaseExpr.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/ivar-in-class-extension.m"]={"clang/test/SemaObjC/ivar-in-class-extension.m:6:14: error: \'SomeClass\' does not have a member named \'privateIvar\'","clang/test/SemaObjC/ivar-in-class-extension.m:7:21: error: \'SomeClass\' does not have a member named \'publicIvar\'"} | ["clang/test/SemaObjC/ivar-in-class-extension.m"]={"clang/test/SemaObjC/ivar-in-class-extension.m:6:14: error: \'SomeClass\' does not have a member named \'privateIvar\'","clang/test/SemaObjC/ivar-in-class-extension.m:7:21: error: \'SomeClass\' does not have a member named \'publicIvar\'"} | ||
Line 8,038: | Line 8,066: | ||
}, | }, | ||
["err_typecheck_member_reference_ivar_suggest"]={ | ["err_typecheck_member_reference_ivar_suggest"]={ | ||
[ | [i]="err_typecheck_member_reference_ivar_suggest", | ||
[ | [h]="%0 does not have a member named %1; did you mean %2?", | ||
[ | [g]="A does not have a member named B; did you mean C?", | ||
[ | [b]=k, | ||
[ | [e]="(.*?) does not have a member named (.*?); did you mean (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific","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"}, | ||
[j]={{ | [j]={{V,1378,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (!IV) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), Sema::LookupMemberName, nullptr, nullptr, Validator, Sema::CTK_ErrorRecovery, IDecl)) {\n // ...\n S.diagnoseTypo(Corrected, S.PDiag(diag::err_typecheck_member_reference_ivar_suggest) << IDecl->getDeclName() << MemberName);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/typo-correction.m"]={"clang/test/SemaObjC/typo-correction.m:48:15: error: \'I\' does not have a member named \'implementation\'; did you mean \'_implementation\'?","clang/test/SemaObjC/typo-correction.m:49:15: error: \'I\' does not have a member named \'interface\'; did you mean \'_interface\'?","clang/test/SemaObjC/typo-correction.m:50:15: error: \'I\' does not have a member named \'extension\'; did you mean \'_extension\'?"} | ["clang/test/SemaObjC/typo-correction.m"]={"clang/test/SemaObjC/typo-correction.m:48:15: error: \'I\' does not have a member named \'implementation\'; did you mean \'_implementation\'?","clang/test/SemaObjC/typo-correction.m:49:15: error: \'I\' does not have a member named \'interface\'; did you mean \'_interface\'?","clang/test/SemaObjC/typo-correction.m:50:15: error: \'I\' does not have a member named \'extension\'; did you mean \'_extension\'?"} | ||
Line 8,052: | Line 8,080: | ||
}, | }, | ||
["err_typecheck_member_reference_struct_union"]={ | ["err_typecheck_member_reference_struct_union"]={ | ||
[ | [i]="err_typecheck_member_reference_struct_union", | ||
[ | [h]="member reference base type %0 is not a structure or union", | ||
[ | [g]="member reference base type A is not a structure or union", | ||
[ | [b]=k, | ||
[ | [e]="member reference base type (.*?) is not a structure or union", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{V,505,"ExprResult Sema::ActOnDependentMemberExpr(Expr *BaseExpr, QualType BaseType, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs) {\n // Even in dependent contexts, try to diagnose base expressions with\n // obviously wrong types, e.g.:\n //\n // T* t;\n // t.f;\n //\n // In Obj-C++, however, the above expression is valid, since it could be\n // accessing the \'f\' property if T is an Obj-C interface. The extra check\n // allows this, while still reporting an error if T is a struct pointer.\n if (!IsArrow) {\n // ...\n if (PT && (!getLangOpts().ObjC || PT->getPointeeType()->isRecordType())) {\n // ...\n Diag(OpLoc, diag::err_typecheck_member_reference_struct_union) << BaseType << BaseExpr->getSourceRange() << NameInfo.getSourceRange();"},{V,1691,"fail:\n // ...\n S.Diag(OpLoc, diag::err_typecheck_member_reference_struct_union) << BaseType << BaseExpr.get()->getSourceRange() << MemberLoc;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:66:24: error: member reference base type \'void *\' is not a structure or union"} | ["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:66:24: error: member reference base type \'void *\' is not a structure or union"} | ||
Line 8,066: | Line 8,094: | ||
}, | }, | ||
["err_typecheck_member_reference_suggestion"]={ | ["err_typecheck_member_reference_suggestion"]={ | ||
[ | [i]="err_typecheck_member_reference_suggestion", | ||
[ | [h]="member reference type %0 is %select{a|not a}1 pointer; did you mean to use \'%select{->|.}1\'?", | ||
[ | [g]={{nil,nil,{"member reference type A is ",{"a","not a"}," pointer; did you mean to use \'",{"->","."},"\'?"}}}, | ||
[ | [b]=k, | ||
[ | [e]="member reference type (.*?) is (?:a|not a) pointer; did you mean to use \'(?:\\-\\>|\\.)\'\\?", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"a928c652bec1",1260226019,"Recover from dot accesses to record pointers and arrow accesses to records.","Recover from dot accesses to record pointers and arrow accesses to records.\nPatch by Nicola Gigante!\n\nllvm-svn: 90814"}, | ||
[j]={{ | [j]={{P,7608,"ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor) {\n // ...\n // C++ [over.match.oper]p8:\n // [...] When operator->returns, the operator-> is applied to the value\n // returned, with the original second operand.\n if (OpKind == tok::arrow) {\n // ...\n while (BaseType->isRecordType()) {\n // ...\n if (Result.isInvalid()) {\n if (NoArrowOperatorFound) {\n if (FirstIteration) {\n Diag(OpLoc, diag::err_typecheck_member_reference_suggestion) << BaseType << 1 << Base->getSourceRange() << FixItHint::CreateReplacement(OpLoc, \".\");"},{P,7720,"static bool CheckArrow(Sema &S, QualType &ObjectType, Expr *&Base, tok::TokenKind &OpKind, SourceLocation OpLoc) {\n // ...\n // C++ [expr.pseudo]p2:\n // The left-hand side of the dot operator shall be of scalar type. The\n // left-hand side of the arrow operator shall be of pointer to scalar type.\n // This scalar type is the object type.\n // Note that this is rather different from the normal handling for the\n // arrow operator.\n if (OpKind == tok::arrow) {\n // ...\n if (const PointerType *Ptr = ObjectType->getAs<PointerType>()) {\n // ...\n } else if (!Base->isTypeDependent()) {\n // ...\n S.Diag(OpLoc, diag::err_typecheck_member_reference_suggestion) << ObjectType << true << FixItHint::CreateReplacement(OpLoc, \".\");"},{P,7792,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n // ...\n // C++ [expr.pseudo]p2:\n // [...] The cv-unqualified versions of the object type and of the type\n // designated by the pseudo-destructor-name shall be the same type.\n if (DestructedTypeInfo) {\n // ...\n if (!DestructedType->isDependentType() && !ObjectType->isDependentType()) {\n if (!Context.hasSameUnqualifiedType(DestructedType, ObjectType)) {\n // Detect dot pseudo destructor calls on pointer objects, e.g.:\n // Foo *foo;\n // foo.~Foo();\n if (OpKind == tok::period && ObjectType->isPointerType() && Context.hasSameUnqualifiedType(DestructedType, ObjectType->getPointeeType())) {\n auto Diagnostic = Diag(OpLoc, diag::err_typecheck_member_reference_suggestion) << ObjectType << /*IsArrow=*/0 << Base->getSourceRange();"},{V,1285,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // For later type-checking purposes, turn arrow accesses into dot\n // accesses. The only access type we support that doesn\'t follow\n // the C equivalence \"a->b === (*a).b\" is ObjC property accesses,\n // and those never use arrows, so this is unaffected.\n if (IsArrow) {\n if (const PointerType *Ptr = BaseType->getAs<PointerType>())\n // ...\n else if (const ObjCObjectPointerType *Ptr = BaseType->getAs<ObjCObjectPointerType>())\n // ...\n else if (BaseType->isRecordType()) {\n // Recover from arrow accesses to records, e.g.:\n // struct MyRecord foo;\n // foo->bar\n // This is actually well-formed in C++ if MyRecord has an\n // overloaded operator->, but that should have been dealt with\n // by now--or a diagnostic message already issued if a problem\n // was encountered while looking for the overloaded operator->.\n if (!S.getLangOpts().CPlusPlus) {\n S.Diag(OpLoc, diag::err_typecheck_member_reference_suggestion) << BaseType << int(IsArrow) << BaseExpr.get()->getSourceRange() << FixItHint::CreateReplacement(OpLoc, \".\");"},{V,1664,"fail:\n // Recover from dot accesses to pointers, e.g.:\n // type *foo;\n // foo.bar\n // This is actually well-formed in two cases:\n // - \'type\' is an Objective C type\n // - \'bar\' is a pseudo-destructor name which happens to refer to\n // the appropriate pointer type\n if (const PointerType *Ptr = BaseType->getAs<PointerType>()) {\n if (!IsArrow && Ptr->getPointeeType()->isRecordType() && MemberName.getNameKind() != DeclarationName::CXXDestructorName) {\n S.Diag(OpLoc, diag::err_typecheck_member_reference_suggestion) << BaseType << int(IsArrow) << BaseExpr.get()->getSourceRange() << FixItHint::CreateReplacement(OpLoc, \"->\");"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/member-reference.c"]={"clang/test/Sema/member-reference.c:23:11: error: member reference type \'struct simple\' is not a pointer; did you mean to use \'.\'?"} | ["clang/test/Sema/member-reference.c"]={"clang/test/Sema/member-reference.c:23:11: error: member reference type \'struct simple\' is not a pointer; did you mean to use \'.\'?"} | ||
Line 8,080: | Line 8,108: | ||
}, | }, | ||
["err_typecheck_member_reference_type"]={ | ["err_typecheck_member_reference_type"]={ | ||
[ | [i]="err_typecheck_member_reference_type", | ||
[ | [h]="cannot refer to type member %0 in %1 with \'%select{.|->}2\'", | ||
[ | [g]={{nil,nil,{"cannot refer to type member A in B with \'",{".","->"},uc}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot refer to type member (.*?) in (.*?) with \'(?:\\.|\\-\\>)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{V,1176,"ExprResult Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, SourceLocation OpLoc, bool IsArrow, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, bool SuppressQualifierCheck, ActOnMemberAccessExtraArgs *ExtraArgs) {\n // ...\n // We found something that we didn\'t expect. Complain.\n if (isa<TypeDecl>(MemberDecl))\n Diag(MemberLoc, diag::err_typecheck_member_reference_type) << MemberName << BaseType << int(IsArrow);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/member-expr.cpp"]={"clang/test/SemaCXX/member-expr.cpp:16:5: error: cannot refer to type member \'E\' in \'X\' with \'.\'","clang/test/SemaCXX/member-expr.cpp:17:7: error: cannot refer to type member \'E\' in \'X\' with \'->\'"} | ["clang/test/SemaCXX/member-expr.cpp"]={"clang/test/SemaCXX/member-expr.cpp:16:5: error: cannot refer to type member \'E\' in \'X\' with \'.\'","clang/test/SemaCXX/member-expr.cpp:17:7: error: cannot refer to type member \'E\' in \'X\' with \'->\'"} | ||
Line 8,094: | Line 8,122: | ||
}, | }, | ||
["err_typecheck_member_reference_unknown"]={ | ["err_typecheck_member_reference_unknown"]={ | ||
[ | [i]="err_typecheck_member_reference_unknown", | ||
[ | [h]="cannot refer to member %0 in %1 with \'%select{.|->}2\'", | ||
[ | [g]={{nil,nil,{"cannot refer to member A in B with \'",{".","->"},uc}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot refer to member (.*?) in (.*?) with \'(?:\\.|\\-\\>)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{V,1179,"ExprResult Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, SourceLocation OpLoc, bool IsArrow, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, bool SuppressQualifierCheck, ActOnMemberAccessExtraArgs *ExtraArgs) {\n // ...\n // We found something that we didn\'t expect. Complain.\n if (isa<TypeDecl>(MemberDecl))\n // ...\n else\n Diag(MemberLoc, diag::err_typecheck_member_reference_unknown) << MemberName << BaseType << int(IsArrow);"}} | ||
}, | }, | ||
["err_typecheck_missing_return_type_incompatible"]={ | ["err_typecheck_missing_return_type_incompatible"]={ | ||
[ | [i]="err_typecheck_missing_return_type_incompatible", | ||
[ | [h]="%diff{return type $ must match previous return type $|return type must match previous return type}0,1 when %select{block literal|lambda expression}2 has unspecified explicit return type", | ||
[ | [g]={{nil,nil,{{"return type A must match previous return type B","return type must match previous return type"}," when ",{"block literal","lambda expression"}," has unspecified explicit return type"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:return type (.*?) must match previous return type (.*?)|return type must match previous return type) when (?:block literal|lambda expression) has unspecified explicit return type", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"dd5eb9df0cd2",1322934473,"If block literal return type is not specified, return type of the block is ","If block literal return type is not specified, return type of the block is \ninferred from return types. All the return statements have to agree about the type.\n// rdar://10466373\n\nllvm-svn: 145774"}, | ||
[j]={{ | [j]={{kd,704,"void Sema::deduceClosureReturnType(CapturingScopeInfo &CSI) {\n // ...\n // We require the return types to strictly match here.\n // Note that we\'ve already done the required promotions as part of\n // processing the return statement.\n for (const ReturnStmt *RS : CSI.Returns) {\n // ...\n Diag(RS->getBeginLoc(), diag::err_typecheck_missing_return_type_incompatible) << ReturnType << CSI.ReturnType << isa<LambdaScopeInfo>(CSI);"},{Z,3860,"/// Deduce the return type for a function from a returned expression, per\n/// C++1y [dcl.spec.auto]p6.\nbool Sema::DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD, SourceLocation ReturnLoc, Expr *RetExpr, const AutoType *AT) {\n // ...\n {\n // ...\n case TDK_Inconsistent: {\n // ...\n if (LambdaSI && LambdaSI->HasImplicitReturnType)\n Diag(ReturnLoc, diag::err_typecheck_missing_return_type_incompatible) << Info.SecondArg << Info.FirstArg << true /*IsLambda*/;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/instantiate-blocks.cpp"]={"clang/test/SemaCXX/instantiate-blocks.cpp:22:7: error: return type \'double\' must match previous return type \'float\' when block literal has unspecified explicit return type"} | ["clang/test/SemaCXX/instantiate-blocks.cpp"]={"clang/test/SemaCXX/instantiate-blocks.cpp:22:7: error: return type \'double\' must match previous return type \'float\' when block literal has unspecified explicit return type"} | ||
Line 8,119: | Line 8,147: | ||
}, | }, | ||
["err_typecheck_negative_array_size"]={ | ["err_typecheck_negative_array_size"]={ | ||
[ | [i]="err_typecheck_negative_array_size", | ||
[h]="array size is negative", | |||
[g]="array size is negative", | |||
[b]=k, | |||
[e]="array size is negative", | [e]="array size is negative", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{w,6609,"/// 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 (SizeIsNegative)\n Diag(Loc, diag::err_typecheck_negative_array_size);"},{w,6726,"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 Diag(NewTD->getLocation(), diag::err_typecheck_negative_array_size);"},{P,2221,"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 if (Value->isSigned() && Value->isNegative()) {\n return ExprError(Diag((*ArraySize)->getBeginLoc(), diag::err_typecheck_negative_array_size) << (*ArraySize)->getSourceRange());"},{R,2640,"/// 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 // C99 6.7.5.2p1: If the expression is a constant expression, it shall\n // have a value greater than zero.\n // In C++, this follows from narrowing conversions being disallowed.\n if (ConstVal.isSigned() && ConstVal.isNegative()) {\n if (Entity)\n // ...\n else\n Diag(ArraySize->getBeginLoc(), diag::err_typecheck_negative_array_size) << ArraySize->getSourceRange();"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
[ | [dd]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:76:19: error: array size is negative"} | ||
} | } | ||
}, | }, | ||
["err_typecheck_non_object_not_modifiable_lvalue"]={ | ["err_typecheck_non_object_not_modifiable_lvalue"]={ | ||
[ | [i]="err_typecheck_non_object_not_modifiable_lvalue", | ||
[ | [h]="non-object type %0 is not assignable", | ||
[ | [g]="non-object type A is not assignable", | ||
[ | [b]=k, | ||
[ | [e]="non\\-object type (.*?) is not assignable", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,14351,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_NotObjectType:\n DiagID = diag::err_typecheck_non_object_not_modifiable_lvalue;"}}, | [j]={{n,14351,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_NotObjectType:\n DiagID = diag::err_typecheck_non_object_not_modifiable_lvalue;"}}, | ||
[l]={ | [l]={ | ||
Line 8,147: | Line 8,175: | ||
}, | }, | ||
["err_typecheck_nonviable_condition"]={ | ["err_typecheck_nonviable_condition"]={ | ||
[ | [i]="err_typecheck_nonviable_condition", | ||
[ | [h]="no viable conversion%select{%diff{ from $ to $|}1,2|%diff{ from returned value of type $ to function return type $|}1,2}0", | ||
[ | [g]={{nil,nil,{"no viable conversion",{{{" from B to C",a}},{{" from returned value of type B to function return type C",a}}}}}}, | ||
[ | [b]=k, | ||
[ | [e]="no viable conversion(?:(?: from (.*?) to (.*?)|)|(?: from returned value of type (.*?) to function return type (.*?)|))", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"76197416ac15",1258568789,"Improve on diagnosing type mismatches because of ","Improve on diagnosing type mismatches because of \nlack of viable convesion functions.\n\nllvm-svn: 89216"}, | ||
[j]={{ | [j]={{Q,9663,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitOverloadFailed:\n case FK_UserConversionOverloadFailed:\n // ...\n case OR_No_Viable_Function: {\n // ...\n if (!S.RequireCompleteType(Kind.getLocation(), DestType.getNonReferenceType(), diag::err_typecheck_nonviable_condition_incomplete, OnlyArg->getType(), Args[0]->getSourceRange()))\n S.Diag(Kind.getLocation(), diag::err_typecheck_nonviable_condition) << (Entity.getKind() == InitializedEntity::EK_Result) << OnlyArg->getType() << Args[0]->getSourceRange() << DestType.getNonReferenceType();"},{Pb,3780,"bool Sema::DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType) {\n // ...\n if (OvResult == OR_Ambiguous)\n // ...\n else { // OR_No_Viable_Function && !CandidateSet.empty()\n if (!RequireCompleteType(From->getBeginLoc(), ToType, diag::err_typecheck_nonviable_condition_incomplete, From->getType(), From->getSourceRange()))\n Diag(From->getBeginLoc(), diag::err_typecheck_nonviable_condition) << false << From->getType() << From->getSourceRange() << ToType;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl"]={"clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:19:34: error: no viable conversion from \'S\' to \'float\'","clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:19:37: error: no viable conversion from \'S\' to \'float\'","clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:21:32: error: no viable conversion from \'S2\' to \'float\'"} | ["clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl"]={"clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:19:34: error: no viable conversion from \'S\' to \'float\'","clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:19:37: error: no viable conversion from \'S\' to \'float\'","clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:21:32: error: no viable conversion from \'S2\' to \'float\'"} | ||
Line 8,161: | Line 8,189: | ||
}, | }, | ||
["err_typecheck_nonviable_condition_incomplete"]={ | ["err_typecheck_nonviable_condition_incomplete"]={ | ||
[ | [i]="err_typecheck_nonviable_condition_incomplete", | ||
[ | [h]="no viable conversion%diff{ from $ to incomplete type $|}0,1", | ||
[ | [g]={{nil,nil,{"no viable conversion",{" from A to incomplete type B",a}}}}, | ||
[ | [b]=k, | ||
[ | [e]="no viable conversion(?: from (.*?) to incomplete type (.*?)|)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"64cf3efd47bc",1372297825,"Fix a conversion to incomplete type bug -- The error message now specifically states that the type i...","Fix a conversion to incomplete type bug -- The error message now specifically states that the type is incomplete and points to the forward declaration of the incomplete type.\n\nllvm-svn: 185056"}, | ||
[j]={{ | [j]={{Q,9661,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitOverloadFailed:\n case FK_UserConversionOverloadFailed:\n // ...\n case OR_No_Viable_Function: {\n // ...\n if (!S.RequireCompleteType(Kind.getLocation(), DestType.getNonReferenceType(), diag::err_typecheck_nonviable_condition_incomplete, OnlyArg->getType(), Args[0]->getSourceRange()))"},{Pb,3778,"bool Sema::DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType) {\n // ...\n if (OvResult == OR_Ambiguous)\n // ...\n else { // OR_No_Viable_Function && !CandidateSet.empty()\n if (!RequireCompleteType(From->getBeginLoc(), ToType, diag::err_typecheck_nonviable_condition_incomplete, From->getType(), From->getSourceRange()))"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/conversion-incomplete-type.cpp"]={"clang/test/SemaCXX/conversion-incomplete-type.cpp:12:23: error: no viable conversion from \'const string\' to incomplete type \'const StringPiece\'","clang/test/SemaCXX/conversion-incomplete-type.cpp:20:23: error: no viable conversion from \'const string\' to incomplete type \'const StringPiece\'"} | ["clang/test/SemaCXX/conversion-incomplete-type.cpp"]={"clang/test/SemaCXX/conversion-incomplete-type.cpp:12:23: error: no viable conversion from \'const string\' to incomplete type \'const StringPiece\'","clang/test/SemaCXX/conversion-incomplete-type.cpp:20:23: error: no viable conversion from \'const string\' to incomplete type \'const StringPiece\'"} | ||
Line 8,175: | Line 8,203: | ||
}, | }, | ||
["err_typecheck_op_on_nonoverlapping_address_space_pointers"]={ | ["err_typecheck_op_on_nonoverlapping_address_space_pointers"]={ | ||
[ | [i]="err_typecheck_op_on_nonoverlapping_address_space_pointers", | ||
[ | [h]="%select{comparison between %diff{ ($ and $)|}0,1|arithmetic operation with operands of type %diff{ ($ and $)|}0,1|conditional operator with the second and third operands of type %diff{ ($ and $)|}0,1}2 which are pointers to non-overlapping address spaces", | ||
[ | [g]={{nil,nil,{{{"comparison between ",{rc,a}},{"arithmetic operation with operands of type ",{rc,a}},{"conditional operator with the second and third operands of type ",{rc,a}}}," which are pointers to non-overlapping address spaces"}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:comparison between (?: \\((.*?) and (.*?)\\)|)|arithmetic operation with operands of type (?: \\((.*?) and (.*?)\\)|)|conditional operator with the second and third operands of type (?: \\((.*?) and (.*?)\\)|)) which are pointers to non\\-overlapping address spaces", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"5d8ad8a7b891",1417016201,"[OpenCL] Implemented restrictions for pointer conversions specified in OpenCL v2.0.","[OpenCL] Implemented restrictions for pointer conversions specified in OpenCL v2.0.\n\nOpenCL v2.0 s6.5.5 restricts conversion of pointers to different address spaces:\n- the named address spaces (__global, __local, and __private) => __generic - implicitly converted;\n- __generic => named - with an explicit cast;\n- named <=> named - disallowed;\n- __constant <=> any other - disallowed.\n\nllvm-svn: 222834"}, | ||
[j]={{n,8738,"/// Checks compatibility between two pointers and return the resulting\n/// type.\nstatic QualType checkConditionalPointerCompatibility(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) {\n // ...\n // OpenCL v1.1 s6.5 - Conversion between pointers to distinct address\n // spaces is disallowed.\n if (lhQual.isAddressSpaceSupersetOf(rhQual))\n // ...\n else if (rhQual.isAddressSpaceSupersetOf(lhQual))\n // ...\n else {\n S.Diag(Loc, diag::err_typecheck_op_on_nonoverlapping_address_space_pointers) << LHSTy << RHSTy << 2 << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,11631,"/// Check the validity of a binary arithmetic operation w.r.t. pointer\n/// operands.\n///\n/// This routine will diagnose any invalid arithmetic on pointer operands much\n/// like \\see checkArithmeticOpPointerOperand. However, it has special logic\n/// for emitting a single diagnostic even for operations where both LHS and RHS\n/// are (potentially problematic) pointers.\n///\n/// \\returns True when the operand is valid to use (even if as an extension).\nstatic bool checkArithmeticBinOpPointerOperands(Sema &S, SourceLocation Loc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n // if both are pointers check if operation is valid wrt address spaces\n if (isLHSPointer && isRHSPointer) {\n if (!LHSPointeeTy.isAddressSpaceOverlapping(RHSPointeeTy)) {\n S.Diag(Loc, diag::err_typecheck_op_on_nonoverlapping_address_space_pointers) << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/"},{n,13241,"// 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 if (LCanPointeeTy != RCanPointeeTy) {\n // Treat NULL constant as a special case in OpenCL.\n if (getLangOpts().OpenCL && !LHSIsNull && !RHSIsNull) {\n if (!LCanPointeeTy.isAddressSpaceOverlapping(RCanPointeeTy)) {\n Diag(Loc, diag::err_typecheck_op_on_nonoverlapping_address_space_pointers) << LHSType << RHSType << 0 /* comparison */"}}, | [j]={{n,8738,"/// Checks compatibility between two pointers and return the resulting\n/// type.\nstatic QualType checkConditionalPointerCompatibility(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) {\n // ...\n // OpenCL v1.1 s6.5 - Conversion between pointers to distinct address\n // spaces is disallowed.\n if (lhQual.isAddressSpaceSupersetOf(rhQual))\n // ...\n else if (rhQual.isAddressSpaceSupersetOf(lhQual))\n // ...\n else {\n S.Diag(Loc, diag::err_typecheck_op_on_nonoverlapping_address_space_pointers) << LHSTy << RHSTy << 2 << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,11631,"/// Check the validity of a binary arithmetic operation w.r.t. pointer\n/// operands.\n///\n/// This routine will diagnose any invalid arithmetic on pointer operands much\n/// like \\see checkArithmeticOpPointerOperand. However, it has special logic\n/// for emitting a single diagnostic even for operations where both LHS and RHS\n/// are (potentially problematic) pointers.\n///\n/// \\returns True when the operand is valid to use (even if as an extension).\nstatic bool checkArithmeticBinOpPointerOperands(Sema &S, SourceLocation Loc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n // if both are pointers check if operation is valid wrt address spaces\n if (isLHSPointer && isRHSPointer) {\n if (!LHSPointeeTy.isAddressSpaceOverlapping(RHSPointeeTy)) {\n S.Diag(Loc, diag::err_typecheck_op_on_nonoverlapping_address_space_pointers) << LHSExpr->getType() << RHSExpr->getType() << 1 /*arithmetic op*/"},{n,13241,"// 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 if (LCanPointeeTy != RCanPointeeTy) {\n // Treat NULL constant as a special case in OpenCL.\n if (getLangOpts().OpenCL && !LHSIsNull && !RHSIsNull) {\n if (!LCanPointeeTy.isAddressSpaceOverlapping(RCanPointeeTy)) {\n Diag(Loc, diag::err_typecheck_op_on_nonoverlapping_address_space_pointers) << LHSType << RHSType << 0 /* comparison */"}}, | ||
[l]={ | [l]={ | ||
Line 8,189: | Line 8,217: | ||
}, | }, | ||
["err_typecheck_ordered_comparison_of_function_pointers"]={ | ["err_typecheck_ordered_comparison_of_function_pointers"]={ | ||
[ | [i]={{nil,F,"err_typecheck_ordered_comparison_of_function_pointers"}}, | ||
[ | [h]={{nil,F,"ordered comparison of function pointers (%0 and %1)"}}, | ||
[ | [g]={{nil,F,"ordered comparison of function pointers (A and B)"}}, | ||
[ | [b]=k, | ||
[ | [e]="ordered comparison of function pointers \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]={{nil,F,m}}, | ||
[ | [c]={Vc,1615397021,Zc,ad}, | ||
[j]={{n,13039,"// 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;"}}, | [j]={{n,13039,"// 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;"}}, | ||
[l]={ | [l]={ | ||
Line 8,203: | Line 8,231: | ||
}, | }, | ||
["err_typecheck_ordered_comparison_of_pointer_and_zero"]={ | ["err_typecheck_ordered_comparison_of_pointer_and_zero"]={ | ||
[ | [i]="err_typecheck_ordered_comparison_of_pointer_and_zero", | ||
[ | [h]="ordered comparison between pointer and zero (%0 and %1)", | ||
[ | [g]="ordered comparison between pointer and zero (A and B)", | ||
[ | [b]=k, | ||
[ | [e]="ordered comparison between pointer and zero \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"0c1c53e3fad7",1477017397,"DR583, DR1512: Implement a rewrite to C++\'s \'composite pointer type\' rules.","DR583, DR1512: Implement a rewrite to C++\'s \'composite pointer type\' rules.\nThis has two significant effects:\n\n1) Direct relational comparisons between null pointer constants (0 and nullopt)\n and pointers are now ill-formed. This was always the case for C, and it\n appears that C++ only ever permitted by accident. For instance, cases like\n nullptr < &a\n are now rejected.\n\n2) Comparisons and conditional operators between differently-cv-qualified\n pointer types now work, and produce a composite type that both source\n pointer types can convert to (when possible). For instance, comparison\n between \'int **\' and \'const int **\' is now valid, and uses an intermediate\n type of \'const int *const *\'.\n\nClang previously supported #2 as an extension.\n\nWe do not accept the cases in #1 as an extension. I\'ve tested a fair amount of\ncode to check that this doesn\'t break it, but if it turns out that someone is\nrelying on this, we can easily add it back as an extension.\n\nllvm-svn: 284800"}, | ||
[j]={{n,13349,"// 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;"}}, | [j]={{n,13349,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n // ...\n if (LangOpts.DebuggerSupport) {\n // ...\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n if (IsOrdered) {\n // ...\n DiagID = isError ? diag::err_typecheck_ordered_comparison_of_pointer_and_zero : diag::ext_typecheck_ordered_comparison_of_pointer_and_zero;"}}, | ||
[l]={ | [l]={ | ||
Line 8,217: | Line 8,245: | ||
}, | }, | ||
["err_typecheck_pointer_arith_function_type"]={ | ["err_typecheck_pointer_arith_function_type"]={ | ||
[ | [i]="err_typecheck_pointer_arith_function_type", | ||
[ | [h]="arithmetic on%select{ a|}0 pointer%select{|s}0 to%select{ the|}2 function type%select{|s}2 %1%select{| and %3}2", | ||
[ | [g]={{nil,nil,{"arithmetic on",{" a",a}," pointer",{a,kc}," to",{" the",a}," function type",{a,kc},Ob,{a," and D"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="arithmetic on(?: a|) pointer(?:|s) to(?: the|) function type(?:|s) (.*?)(?:| and (.*?))", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,11485,"/// 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 */"},{n,11500,"/// 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 */"}}, | [j]={{n,11485,"/// 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 */"},{n,11500,"/// Diagnose invalid arithmetic on a function pointer.\nstatic void diagnoseArithmeticOnFunctionPointer(Sema &S, SourceLocation Loc, Expr *Pointer) {\n // ...\n S.Diag(Loc, S.getLangOpts().CPlusPlus ? diag::err_typecheck_pointer_arith_function_type : diag::ext_gnu_ptr_func_arith) << 0 /* one pointer */ << Pointer->getType()->getPointeeType() << 0 /* one pointer, so only one type */"}}, | ||
[l]={ | [l]={ | ||
Line 8,231: | Line 8,259: | ||
}, | }, | ||
["err_typecheck_pointer_arith_void_type"]={ | ["err_typecheck_pointer_arith_void_type"]={ | ||
[ | [i]="err_typecheck_pointer_arith_void_type", | ||
[ | [h]="arithmetic on%select{ a|}0 pointer%select{|s}0 to void", | ||
[ | [g]={{nil,nil,{"arithmetic on",{" a",a}," pointer",{a,kc}," to void"}}}, | ||
[ | [b]=k, | ||
[ | [e]="arithmetic on(?: a|) pointer(?:|s) to void", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,11431,"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(); }"},{n,11441,"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(); }"}}, | [j]={{n,11431,"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(); }"},{n,11441,"static void diagnoseArithmeticOnVoidPointer(Sema &S, SourceLocation Loc, Expr *Pointer) { S.Diag(Loc, S.getLangOpts().CPlusPlus ? diag::err_typecheck_pointer_arith_void_type : diag::ext_gnu_void_ptr) << 0 /* one pointer */ << Pointer->getSourceRange(); }"}}, | ||
[l]={ | [l]={ | ||
Line 8,245: | Line 8,273: | ||
}, | }, | ||
["err_typecheck_sclass_fscope"]={ | ["err_typecheck_sclass_fscope"]={ | ||
[ | [i]="err_typecheck_sclass_fscope", | ||
[ | [h]="illegal storage class on file-scoped variable", | ||
[ | [g]="illegal storage class on file-scoped variable", | ||
[ | [b]=k, | ||
[ | [e]="illegal storage class on file\\-scoped variable", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{w,7508,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (!DC->isRecord() && S->getFnParent() == nullptr) {\n // C99 6.9p2: The storage-class specifiers auto and register shall not\n // appear in the declaration specifiers in an external declaration.\n // Global Register+Asm is a GNU extension we support.\n if (SC == SC_Auto || (SC == SC_Register && !D.getAsmLabel())) {\n Diag(D.getIdentifierLoc(), diag::err_typecheck_sclass_fscope);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/decl-invalid.c"]={"clang/test/Sema/decl-invalid.c:26:14: error: illegal storage class on file-scoped variable"} | ["clang/test/Sema/decl-invalid.c"]={"clang/test/Sema/decl-invalid.c:26:14: error: illegal storage class on file-scoped variable"} | ||
Line 8,259: | Line 8,287: | ||
}, | }, | ||
["err_typecheck_sclass_func"]={ | ["err_typecheck_sclass_func"]={ | ||
[ | [i]="err_typecheck_sclass_func", | ||
[h]="illegal storage class on function", | |||
[g]="illegal storage class on function", | |||
[b]=k, | |||
[e]="illegal storage class on function", | [e]="illegal storage class on function", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[j]={{w,9104,"static StorageClass getFunctionStorageClass(Sema &SemaRef, Declarator &D) {\n // ...\n case DeclSpec::SCS_auto:\n case DeclSpec::SCS_register:\n case DeclSpec::SCS_mutable:\n SemaRef.Diag(D.getDeclSpec().getStorageClassSpecLoc(), diag::err_typecheck_sclass_func);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/Sema/function.c"]={"clang/test/Sema/function.c:59:3: error: illegal storage class on function"} | ["clang/test/Sema/function.c"]={"clang/test/Sema/function.c:59:3: error: illegal storage class on function"} | ||
Line 8,273: | Line 8,301: | ||
}, | }, | ||
["err_typecheck_statement_requires_integer"]={ | ["err_typecheck_statement_requires_integer"]={ | ||
[ | [i]="err_typecheck_statement_requires_integer", | ||
[ | [h]="statement requires expression of integer type (%0 invalid)", | ||
[ | [g]="statement requires expression of integer type (A invalid)", | ||
[ | [b]=k, | ||
[ | [e]="statement requires expression of integer type \\((.*?) invalid\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{Z,1040,"ExprResult Sema::CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond) {\n class SwitchConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder diagnoseNotInt(Sema &S, SourceLocation Loc, QualType T) override { return S.Diag(Loc, diag::err_typecheck_statement_requires_integer) << T; }"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/non-integral-switch-cond.cpp"]={"clang/test/SemaTemplate/non-integral-switch-cond.cpp:9:5: error: statement requires expression of integer type (\'NOT_AN_INTEGRAL_TYPE\' invalid)"} | ["clang/test/SemaTemplate/non-integral-switch-cond.cpp"]={"clang/test/SemaTemplate/non-integral-switch-cond.cpp:9:5: error: statement requires expression of integer type (\'NOT_AN_INTEGRAL_TYPE\' invalid)"} | ||
Line 8,287: | Line 8,315: | ||
}, | }, | ||
["err_typecheck_statement_requires_scalar"]={ | ["err_typecheck_statement_requires_scalar"]={ | ||
[ | [i]="err_typecheck_statement_requires_scalar", | ||
[ | [h]="statement requires expression of scalar type (%0 invalid)", | ||
[ | [g]="statement requires expression of scalar type (A invalid)", | ||
[ | [b]=k, | ||
[ | [e]="statement requires expression of scalar type \\((.*?) invalid\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,21002,"ExprResult Sema::CheckBooleanCondition(SourceLocation Loc, Expr *E, bool IsConstexpr) {\n // ...\n if (!E->isTypeDependent()) {\n // ...\n if (!T->isScalarType()) { // C99 6.8.4.1p1\n Diag(Loc, diag::err_typecheck_statement_requires_scalar) << T << E->getSourceRange();"}}, | [j]={{n,21002,"ExprResult Sema::CheckBooleanCondition(SourceLocation Loc, Expr *E, bool IsConstexpr) {\n // ...\n if (!E->isTypeDependent()) {\n // ...\n if (!T->isScalarType()) { // C99 6.8.4.1p1\n Diag(Loc, diag::err_typecheck_statement_requires_scalar) << T << E->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 8,301: | Line 8,329: | ||
}, | }, | ||
["err_typecheck_sub_ptr_compatible"]={ | ["err_typecheck_sub_ptr_compatible"]={ | ||
[ | [i]="err_typecheck_sub_ptr_compatible", | ||
[ | [h]="%diff{$ and $ are not pointers to compatible types|pointers to incompatible types}0,1", | ||
[ | [g]={{nil,nil,{{"A and B are not pointers to compatible types","pointers to incompatible types"}}}}, | ||
[ | [b]=k, | ||
[ | [e]="(?:(.*?) and (.*?) are not pointers to compatible types|pointers to incompatible types)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{z,9078,"/// SemaBuiltinARMMemoryTaggingCall - Handle calls of memory tagging extensions\nbool Sema::SemaBuiltinARMMemoryTaggingCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (BuiltinID == AArch64::BI__builtin_arm_subp) {\n // ...\n // Ensure Pointee types are compatible\n if (ArgTypeA->isAnyPointerType() && !isNull(ArgA) && ArgTypeB->isAnyPointerType() && !isNull(ArgB)) {\n // ...\n if (!Context.typesAreCompatible(Context.getCanonicalType(pointeeA).getUnqualifiedType(), Context.getCanonicalType(pointeeB).getUnqualifiedType())) {\n return Diag(TheCall->getBeginLoc(), diag::err_typecheck_sub_ptr_compatible) << ArgTypeA << ArgTypeB << ArgA->getSourceRange() << ArgB->getSourceRange();"},{n,11948,"/// Emit error when two pointers are incompatible.\nstatic void diagnosePointerIncompatibility(Sema &S, SourceLocation Loc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n S.Diag(Loc, diag::err_typecheck_sub_ptr_compatible) << LHSExpr->getType() << RHSExpr->getType() << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/CXX/over/over.built/p15.cpp"]={"clang/test/CXX/over/over.built/p15.cpp:6:13: error: \'int *\' and \'float *\' are not pointers to compatible types"} | ["clang/test/CXX/over/over.built/p15.cpp"]={"clang/test/CXX/over/over.built/p15.cpp:6:13: error: \'int *\' and \'float *\' are not pointers to compatible types"} | ||
Line 8,315: | Line 8,343: | ||
}, | }, | ||
["err_typecheck_subscript_not_integer"]={ | ["err_typecheck_subscript_not_integer"]={ | ||
[ | [i]="err_typecheck_subscript_not_integer", | ||
[h]="array subscript is not an integer", | |||
[g]="array subscript is not an integer", | |||
[b]=k, | |||
[e]="array subscript is not an integer", | [e]="array subscript is not an integer", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"003af249275a",1240699855,"minor diagnostics improvements.","minor diagnostics improvements.\n\nllvm-svn: 70092"}, | |||
[ | |||
[ | |||
[j]={{n,5956,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n // C99 6.5.2.1p1\n if (!IndexExpr->getType()->isIntegerType() && !IndexExpr->isTypeDependent())\n return ExprError(Diag(LLoc, diag::err_typecheck_subscript_not_integer) << IndexExpr->getSourceRange());"},{n,16636,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n // ...\n for (const OffsetOfComponent &OC : Components) {\n if (OC.isBrackets) {\n // ...\n // The expression must be an integral expression.\n // FIXME: An integral constant expression?\n if (!Idx->isTypeDependent() && !Idx->isValueDependent() && !Idx->getType()->isIntegerType())\n return ExprError(Diag(Idx->getBeginLoc(), diag::err_typecheck_subscript_not_integer) << Idx->getSourceRange());"}}, | [j]={{n,5956,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n // C99 6.5.2.1p1\n if (!IndexExpr->getType()->isIntegerType() && !IndexExpr->isTypeDependent())\n return ExprError(Diag(LLoc, diag::err_typecheck_subscript_not_integer) << IndexExpr->getSourceRange());"},{n,16636,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n // ...\n for (const OffsetOfComponent &OC : Components) {\n if (OC.isBrackets) {\n // ...\n // The expression must be an integral expression.\n // FIXME: An integral constant expression?\n if (!Idx->isTypeDependent() && !Idx->isValueDependent() && !Idx->getType()->isIntegerType())\n return ExprError(Diag(Idx->getBeginLoc(), diag::err_typecheck_subscript_not_integer) << Idx->getSourceRange());"}}, | ||
[l]={ | [l]={ | ||
Line 8,329: | Line 8,357: | ||
}, | }, | ||
["err_typecheck_subscript_value"]={ | ["err_typecheck_subscript_value"]={ | ||
[ | [i]="err_typecheck_subscript_value", | ||
[h]="subscripted value is not an array, pointer, or vector", | |||
[g]="subscripted value is not an array, pointer, or vector", | |||
[b]=k, | |||
[e]="subscripted value is not an array, pointer, or vector", | [e]="subscripted value is not an array, pointer, or vector", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={u,1237025389,s,t}, | |||
[ | |||
[ | |||
[j]={{n,5950,"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 } else {\n return ExprError(Diag(LLoc, diag::err_typecheck_subscript_value) << LHSExp->getSourceRange() << RHSExp->getSourceRange());"}}, | [j]={{n,5950,"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 } else {\n return ExprError(Diag(LLoc, diag::err_typecheck_subscript_value) << LHSExp->getSourceRange() << RHSExp->getSourceRange());"}}, | ||
[l]={ | [l]={ | ||
Line 8,343: | Line 8,371: | ||
}, | }, | ||
["err_typecheck_sve_rvv_ambiguous"]={ | ["err_typecheck_sve_rvv_ambiguous"]={ | ||
[ | [i]="err_typecheck_sve_rvv_ambiguous", | ||
[ | [h]="cannot combine fixed-length and sizeless %select{SVE|RVV}0 vectors in expression, result is ambiguous (%1 and %2)", | ||
[ | [g]={{nil,nil,{"cannot combine fixed-length and sizeless ",{"SVE","RVV"}," vectors in expression, result is ambiguous (B and C)"}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot combine fixed\\-length and sizeless (?:SVE|RVV) vectors in expression, result is ambiguous \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{n,11066,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n if (IsSveRVVConversion(LHSType, RHSType, SVEorRVV) || IsSveRVVConversion(RHSType, LHSType, SVEorRVV)) {\n Diag(Loc, diag::err_typecheck_sve_rvv_ambiguous) << SVEorRVV << LHSType << RHSType;"}}, | [j]={{n,11066,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n if (IsSveRVVConversion(LHSType, RHSType, SVEorRVV) || IsSveRVVConversion(RHSType, LHSType, SVEorRVV)) {\n Diag(Loc, diag::err_typecheck_sve_rvv_ambiguous) << SVEorRVV << LHSType << RHSType;"}}, | ||
[l]={ | [l]={ | ||
Line 8,357: | Line 8,385: | ||
}, | }, | ||
["err_typecheck_sve_rvv_gnu_ambiguous"]={ | ["err_typecheck_sve_rvv_gnu_ambiguous"]={ | ||
[ | [i]="err_typecheck_sve_rvv_gnu_ambiguous", | ||
[ | [h]="cannot combine GNU and %select{SVE|RVV}0 vectors in expression, result is ambiguous (%1 and %2)", | ||
[ | [g]={{nil,nil,{"cannot combine GNU and ",{"SVE","RVV"}," vectors in expression, result is ambiguous (B and C)"}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot combine GNU and (?:SVE|RVV) vectors in expression, result is ambiguous \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{n,11073,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n if (IsSveRVVGnuConversion(LHSType, RHSType, SVEorRVV) || IsSveRVVGnuConversion(RHSType, LHSType, SVEorRVV)) {\n Diag(Loc, diag::err_typecheck_sve_rvv_gnu_ambiguous) << SVEorRVV << LHSType << RHSType;"}}, | [j]={{n,11073,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n if (IsSveRVVGnuConversion(LHSType, RHSType, SVEorRVV) || IsSveRVVGnuConversion(RHSType, LHSType, SVEorRVV)) {\n Diag(Loc, diag::err_typecheck_sve_rvv_gnu_ambiguous) << SVEorRVV << LHSType << RHSType;"}}, | ||
[l]={ | [l]={ | ||
Line 8,371: | Line 8,399: | ||
}, | }, | ||
["err_typecheck_three_way_comparison_of_pointer_and_zero"]={ | ["err_typecheck_three_way_comparison_of_pointer_and_zero"]={ | ||
[ | [i]={{nil,p,"err_typecheck_three_way_comparison_of_pointer_and_zero"}}, | ||
[ | [h]={{nil,p,"three-way comparison between pointer and zero"}}, | ||
[ | [g]={{nil,p,"three-way comparison between pointer and zero"}}, | ||
[ | [b]=k, | ||
[ | [e]="three\\-way comparison between pointer and zero", | ||
[ | [f]=a, | ||
[ | [d]={{nil,p,m}}, | ||
[ | [c]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | ||
[j]={{n,13037,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n auto computeResultTy = [&]() {\n // ...\n if (CompositeTy->isPointerType() && LHSIsNull != RHSIsNull) {\n // ...\n Diag(Loc, diag::err_typecheck_three_way_comparison_of_pointer_and_zero) << (LHSIsNull ? LHS.get()->getSourceRange() : RHS.get()->getSourceRange());"}} | [j]={{n,13037,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n auto computeResultTy = [&]() {\n // ...\n if (CompositeTy->isPointerType() && LHSIsNull != RHSIsNull) {\n // ...\n Diag(Loc, diag::err_typecheck_three_way_comparison_of_pointer_and_zero) << (LHSIsNull ? LHS.get()->getSourceRange() : RHS.get()->getSourceRange());"}} | ||
}, | }, | ||
["err_typecheck_unary_expr"]={ | ["err_typecheck_unary_expr"]={ | ||
[ | [i]="err_typecheck_unary_expr", | ||
[ | [h]="invalid argument type %0 to unary expression", | ||
[ | [g]="invalid argument type A to unary expression", | ||
[ | [b]=k, | ||
[ | [e]="invalid argument type (.*?) to unary expression", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{n,16161,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // The only legal unary operation for atomics is \'&\'.\n if ((Opc != UO_AddrOf && Ty->isAtomicType()) ||\n // ...\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << InputExpr->getType() << Input.get()->getSourceRange());"},{n,16237,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_Plus:\n case UO_Minus:\n // ...\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16249,"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 else if (resultType->hasIntegerRepresentation())\n // ...\n else if (resultType->isExtVectorType() && Context.getLangOpts().OpenCL) {\n // ...\n if (!T->isIntegerType())\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16269,"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 else if (resultType->hasIntegerRepresentation())\n // ...\n else if (resultType->isExtVectorType() && Context.getLangOpts().OpenCL) {\n // ...\n } else {\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16287,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n // WebAsembly tables can\'t be used in unary expressions.\n if (resultType->isPointerType() && resultType->getPointeeType().isWebAssemblyReferenceType()) {\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16297,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n if (resultType->isScalarType() && !isScopedEnumerationType(resultType)) {\n // C99 6.5.3.3p1: ok, fallthrough;\n if (Context.getLangOpts().CPlusPlus) {\n // ...\n } else if (Context.getLangOpts().OpenCL && Context.getLangOpts().OpenCLVersion < 120) {\n // OpenCL v1.1 6.3.h: The logical operator not (!) does not\n // operate on scalar float types.\n if (!resultType->isIntegerType() && !resultType->isPointerType())\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16306,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n if (resultType->isScalarType() && !isScopedEnumerationType(resultType)) {\n // ...\n } else if (resultType->isExtVectorType()) {\n if (Context.getLangOpts().OpenCL && Context.getLangOpts().getOpenCLCompatibleVersion() < 120) {\n // ...\n if (!T->isIntegerType())\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16313,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n if (resultType->isScalarType() && !isScopedEnumerationType(resultType)) {\n // ...\n } else if (resultType->isExtVectorType()) {\n // ...\n } else if (Context.getLangOpts().CPlusPlus && resultType->isVectorType()) {\n // ...\n if (VTy->getVectorKind() != VectorType::GenericVector)\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16580,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n if (resultType->isScalarType() && !isScopedEnumerationType(resultType)) {\n // ...\n } else if (resultType->isExtVectorType()) {\n // ...\n } else if (Context.getLangOpts().CPlusPlus && resultType->isVectorType()) {\n // ...\n } else {\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"}}, | [j]={{n,16161,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // The only legal unary operation for atomics is \'&\'.\n if ((Opc != UO_AddrOf && Ty->isAtomicType()) ||\n // ...\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << InputExpr->getType() << Input.get()->getSourceRange());"},{n,16237,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_Plus:\n case UO_Minus:\n // ...\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16249,"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 else if (resultType->hasIntegerRepresentation())\n // ...\n else if (resultType->isExtVectorType() && Context.getLangOpts().OpenCL) {\n // ...\n if (!T->isIntegerType())\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16269,"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 else if (resultType->hasIntegerRepresentation())\n // ...\n else if (resultType->isExtVectorType() && Context.getLangOpts().OpenCL) {\n // ...\n } else {\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16287,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n // WebAsembly tables can\'t be used in unary expressions.\n if (resultType->isPointerType() && resultType->getPointeeType().isWebAssemblyReferenceType()) {\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16297,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n if (resultType->isScalarType() && !isScopedEnumerationType(resultType)) {\n // C99 6.5.3.3p1: ok, fallthrough;\n if (Context.getLangOpts().CPlusPlus) {\n // ...\n } else if (Context.getLangOpts().OpenCL && Context.getLangOpts().OpenCLVersion < 120) {\n // OpenCL v1.1 6.3.h: The logical operator not (!) does not\n // operate on scalar float types.\n if (!resultType->isIntegerType() && !resultType->isPointerType())\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16306,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n if (resultType->isScalarType() && !isScopedEnumerationType(resultType)) {\n // ...\n } else if (resultType->isExtVectorType()) {\n if (Context.getLangOpts().OpenCL && Context.getLangOpts().getOpenCLCompatibleVersion() < 120) {\n // ...\n if (!T->isIntegerType())\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16313,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n if (resultType->isScalarType() && !isScopedEnumerationType(resultType)) {\n // ...\n } else if (resultType->isExtVectorType()) {\n // ...\n } else if (Context.getLangOpts().CPlusPlus && resultType->isVectorType()) {\n // ...\n if (VTy->getVectorKind() != VectorType::GenericVector)\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"},{n,16580,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_LNot: // logical negation\n // ...\n if (resultType->isScalarType() && !isScopedEnumerationType(resultType)) {\n // ...\n } else if (resultType->isExtVectorType()) {\n // ...\n } else if (Context.getLangOpts().CPlusPlus && resultType->isVectorType()) {\n // ...\n } else {\n return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange());"}}, | ||
[l]={ | [l]={ | ||
Line 8,396: | Line 8,424: | ||
}, | }, | ||
["err_typecheck_vector_lengths_not_equal"]={ | ["err_typecheck_vector_lengths_not_equal"]={ | ||
[ | [i]="err_typecheck_vector_lengths_not_equal", | ||
[ | [h]="vector operands do not have the same number of elements (%0 and %1)", | ||
[ | [g]="vector operands do not have the same number of elements (A and B)", | ||
[ | [b]=k, | ||
[ | [e]="vector operands do not have the same number of elements \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"c65605d008dd",1423201495,"OpenCL: handle shift operator with vector operands","OpenCL: handle shift operator with vector operands\n\nIntroduce a number of checks:\n1. If LHS is a scalar, then RHS cannot be a vector.\n2. Operands must be of integer type.\n3. If both are vectors, then the number of elements must match.\n\nRelax the requirement for \"usual arithmetic conversions\":\nWhen LHS is a vector, a scalar RHS can simply be expanded into a\nvector; OpenCL does not require that its rank be lower than the LHS.\nFor example, the following code is not an error even if the implicit\ntype of the constant literal is \"int\".\n\n char2 foo(char2 v) { return v << 1; }\n\nConsolidate existing tests under CodeGenOpenCL, and add more tests\nunder SemaOpenCL.\n\nllvm-svn: 228382"}, | ||
[j]={{n,11239,"QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind) {\n // ...\n if (LHSType->isVLSTBuiltinType() && RHSType->isVLSTBuiltinType() && Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC != Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC) {\n Diag(Loc, diag::err_typecheck_vector_lengths_not_equal) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,12149,"/// Return the resulting type when a vector is shifted\n/// by a scalar or vector shift amount.\nstatic QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (!LHSVecTy) {\n // ...\n } else if (RHSVecTy) {\n // OpenCL v1.1 s6.3.j says that for vector types, the operators\n // are applied component-wise. So if RHS is a vector, then ensure\n // that the number of elements is the same as LHS...\n if (RHSVecTy->getNumElements() != LHSVecTy->getNumElements()) {\n S.Diag(Loc, diag::err_typecheck_vector_lengths_not_equal) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,12323,"static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (!LHSType->isVLSTBuiltinType()) {\n // ...\n } else if (RHSBuiltinTy && RHSBuiltinTy->isVLSTBuiltinType()) {\n if (S.Context.getTypeSize(RHSBuiltinTy) != S.Context.getTypeSize(LHSBuiltinTy)) {\n S.Diag(Loc, diag::err_typecheck_vector_lengths_not_equal) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | [j]={{n,11239,"QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind) {\n // ...\n if (LHSType->isVLSTBuiltinType() && RHSType->isVLSTBuiltinType() && Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC != Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC) {\n Diag(Loc, diag::err_typecheck_vector_lengths_not_equal) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,12149,"/// Return the resulting type when a vector is shifted\n/// by a scalar or vector shift amount.\nstatic QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (!LHSVecTy) {\n // ...\n } else if (RHSVecTy) {\n // OpenCL v1.1 s6.3.j says that for vector types, the operators\n // are applied component-wise. So if RHS is a vector, then ensure\n // that the number of elements is the same as LHS...\n if (RHSVecTy->getNumElements() != LHSVecTy->getNumElements()) {\n S.Diag(Loc, diag::err_typecheck_vector_lengths_not_equal) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,12323,"static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (!LHSType->isVLSTBuiltinType()) {\n // ...\n } else if (RHSBuiltinTy && RHSBuiltinTy->isVLSTBuiltinType()) {\n if (S.Context.getTypeSize(RHSBuiltinTy) != S.Context.getTypeSize(LHSBuiltinTy)) {\n S.Diag(Loc, diag::err_typecheck_vector_lengths_not_equal) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 8,410: | Line 8,438: | ||
}, | }, | ||
["err_typecheck_vector_not_convertable"]={ | ["err_typecheck_vector_not_convertable"]={ | ||
[ | [i]="err_typecheck_vector_not_convertable", | ||
[ | [h]="cannot convert between vector values of different size (%0 and %1)", | ||
[ | [g]="cannot convert between vector values of different size (A and B)", | ||
[ | [b]=k, | ||
[ | [e]="cannot convert between vector values of different size \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={K,1236199783,J,I}, | ||
[j]={{n,11109,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n unsigned DiagID = diag::err_typecheck_vector_not_convertable;"}}, | [j]={{n,11109,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n unsigned DiagID = diag::err_typecheck_vector_not_convertable;"}}, | ||
[l]={ | [l]={ | ||
Line 8,424: | Line 8,452: | ||
}, | }, | ||
["err_typecheck_vector_not_convertable_implict_truncation"]={ | ["err_typecheck_vector_not_convertable_implict_truncation"]={ | ||
[ | [i]={{nil,o,"err_typecheck_vector_not_convertable_implict_truncation"}}, | ||
[ | [h]={{nil,o,"cannot convert between %select{scalar|vector}0 type %1 and vector type %2 as implicit conversion would cause truncation"}}, | ||
[ | [g]={{nil,o,{"cannot convert between ",{"scalar","vector"}," type B and vector type C as implicit conversion would cause truncation"}}}, | ||
[ | [b]=k, | ||
[ | [e]="cannot convert between (?:scalar|vector) type (.*?) and vector type (.*?) as implicit conversion would cause truncation", | ||
[ | [f]=a, | ||
[ | [d]={{nil,o,m}}, | ||
[ | [c]={"7cd5876e6031",1494616266,"[Sema] Support implicit scalar to vector conversions","[Sema] Support implicit scalar to vector conversions\n\nThis patch teaches clang to perform implicit scalar to vector conversions\nwhen one of the operands of a binary vector expression is a scalar which\ncan be converted to the element type of the vector without truncation\nfollowing GCC\'s implementation.\n\nIf the (constant) scalar is can be casted safely, it is implicitly casted to the\nvector elements type and splatted to produce a vector of the same type.\n\nContributions from: Petar Jovanovic\n\nReviewers: bruno, vkalintiris\n\nDifferential Revision: https://reviews.llvm.org/D25866\n\nllvm-svn: 302935"}, | ||
[j]={{n,11194,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n // If there is a vector type that is not a ExtVector and a scalar, we reach\n // this point if scalar could not be converted to the vector\'s element type\n // without truncation.\n if ((RHSVecType && !isa<ExtVectorType>(RHSVecType)) || (LHSVecType && !isa<ExtVectorType>(LHSVecType))) {\n // ...\n Diag(Loc, diag::err_typecheck_vector_not_convertable_implict_truncation) << ScalarOrVector << Scalar << Vector;"},{n,11272,"QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind) {\n // ...\n if (LHSType->isVLSTBuiltinType() || RHSType->isVLSTBuiltinType()) {\n // ...\n Diag(Loc, diag::err_typecheck_vector_not_convertable_implict_truncation) << ScalarOrVector << Scalar << Vector;"}}, | [j]={{n,11194,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n // If there is a vector type that is not a ExtVector and a scalar, we reach\n // this point if scalar could not be converted to the vector\'s element type\n // without truncation.\n if ((RHSVecType && !isa<ExtVectorType>(RHSVecType)) || (LHSVecType && !isa<ExtVectorType>(LHSVecType))) {\n // ...\n Diag(Loc, diag::err_typecheck_vector_not_convertable_implict_truncation) << ScalarOrVector << Scalar << Vector;"},{n,11272,"QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind) {\n // ...\n if (LHSType->isVLSTBuiltinType() || RHSType->isVLSTBuiltinType()) {\n // ...\n Diag(Loc, diag::err_typecheck_vector_not_convertable_implict_truncation) << ScalarOrVector << Scalar << Vector;"}}, | ||
[l]={ | [l]={ | ||
Line 8,438: | Line 8,466: | ||
}, | }, | ||
["err_typecheck_vector_not_convertable_non_scalar"]={ | ["err_typecheck_vector_not_convertable_non_scalar"]={ | ||
[ | [i]="err_typecheck_vector_not_convertable_non_scalar", | ||
[ | [h]="cannot convert between vector and non-scalar values (%0 and %1)", | ||
[ | [g]="cannot convert between vector and non-scalar values (A and B)", | ||
[ | [b]=k, | ||
[ | [e]="cannot convert between vector and non\\-scalar values \\((.*?) and (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d07dcdb9588b",1389081571,"For areVectorOperandsLaxBitCastable(), only return false if both opearands are vector types","For areVectorOperandsLaxBitCastable(), only return false if both opearands are vector types\nand add a diagnostic when the operand is a vector and non-scalar value.\n\nrdar://15722301\n\nllvm-svn: 198680"}, | ||
[j]={{n,11147,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n // If there\'s a non-vector, non-real operand, diagnose that.\n if ((!RHSVecType && !RHSType->isRealType()) || (!LHSVecType && !LHSType->isRealType())) {\n Diag(Loc, diag::err_typecheck_vector_not_convertable_non_scalar) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,11227,"QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind) {\n // ...\n if ((!LHSType->isVLSTBuiltinType() && !LHSType->isRealType()) || (!RHSType->isVLSTBuiltinType() && !RHSType->isRealType())) {\n Diag(Loc, diag::err_typecheck_vector_not_convertable_non_scalar) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | [j]={{n,11147,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n // If there\'s a non-vector, non-real operand, diagnose that.\n if ((!RHSVecType && !RHSType->isRealType()) || (!LHSVecType && !LHSType->isRealType())) {\n Diag(Loc, diag::err_typecheck_vector_not_convertable_non_scalar) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"},{n,11227,"QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind) {\n // ...\n if ((!LHSType->isVLSTBuiltinType() && !LHSType->isRealType()) || (!RHSType->isVLSTBuiltinType() && !RHSType->isRealType())) {\n Diag(Loc, diag::err_typecheck_vector_not_convertable_non_scalar) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
Line 8,452: | Line 8,480: | ||
}, | }, | ||
["err_typecheck_wasm_table_must_have_zero_length"]={ | ["err_typecheck_wasm_table_must_have_zero_length"]={ | ||
[ | [i]="err_typecheck_wasm_table_must_have_zero_length", | ||
[ | [h]="only zero-length WebAssembly tables are currently supported", | ||
[ | [g]="only zero-length WebAssembly tables are currently supported", | ||
[ | [b]=k, | ||
[ | [e]="only zero\\-length WebAssembly tables are currently supported", | ||
[ | [f]=a, | ||
[ | [d]=a, | ||
[ | [c]={ab,1625925174,bb,cb}, | ||
[j]={{ | [j]={{w,8671,"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 (!ATy || ATy->getSize().getSExtValue() != 0) {\n Diag(NewVD->getLocation(), diag::err_typecheck_wasm_table_must_have_zero_length);"}}, | ||
[l]={ | [l]={ | ||
["clang/test/Sema/wasm-refs-and-tables.c"]={"clang/test/Sema/wasm-refs-and-tables.c:15:22: error: only zero-length WebAssembly tables are currently supported","clang/test/Sema/wasm-refs-and-tables.c:16:22: error: only zero-length WebAssembly tables are currently supported","clang/test/Sema/wasm-refs-and-tables.c:17:22: error: only zero-length WebAssembly tables are currently supported","clang/test/Sema/wasm-refs-and-tables.c:24:22: error: only zero-length WebAssembly tables are currently supported"} | ["clang/test/Sema/wasm-refs-and-tables.c"]={"clang/test/Sema/wasm-refs-and-tables.c:15:22: error: only zero-length WebAssembly tables are currently supported","clang/test/Sema/wasm-refs-and-tables.c:16:22: error: only zero-length WebAssembly tables are currently supported","clang/test/Sema/wasm-refs-and-tables.c:17:22: error: only zero-length WebAssembly tables are currently supported","clang/test/Sema/wasm-refs-and-tables.c:24:22: error: only zero-length WebAssembly tables are currently supported"} | ||
Line 8,466: | Line 8,494: | ||
}, | }, | ||
["err_typecheck_zero_array_size"]={ | ["err_typecheck_zero_array_size"]={ | ||
[ | [i]="err_typecheck_zero_array_size", | ||
[ | [h]={{nil,C,"zero-length arrays are not permitted in %select{C++|SYCL device code}0"},{F,nil,"zero-length arrays are not permitted in C++"}}, | ||
[ | [g]={{nil,C,{"zero-length arrays are not permitted in ",{"C++","SYCL device code"}}},{F,nil,"zero-length arrays are not permitted in C++"}}, | ||
[ | [b]=k, | ||
[ | [e]="zero\\-length arrays are not permitted in (?:C\\+\\+|SYCL device code)", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"d5cb1ddb2cf4",1269744163,"After performing template argument deduction for a function template,","After performing template argument deduction for a function template,\ncheck deduced non-type template arguments and template template\narguments against the template parameters for which they were deduced,\nperforming conversions as appropriate so that deduced template\narguments get the same treatment as explicitly-specified template\narguments. This is the bulk of PR6723.\n\nAlso keep track of whether deduction of a non-type template argument\ncame from an array bound (vs. anywhere else). With this information,\nwe enforce C++ [temp.deduct.type]p17, which requires exact type\nmatches when deduction deduces a non-type template argument from\nsomething that is not an array bound.\n\nFinally, when in a SFINAE context, translate the \"zero sized\narrays are an extension\" extension diagnostic into a hard error (for\nbetter standard conformance), which was a minor part of PR6723.\n\nllvm-svn: 99734"}, | ||
[j]={{"clang/lib/Sema/SemaSYCL.cpp",55,"void Sema::deepTypeCheckForSYCLDevice(SourceLocation UsedAt, llvm::DenseSet<QualType> Visited, ValueDecl *DeclToCheck) {\n // ...\n auto Check = [&](QualType TypeToCheck, const ValueDecl *D) {\n // ...\n if (isZeroSizedArray(*this, TypeToCheck)) {\n SYCLDiagIfDeviceCode(UsedAt, diag::err_typecheck_zero_array_size) << 1;"},{ | [j]={{"clang/lib/Sema/SemaSYCL.cpp",55,"void Sema::deepTypeCheckForSYCLDevice(SourceLocation UsedAt, llvm::DenseSet<QualType> Visited, ValueDecl *DeclToCheck) {\n // ...\n auto Check = [&](QualType TypeToCheck, const ValueDecl *D) {\n // ...\n if (isZeroSizedArray(*this, TypeToCheck)) {\n SYCLDiagIfDeviceCode(UsedAt, diag::err_typecheck_zero_array_size) << 1;"},{R,2648,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n if (!ArraySize) {\n // ...\n } else if (ArraySize->isTypeDependent() || ArraySize->isValueDependent()) {\n // ...\n } else {\n // ...\n if (!R.isUsable()) {\n // ...\n } else if (!T->isDependentType() && !T->isIncompleteType() && !T->isConstantSizeType()) {\n // ...\n } else {\n // ...\n if (ConstVal == 0 && !T.isWebAssemblyReferenceType()) {\n // ...\n Diag(ArraySize->getBeginLoc(), isSFINAEContext() ? diag::err_typecheck_zero_array_size : diag::ext_typecheck_zero_array_size) << 0 << ArraySize->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaSYCL/zero-length-arrays.cpp"]={Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,"clang/test/SemaSYCL/zero-length-arrays.cpp:69:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:70:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:72:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:77:26: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:84:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:84:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:84:14: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:84:16: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:89:32: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:89:32: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:99:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:99:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:101:13: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:101:13: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:108:32: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:108:32: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:53:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:53:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:19:8: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:19:8: error: zero-length arrays are not permitted in SYCL device code"} | ["clang/test/SemaSYCL/zero-length-arrays.cpp"]={Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,"clang/test/SemaSYCL/zero-length-arrays.cpp:69:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:70:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:72:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:77:26: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:84:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:84:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:84:14: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:84:16: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:89:32: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:89:32: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:99:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:99:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:101:13: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:101:13: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:108:32: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:108:32: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:53:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:53:11: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:19:8: error: zero-length arrays are not permitted in SYCL device code","clang/test/SemaSYCL/zero-length-arrays.cpp:19:8: error: zero-length arrays are not permitted in SYCL device code"} | ||
Line 8,480: | Line 8,508: | ||
}, | }, | ||
["err_typedef_changes_linkage"]={ | ["err_typedef_changes_linkage"]={ | ||
[ | [i]="err_typedef_changes_linkage", | ||
[ | [h]={{nil,q,"unsupported: anonymous type given name for linkage purposes by %select{typedef|alias}0 declaration after its linkage was computed; add a tag name here to establish linkage prior to definition"},{p,nil,"unsupported: typedef changes linkage of anonymous type, but linkage was already computed"}}, | ||
[ | [g]={{nil,q,{"unsupported: anonymous type given name for linkage purposes by ",{Rc,"alias"}," declaration after its linkage was computed; add a tag name here to establish linkage prior to definition"}},{p,nil,"unsupported: typedef changes linkage of anonymous type, but linkage was already computed"}}, | ||
[ | [b]=k, | ||
[ | [e]="unsupported\\: anonymous type given name for linkage purposes by (?:typedef|alias) declaration after its linkage was computed; add a tag name here to establish linkage prior to definition", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"2575d8805927",1391044373,"Diagnose typedef names for linkage purposes that would change","Diagnose typedef names for linkage purposes that would change\na previously-computed linkage as an unsupportable error condition.\n\nPer discussion on cfe-commits, this appears to be a\ndifficult-to-resolve flaw in our implementation approach;\nwe may pursue this as a language defect, but for now it\'s\nbetter to diagnose it as unsupported than to produce\ninconsistent results (or assertions). Anything that we can\ndo to limit how often this diagnostic fires, such as the\nchanges in r200380, is probably for the best, though.\n\nllvm-svn: 200438"}, | ||
[j]={{ | [j]={{w,5015,"void Sema::setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD) {\n // ...\n if (NonCLike || ChangesLinkage) {\n // ...\n if (ChangesLinkage) {\n // If the linkage changes, we can\'t accept this as an extension.\n if (NonCLike.Kind == NonCLikeKind::None)\n DiagID = diag::err_typedef_changes_linkage;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/anonymous-struct.cpp"]={"clang/test/SemaCXX/anonymous-struct.cpp:115:17: error: unsupported: anonymous type given name for linkage purposes by typedef declaration after its linkage was computed; add a tag name here to establish linkage prior to definition","clang/test/SemaCXX/anonymous-struct.cpp:131:17: error: unsupported: anonymous type given name for linkage purposes by typedef declaration after its linkage was computed; add a tag name here to establish linkage prior to definition"} | ["clang/test/SemaCXX/anonymous-struct.cpp"]={"clang/test/SemaCXX/anonymous-struct.cpp:115:17: error: unsupported: anonymous type given name for linkage purposes by typedef declaration after its linkage was computed; add a tag name here to establish linkage prior to definition","clang/test/SemaCXX/anonymous-struct.cpp:131:17: error: unsupported: anonymous type given name for linkage purposes by typedef declaration after its linkage was computed; add a tag name here to establish linkage prior to definition"} | ||
Line 8,494: | Line 8,522: | ||
}, | }, | ||
["err_typedef_not_bitfield"]={ | ["err_typedef_not_bitfield"]={ | ||
[ | [i]="err_typedef_not_bitfield", | ||
[ | [h]="typedef member %0 cannot be a bit-field", | ||
[ | [g]="typedef member A cannot be a bit-field", | ||
[ | [b]=k, | ||
[ | [e]="typedef member (.*?) cannot be a bit\\-field", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={u,1237025389,s,t}, | ||
[j]={{ | [j]={{H,3630,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n // ...\n if (isInstField) {\n // ...\n } else {\n // ...\n // Non-instance-fields can\'t have a bitfield.\n if (BitWidth) {\n if (Member->isInvalidDecl()) {\n // ...\n } else if (isa<VarDecl>(Member) || isa<VarTemplateDecl>(Member)) {\n // ...\n } else if (isa<TypedefDecl>(Member)) {\n // ...\n Diag(Loc, diag::err_typedef_not_bitfield) << Name << BitWidth->getSourceRange();"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:33:15: error: typedef member \'E\' cannot be a bit-field"} | ["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:33:15: error: typedef member \'E\' cannot be a bit-field"} | ||
Line 8,508: | Line 8,536: | ||
}, | }, | ||
["err_typedef_not_identifier"]={ | ["err_typedef_not_identifier"]={ | ||
[ | [i]="err_typedef_not_identifier", | ||
[h]="typedef name must be an identifier", | |||
[g]="typedef name must be an identifier", | |||
[b]=k, | |||
[e]="typedef name must be an identifier", | [e]="typedef name must be an identifier", | ||
[f | [f]=a, | ||
[d]=m, | |||
[c]={"d8f446f1b2db",1279003021,"Diagnose typedef of an operator name. Fixes PR7462","Diagnose typedef of an operator name. Fixes PR7462\n\nllvm-svn: 108233"}, | |||
[j]={{w,6684,"NamedDecl *Sema::ActOnTypedefDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous) {\n // ...\n if (D.getName().getKind() != UnqualifiedIdKind::IK_Identifier) {\n if (D.getName().getKind() == UnqualifiedIdKind::IK_DeductionGuideName)\n // ...\n else\n Diag(D.getName().StartLocation, diag::err_typedef_not_identifier) << D.getName().getSourceRange();"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/typedef-redecl.cpp"]={"clang/test/SemaCXX/typedef-redecl.cpp:54:15: error: typedef name must be an identifier"} | ["clang/test/SemaCXX/typedef-redecl.cpp"]={"clang/test/SemaCXX/typedef-redecl.cpp:54:15: error: typedef name must be an identifier"} | ||
Line 8,522: | Line 8,550: | ||
}, | }, | ||
["err_typename_identifiers_only"]={ | ["err_typename_identifiers_only"]={ | ||
[ | [i]="err_typename_identifiers_only", | ||
[h]="typename is allowed for identifiers only", | |||
[g]="typename is allowed for identifiers only", | |||
[b]=k, | |||
[e]="typename is allowed for identifiers only", | [e]="typename is allowed for identifiers only", | ||
[f | [f]=a, | ||
[d]=x, | |||
[c]={"882a61a64035",1317047428,"Diagnose attempts to use \'using typename\' with a non-identifier name,","Diagnose attempts to use \'using typename\' with a non-identifier name,\nfrom Stepan Dyatkovskiy. Fixes PR10925.\n\nllvm-svn: 140528"}, | |||
[j]={{Qb,830,"/// 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 while (true) {\n // ...\n if (InvalidDeclarator)\n // ...\n else {\n // \"typename\" keyword is allowed for identifiers only,\n // because it may be a type definition.\n if (D.TypenameLoc.isValid() && D.Name.getKind() != UnqualifiedIdKind::IK_Identifier) {\n Diag(D.Name.getSourceRange().getBegin(), diag::err_typename_identifiers_only) << FixItHint::CreateRemoval(SourceRange(D.TypenameLoc));"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
["clang/test/SemaTemplate/typename-specifier.cpp"]={"clang/test/SemaTemplate/typename-specifier.cpp:136:47: error: typename is allowed for identifiers only"} | ["clang/test/SemaTemplate/typename-specifier.cpp"]={"clang/test/SemaTemplate/typename-specifier.cpp:136:47: error: typename is allowed for identifiers only"} | ||
Line 8,536: | Line 8,564: | ||
}, | }, | ||
["err_typename_invalid_constexpr"]={ | ["err_typename_invalid_constexpr"]={ | ||
[ | [i]="err_typename_invalid_constexpr", | ||
[ | [h]={{nil,p,"type name does not allow %select{<ERROR>|constexpr|consteval|constinit}0 specifier to be specified"},{D,D,"type name does not allow %select{constexpr|consteval}0 specifier to be specified"},{E,nil,"type name does not allow constexpr specifier to be specified"}}, | ||
[ | [g]={{nil,p,{"type name does not allow ",{"constexpr","consteval","constinit"}," specifier to be specified"}},{D,D,{"type name does not allow ",{"constexpr","consteval"}," specifier to be specified"}},{E,nil,"type name does not allow constexpr specifier to be specified"}}, | ||
[ | [b]=k, | ||
[ | [e]="type name does not allow (?:constexpr|consteval|constinit) specifier to be specified", | ||
[ | [f]=a, | ||
[ | [d]=x, | ||
[ | [c]={"c5b05520550a",1331538975,"Fix parsing of type-specifier-seq\'s. Types are syntactically allowed to be","Fix parsing of type-specifier-seq\'s. Types are syntactically allowed to be\ndefined here, but not semantically, so\n\n new struct S {};\n\nis always ill-formed, even if there is a struct S in scope.\n\nWe also had a couple of bugs in ParseOptionalTypeSpecifier caused by it being\nunder-loved (due to it only being used in a few places) so merge it into\nParseDeclarationSpecifiers with a new DeclSpecContext. To avoid regressing, this\nrequired improving ParseDeclarationSpecifiers\' diagnostics in some cases. This\nalso required teaching ParseSpecifierQualifierList about constexpr... which\nincidentally fixes an issue where we\'d allow the constexpr specifier in other\nbad places.\n\nllvm-svn: 152549"}, | ||
[j]={{ | [j]={{jb,2688,"/// 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 // Issue diagnostic and remove constexpr specifier if present.\n if (DS.hasConstexprSpecifier() && DSC != DeclSpecContext::DSC_condition) {\n Diag(DS.getConstexprSpecLoc(), diag::err_typename_invalid_constexpr) << static_cast<int>(DS.getConstexprSpecifier());"}}, | ||
[l]={ | [l]={ | ||
[ | [dd]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:20:13: error: type name does not allow constexpr specifier to be specified"} | ||
} | } | ||
}, | }, | ||
["err_typename_invalid_functionspec"]={ | ["err_typename_invalid_functionspec"]={ | ||
[ | [i]="err_typename_invalid_functionspec", | ||
[h]="type name does not allow function specifier to be specified", | |||
[g]="type name does not allow function specifier to be specified", | |||
[b]=k, | |||
[e]="type name does not allow function specifier to be specified", | [e]="type name does not allow function specifier to be specified", | ||
[f | [f]=a, | ||
[d]=x, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{jb,2676,"/// 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 // Issue diagnostic and remove function specifier if present.\n if (Specs & DeclSpec::PQ_FunctionSpecifier) {\n if (DS.isInlineSpecified())\n Diag(DS.getInlineSpecLoc(), diag::err_typename_invalid_functionspec);"},{jb,2678,"/// 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 // Issue diagnostic and remove function specifier if present.\n if (Specs & DeclSpec::PQ_FunctionSpecifier) {\n // ...\n if (DS.isVirtualSpecified())\n Diag(DS.getVirtualSpecLoc(), diag::err_typename_invalid_functionspec);"},{jb,2680,"/// 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 // Issue diagnostic and remove function specifier if present.\n if (Specs & DeclSpec::PQ_FunctionSpecifier) {\n // ...\n if (DS.hasExplicitSpecifier())\n Diag(DS.getExplicitSpecLoc(), diag::err_typename_invalid_functionspec);"},{jb,2682,"/// 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 // Issue diagnostic and remove function specifier if present.\n if (Specs & DeclSpec::PQ_FunctionSpecifier) {\n // ...\n if (DS.isNoreturnSpecified())\n Diag(DS.getNoreturnSpecLoc(), diag::err_typename_invalid_functionspec);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
[ | [dd]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:14:13: error: type name does not allow function specifier to be specified","clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:15:13: error: type name does not allow function specifier to be specified","clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:16:13: error: type name does not allow function specifier to be specified"} | ||
} | } | ||
}, | }, | ||
["err_typename_invalid_storageclass"]={ | ["err_typename_invalid_storageclass"]={ | ||
[ | [i]="err_typename_invalid_storageclass", | ||
[h]="type name does not allow storage class to be specified", | |||
[g]="type name does not allow storage class to be specified", | |||
[b]=k, | |||
[e]="type name does not allow storage class to be specified", | [e]="type name does not allow storage class to be specified", | ||
[f | [f]=a, | ||
[d]=x, | |||
[c]={K,1236199783,J,I}, | |||
[j]={{jb,2666,"/// 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 // Issue diagnostic and remove storage class if present.\n if (Specs & DeclSpec::PQ_StorageClassSpecifier) {\n if (DS.getStorageClassSpecLoc().isValid())\n Diag(DS.getStorageClassSpecLoc(), diag::err_typename_invalid_storageclass);"},{jb,2669,"/// 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 // Issue diagnostic and remove storage class if present.\n if (Specs & DeclSpec::PQ_StorageClassSpecifier) {\n if (DS.getStorageClassSpecLoc().isValid())\n // ...\n else\n Diag(DS.getThreadStorageClassSpecLoc(), diag::err_typename_invalid_storageclass);"}}, | |||
[ | |||
[ | |||
[j]={{ | |||
[l]={ | [l]={ | ||
[ | [dd]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:19:13: error: type name does not allow storage class to be specified"} | ||
} | } | ||
}, | }, | ||
["err_typename_missing"]={ | ["err_typename_missing"]={ | ||
[ | [i]="err_typename_missing", | ||
[ | [h]="missing \'typename\' prior to dependent type name \'%0%1\'", | ||
[ | [g]="missing \'typename\' prior to dependent type name \'AB\'", | ||
[ | [b]=k, | ||
[ | [e]="missing \'typename\' prior to dependent type name \'(.*?)(.*?)\'", | ||
[ | [f]=a, | ||
[ | [d]=m, | ||
[ | [c]={"15e5602e5998",1255476442,"Improve diagnostics when the parser encounters a declarator with an","Improve diagnostics when the parser encounters a declarator with an\nunknown type name, e.g.,\n\n foo::bar x;\n\nwhen \"bar\" does not refer to a type in \"foo\". \n\nWith this change, the parser now calls into the action to perform\ndiagnostics and can try to recover by substituting in an appropriate\ntype. For example, this allows us to easily diagnose some missing\n\"typename\" specifiers, which we now do:\n\n test/SemaCXX/unknown-type-name.cpp:29:1: error: missing \'typename\'\n prior to dependent type name \'A<T>::type\'\n A<T>::type A<T>::f() { return type(); }\n ^~~~~~~~~~\n typename \n\nFixes PR3990.\n\nllvm-svn: 84053"}, | ||
[j]={{ | [j]={{w,819,"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 unsigned DiagID = diag::err_typename_missing;"},{n,2878,"/// 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 unsigned DiagID = diag::err_typename_missing;"}}, | ||
[l]={ | [l]={ | ||
["clang/test/SemaCXX/PR11358.cpp"]={"clang/test/SemaCXX/PR11358.cpp:15:7: error: missing \'typename\' prior to dependent type name \'Container::iterator\'","clang/test/SemaCXX/PR11358.cpp:31:10: error: missing \'typename\' prior to dependent type name \'hash_map<KeyType, ValueType>::const_iterator\'","clang/test/SemaCXX/PR11358.cpp:47:7: error: missing \'typename\' prior to dependent type name \'Container::iterator\'"} | ["clang/test/SemaCXX/PR11358.cpp"]={"clang/test/SemaCXX/PR11358.cpp:15:7: error: missing \'typename\' prior to dependent type name \'Container::iterator\'","clang/test/SemaCXX/PR11358.cpp:31:10: error: missing \'typename\' prior to dependent type name \'hash_map<KeyType, ValueType>::const_iterator\'","clang/test/SemaCXX/PR11358.cpp:47:7: error: missing \'typename\' prior to dependent type name \'Container::iterator\'"} |
edits