Bots, Bureaucrats, Interface administrators, smwadministrator, smwcurator, smweditor, Administrators
2,558
edits
Timo.stripf (talk | contribs) No edit summary |
Timo.stripf (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
local a=" | local a="category_hist"; | ||
local b="message_hist"; | local b="message_hist"; | ||
local c=" | local c="regex3"; | ||
local d=" | local d="source"; | ||
local e=" | local e="regex2"; | ||
local f=" | local f="regex1"; | ||
local g=" | local g="hierarchical_hist"; | ||
local h=" | local h="commit"; | ||
local i=" | local i="id_hist"; | ||
local j="tests2"; | local j="tests2"; | ||
local k=""; | local k="maingroup"; | ||
local l=" | local l="groups"; | ||
local m | local m="Semantic Issue"; | ||
local n="(?:warning|error|fatal error)\\: "; | |||
local | local o=""; | ||
local p="10.0"; | local p="10.0"; | ||
local q="note\\: "; | local q="note\\: "; | ||
| Line 19: | Line 19: | ||
local s="clang/lib/AST/ExprConstant.cpp"; | local s="clang/lib/AST/ExprConstant.cpp"; | ||
local t="pedantic"; | local t="pedantic"; | ||
local u="clang/lib/Sema/SemaExpr.cpp"; | local u="None"; | ||
local | local v="clang/lib/Sema/SemaExpr.cpp"; | ||
local | local w="clang/lib/Sema/SemaDecl.cpp"; | ||
local | local x="13.0"; | ||
local | local y="15.0"; | ||
local | local z="12.0"; | ||
local | local A="11.0"; | ||
local | local B="Lexical or Preprocessor Issue"; | ||
local | local C="read of"; | ||
local | local D="8.0"; | ||
local | local E="6.0"; | ||
local | local F="microsoft"; | ||
local G="Parse Issue"; | |||
local H="c++11-extensions"; | local H="c++11-extensions"; | ||
local I=" | local I="assignment to"; | ||
local J="increment of"; | local J="increment of"; | ||
local K="b1c4d5507fad"; | local K="decrement of"; | ||
local | local L="b1c4d5507fad"; | ||
local | local M="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; | ||
local | local N="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format.\n\nllvm-svn: 66064"; | ||
local | local O="clang/lib/Sema/SemaTemplate.cpp"; | ||
local | local P="16.0"; | ||
local | local Q="(?:error|warning|fatal error)\\: "; | ||
local | local R="clang/lib/Parse/ParseDeclCXX.cpp"; | ||
local | local S="Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"; | ||
local | local T="Update tablegen diagnostic files to be in sync with the def files."; | ||
local | local U="5a8987ca5113"; | ||
local | local V="14.0"; | ||
local W="gnu"; | |||
local X=" \\[(?:\\-Werror,)?\\-Wpedantic[^\\]]*\\]"; | local X=" \\[(?:\\-Werror,)?\\-Wpedantic[^\\]]*\\]"; | ||
local Y="c++17-extensions"; | local Y="c++17-extensions"; | ||
local Z=" | local Z="clang/lib/Sema/SemaDeclCXX.cpp"; | ||
local ab=" | local ab="5.0"; | ||
local bb="clang/lib/Lex/PPDirectives.cpp"; | local bb="clang/lib/Lex/PPDirectives.cpp"; | ||
local cb="member call on"; | local cb="dynamic_cast of"; | ||
local | local db="member call on"; | ||
local | local eb="typeid applied to"; | ||
local fb="clang/lib/Sema/SemaDeclAttr.cpp"; | |||
local gb="c++0x-extensions"; | local gb="c++0x-extensions"; | ||
local hb="clang/lib/Lex/Pragma.cpp"; | local hb="microsoft-template"; | ||
local | local ib="clang/lib/Lex/Pragma.cpp"; | ||
local | local jb="CL4"; | ||
local | local kb="c++20-extensions"; | ||
local lb=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-extensions[^\\]]*\\]"; | |||
local | local mb="clang/lib/AST/Interp/Interp.cpp"; | ||
local nb="7.0"; | |||
local ob="clang/lib/Sema/SemaExprObjC.cpp"; | local ob="clang/lib/Sema/SemaExprObjC.cpp"; | ||
local pb="most"; | local pb="most"; | ||
local qb="all"; | local qb="all"; | ||
local rb=" is not allowed in a constant expression"; | local rb=" is not allowed in a constant expression"; | ||
local sb="PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus\nExtWarn/Warnings. Mostly the name of the warning was changed to match the\nsemantics, but in the PR20356 cases, the warning was about valid code, so the\ndiagnostic was changed from ExtWarn to Warning instead.\n\nllvm-svn: 213443 | local sb="clang/lib/Sema/SemaInit.cpp"; | ||
local tb="PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus\nExtWarn/Warnings. Mostly the name of the warning was changed to match the\nsemantics, but in the PR20356 cases, the warning was about valid code, so the\ndiagnostic was changed from ExtWarn to Warning instead.\n\nllvm-svn: 213443"; | |||
local ub="PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus"; | local ub="PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus"; | ||
local vb="clang/lib/Sema/SemaStmt.cpp"; | local vb="1b98ccc4e957"; | ||
local | local wb="clang/lib/Sema/SemaStmt.cpp"; | ||
local | local xb="clang/lib/Parse/ParseDecl.cpp"; | ||
local yb="For P0784R7: Add support for dynamic allocation with new / delete during\nconstant evaluation.\n\nllvm-svn: 373036"; | |||
local zb=" \\[(?:\\-Werror,)?\\-Wc\\+\\+17\\-extensions[^\\]]*\\]"; | local zb=" \\[(?:\\-Werror,)?\\-Wc\\+\\+17\\-extensions[^\\]]*\\]"; | ||
local Ab="clang/lib/ | local Ab="For P0784R7: Add support for dynamic allocation with new / delete during"; | ||
local | local Bb="clang/lib/Sema/SemaType.cpp"; | ||
local Cb="c++1z-extensions"; | |||
local Db=" | local Db="destruction of"; | ||
local Eb=" | local Eb="da1b4347e41a"; | ||
local Fb=" | local Fb="assigning to A from B"; | ||
local Gb=" | local Gb="initializing with expression of different type"; | ||
local Hb=" | local Hb="converting between types"; | ||
local Ib=" | local Ib="converting A to type B"; | ||
local Jb=" | local Jb="sending A to parameter of type B"; | ||
local Kb=" | local Kb="clang/lib/Lex/Lexer.cpp"; | ||
local Lb="passing A to parameter of type B"; | local Lb="passing A to parameter of type B"; | ||
local Mb=" | local Mb="returning A from a function with result type B"; | ||
local Nb=" | local Nb="initializing A with an expression of type B"; | ||
local Ob=" | local Ob="passing to parameter of different type"; | ||
local Pb="sending to parameter of different type"; | |||
local | local Qb="clang/lib/Sema/SemaExceptionSpec.cpp"; | ||
local | local Rb="casting between types"; | ||
local | local Sb="casting A to type B"; | ||
local | local Tb="clang/lib/Sema/SemaExprCXX.cpp"; | ||
local Ub=" | local Ub="returning from function with different return type"; | ||
local Vb=" | local Vb="assigning to different types"; | ||
local Wb="clang/lib/Sema/ | local Wb="clang/lib/Sema/SemaAccess.cpp"; | ||
local Xb="clang/lib/Lex/LiteralSupport.cpp"; | local Xb="microsoft-exception-spec"; | ||
local | local Yb="clang/lib/Lex/LiteralSupport.cpp"; | ||
local | local Zb="variable"; | ||
local | local ac="clang/lib/Sema/SemaChecking.cpp"; | ||
local bc="function"; | |||
local cc=" \\[(?:\\-Werror,)?\\-Wc\\+\\+20\\-extensions[^\\]]*\\]"; | |||
local dc=" | local dc="implicit"; | ||
local ec | local ec="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 fc="Implement P2361 Unevaluated string literals"; | |||
local gc=" | local gc=" "; | ||
local hc=" "; | local hc="c++2a-extensions"; | ||
local ic=" | local ic="95f50964fbf5"; | ||
local jc="7.1"; | local jc="7.1"; | ||
local kc | local kc="clang/lib/Sema/SemaAvailability.cpp"; | ||
local lc="(?: \\[(?:\\-Werror)?[^\\]]*\\])?"; | |||
local mc="clang/lib/Sema/ | local mc="clang/lib/Sema/SemaDeclObjC.cpp"; | ||
local nc="clang/lib/Sema/ | local nc="construction of"; | ||
local oc="clang/lib/Sema/SemaObjCProperty.cpp"; | |||
local pc="clang/lib/Sema/ | local pc="clang/lib/Sema/SemaOverload.cpp"; | ||
local qc="clang/lib/Sema/SemaTemplateInstantiate.cpp"; | local qc="clang/lib/Sema/SemaTemplateInstantiate.cpp"; | ||
local rc=" | local rc=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-template[^\\]]*\\]"; | ||
local sc=" | local sc="3da88fac5416"; | ||
local tc="implicit-function-declaration"; | local tc="implicit-function-declaration"; | ||
local uc=" | local uc="C++1y: support simple variable assignments in constexpr functions."; | ||
local vc=" | local vc="C++1y: support simple variable assignments in constexpr functions.\n\nllvm-svn: 180603"; | ||
local wc="missing-declarations"; | |||
local | local xc="unknown-pragmas"; | ||
local yc="main"; | |||
local zc="clang/test/SemaCXX/constant-expression-cxx2a.cpp"; | |||
local Ac="c++11-compat"; | |||
local Bc="clang/test/CXX/expr/expr.const/p2-0x.cpp"; | |||
local Cc="[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"; | |||
local Dc="ARC Casting Rules"; | |||
local | local Ec="31168b077c36"; | ||
local | local Fc="Automatic Reference Counting."; | ||
local | local Gc="[clang] Add no_builtin attribute"; | ||
local | local Hc="bd8791610948"; | ||
local | local Ic="c++11-narrowing"; | ||
local | local Jc="c++11-compat-pedantic"; | ||
local | local Kc="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"; | ||
local | local Lc="11.1"; | ||
local Mc="variadic-macros"; | |||
local Nc="pointer-arith"; | |||
local | local Oc="clang/lib/Sema/SemaStmtAsm.cpp"; | ||
local | local Pc="[clang] New __attribute__((__clang_arm_mve_alias))."; | ||
local | local Qc="7c11da0cfd33"; | ||
local | local Rc="temporary"; | ||
local Sc="c++0x-compat"; | |||
local Tc="[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast\n\nThis commit adds a new builtin, __builtin_bit_cast(T, v), which performs a\nbit_cast from a value v to a type T. This expression can be evaluated at\ncompile time under specific circumstances.\n\nThe compile time evaluation currently doesn\'t support bit-fields, but I\'m\nplanning on fixing this in a follow up (some of the logic for figuring this out\nis in CodeGen). I\'m also planning follow-ups for supporting some more esoteric\ntypes that the constexpr evaluator supports, as well as extending\n__builtin_memcpy constexpr evaluation to use the same infrastructure.\n\nrdar://44987528\n\nDifferential revision: https://reviews.llvm.org/D62825\n\nllvm-svn: 364954"; | |||
local Uc="clang/lib/Sema/SemaCast.cpp"; | |||
local Vc="clang/test/SemaCXX/constexpr-value-init.cpp:4:21: note: read of object outside its lifetime is not allowed in a constant expression"; | |||
local Wc="Support warn_unused_result on typedefs"; | |||
local | local Xc="incompatible-pointer-types"; | ||
local | local Yc="[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recognition of module partition CMIs\nand removes the FIXMEs in the parser.\n\nModule partitions are recognised in the base computation of visibility,\nhowever additional amendments to visibility follow in subsequent patches.\n\nDifferential Revision: https://reviews.llvm.org/D118586"; | ||
local | local Zc="[C++20][Modules][3/8] Initial handling for module partitions."; | ||
local ad="69350e569dc4"; | |||
local bd="clang/lib/Sema/SemaConcept.cpp"; | |||
local cd="clang/lib/Sema/DeclSpec.cpp"; | |||
local dd="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"; | |||
local ed="Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes things implicitly unavailable.\n\nllvm-svn: 251496"; | |||
local fd="cb08f4aa4467"; | |||
local | local gd="clang/lib/Sema/SemaLookup.cpp"; | ||
local | local hd="[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast"; | ||
local | local id="Refine r251469 to give better (and more localizable) diagnostics"; | ||
local jd="c6af8c606dae"; | |||
local | local kd="ARC Restrictions"; | ||
local ld="eee944e7f9e6"; | |||
local md="[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"; | |||
return { | return { | ||
["ext_gnu_statement_expr_macro"]={ | ["ext_gnu_statement_expr_macro"]={ | ||
[ | [l]={W,"gnu-statement-expression","gnu-statement-expression-from-macro-expansion",t}, | ||
[ | [k]="gnu-statement-expression-from-macro-expansion", | ||
[ | [i]={{nil,y,"ext_gnu_statement_expr_macro"}}, | ||
[b]={{nil, | [b]={{nil,y,"use of GNU statement expression extension from macro expansion"}}, | ||
[ | [g]={{nil,y,"use of GNU statement expression extension from macro expansion"}}, | ||
[ | [f]=n, | ||
[ | [e]="use of GNU statement expression extension from macro expansion", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-statement\\-expression\\-from\\-macro\\-expansion[^\\]]*\\]", | ||
[ | [a]={{nil,y,G}}, | ||
[ | [h]={"7689c7fc9e08",1653629944,"Create specialization of -Wgnu-statement-expression for expressions found in macros.","Create specialization of -Wgnu-statement-expression for expressions found in macros.\n\n-Wgnu-statement-expression currently warns for both direct source uses of statement expressions but also macro expansions; since they may be used by macros to avoid multiple evaluation of macro arguments, engineers might want to suppress warnings when statement expressions are expanded from macros but see them if introduced directly in source code.\n\nDifferential Revision: https://reviews.llvm.org/D126522"}, | ||
[ | [d]={{"clang/lib/Parse/ParseExpr.cpp",2932,"/// ParseParenExpression - This parses the unit that starts with a \'(\' token,\n/// based on what is allowed by ExprType. The actual thing parsed is returned\n/// in ExprType. If stopIfCastExpr is true, it will only return the parsed type,\n/// not the parsed cast-expression.\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// \'(\' expression \')\'\n/// [GNU] \'(\' compound-statement \')\' (if !ParenExprOnly)\n/// postfix-expression: [C99 6.5.2]\n/// \'(\' type-name \')\' \'{\' initializer-list \'}\'\n/// \'(\' type-name \')\' \'{\' initializer-list \',\' \'}\'\n/// cast-expression: [C99 6.5.4]\n/// \'(\' type-name \')\' cast-expression\n/// [ARC] bridged-cast-expression\n/// [ARC] bridged-cast-expression:\n/// (__bridge type-name) cast-expression\n/// (__bridge_transfer type-name) cast-expression\n/// (__bridge_retained type-name) cast-expression\n/// fold-expression: [C++1z]\n/// \'(\' cast-expression fold-operator \'...\' \')\'\n/// \'(\' \'...\' fold-operator cast-expression \')\'\n/// \'(\' cast-expression fold-operator \'...\'\n/// fold-operator cast-expression \')\'\n/// [OPENMP] Array shaping operation\n/// \'(\' \'[\' expression \']\' { \'[\' expression \']\' } cast-expression\n/// \\endverbatim\nExprResult Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr, bool isTypeCast, ParsedType &CastTy, SourceLocation &RParenLoc) {\n // ...\n // None of these cases should fall through with an invalid Result\n // unless they\'ve already reported an error.\n if (ExprType >= CompoundStmt && Tok.is(tok::l_brace)) {\n Diag(Tok, OpenLoc.isMacroID() ? diag::ext_gnu_statement_expr_macro : diag::ext_gnu_statement_expr);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/gnu-flags.c"]={"clang/test/Sema/gnu-flags.c:97:11: warning: use of GNU statement expression extension from macro expansion [-Wgnu-statement-expression-from-macro-expansion]"} | ["clang/test/Sema/gnu-flags.c"]={"clang/test/Sema/gnu-flags.c:97:11: warning: use of GNU statement expression extension from macro expansion [-Wgnu-statement-expression-from-macro-expansion]"} | ||
| Line 186: | Line 187: | ||
}, | }, | ||
["ext_gnu_subscript_void_type"]={ | ["ext_gnu_subscript_void_type"]={ | ||
[ | [l]={W,"gnu-pointer-arith",t,Nc}, | ||
[ | [k]="gnu-pointer-arith", | ||
[ | [i]="ext_gnu_subscript_void_type", | ||
[b]="subscript of a pointer to void is a GNU extension", | [b]="subscript of a pointer to void is a GNU extension", | ||
[g]="subscript of a pointer to void is a GNU extension", | [g]="subscript of a pointer to void is a GNU extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-pointer\\-arith[^\\]]*\\]", | [f]=n, | ||
[ | [e]="subscript of a pointer to void is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-pointer\\-arith[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"4cc3f296a907",1309192347,"Cleanup a fixme by using a specific diagnostic for subscripting","Cleanup a fixme by using a specific diagnostic for subscripting\na pointer to void.\n\nllvm-svn: 133912"}, | |||
[d]={{v,5981,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n if (ResultType->isVoidType() && !getLangOpts().CPlusPlus) {\n // ...\n Diag(LLoc, diag::ext_gnu_subscript_void_type) << BaseExpr->getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/pointer-addition.c"]={"clang/test/Sema/pointer-addition.c:18:11: warning: subscript of a pointer to void is a GNU extension [-Wgnu-pointer-arith]"} | ["clang/test/Sema/pointer-addition.c"]={"clang/test/Sema/pointer-addition.c:18:11: warning: subscript of a pointer to void is a GNU extension [-Wgnu-pointer-arith]"} | ||
| Line 202: | Line 203: | ||
}, | }, | ||
["ext_gnu_void_ptr"]={ | ["ext_gnu_void_ptr"]={ | ||
[ | [l]={W,"gnu-pointer-arith",t,Nc}, | ||
[ | [k]="gnu-pointer-arith", | ||
[ | [i]="ext_gnu_void_ptr", | ||
[b]="arithmetic on%select{ a|}0 pointer%select{|s}0 to void is a GNU extension", | [b]="arithmetic on%select{ a|}0 pointer%select{|s}0 to void is a GNU extension", | ||
[ | [g]={{nil,nil,{"arithmetic on",{" a",o}," pointer",{o,"s"}," to void is a GNU extension"}}}, | ||
[ | [f]=n, | ||
[ | [e]="arithmetic on(?: a|) pointer(?:|s) to void is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-pointer\\-arith[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{v,11440,"static void diagnoseArithmeticOnTwoVoidPointers(Sema &S, SourceLocation Loc, Expr *LHSExpr, Expr *RHSExpr) { S.Diag(Loc, S.getLangOpts().CPlusPlus ? diag::err_typecheck_pointer_arith_void_type : diag::ext_gnu_void_ptr) << 1 /* two pointers */ << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); }"},{v,11453,"static void diagnoseArithmeticOnVoidPointer(Sema &S, SourceLocation Loc, Expr *Pointer) { S.Diag(Loc, S.getLangOpts().CPlusPlus ? diag::err_typecheck_pointer_arith_void_type : diag::ext_gnu_void_ptr) << 0 /* one pointer */ << Pointer->getSourceRange(); }"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/typecheck-binop.c"]={"clang/test/Sema/typecheck-binop.c:14:11: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]","clang/test/Sema/typecheck-binop.c:18:11: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"} | ["clang/test/Sema/typecheck-binop.c"]={"clang/test/Sema/typecheck-binop.c:14:11: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]","clang/test/Sema/typecheck-binop.c:18:11: warning: arithmetic on pointers to void is a GNU extension [-Wgnu-pointer-arith]"} | ||
| Line 218: | Line 219: | ||
}, | }, | ||
["ext_goto_into_protected_scope"]={ | ["ext_goto_into_protected_scope"]={ | ||
[ | [l]={F,"microsoft-goto"}, | ||
[ | [k]="microsoft-goto", | ||
[ | [i]="ext_goto_into_protected_scope", | ||
[b]="jump from this goto statement to its label is a Microsoft extension", | [b]="jump from this goto statement to its label is a Microsoft extension", | ||
[g]="jump from this goto statement to its label is a Microsoft extension", | [g]="jump from this goto statement to its label is a Microsoft extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-goto[^\\]]*\\]", | [f]=n, | ||
[ | [e]="jump from this goto statement to its label is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-goto[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={vb,1405733957,ub,tb}, | |||
[d]={{"clang/lib/Sema/JumpDiagnostics.cpp",667,"/// VerifyJumps - Verify each element of the Jumps array to see if they are\n/// valid, emitting diagnostics if not.\nvoid JumpScopeChecker::VerifyJumps() {\n while (!Jumps.empty()) {\n // ...\n // With a goto,\n if (GotoStmt *GS = dyn_cast<GotoStmt>(Jump)) {\n // The label may not have a statement if it\'s coming from inline MS ASM.\n if (GS->getLabel()->getStmt()) {\n CheckJump(GS, GS->getLabel()->getStmt(), GS->getGotoLoc(), diag::err_goto_into_protected_scope, diag::ext_goto_into_protected_scope, diag::warn_cxx98_compat_goto_into_protected_scope);"},{"clang/lib/Sema/JumpDiagnostics.cpp",695,"/// VerifyJumps - Verify each element of the Jumps array to see if they are\n/// valid, emitting diagnostics if not.\nvoid JumpScopeChecker::VerifyJumps() {\n while (!Jumps.empty()) {\n // ...\n // We only get indirect gotos here when they have a constant target.\n if (IndirectGotoStmt *IGS = dyn_cast<IndirectGotoStmt>(Jump)) {\n // ...\n CheckJump(IGS, Target->getStmt(), IGS->getGotoLoc(), diag::err_goto_into_protected_scope, diag::ext_goto_into_protected_scope, diag::warn_cxx98_compat_goto_into_protected_scope);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:66:7: warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:77:3: warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:103:3: warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]"} | ["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:66:7: warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:77:3: warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:103:3: warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]"} | ||
| Line 234: | Line 235: | ||
}, | }, | ||
["ext_hex_constant_invalid"]={ | ["ext_hex_constant_invalid"]={ | ||
[ | [l]={"c99-extensions",t}, | ||
[ | [k]="c99-extensions", | ||
[ | [i]="ext_hex_constant_invalid", | ||
[b]="hexadecimal floating constants are a C99 feature", | [b]="hexadecimal floating constants are a C99 feature", | ||
[g]="hexadecimal floating constants are a C99 feature", | [g]="hexadecimal floating constants are a C99 feature", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wc99\\-extensions[^\\]]*\\]", | [f]=n, | ||
[ | [e]="hexadecimal floating constants are a C99 feature", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc99\\-extensions[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17.","Update diagnostics now that hexadecimal literals look likely to be part of C++17.\n\nllvm-svn: 262753"}, | |||
[d]={{Yb,1330,"/// ParseNumberStartingWithZero - This method is called when the first character\n/// of the number is found to be a zero. This means it is either an octal\n/// number (like \'04\') or a hex number (\'0x123a\') a binary number (\'0b1010\') or\n/// a floating point number (01239.123e4). Eat the prefix, determining the\n/// radix etc.\nvoid NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {\n // ...\n // Handle a hex number like 0x1234.\n if ((c1 == \'x\' || c1 == \'X\') && (isHexDigit(s[1]) || s[1] == \'.\')) {\n // ...\n // A binary exponent can appear with or with a \'.\'. If dotted, the\n // binary exponent is required.\n if (*s == \'p\' || *s == \'P\') {\n // ...\n if (!LangOpts.HexFloats)\n Diags.Report(TokLoc, LangOpts.CPlusPlus ? diag::ext_hex_literal_invalid : diag::ext_hex_constant_invalid);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Lexer/rdr-6096838-2.c"]={"clang/test/Lexer/rdr-6096838-2.c:5:17: warning: hexadecimal floating constants are a C99 feature [-Wc99-extensions]"} | ["clang/test/Lexer/rdr-6096838-2.c"]={"clang/test/Lexer/rdr-6096838-2.c:5:17: warning: hexadecimal floating constants are a C99 feature [-Wc99-extensions]"} | ||
| Line 250: | Line 251: | ||
}, | }, | ||
["ext_hex_literal_invalid"]={ | ["ext_hex_literal_invalid"]={ | ||
[ | [l]={Y,Cb,t}, | ||
[ | [k]=Y, | ||
[ | [i]="ext_hex_literal_invalid", | ||
[b]="hexadecimal floating literals are a C++1z feature", | [b]="hexadecimal floating literals are a C++1z feature", | ||
[ | [g]="hexadecimal floating literals are a C++1z feature", | ||
[ | [f]=n, | ||
[ | [e]="hexadecimal floating literals are a C\\+\\+17 feature", | ||
[ | [c]=zb, | ||
[ | [a]=B, | ||
[ | [h]={"560a3579b29a",1457130726,"Update diagnostics now that hexadecimal literals look likely to be part of C++17.","Update diagnostics now that hexadecimal literals look likely to be part of C++17.\n\nllvm-svn: 262753"}, | ||
[ | [d]={{Yb,1329,"/// ParseNumberStartingWithZero - This method is called when the first character\n/// of the number is found to be a zero. This means it is either an octal\n/// number (like \'04\') or a hex number (\'0x123a\') a binary number (\'0b1010\') or\n/// a floating point number (01239.123e4). Eat the prefix, determining the\n/// radix etc.\nvoid NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {\n // ...\n // Handle a hex number like 0x1234.\n if ((c1 == \'x\' || c1 == \'X\') && (isHexDigit(s[1]) || s[1] == \'.\')) {\n // ...\n // A binary exponent can appear with or with a \'.\'. If dotted, the\n // binary exponent is required.\n if (*s == \'p\' || *s == \'P\') {\n // ...\n if (!LangOpts.HexFloats)\n Diags.Report(TokLoc, LangOpts.CPlusPlus ? diag::ext_hex_literal_invalid : diag::ext_hex_constant_invalid);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Lexer/hexfloat.cpp"]={"clang/test/Lexer/hexfloat.cpp:7:11: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]","clang/test/Lexer/hexfloat.cpp:8:12: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]","clang/test/Lexer/hexfloat.cpp:9:11: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]","clang/test/Lexer/hexfloat.cpp:10:12: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]"} | ["clang/test/Lexer/hexfloat.cpp"]={"clang/test/Lexer/hexfloat.cpp:7:11: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]","clang/test/Lexer/hexfloat.cpp:8:12: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]","clang/test/Lexer/hexfloat.cpp:9:11: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]","clang/test/Lexer/hexfloat.cpp:10:12: warning: hexadecimal floating literals are a C++17 feature [-Wc++17-extensions]"} | ||
| Line 266: | Line 267: | ||
}, | }, | ||
["ext_hlsl_access_specifiers"]={ | ["ext_hlsl_access_specifiers"]={ | ||
[ | [l]={"hlsl-extensions"}, | ||
[ | [k]="hlsl-extensions", | ||
[ | [i]={{nil,y,"ext_hlsl_access_specifiers"}}, | ||
[b]={{nil, | [b]={{nil,y,"access specifiers are a clang HLSL extension"}}, | ||
[ | [g]={{nil,y,"access specifiers are a clang HLSL extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="access specifiers are a clang HLSL extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Whlsl\\-extensions[^\\]]*\\]", | ||
[ | [a]={{nil,y,u}}, | ||
[ | [h]={"0d6b574b8717",1651158800,"[HLSL] Adjust access specifier behavior","[HLSL] Adjust access specifier behavior\n\nHLSL doesn\'t support access specifiers. This change has two components:\n\n1) Make default access for classes public\n2) Diagnose the use of access specifiers as a clang HLSL extension\n\nAs long as the default behavior for access specifiers matches HLSL,\nallowing them to be used doesn\'t cause sourece incompatability with\nvalid code. As such enabling them as a clang extension seems like a\nreasonable approach.\n\nFixes #55124\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D124487"}, | ||
[ | [d]={{R,2271,"/// ParseBaseSpecifier - Parse a C++ base-specifier. A base-specifier is\n/// one entry in the base class list of a class specifier, for example:\n/// class foo : public bar, virtual private baz {\n/// \'public bar\' and \'virtual private baz\' are each base-specifiers.\n///\n/// base-specifier: [C++ class.derived]\n/// attribute-specifier-seq[opt] base-type-specifier\n/// attribute-specifier-seq[opt] \'virtual\' access-specifier[opt]\n/// base-type-specifier\n/// attribute-specifier-seq[opt] access-specifier \'virtual\'[opt]\n/// base-type-specifier\nBaseResult Parser::ParseBaseSpecifier(Decl *ClassDecl) {\n // ...\n if (Access != AS_none) {\n // ...\n if (getLangOpts().HLSL)\n Diag(Tok.getLocation(), diag::ext_hlsl_access_specifiers);"},{R,3378,"Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclarationWithPragmas(AccessSpecifier &AS, ParsedAttributes &AccessAttrs, DeclSpec::TST TagType, Decl *TagDecl) {\n // ...\n case tok::kw_public:\n case tok::kw_protected: {\n if (getLangOpts().HLSL)\n Diag(Tok.getLocation(), diag::ext_hlsl_access_specifiers);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ParserHLSL/access_specifiers.hlsl"]={"clang/test/ParserHLSL/access_specifiers.hlsl:12:1: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:14:1: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:18:24: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:26:24: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:30:31: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]"} | ["clang/test/ParserHLSL/access_specifiers.hlsl"]={"clang/test/ParserHLSL/access_specifiers.hlsl:12:1: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:14:1: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:18:24: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:26:24: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]","clang/test/ParserHLSL/access_specifiers.hlsl:30:31: warning: access specifiers are a clang HLSL extension [-Whlsl-extensions]"} | ||
| Line 282: | Line 283: | ||
}, | }, | ||
["ext_ident_list_in_param"]={ | ["ext_ident_list_in_param"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_ident_list_in_param", | ||
[b]="type-less parameter names in function declaration", | [b]="type-less parameter names in function declaration", | ||
[ | [g]="type-less parameter names in function declaration", | ||
[ | [f]=n, | ||
[ | [e]="type\\-less parameter names in function declaration", | ||
[ | [c]=X, | ||
[ | [a]=G, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{xb,7218,"/// ParseFunctionDeclaratorIdentifierList - While parsing a function declarator\n/// we found a K&R-style identifier list instead of a typed parameter list.\n///\n/// After returning, ParamInfo will hold the parsed parameters.\n///\n/// identifier-list: [C99 6.7.5]\n/// identifier\n/// identifier-list \',\' identifier\n///\nvoid Parser::ParseFunctionDeclaratorIdentifierList(Declarator &D, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo) {\n // ...\n // If there was no identifier specified for the declarator, either we are in\n // an abstract-declarator, or we are in a parameter declarator which was found\n // to be abstract. In abstract-declarators, identifier lists are not valid:\n // diagnose this.\n if (!D.getIdentifier())\n Diag(Tok, diag::ext_ident_list_in_param);"}} | ||
}, | }, | ||
["ext_imaginary_constant"]={ | ["ext_imaginary_constant"]={ | ||
[ | [l]={W,"gnu-imaginary-constant",t}, | ||
[ | [k]="gnu-imaginary-constant", | ||
[ | [i]="ext_imaginary_constant", | ||
[b]="imaginary constants are a GNU extension", | [b]="imaginary constants are a GNU extension", | ||
[g]="imaginary constants are a GNU extension", | [g]="imaginary constants are a GNU extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-imaginary\\-constant[^\\]]*\\]", | [f]=n, | ||
[ | [e]="imaginary constants are a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-imaginary\\-constant[^\\]]*\\]", | ||
[ | [a]={{nil,E,m},{ab,nil,B}}, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{v,4279,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n // If this is an imaginary literal, create the ImaginaryLiteral wrapper.\n if (Literal.isImaginary) {\n // ...\n Diag(Tok.getLocation(), diag::ext_imaginary_constant);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/exprs.c"]={"clang/test/Sema/exprs.c:43:10: warning: imaginary constants are a GNU extension [-Wgnu-imaginary-constant]"} | ["clang/test/Sema/exprs.c"]={"clang/test/Sema/exprs.c:43:10: warning: imaginary constants are a GNU extension [-Wgnu-imaginary-constant]"} | ||
| Line 311: | Line 312: | ||
}, | }, | ||
["ext_implicit_exception_spec_mismatch"]={ | ["ext_implicit_exception_spec_mismatch"]={ | ||
[ | [l]={"implicit-exception-spec-mismatch"}, | ||
[ | [k]="implicit-exception-spec-mismatch", | ||
[ | [i]="ext_implicit_exception_spec_mismatch", | ||
[b]="function previously declared with an %select{explicit|implicit}0 exception specification redeclared with an %select{implicit|explicit}0 exception specification", | [b]="function previously declared with an %select{explicit|implicit}0 exception specification redeclared with an %select{implicit|explicit}0 exception specification", | ||
[ | [g]={{nil,nil,{"function previously declared with an ",{"explicit",dc}," exception specification redeclared with an ",{dc,"explicit"}," exception specification"}}}, | ||
[ | [f]=n, | ||
[ | [e]="function previously declared with an (?:explicit|implicit) exception specification redeclared with an (?:implicit|explicit) exception specification", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wimplicit\\-exception\\-spec\\-mismatch[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"66f3ac9d2197",1350721611,"Rework implementation of DR1492: Apply the resolution to operator delete too,","Rework implementation of DR1492: Apply the resolution to operator delete too,\nsince it also has an implicit exception specification. Downgrade the error to\nan extwarn, since at least for operator delete, system headers like to declare\nit as \'noexcept\' whereas the implicit definition does not have an explicit\nexception specification. Move the exception specification for user-declared\n\'operator delete\' functions from the type-as-written into the type, to reflect\nreality and to allow us to detect whether there was an implicit exception spec\nor not.\n\nllvm-svn: 166372"}, | ||
[ | [d]={{Qb,340,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n // Check the types as written: they must match before any exception\n // specification adjustment is applied.\n if (!CheckEquivalentExceptionSpecImpl(*this, PDiag(DiagID), PDiag(diag::note_previous_declaration), Old->getType()->getAs<FunctionProtoType>(), Old->getLocation(), New->getType()->getAs<FunctionProtoType>(), New->getLocation(), &MissingExceptionSpecification, &MissingEmptyExceptionSpecification,\n // ...\n // C++11 [except.spec]p4 [DR1492]:\n // If a declaration of a function has an implicit\n // exception-specification, other declarations of the function shall\n // not specify an exception-specification.\n if (getLangOpts().CPlusPlus11 && getLangOpts().CXXExceptions && hasImplicitExceptionSpec(Old) != hasImplicitExceptionSpec(New)) {\n Diag(New->getLocation(), diag::ext_implicit_exception_spec_mismatch) << hasImplicitExceptionSpec(Old);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/special/class.dtor/p3.cpp"]={"clang/test/CXX/special/class.dtor/p3.cpp:7:6: warning: function previously declared with an implicit exception specification redeclared with an explicit exception specification [-Wimplicit-exception-spec-mismatch]","clang/test/CXX/special/class.dtor/p3.cpp:10:6: warning: function previously declared with an explicit exception specification redeclared with an implicit exception specification [-Wimplicit-exception-spec-mismatch]"} | ["clang/test/CXX/special/class.dtor/p3.cpp"]={"clang/test/CXX/special/class.dtor/p3.cpp:7:6: warning: function previously declared with an implicit exception specification redeclared with an explicit exception specification [-Wimplicit-exception-spec-mismatch]","clang/test/CXX/special/class.dtor/p3.cpp:10:6: warning: function previously declared with an explicit exception specification redeclared with an implicit exception specification [-Wimplicit-exception-spec-mismatch]"} | ||
| Line 327: | Line 328: | ||
}, | }, | ||
["ext_implicit_function_decl_c99"]={ | ["ext_implicit_function_decl_c99"]={ | ||
[ | [l]={jb,qb,dc,tc,pb}, | ||
[ | [k]=tc, | ||
[ | [i]={{nil,y,"ext_implicit_function_decl_c99"}}, | ||
[b]={{nil, | [b]={{nil,y,"call to undeclared function %0; ISO C99 and later do not support implicit function declarations"}}, | ||
[ | [g]={{nil,y,"call to undeclared function A; ISO C99 and later do not support implicit function declarations"}}, | ||
[ | [f]=Q, | ||
[ | [e]="call to undeclared function (.*?); ISO C99 and later do not support implicit function declarations", | ||
[ | [c]=" \\[[^\\]]*\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", | ||
[ | [a]={{nil,y,m}}, | ||
[ | [h]={fd,1620530452,Wc,dd}, | ||
[ | [d]={{w,16053,"/// ImplicitlyDefineFunction - An undeclared identifier was used in a function\n/// call, forming a call to an implicitly defined function (per C99 6.5.1p2).\nNamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II, Scope *S) {\n // ...\n if (II.getName().startswith(\"__builtin_\"))\n // ...\n // OpenCL v2.0 s6.9.u - Implicit function declaration is not supported.\n else if (getLangOpts().C99)\n diag_id = diag::ext_implicit_function_decl_c99;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/cxx-as-c.c"]={"clang/test/Sema/cxx-as-c.c:5:16: error: call to undeclared function \'n_\'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]"} | ["clang/test/Sema/cxx-as-c.c"]={"clang/test/Sema/cxx-as-c.c:5:16: error: call to undeclared function \'n_\'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]"} | ||
| Line 343: | Line 344: | ||
}, | }, | ||
["ext_implicit_lib_function_decl"]={ | ["ext_implicit_lib_function_decl"]={ | ||
[ | [l]={jb,qb,dc,tc,pb}, | ||
[ | [k]=tc, | ||
[ | [i]="ext_implicit_lib_function_decl", | ||
[b]="implicitly declaring library function \'%0\' with type %1", | [b]="implicitly declaring library function \'%0\' with type %1", | ||
[ | [g]="implicitly declaring library function \'A\' with type B", | ||
[ | [f]=n, | ||
[ | [e]="implicitly declaring library function \'(.*?)\' with type (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{w,2468,"/// LazilyCreateBuiltin - The specified Builtin-ID was first used at\n/// file scope. lazily create a decl for it. ForRedeclaration is true\n/// if we\'re creating this built-in in anticipation of redeclaring the\n/// built-in.\nNamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc) {\n // ...\n if (!ForRedeclaration && (Context.BuiltinInfo.isPredefinedLibFunction(ID) || Context.BuiltinInfo.isHeaderDependentFunction(ID))) {\n Diag(Loc, LangOpts.C99 ? diag::ext_implicit_lib_function_decl_c99 : diag::ext_implicit_lib_function_decl) << Context.BuiltinInfo.getName(ID) << R;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/implicit-intel-builtin-decl.c"]={"clang/test/Sema/implicit-intel-builtin-decl.c:5:9: warning: implicitly declaring library function \'_mm_getcsr\' with type \'unsigned int () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:8:3: warning: implicitly declaring library function \'_mm_setcsr\' with type \'void (unsigned int) noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:11:3: warning: implicitly declaring library function \'_mm_sfence\' with type \'void () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:15:3: warning: implicitly declaring library function \'_mm_clflush\' with type \'void (const void *) noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:18:3: warning: implicitly declaring library function \'_mm_lfence\' with type \'void () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:21:3: warning: implicitly declaring library function \'_mm_mfence\' with type \'void () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:24:3: warning: implicitly declaring library function \'_mm_pause\' with type \'void () noexcept\' [-Wimplicit-function-declaration]"} | ["clang/test/Sema/implicit-intel-builtin-decl.c"]={"clang/test/Sema/implicit-intel-builtin-decl.c:5:9: warning: implicitly declaring library function \'_mm_getcsr\' with type \'unsigned int () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:8:3: warning: implicitly declaring library function \'_mm_setcsr\' with type \'void (unsigned int) noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:11:3: warning: implicitly declaring library function \'_mm_sfence\' with type \'void () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:15:3: warning: implicitly declaring library function \'_mm_clflush\' with type \'void (const void *) noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:18:3: warning: implicitly declaring library function \'_mm_lfence\' with type \'void () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:21:3: warning: implicitly declaring library function \'_mm_mfence\' with type \'void () noexcept\' [-Wimplicit-function-declaration]","clang/test/Sema/implicit-intel-builtin-decl.c:24:3: warning: implicitly declaring library function \'_mm_pause\' with type \'void () noexcept\' [-Wimplicit-function-declaration]"} | ||
| Line 359: | Line 360: | ||
}, | }, | ||
["ext_implicit_lib_function_decl_c99"]={ | ["ext_implicit_lib_function_decl_c99"]={ | ||
[ | [l]={jb,qb,dc,tc,pb}, | ||
[ | [k]=tc, | ||
[ | [i]={{nil,y,"ext_implicit_lib_function_decl_c99"}}, | ||
[b]={{nil, | [b]={{nil,y,"call to undeclared library function \'%0\' with type %1; ISO C99 and later do not support implicit function declarations"}}, | ||
[ | [g]={{nil,y,"call to undeclared library function \'A\' with type B; ISO C99 and later do not support implicit function declarations"}}, | ||
[ | [f]=Q, | ||
[ | [e]="call to undeclared library function \'(.*?)\' with type (.*?); ISO C99 and later do not support implicit function declarations", | ||
[ | [c]=" \\[[^\\]]*\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", | ||
[ | [a]={{nil,y,m}}, | ||
[ | [h]={fd,1620530452,Wc,dd}, | ||
[ | [d]={{w,2467,"/// LazilyCreateBuiltin - The specified Builtin-ID was first used at\n/// file scope. lazily create a decl for it. ForRedeclaration is true\n/// if we\'re creating this built-in in anticipation of redeclaring the\n/// built-in.\nNamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc) {\n // ...\n if (!ForRedeclaration && (Context.BuiltinInfo.isPredefinedLibFunction(ID) || Context.BuiltinInfo.isHeaderDependentFunction(ID))) {\n Diag(Loc, LangOpts.C99 ? diag::ext_implicit_lib_function_decl_c99 : diag::ext_implicit_lib_function_decl) << Context.BuiltinInfo.getName(ID) << R;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/ivar-lookup-resolution-builtin.m"]={"clang/test/SemaObjC/ivar-lookup-resolution-builtin.m:31:10: error: call to undeclared library function \'index\' with type \'char *(const char *, int)\'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]"} | ["clang/test/SemaObjC/ivar-lookup-resolution-builtin.m"]={"clang/test/SemaObjC/ivar-lookup-resolution-builtin.m:31:10: error: call to undeclared library function \'index\' with type \'char *(const char *, int)\'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]"} | ||
| Line 375: | Line 376: | ||
}, | }, | ||
["ext_implicit_typename"]={ | ["ext_implicit_typename"]={ | ||
[ | [l]={kb,hc}, | ||
[ | [k]=kb, | ||
[ | [i]={{nil,P,"ext_implicit_typename"}}, | ||
[b]={{nil, | [b]={{nil,P,"missing \'typename\' prior to dependent type name %0%1; implicit \'typename\' is a C++20 extension"}}, | ||
[ | [g]={{nil,P,"missing \'typename\' prior to dependent type name AB; implicit \'typename\' is a C++20 extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="missing \'typename\' prior to dependent type name (.*?)(.*?); implicit \'typename\' is a C\\+\\+20 extension", | ||
[ | [c]=cc, | ||
[ | [a]={{nil,P,m}}, | ||
[ | [h]={ic,1625925174,fc,ec}, | ||
[ | [d]={{w,374,"/// If the identifier refers to a type name within this scope,\n/// return the declaration of that type.\n///\n/// This routine performs ordinary name lookup of the identifier II\n/// within the given scope, with optional C++ scope specifier SS, to\n/// determine whether the name refers to a type. If so, returns an\n/// opaque pointer (actually a QualType) corresponding to that\n/// type. Otherwise, returns NULL.\nParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS, bool isClassName, bool HasTrailingDot, ParsedType ObjectTypePtr, bool IsCtorOrDtorName, bool WantNontrivialTypeSourceInfo, bool IsClassTemplateDeductionContext, ImplicitTypenameContext AllowImplicitTypename, IdentifierInfo **CorrectedII) {\n // ...\n if (ObjectTypePtr) {\n // ...\n } else if (SS && SS->isNotEmpty()) {\n // ...\n if (!LookupCtx) {\n if (isDependentScopeSpecifier(*SS)) {\n // ...\n if (IsImplicitTypename) {\n // ...\n if (getLangOpts().CPlusPlus20)\n // ...\n else\n Diag(QualifiedLoc, diag::ext_implicit_typename) << SS->getScopeRep() << II.getName() << FixItHint::CreateInsertion(QualifiedLoc, \"typename \");"},{O,4149,"TypeResult Sema::ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, bool IsCtorOrDtorName, bool IsClassName, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n if (!IsCtorOrDtorName && !IsClassName && SS.isSet()) {\n // ...\n // C++ [temp.res]p3:\n // A qualified-id that refers to a type and in which the\n // nested-name-specifier depends on a template-parameter (14.6.2)\n // shall be prefixed by the keyword typename to indicate that the\n // qualified-id denotes a type, forming an\n // elaborated-type-specifier (7.1.5.3).\n if (!LookupCtx && isDependentScopeSpecifier(SS)) {\n // C++2a relaxes some of those restrictions in [temp.res]p5.\n if (AllowImplicitTypename == ImplicitTypenameContext::Yes) {\n if (getLangOpts().CPlusPlus20)\n // ...\n else\n Diag(SS.getBeginLoc(), diag::ext_implicit_typename) << SS.getScopeRep() << TemplateII->getName() << FixItHint::CreateInsertion(SS.getBeginLoc(), \"typename \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/rounding-math-crash.cpp"]={"clang/test/SemaCXX/rounding-math-crash.cpp:3:20: warning: missing \'typename\' prior to dependent type name b::a; implicit \'typename\' is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/SemaCXX/rounding-math-crash.cpp"]={"clang/test/SemaCXX/rounding-math-crash.cpp:3:20: warning: missing \'typename\' prior to dependent type name b::a; implicit \'typename\' is a C++20 extension [-Wc++20-extensions]"} | ||
| Line 391: | Line 392: | ||
}, | }, | ||
["ext_in_class_initializer_float_type"]={ | ["ext_in_class_initializer_float_type"]={ | ||
[ | [l]={W,"gnu-static-float-init","static-float-init"}, | ||
[ | [k]="gnu-static-float-init", | ||
[ | [i]="ext_in_class_initializer_float_type", | ||
[b]="in-class initializer for static data member of type %0 is a GNU extension", | [b]="in-class initializer for static data member of type %0 is a GNU extension", | ||
[ | [g]="in-class initializer for static data member of type A is a GNU extension", | ||
[ | [f]=n, | ||
[ | [e]="in\\-class initializer for static data member of type (.*?) is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-static\\-float\\-init[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"db76892e72e4",1284160882,"Support in-class initialization of static const floating-point data members.","Support in-class initialization of static const floating-point data members.\n\nllvm-svn: 113663"}, | ||
[ | [d]={{w,13521,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // ...\n if (VDecl->isLocalVarDecl()) {\n // ...\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // ...\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n // ...\n } else if (VDecl->isConstexpr()) {\n // ...\n } else if (!DclT.isConstQualified()) {\n // ...\n } else if (DclT->isIntegralOrEnumerationType()) {\n // ...\n } else if (DclT->isFloatingType()) { // also permits complex, which is ok\n // In C++98, this is a GNU extension. In C++11, it is not, but we support\n // it anyway and provide a fixit to add the \'constexpr\'.\n if (getLangOpts().CPlusPlus11) {\n // ...\n } else {\n Diag(VDecl->getLocation(), diag::ext_in_class_initializer_float_type) << DclT << Init->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:190:24: warning: in-class initializer for static data member of type \'const float\' is a GNU extension [-Wgnu-static-float-init]","clang/test/SemaCXX/class.cpp:191:24: warning: in-class initializer for static data member of type \'const float\' is a GNU extension [-Wgnu-static-float-init]"} | ["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:190:24: warning: in-class initializer for static data member of type \'const float\' is a GNU extension [-Wgnu-static-float-init]","clang/test/SemaCXX/class.cpp:191:24: warning: in-class initializer for static data member of type \'const float\' is a GNU extension [-Wgnu-static-float-init]"} | ||
| Line 407: | Line 408: | ||
}, | }, | ||
["ext_in_class_initializer_float_type_cxx11"]={ | ["ext_in_class_initializer_float_type_cxx11"]={ | ||
[ | [l]={"static-float-init"}, | ||
[ | [k]="static-float-init", | ||
[ | [i]="ext_in_class_initializer_float_type_cxx11", | ||
[b]="in-class initializer for static data member of type %0 requires \'constexpr\' specifier", | [b]="in-class initializer for static data member of type %0 requires \'constexpr\' specifier", | ||
[ | [g]="in-class initializer for static data member of type A requires \'constexpr\' specifier", | ||
[ | [f]=Q, | ||
[ | [e]="in\\-class initializer for static data member of type (.*?) requires \'constexpr\' specifier", | ||
[ | [c]=" \\[[^\\]]*\\-Wstatic\\-float\\-init[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"cf656385ea2d",1359087736,"Sync \'in class initialization of static const double\' extension up with GCC,","Sync \'in class initialization of static const double\' extension up with GCC,\nand split it out of -Wgnu into its own warning flag.\n\n * In C++11, this is now a hard error (GCC has no extension here in C++11 mode).\n The error can be disabled with -Wno-static-float-init, and has a fixit to\n add \'constexpr\'.\n\n * In C++98, this is still an ExtWarn, but is now controlled by\n -Wstatic-float-init as well as -Wgnu.\n\nllvm-svn: 173414"}, | ||
[ | [d]={{w,13515,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // ...\n if (VDecl->isLocalVarDecl()) {\n // ...\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // ...\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n // ...\n } else if (VDecl->isConstexpr()) {\n // ...\n } else if (!DclT.isConstQualified()) {\n // ...\n } else if (DclT->isIntegralOrEnumerationType()) {\n // ...\n } else if (DclT->isFloatingType()) { // also permits complex, which is ok\n // In C++98, this is a GNU extension. In C++11, it is not, but we support\n // it anyway and provide a fixit to add the \'constexpr\'.\n if (getLangOpts().CPlusPlus11) {\n Diag(VDecl->getLocation(), diag::ext_in_class_initializer_float_type_cxx11) << DclT << Init->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx0x-class.cpp"]={"clang/test/SemaCXX/cxx0x-class.cpp:23:24: warning: in-class initializer for static data member of type \'const float\' requires \'constexpr\' specifier [-Wstatic-float-init]","clang/test/SemaCXX/cxx0x-class.cpp:24:24: warning: in-class initializer for static data member of type \'const float\' requires \'constexpr\' specifier [-Wstatic-float-init]"} | ["clang/test/SemaCXX/cxx0x-class.cpp"]={"clang/test/SemaCXX/cxx0x-class.cpp:23:24: warning: in-class initializer for static data member of type \'const float\' requires \'constexpr\' specifier [-Wstatic-float-init]","clang/test/SemaCXX/cxx0x-class.cpp:24:24: warning: in-class initializer for static data member of type \'const float\' requires \'constexpr\' specifier [-Wstatic-float-init]"} | ||
| Line 423: | Line 424: | ||
}, | }, | ||
["ext_in_class_initializer_non_constant"]={ | ["ext_in_class_initializer_non_constant"]={ | ||
[ | [l]={W,"gnu-folding-constant",t}, | ||
[ | [k]="gnu-folding-constant", | ||
[ | [i]="ext_in_class_initializer_non_constant", | ||
[b]="in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension", | [b]="in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension", | ||
[ | [g]="in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension", | ||
[ | [f]=n, | ||
[ | [e]="in\\-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-folding\\-constant[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"9925ec8bf446",1308030389,"fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member","fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member\nas an extension.\n\nllvm-svn: 132980"}, | ||
[ | [d]={{w,13499,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // ...\n if (VDecl->isLocalVarDecl()) {\n // ...\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // ...\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n // ...\n } else if (VDecl->isConstexpr()) {\n // ...\n } else if (!DclT.isConstQualified()) {\n // ...\n } else if (DclT->isIntegralOrEnumerationType()) {\n // ...\n if (getLangOpts().CPlusPlus11 && DclT.isVolatileQualified())\n // ...\n else if (Init->isValueDependent())\n // ...\n else if (Init->isIntegerConstantExpr(Context, &Loc))\n // ...\n else if (Init->getType()->isScopedEnumeralType() && Init->isCXX11ConstantExpr(Context))\n // ...\n else if (Init->isEvaluatable(Context)) {\n // ...\n Diag(Loc, diag::ext_in_class_initializer_non_constant) << Init->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/i-c-e-cxx.cpp"]={"clang/test/SemaCXX/i-c-e-cxx.cpp:60:28: warning: in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension [-Wgnu-folding-constant]"} | ["clang/test/SemaCXX/i-c-e-cxx.cpp"]={"clang/test/SemaCXX/i-c-e-cxx.cpp:60:28: warning: in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension [-Wgnu-folding-constant]"} | ||
| Line 439: | Line 440: | ||
}, | }, | ||
["ext_incomplete_in_exception_spec"]={ | ["ext_incomplete_in_exception_spec"]={ | ||
[ | [l]={F,Xb}, | ||
[ | [k]=Xb, | ||
[ | [i]="ext_incomplete_in_exception_spec", | ||
[b]="%select{|pointer to |reference to }0incomplete type %1 is not allowed in exception specification", | [b]="%select{|pointer to |reference to }0incomplete type %1 is not allowed in exception specification", | ||
[ | [g]={{nil,nil,{{o,"pointer to ","reference to "},"incomplete type B is not allowed in exception specification"}}}, | ||
[ | [f]=n, | ||
[ | [e]="(?:|pointer to |reference to )incomplete type (.*?) is not allowed in exception specification", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-exception\\-spec[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"b2b0da4ad08d",1465583081,"[-fms-extensions] Permit incomplete types in dynamic exception specifications","[-fms-extensions] Permit incomplete types in dynamic exception specifications\n\nMicrosoft headers, comdef.h and comutil.h, assume that this is an OK\nthing to do. Downgrade the hard error to a warning if we are in\n-fms-extensions mode.\n\nThis fixes PR28080.\n\nllvm-svn: 272412"}, | ||
[ | [d]={{Qb,168,"/// CheckSpecifiedExceptionType - Check if the given type is valid in an\n/// exception specification. Incomplete types, or pointers to incomplete types\n/// other than void are not allowed.\n///\n/// \\param[in,out] T The exception type. This will be decayed to a pointer type\n/// when the input is an array or a function type.\nbool Sema::CheckSpecifiedExceptionType(QualType &T, SourceRange Range) {\n // ...\n if (getLangOpts().MSVCCompat) {\n DiagID = diag::ext_incomplete_in_exception_spec;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/ms-exception-spec.cpp"]={"clang/test/SemaCXX/ms-exception-spec.cpp:19:17: warning: incomplete type \'S\' is not allowed in exception specification [-Wmicrosoft-exception-spec]"} | ["clang/test/SemaCXX/ms-exception-spec.cpp"]={"clang/test/SemaCXX/ms-exception-spec.cpp:19:17: warning: incomplete type \'S\' is not allowed in exception specification [-Wmicrosoft-exception-spec]"} | ||
| Line 455: | Line 456: | ||
}, | }, | ||
["ext_increment_bool"]={ | ["ext_increment_bool"]={ | ||
[ | [l]={"increment-bool"}, | ||
[ | [k]="increment-bool", | ||
[ | [i]="ext_increment_bool", | ||
[b]="ISO C++1z does not allow incrementing expression of type bool", | [b]="ISO C++1z does not allow incrementing expression of type bool", | ||
[ | [g]="ISO C++1z does not allow incrementing expression of type bool", | ||
[ | [f]=Q, | ||
[ | [e]="ISO C\\+\\+17 does not allow incrementing expression of type bool", | ||
[ | [c]=" \\[[^\\]]*\\-Wincrement\\-bool[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"4a0cd893257d",1448504197,"P0002R1: increment on expressions of type bool is no longer allowed in C++1z.","P0002R1: increment on expressions of type bool is no longer allowed in C++1z.\n\nllvm-svn: 254122"}, | ||
[ | [d]={{v,14703,"/// CheckIncrementDecrementOperand - unlike most \"Check\" methods, this routine\n/// doesn\'t need to call UsualUnaryConversions or UsualArithmeticConversions.\nstatic QualType CheckIncrementDecrementOperand(Sema &S, Expr *Op, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation OpLoc, bool IsInc, bool IsPrefix) {\n // ...\n if (S.getLangOpts().CPlusPlus && ResType->isBooleanType()) {\n // ...\n S.Diag(OpLoc, S.getLangOpts().CPlusPlus17 ? diag::ext_increment_bool : diag::warn_increment_bool) << Op->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/over/over.built/p4.cpp"]={"clang/test/CXX/over/over.built/p4.cpp:7:9: error: ISO C++17 does not allow incrementing expression of type bool [-Wincrement-bool]","clang/test/CXX/over/over.built/p4.cpp:8:10: error: ISO C++17 does not allow incrementing expression of type bool [-Wincrement-bool]"} | ["clang/test/CXX/over/over.built/p4.cpp"]={"clang/test/CXX/over/over.built/p4.cpp:7:9: error: ISO C++17 does not allow incrementing expression of type bool [-Wincrement-bool]","clang/test/CXX/over/over.built/p4.cpp:8:10: error: ISO C++17 does not allow incrementing expression of type bool [-Wincrement-bool]"} | ||
| Line 471: | Line 472: | ||
}, | }, | ||
["ext_init_capture"]={ | ["ext_init_capture"]={ | ||
[ | [l]={"c++14-extensions","c++1y-extensions"}, | ||
[ | [k]="c++14-extensions", | ||
[ | [i]="ext_init_capture", | ||
[b]="initialized lambda captures are a C++14 extension", | [b]="initialized lambda captures are a C++14 extension", | ||
[ | [g]="initialized lambda captures are a C++14 extension", | ||
[ | [f]=n, | ||
[ | [e]="initialized lambda captures are a C\\+\\+14 extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+14\\-extensions[^\\]]*\\]", | ||
[ | [a]="Lambda Issue", | ||
[ | [h]={"5b013f505068",1380346707,"Add compat/extension warnings for init captures.","Add compat/extension warnings for init captures.\n\nllvm-svn: 191609"}, | ||
[ | [d]={{"clang/lib/Sema/SemaLambda.cpp",1072,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n // ...\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n // ...\n if (C->Init.isUsable()) {\n Diag(C->Loc, getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_init_capture : diag::ext_init_capture);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/objcxx11-invalid-lambda.cpp"]={"clang/test/Parser/objcxx11-invalid-lambda.cpp:6:7: warning: initialized lambda captures are a C++14 extension [-Wc++14-extensions]"} | ["clang/test/Parser/objcxx11-invalid-lambda.cpp"]={"clang/test/Parser/objcxx11-invalid-lambda.cpp:6:7: warning: initialized lambda captures are a C++14 extension [-Wc++14-extensions]"} | ||
| Line 487: | Line 488: | ||
}, | }, | ||
["ext_init_capture_pack"]={ | ["ext_init_capture_pack"]={ | ||
[ | [l]={kb,hc}, | ||
[ | [k]=kb, | ||
[ | [i]={{nil,r,"ext_init_capture_pack"}}, | ||
[b]={{nil,p,"initialized lambda pack captures are a C++20 extension"},{r,r,"initialized lambda pack captures are a C++2a extension"}}, | [b]={{nil,p,"initialized lambda pack captures are a C++20 extension"},{r,r,"initialized lambda pack captures are a C++2a extension"}}, | ||
[ | [g]={{nil,p,"initialized lambda pack captures are a C++20 extension"},{r,r,"initialized lambda pack captures are a C++2a extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="initialized lambda pack captures are a C\\+\\+20 extension", | ||
[ | [c]=cc, | ||
[ | [a]={{nil,r,"Lambda Issue"}}, | ||
[ | [h]={"b2997f579a8b",1558469450,"[c++20] P0780R2: Support pack-expansion of init-captures.","[c++20] P0780R2: Support pack-expansion of init-captures.\n\nThis permits an init-capture to introduce a new pack:\n\n template<typename ...T> auto x = [...a = T()] { /* a is a pack */ };\n\nTo support this, the mechanism for allowing ParmVarDecls to be packs has\nbeen extended to support arbitrary local VarDecls.\n\nllvm-svn: 361300"}, | ||
[ | [d]={{"clang/lib/Sema/SemaLambda.cpp",729,"QualType Sema::buildLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, std::optional<unsigned> NumExpansions, IdentifierInfo *Id, bool IsDirectInit, Expr *&Init) {\n // ...\n if (EllipsisLoc.isValid()) {\n if (Init->containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_init_capture_pack : diag::ext_init_capture_pack);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/sizeof-pack.cpp"]={"clang/test/SemaTemplate/sizeof-pack.cpp:9:11: warning: initialized lambda pack captures are a C++20 extension [-Wc++20-extensions]"} | ["clang/test/SemaTemplate/sizeof-pack.cpp"]={"clang/test/SemaTemplate/sizeof-pack.cpp:9:11: warning: initialized lambda pack captures are a C++20 extension [-Wc++20-extensions]"} | ||
| Line 503: | Line 504: | ||
}, | }, | ||
["ext_init_from_predefined"]={ | ["ext_init_from_predefined"]={ | ||
[ | [l]={F,"microsoft-init-from-predefined"}, | ||
[ | [k]="microsoft-init-from-predefined", | ||
[ | [i]="ext_init_from_predefined", | ||
[b]="initializing an array from a \'%0\' predefined identifier is a Microsoft extension", | [b]="initializing an array from a \'%0\' predefined identifier is a Microsoft extension", | ||
[ | [g]="initializing an array from a \'A\' predefined identifier is a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="initializing an array from a \'(.*?)\' predefined identifier is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-init\\-from\\-predefined[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={ic,1625925174,fc,ec}, | ||
[ | [d]={{sb,8619,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n if (S.getLangOpts().MicrosoftExt && Args.size() == 1 && isa<PredefinedExpr>(Args[0]) && Entity.getType()->isArrayType()) {\n // ...\n S.Diag(Init->getBeginLoc(), diag::ext_init_from_predefined) << Init;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/ms_predefined_expr.cpp"]={"clang/test/Sema/ms_predefined_expr.cpp:4:19: warning: initializing an array from a \'__FUNCTION__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:5:19: warning: initializing an array from a \'__FUNCDNAME__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:6:19: warning: initializing an array from a \'__FUNCSIG__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:7:19: warning: initializing an array from a \'__func__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:8:19: warning: initializing an array from a \'__PRETTY_FUNCTION__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]"} | ["clang/test/Sema/ms_predefined_expr.cpp"]={"clang/test/Sema/ms_predefined_expr.cpp:4:19: warning: initializing an array from a \'__FUNCTION__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:5:19: warning: initializing an array from a \'__FUNCDNAME__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:6:19: warning: initializing an array from a \'__FUNCSIG__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:7:19: warning: initializing an array from a \'__func__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]","clang/test/Sema/ms_predefined_expr.cpp:8:19: warning: initializing an array from a \'__PRETTY_FUNCTION__\' predefined identifier is a Microsoft extension [-Wmicrosoft-init-from-predefined]"} | ||
| Line 519: | Line 520: | ||
}, | }, | ||
["ext_init_list_constant_narrowing"]={ | ["ext_init_list_constant_narrowing"]={ | ||
[ | [l]={Sc,"c++0x-narrowing",Ac,Jc,Ic,"narrowing"}, | ||
[ | [k]=Ic, | ||
[ | [i]="ext_init_list_constant_narrowing", | ||
[b]="constant expression evaluates to %0 which cannot be narrowed to type %1", | [b]="constant expression evaluates to %0 which cannot be narrowed to type %1", | ||
[ | [g]="constant expression evaluates to A which cannot be narrowed to type B", | ||
[ | [f]=Q, | ||
[ | [e]="constant expression evaluates to (.*?) which cannot be narrowed to type (.*?)", | ||
[ | [c]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a","Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow a flag to be set on the Diagnostic object,\nto mark it as \'causes substitution failure\'.\n\nRefactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior\nrather than a bunch of flags.\n\nllvm-svn: 194444"}, | ||
[ | [d]={{sb,10426,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n // ...\n case NK_Constant_Narrowing:\n // ...\n S.Diag(PostInit->getBeginLoc(), NarrowingErrs(S.getLangOpts()) ? diag::ext_init_list_constant_narrowing : diag::warn_init_list_constant_narrowing) << PostInit->getSourceRange() << ConstantValue.getAsString(S.getASTContext(), ConstantType) << EntityType.getLocalUnqualifiedType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx0x-initializer-scalars.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:48:21: error: constant expression evaluates to 100000 which cannot be narrowed to type \'short\' [-Wc++11-narrowing]","clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:49:24: error: constant expression evaluates to 100000 which cannot be narrowed to type \'short\' [-Wc++11-narrowing]"} | ["clang/test/SemaCXX/cxx0x-initializer-scalars.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:48:21: error: constant expression evaluates to 100000 which cannot be narrowed to type \'short\' [-Wc++11-narrowing]","clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:49:24: error: constant expression evaluates to 100000 which cannot be narrowed to type \'short\' [-Wc++11-narrowing]"} | ||
| Line 535: | Line 536: | ||
}, | }, | ||
["ext_init_list_type_narrowing"]={ | ["ext_init_list_type_narrowing"]={ | ||
[ | [l]={Sc,"c++0x-narrowing",Ac,Jc,Ic,"narrowing"}, | ||
[ | [k]=Ic, | ||
[ | [i]="ext_init_list_type_narrowing", | ||
[b]="type %0 cannot be narrowed to %1 in initializer list", | [b]="type %0 cannot be narrowed to %1 in initializer list", | ||
[ | [g]="type A cannot be narrowed to B in initializer list", | ||
[ | [f]=Q, | ||
[ | [e]="type (.*?) cannot be narrowed to (.*?) in initializer list", | ||
[ | [c]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a","Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow a flag to be set on the Diagnostic object,\nto mark it as \'causes substitution failure\'.\n\nRefactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior\nrather than a bunch of flags.\n\nllvm-svn: 194444"}, | ||
[ | [d]={{sb,10415,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n // ...\n case NK_Type_Narrowing:\n // ...\n S.Diag(PostInit->getBeginLoc(), NarrowingErrs(S.getLangOpts()) ? diag::ext_init_list_type_narrowing : diag::warn_init_list_type_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() << EntityType.getLocalUnqualifiedType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.const/p6.cpp"]={"clang/test/CXX/expr/expr.const/p6.cpp:38:20: error: type \'float\' cannot be narrowed to \'int\' in initializer list [-Wc++11-narrowing]"} | ["clang/test/CXX/expr/expr.const/p6.cpp"]={"clang/test/CXX/expr/expr.const/p6.cpp:38:20: error: type \'float\' cannot be narrowed to \'int\' in initializer list [-Wc++11-narrowing]"} | ||
| Line 551: | Line 552: | ||
}, | }, | ||
["ext_init_list_variable_narrowing"]={ | ["ext_init_list_variable_narrowing"]={ | ||
[ | [l]={Sc,"c++0x-narrowing",Ac,Jc,Ic,"narrowing"}, | ||
[ | [k]=Ic, | ||
[ | [i]="ext_init_list_variable_narrowing", | ||
[b]="non-constant-expression cannot be narrowed from type %0 to %1 in initializer list", | [b]="non-constant-expression cannot be narrowed from type %0 to %1 in initializer list", | ||
[ | [g]="non-constant-expression cannot be narrowed from type A to B in initializer list", | ||
[ | [f]=Q, | ||
[ | [e]="non\\-constant\\-expression cannot be narrowed from type (.*?) to (.*?) in initializer list", | ||
[ | [c]=" \\[[^\\]]*\\-Wc\\+\\+11\\-narrowing[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"16e1b07597f3",1384224105,"Rather than duplicating extension diagnostics to allow them to cause a","Rather than duplicating extension diagnostics to allow them to cause a\nsubstitution failure, allow a flag to be set on the Diagnostic object,\nto mark it as \'causes substitution failure\'.\n\nRefactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior\nrather than a bunch of flags.\n\nllvm-svn: 194444"}, | ||
[ | [d]={{sb,10437,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n // ...\n case NK_Variable_Narrowing:\n // ...\n S.Diag(PostInit->getBeginLoc(), NarrowingErrs(S.getLangOpts()) ? diag::ext_init_list_variable_narrowing : diag::warn_init_list_variable_narrowing) << PostInit->getSourceRange() << PreNarrowingType.getLocalUnqualifiedType() << EntityType.getLocalUnqualifiedType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp:10:9: error: non-constant-expression cannot be narrowed from type \'int\' to \'float\' in initializer list [-Wc++11-narrowing]","clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp:12:9: error: non-constant-expression cannot be narrowed from type \'int\' to \'float\' in initializer list [-Wc++11-narrowing]"} | ["clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp:10:9: error: non-constant-expression cannot be narrowed from type \'int\' to \'float\' in initializer list [-Wc++11-narrowing]","clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp:12:9: error: non-constant-expression cannot be narrowed from type \'int\' to \'float\' in initializer list [-Wc++11-narrowing]"} | ||
| Line 567: | Line 568: | ||
}, | }, | ||
["ext_init_statement"]={ | ["ext_init_statement"]={ | ||
[ | [l]={Y,Cb}, | ||
[ | [k]=Y, | ||
[ | [i]="ext_init_statement", | ||
[b]="\'%select{if|switch}0\' initialization statements are a C++1z extension", | [b]="\'%select{if|switch}0\' initialization statements are a C++1z extension", | ||
[ | [g]={{nil,ab,{"\'",{"if","switch"},"\' initialization statements are a C++17 extension"}},{nil,nil,{"\'",{"if","switch"},"\' initialization statements are a C++1z extension"}}}, | ||
[ | [f]=n, | ||
[ | [e]="\'(?:if|switch)\' initialization statements are a C\\+\\+17 extension", | ||
[ | [c]=zb, | ||
[ | [a]=G, | ||
[ | [h]={"fccb5128b201",1476822436,"Add missing warning for use of C++1z init-statements in C++14 and before.","Add missing warning for use of C++1z init-statements in C++14 and before.\n\nllvm-svn: 284530"}, | ||
[ | [d]={{"clang/lib/Parse/ParseExprCXX.cpp",2075,"/// ParseCXXCondition - if/switch/while condition expression.\n///\n/// condition:\n/// expression\n/// type-specifier-seq declarator \'=\' assignment-expression\n/// [C++11] type-specifier-seq declarator \'=\' initializer-clause\n/// [C++11] type-specifier-seq declarator braced-init-list\n/// [Clang] type-specifier-seq ref-qualifier[opt] \'[\' identifier-list \']\'\n/// brace-or-equal-initializer\n/// [GNU] type-specifier-seq declarator simple-asm-expr[opt] attributes[opt]\n/// \'=\' assignment-expression\n///\n/// In C++1z, a condition may in some contexts be preceded by an\n/// optional init-statement. This function will parse that too.\n///\n/// \\param InitStmt If non-null, an init-statement is permitted, and if present\n/// will be parsed and stored here.\n///\n/// \\param Loc The location of the start of the statement that requires this\n/// condition, e.g., the \"for\" in a for loop.\n///\n/// \\param MissingOK Whether an empty condition is acceptable here. Otherwise\n/// it is considered an error to be recovered from.\n///\n/// \\param FRI If non-null, a for range declaration is permitted, and if\n/// present will be parsed and stored here, and a null result will be returned.\n///\n/// \\param EnterForConditionScope If true, enter a continue/break scope at the\n/// appropriate moment for a \'for\' loop.\n///\n/// \\returns The parsed condition.\nSema::ConditionResult Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, Sema::ConditionKind CK, bool MissingOK, ForRangeInfo *FRI, bool EnterForConditionScope) {\n // ...\n const auto WarnOnInit = [this, &CK] { Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_init_statement : diag::ext_init_statement) << (CK == Sema::ConditionKind::Switch); };"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-c++1z-extensions.cpp"]={"clang/test/SemaCXX/warn-c++1z-extensions.cpp:4:7: warning: \'if\' initialization statements are a C++17 extension [-Wc++17-extensions]","clang/test/SemaCXX/warn-c++1z-extensions.cpp:5:11: warning: \'switch\' initialization statements are a C++17 extension [-Wc++17-extensions]"} | ["clang/test/SemaCXX/warn-c++1z-extensions.cpp"]={"clang/test/SemaCXX/warn-c++1z-extensions.cpp:4:7: warning: \'if\' initialization statements are a C++17 extension [-Wc++17-extensions]","clang/test/SemaCXX/warn-c++1z-extensions.cpp:5:11: warning: \'switch\' initialization statements are a C++17 extension [-Wc++17-extensions]"} | ||
| Line 583: | Line 584: | ||
}, | }, | ||
["ext_initializer_overrides"]={ | ["ext_initializer_overrides"]={ | ||
[ | [l]={o,jb,"extra","initializer-overrides","override-init"}, | ||
[ | [k]="initializer-overrides", | ||
[ | [i]={{nil,p,"ext_initializer_overrides"}}, | ||
[b]={{nil,p,"initializer %select{partially |}0overrides prior initialization of this subobject"}}, | [b]={{nil,p,"initializer %select{partially |}0overrides prior initialization of this subobject"}}, | ||
[ | [g]={{nil,p,{"initializer ",{"partially ",o},"overrides prior initialization of this subobject"}}}, | ||
[ | [f]=n, | ||
[ | [e]="initializer (?:partially |)overrides prior initialization of this subobject", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winitializer\\-overrides[^\\]]*\\]", | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={"5030928d60a1",1567205575,"[c++20] Implement semantic restrictions for C++20 designated","[c++20] Implement semantic restrictions for C++20 designated\ninitializers.\n\nThis has some interesting interactions with our existing extensions to\nsupport C99 designated initializers as an extension in C++. Those are\nresolved as follows:\n\n * We continue to permit the full breadth of C99 designated initializers\n in C++, with the exception that we disallow a partial overwrite of an\n initializer with a non-trivially-destructible type. (Full overwrite\n is OK, because we won\'t run the first initializer at all.)\n\n * The C99 extensions are disallowed in SFINAE contexts and during\n overload resolution, where they could change the meaning of valid\n programs.\n\n * C++20 disallows reordering of initializers. We only check for that for\n the simple cases that the C++20 rules permit (designators of the form\n \'.field_name =\' and continue to allow reordering in other cases).\n It would be nice to improve this behavior in future.\n\n * All C99 designated initializer extensions produce a warning by\n default in C++20 mode. People are going to learn the C++ rules based\n on what Clang diagnoses, so it\'s important we diagnose these properly\n by default.\n\n * In C++ <= 17, we apply the C++20 rules rather than the C99 rules, and\n so still diagnose C99 extensions as described above. We continue to\n accept designated C++20-compatible initializers in C++ <= 17 silently\n by default (but naturally still reject under -pedantic-errors).\n\nThis is not a complete implementation of P0329R4. In particular, that\npaper introduces new non-C99-compatible syntax { .field { init } }, and\nwe do not support that yet.\n\nThis is based on a previous patch by Don Hinton, though I\'ve made\nsubstantial changes when addressing the above interactions.\n\nDifferential Revision: https://reviews.llvm.org/D59754\n\nllvm-svn: 370544"}, | ||
[ | [d]={{sb,415,"/// Semantic checking for initializer lists.\n///\n/// The InitListChecker class contains a set of routines that each\n/// handle the initialization of a certain kind of entity, e.g.,\n/// arrays, vectors, struct/union types, scalars, etc. The\n/// InitListChecker itself performs a recursive walk of the subobject\n/// structure of the type to be initialized, while stepping through\n/// the initializer list one element at a time. The IList and Index\n/// parameters to each of the Check* routines contain the active\n/// (syntactic) initializer list and the index into that initializer\n/// list that represents the current initializer. Each routine is\n/// responsible for moving that Index forward as it consumes elements.\n///\n/// Each Check* routine also has a StructuredList/StructuredIndex\n/// arguments, which contains the current \"structured\" (semantic)\n/// initializer list and the index into that initializer list where we\n/// are copying initializers as we map them over to the semantic\n/// list. Once we have completed our recursive walk of the subobject\n/// structure, we will have constructed a full semantic initializer\n/// list.\n///\n/// C99 designators cause changes in the initializer list traversal,\n/// because they make the initialization \"jump\" into a specific\n/// subobject and then continue the initialization from that\n/// point. CheckDesignatedInitializer() recursively steps into the\n/// designated subobject and manages backing out the recursion to\n/// initialize the subobjects after the one designated.\n///\n/// If an initializer list contains any designators, we build a placeholder\n/// structured list even in \'verify only\' mode, so that we can track which\n/// elements need \'empty\' initializtion.\nclass InitListChecker {\n // ...\n /// Diagnose that OldInit (or part thereof) has been overridden by NewInit.\n void diagnoseInitOverride(Expr *OldInit, SourceRange NewInitRange, bool UnionOverride = false, bool FullyOverwritten = true) {\n // ...\n unsigned DiagID = SemaRef.getLangOpts().CPlusPlus ? (UnionOverride ? diag::ext_initializer_union_overrides : diag::ext_initializer_overrides) : diag::warn_initializer_overrides;"}} | ||
}, | }, | ||
["ext_initializer_string_for_char_array_too_long"]={ | ["ext_initializer_string_for_char_array_too_long"]={ | ||
[ | [l]={"excess-initializers"}, | ||
[ | [k]="excess-initializers", | ||
[ | [i]="ext_initializer_string_for_char_array_too_long", | ||
[b]="initializer-string for char array is too long", | [b]="initializer-string for char array is too long", | ||
[ | [g]="initializer-string for char array is too long", | ||
[ | [f]=n, | ||
[ | [e]="initializer\\-string for char array is too long", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wexcess\\-initializers[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={vb,1405733957,ub,tb}, | ||
[ | [d]={{sb,258,"static void CheckStringInit(Expr *Str, QualType &DeclT, const ArrayType *AT, Sema &S) {\n // ...\n // We have an array of character type with known size. However,\n // the size may be smaller or larger than the string we are initializing.\n // FIXME: Avoid truncation for 64-bit length strings.\n if (S.getLangOpts().CPlusPlus) {\n // ...\n } else {\n // C99 6.7.8p14.\n if (StrLength - 1 > CAT->getSize().getZExtValue())\n S.Diag(Str->getBeginLoc(), diag::ext_initializer_string_for_char_array_too_long) << Str->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGen/globalinit.c"]={"clang/test/CodeGen/globalinit.c:20:19: warning: initializer-string for char array is too long [-Wexcess-initializers]"} | ["clang/test/CodeGen/globalinit.c"]={"clang/test/CodeGen/globalinit.c:20:19: warning: initializer-string for char array is too long [-Wexcess-initializers]"} | ||
| Line 612: | Line 613: | ||
}, | }, | ||
["ext_initializer_union_overrides"]={ | ["ext_initializer_union_overrides"]={ | ||
[ | [l]={o,jb,"extra","initializer-overrides","override-init"}, | ||
[ | [k]="initializer-overrides", | ||
[ | [i]="ext_initializer_union_overrides", | ||
[b]="initializer %select{partially |}0overrides prior initialization of this subobject", | [b]="initializer %select{partially |}0overrides prior initialization of this subobject", | ||
[ | [g]={{nil,nil,{"initializer ",{"partially ",o},"overrides prior initialization of this subobject"}}}, | ||
[ | [f]=Q, | ||
[ | [e]="initializer (?:partially |)overrides prior initialization of this subobject", | ||
[ | [c]=" \\[[^\\]]*\\-Winitializer\\-overrides[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={ic,1625925174,fc,ec}, | ||
[ | [d]={{sb,414,"/// Semantic checking for initializer lists.\n///\n/// The InitListChecker class contains a set of routines that each\n/// handle the initialization of a certain kind of entity, e.g.,\n/// arrays, vectors, struct/union types, scalars, etc. The\n/// InitListChecker itself performs a recursive walk of the subobject\n/// structure of the type to be initialized, while stepping through\n/// the initializer list one element at a time. The IList and Index\n/// parameters to each of the Check* routines contain the active\n/// (syntactic) initializer list and the index into that initializer\n/// list that represents the current initializer. Each routine is\n/// responsible for moving that Index forward as it consumes elements.\n///\n/// Each Check* routine also has a StructuredList/StructuredIndex\n/// arguments, which contains the current \"structured\" (semantic)\n/// initializer list and the index into that initializer list where we\n/// are copying initializers as we map them over to the semantic\n/// list. Once we have completed our recursive walk of the subobject\n/// structure, we will have constructed a full semantic initializer\n/// list.\n///\n/// C99 designators cause changes in the initializer list traversal,\n/// because they make the initialization \"jump\" into a specific\n/// subobject and then continue the initialization from that\n/// point. CheckDesignatedInitializer() recursively steps into the\n/// designated subobject and manages backing out the recursion to\n/// initialize the subobjects after the one designated.\n///\n/// If an initializer list contains any designators, we build a placeholder\n/// structured list even in \'verify only\' mode, so that we can track which\n/// elements need \'empty\' initializtion.\nclass InitListChecker {\n // ...\n /// Diagnose that OldInit (or part thereof) has been overridden by NewInit.\n void diagnoseInitOverride(Expr *OldInit, SourceRange NewInitRange, bool UnionOverride = false, bool FullyOverwritten = true) {\n // ...\n unsigned DiagID = SemaRef.getLangOpts().CPlusPlus ? (UnionOverride ? diag::ext_initializer_union_overrides : diag::ext_initializer_overrides) : diag::warn_initializer_overrides;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2b-designated-initializers.cpp"]={"clang/test/SemaCXX/cxx2b-designated-initializers.cpp:41:9: error: initializer partially overrides prior initialization of this subobject [-Winitializer-overrides]"} | ["clang/test/SemaCXX/cxx2b-designated-initializers.cpp"]={"clang/test/SemaCXX/cxx2b-designated-initializers.cpp:41:9: error: initializer partially overrides prior initialization of this subobject [-Winitializer-overrides]"} | ||
| Line 628: | Line 629: | ||
}, | }, | ||
["ext_inline_namespace"]={ | ["ext_inline_namespace"]={ | ||
[ | [l]={gb,H,"c++11-inline-namespace"}, | ||
[ | [k]="c++11-inline-namespace", | ||
[ | [i]="ext_inline_namespace", | ||
[b]="inline namespaces are a C++11 feature", | [b]="inline namespaces are a C++11 feature", | ||
[ | [g]="inline namespaces are a C++11 feature", | ||
[ | [f]=n, | ||
[ | [e]="inline namespaces are a C\\+\\+11 feature", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-inline\\-namespace[^\\]]*\\]", | ||
[ | [a]=G, | ||
[ | [h]={"5a5f2c76b6f7",1283215005,"Enable inline namespaces in C++03 as an extension.","Enable inline namespaces in C++03 as an extension.\n\nllvm-svn: 112566"}, | ||
[ | [d]={{R,225,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n // If we\'re still good, complain about inline namespaces in non-C++0x now.\n if (InlineLoc.isValid())\n Diag(InlineLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_inline_namespace : diag::ext_inline_namespace);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp:7:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp:8:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp:9:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]"} | ["clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp:7:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp:8:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp:9:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]"} | ||
| Line 644: | Line 645: | ||
}, | }, | ||
["ext_inline_nested_namespace_definition"]={ | ["ext_inline_nested_namespace_definition"]={ | ||
[ | [l]={kb,hc}, | ||
[ | [k]=kb, | ||
[ | [i]={{nil,D,"ext_inline_nested_namespace_definition"}}, | ||
[b]={{nil,p,"inline nested namespace definition is a C++20 extension"},{r, | [b]={{nil,p,"inline nested namespace definition is a C++20 extension"},{r,D,"inline nested namespace definition is a C++2a extension"}}, | ||
[ | [g]={{nil,p,"inline nested namespace definition is a C++20 extension"},{r,D,"inline nested namespace definition is a C++2a extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="inline nested namespace definition is a C\\+\\+20 extension", | ||
[ | [c]=cc, | ||
[ | [a]={{nil,D,G}}, | ||
[ | [h]={"53f391dcb323",1542043188,"Implement P1094R2 (nested inline namespaces)","Implement P1094R2 (nested inline namespaces)\n\nAs approved for the Working Paper in San Diego, support annotating\ninline namespaces with \'inline\'.\n\nChange-Id: I51a654e11ffb475bf27cccb2458768151619e384\nllvm-svn: 346677"}, | ||
[ | [d]={{R,183,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n if (ExtraNSs.empty()) {\n // ...\n } else if (InlineLoc.isValid()) {\n // ...\n } else if (getLangOpts().CPlusPlus20) {\n // ...\n } else if (getLangOpts().CPlusPlus17) {\n // ...\n if (FirstNestedInlineLoc.isValid())\n Diag(FirstNestedInlineLoc, diag::ext_inline_nested_namespace_definition);"},{R,218,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n if (ExtraNSs.empty()) {\n // ...\n } else if (InlineLoc.isValid()) {\n // ...\n } else if (getLangOpts().CPlusPlus20) {\n // ...\n } else if (getLangOpts().CPlusPlus17) {\n // ...\n } else {\n // ...\n // Warn about nested inline namespaces.\n if (FirstNestedInlineLoc.isValid())\n Diag(FirstNestedInlineLoc, diag::ext_inline_nested_namespace_definition);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp"]={"clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:19:27: warning: inline nested namespace definition is a C++20 extension [-Wc++20-extensions]","clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:36:27: warning: inline nested namespace definition is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp"]={"clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:19:27: warning: inline nested namespace definition is a C++20 extension [-Wc++20-extensions]","clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:36:27: warning: inline nested namespace definition is a C++20 extension [-Wc++20-extensions]"} | ||
| Line 660: | Line 661: | ||
}, | }, | ||
["ext_inline_variable"]={ | ["ext_inline_variable"]={ | ||
[ | [l]={Y,Cb}, | ||
[ | [k]=Y, | ||
[ | [i]="ext_inline_variable", | ||
[b]="inline variables are a C++1z extension", | [b]="inline variables are a C++1z extension", | ||
[ | [g]="inline variables are a C++1z extension", | ||
[ | [f]=n, | ||
[ | [e]="inline variables are a C\\+\\+17 extension", | ||
[ | [c]=zb, | ||
[ | [a]=m, | ||
[ | [h]={"62f19e700d31",1466813756,"Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a","Implement C++17 P0386R2, inline variables. (The \'inline\' specifier gives a\nvariable weak discardable linkage and partially-ordered initialization, and is\nimplied for constexpr static data members.)\n\nllvm-svn: 273754"}, | ||
[ | [d]={{w,7732,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (D.getDeclSpec().isInlineSpecified()) {\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else if (CurContext->isFunctionOrMethod()) {\n // ...\n } else {\n Diag(D.getDeclSpec().getInlineSpecLoc(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_inline_variable : diag::ext_inline_variable);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.spec/temp.inst/p1.cpp"]={"clang/test/CXX/temp/temp.spec/temp.inst/p1.cpp:62:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]"} | ["clang/test/CXX/temp/temp.spec/temp.inst/p1.cpp"]={"clang/test/CXX/temp/temp.spec/temp.inst/p1.cpp:62:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]"} | ||
| Line 676: | Line 677: | ||
}, | }, | ||
["ext_integer_complement_complex"]={ | ["ext_integer_complement_complex"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_integer_complement_complex", | ||
[b]="ISO C does not support \'~\' for complex conjugation of %0", | [b]="ISO C does not support \'~\' for complex conjugation of %0", | ||
[ | [g]="ISO C does not support \'~\' for complex conjugation of A", | ||
[ | [f]=n, | ||
[ | [e]="ISO C does not support \'~\' for complex conjugation of (.*?)", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{v,16246,"ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp) {\n // ...\n case UO_Not: // bitwise complement\n // ...\n // C99 6.5.3.3p1. We allow complex int and float as a GCC extension.\n if (resultType->isComplexType() || resultType->isComplexIntegerType())\n // ...\n Diag(OpLoc, diag::ext_integer_complement_complex) << resultType << Input.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_integer_complex"]={ | ["ext_integer_complex"]={ | ||
[ | [l]={W,"gnu-complex-integer",t}, | ||
[ | [k]="gnu-complex-integer", | ||
[ | [i]="ext_integer_complex", | ||
[b]="complex integer types are a GNU extension", | [b]="complex integer types are a GNU extension", | ||
[g]="complex integer types are a GNU extension", | [g]="complex integer types are a GNU extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-complex\\-integer[^\\]]*\\]", | [f]=n, | ||
[ | [e]="complex integer types are a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-complex\\-integer[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{cd,1316,"/// Finish - This does final analysis of the declspec, rejecting things like\n/// \"_Imaginary\" (lacking an FP type). After calling this method, DeclSpec is\n/// guaranteed to be self-consistent, even if an error occurred.\nvoid DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {\n // ...\n // TODO: if the implementation does not implement _Complex or _Imaginary,\n // disallow their use. Need information about the backend.\n if (TypeSpecComplex != TSC_unspecified) {\n if (TypeSpecType == TST_unspecified) {\n // ...\n } else if (TypeSpecType == TST_int || TypeSpecType == TST_char || TypeSpecType == TST_bitint) {\n // Note that this intentionally doesn\'t include _Complex _Bool.\n if (!S.getLangOpts().CPlusPlus)\n S.Diag(TSTLoc, diag::ext_integer_complex);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/complex-init-list.c"]={"clang/test/Sema/complex-init-list.c:28:10: warning: complex integer types are a GNU extension [-Wgnu-complex-integer]"} | ["clang/test/Sema/complex-init-list.c"]={"clang/test/Sema/complex-init-list.c:28:10: warning: complex integer types are a GNU extension [-Wgnu-complex-integer]"} | ||
| Line 705: | Line 706: | ||
}, | }, | ||
["ext_integer_increment_complex"]={ | ["ext_integer_increment_complex"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_integer_increment_complex", | ||
[b]="ISO C does not support \'++\'/\'--\' on complex integer type %0", | [b]="ISO C does not support \'++\'/\'--\' on complex integer type %0", | ||
[ | [g]="ISO C does not support \'++\'/\'--\' on complex integer type A", | ||
[ | [f]=n, | ||
[ | [e]="ISO C does not support \'\\+\\+\'\\/\'\\-\\-\' on complex integer type (.*?)", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{v,14740,"/// CheckIncrementDecrementOperand - unlike most \"Check\" methods, this routine\n/// doesn\'t need to call UsualUnaryConversions or UsualArithmeticConversions.\nstatic QualType CheckIncrementDecrementOperand(Sema &S, Expr *Op, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation OpLoc, bool IsInc, bool IsPrefix) {\n // ...\n if (S.getLangOpts().CPlusPlus && ResType->isBooleanType()) {\n // ...\n } else if (S.getLangOpts().CPlusPlus && ResType->isEnumeralType()) {\n // ...\n } else if (ResType->isRealType()) {\n // ...\n } else if (ResType->isPointerType()) {\n // ...\n } else if (ResType->isObjCObjectPointerType()) {\n // ...\n } else if (ResType->isAnyComplexType()) {\n // ...\n S.Diag(OpLoc, diag::ext_integer_increment_complex) << ResType << Op->getSourceRange();"}} | ||
}, | }, | ||
["ext_integer_literal_too_large_for_signed"]={ | ["ext_integer_literal_too_large_for_signed"]={ | ||
[ | [l]={"implicitly-unsigned-literal"}, | ||
[ | [k]="implicitly-unsigned-literal", | ||
[ | [i]="ext_integer_literal_too_large_for_signed", | ||
[b]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", | [b]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", | ||
[g]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", | [g]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wimplicitly\\-unsigned\\-literal[^\\]]*\\]", | [f]=n, | ||
[ | [e]="integer literal is too large to be represented in a signed integer type, interpreting as unsigned", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wimplicitly\\-unsigned\\-literal[^\\]]*\\]", | ||
[ | [a]=u, | ||
[h]={"31f42318d833",1406213483,"Improving the \"integer constant too large\" diagnostics based on post-commit feedback from Richard Sm...","Improving the \"integer constant too large\" diagnostics based on post-commit feedback from Richard Smith. Amends r213657.\n\nllvm-svn: 213865"}, | |||
[d]={{"clang/lib/Lex/PPExpressions.cpp",363,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::numeric_constant: {\n // ...\n // Parse the integer literal into Result.\n if (Literal.GetIntegerValue(Result.Val)) {\n // ...\n } else {\n // ...\n // Detect overflow based on whether the value is signed. If signed\n // and if the value is too large, emit a warning \"integer constant is so\n // large that it is unsigned\" e.g. on 12345678901234567890 where intmax_t\n // is 64-bits.\n if (!Literal.isUnsigned && Result.Val.isNegative()) {\n // Octal, hexadecimal, and binary literals are implicitly unsigned if\n // the value does not fit into a signed integer type.\n if (ValueLive && Literal.getRadix() == 10)\n PP.Diag(PeekTok, diag::ext_integer_literal_too_large_for_signed);"},{v,4257,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n } else if (Literal.isFloatingLiteral()) {\n // ...\n } else if (!Literal.isIntegerLiteral()) {\n // ...\n } else {\n // ...\n if (Literal.GetIntegerValue(ResultVal)) {\n // ...\n } else {\n // ...\n // If we still couldn\'t decide a type, we either have \'size_t\' literal\n // that is out of range, or a decimal literal that does not fit in a\n // signed long long and has no U suffix.\n if (Ty.isNull()) {\n if (Literal.isSizeT)\n // ...\n else\n Diag(Tok.getLocation(), diag::ext_integer_literal_too_large_for_signed);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Lexer/bitint-constants.c"]={"clang/test/Lexer/bitint-constants.c:40:5: warning: integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]"} | ["clang/test/Lexer/bitint-constants.c"]={"clang/test/Lexer/bitint-constants.c:40:5: warning: integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]"} | ||
| Line 734: | Line 735: | ||
}, | }, | ||
["ext_internal_in_extern_inline"]={ | ["ext_internal_in_extern_inline"]={ | ||
[ | [l]={"static-in-inline"}, | ||
[ | [k]="static-in-inline", | ||
[ | [i]="ext_internal_in_extern_inline", | ||
[b]="static %select{function|variable}0 %1 is used in an inline function with external linkage", | [b]="static %select{function|variable}0 %1 is used in an inline function with external linkage", | ||
[ | [g]={{nil,nil,{"static ",{bc,Zb}," B is used in an inline function with external linkage"}}}, | ||
[ | [f]=n, | ||
[ | [e]="static (?:function|variable) (.*?) is used in an inline function with external linkage", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wstatic\\-in\\-inline[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"edff0200115c",1340041798,"Allow internal decls in inline functions if the function is in the main file.","Allow internal decls in inline functions if the function is in the main file.\n\nThis handles the very common case of people writing inline functions in their\nmain source files and not tagging them as inline. These cases should still\nbehave as the user intended. (The diagnostic is still emitted as an extension.)\n\nI\'m reworking this code anyway to account for C++\'s equivalent restriction in\n[basic.def.odr]p6, but this should get some bots back to green.\n\nllvm-svn: 158666"}, | ||
[ | [d]={{v,192,"/// Check whether we\'re in an extern inline function and referring to a\n/// variable or function with internal linkage (C11 6.7.4p3).\n///\n/// This is only a warning because we used to silently accept this code, but\n/// in many cases it will not behave correctly. This is not enabled in C++ mode\n/// because the restriction language is a bit weaker (C++11 [basic.def.odr]p6)\n/// and so while there may still be user mistakes, most of the time we can\'t\n/// prove that there are errors.\nstatic void diagnoseUseOfInternalDeclInInlineFunction(Sema &S, const NamedDecl *D, SourceLocation Loc) {\n // ...\n S.Diag(Loc, DowngradeWarning ? diag::ext_internal_in_extern_inline_quiet : diag::ext_internal_in_extern_inline) << /*IsVar=*/!UsedFn << D;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/inline.c"]={"clang/test/Sema/inline.c:14:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:15:9: warning: static variable \'staticStruct\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:16:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:20:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:21:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:70:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:71:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]","XXX.h:2:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","XXX.h:3:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]"} | ["clang/test/Sema/inline.c"]={"clang/test/Sema/inline.c:14:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:15:9: warning: static variable \'staticStruct\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:16:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:20:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:21:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:70:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","clang/test/Sema/inline.c:71:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]","XXX.h:2:3: warning: static function \'staticFunction\' is used in an inline function with external linkage [-Wstatic-in-inline]","XXX.h:3:10: warning: static variable \'staticVar\' is used in an inline function with external linkage [-Wstatic-in-inline]"} | ||
| Line 750: | Line 751: | ||
}, | }, | ||
["ext_internal_in_extern_inline_quiet"]={ | ["ext_internal_in_extern_inline_quiet"]={ | ||
[ | [l]={t,"static-in-inline"}, | ||
[ | [k]="static-in-inline", | ||
[ | [i]="ext_internal_in_extern_inline_quiet", | ||
[b]="static %select{function|variable}0 %1 is used in an inline function with external linkage", | [b]="static %select{function|variable}0 %1 is used in an inline function with external linkage", | ||
[ | [g]={{nil,nil,{"static ",{bc,Zb}," B is used in an inline function with external linkage"}}}, | ||
[ | [f]=n, | ||
[ | [e]="static (?:function|variable) (.*?) is used in an inline function with external linkage", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wstatic\\-in\\-inline[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={vb,1405733957,ub,tb}, | ||
[ | [d]={{v,191,"/// Check whether we\'re in an extern inline function and referring to a\n/// variable or function with internal linkage (C11 6.7.4p3).\n///\n/// This is only a warning because we used to silently accept this code, but\n/// in many cases it will not behave correctly. This is not enabled in C++ mode\n/// because the restriction language is a bit weaker (C++11 [basic.def.odr]p6)\n/// and so while there may still be user mistakes, most of the time we can\'t\n/// prove that there are errors.\nstatic void diagnoseUseOfInternalDeclInInlineFunction(Sema &S, const NamedDecl *D, SourceLocation Loc) {\n // ...\n S.Diag(Loc, DowngradeWarning ? diag::ext_internal_in_extern_inline_quiet : diag::ext_internal_in_extern_inline) << /*IsVar=*/!UsedFn << D;"}} | ||
}, | }, | ||
["ext_keyword_as_ident"]={ | ["ext_keyword_as_ident"]={ | ||
[ | [l]={"keyword-compat"}, | ||
[ | [k]="keyword-compat", | ||
[ | [i]="ext_keyword_as_ident", | ||
[b]="keyword \'%0\' will be made available as an identifier %select{here|for the remainder of the translation unit}1", | [b]="keyword \'%0\' will be made available as an identifier %select{here|for the remainder of the translation unit}1", | ||
[ | [g]={{nil,nil,{"keyword \'A\' will be made available as an identifier ",{"here","for the remainder of the translation unit"}}}}, | ||
[ | [f]=n, | ||
[ | [e]="keyword \'(.*?)\' will be made available as an identifier (?:here|for the remainder of the translation unit)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wkeyword\\-compat[^\\]]*\\]", | ||
[ | [a]=G, | ||
[ | [h]={"47642d2b7ea1",1386051181,"Emit an extension warning when changing system header tokens","Emit an extension warning when changing system header tokens\n\nclang converts keywords to identifiers for compatibility with various system\nheaders such as GNU libc.\n\nImplement a -Wkeyword-compat extension warning to diagnose those cases. The\nwarning is on by default but will generally be ignored in system headers. It\ncan however be enabled globally to aid standards conformance testing.\n\nThis also changes the __uptr keyword avoidance from r195710 to no longer\nspecial-case system headers, bringing it in line with other similar workarounds\nin clang.\n\nImplementation returns bool for symmetry with token annotation functions.\n\nSome examples:\n\nwarning: keyword \'__is_pod\' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat]\nstruct __is_pod\n\nwarning: keyword \'__uptr\' will be treated as an identifier here [-Wkeyword-compat]\nunion w *__uptr;\n\nllvm-svn: 196212"}, | ||
[ | [d]={{"clang/lib/Parse/ParseExpr.cpp",1770,"#include \"clang/Basic/TransformTypeTraits.def\"\n // HACK: libstdc++ uses some of the transform-type-traits as alias\n // templates, so we need to work around this.\n if (!NextToken().is(tok::l_paren)) {\n // ...\n Diag(Tok, diag::ext_keyword_as_ident) << Tok.getIdentifierInfo()->getName() << 0;"},{"clang/lib/Parse/ParseExprCXX.cpp",3134,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (!NextToken().is(tok::l_paren)) {\n // ...\n Diag(Tok, diag::ext_keyword_as_ident) << Tok.getIdentifierInfo()->getName() << 0;"},{"clang/lib/Parse/Parser.cpp",1915,"bool Parser::TryKeywordIdentFallback(bool DisableKeyword) {\n // ...\n Diag(Tok, diag::ext_keyword_as_ident) << PP.getSpelling(Tok) << DisableKeyword;"},{"clang/lib/Parse/ParseStmt.cpp",274,"#include \"clang/Basic/TransformTypeTraits.def\"\n if (NextToken().is(tok::less)) {\n // ...\n Diag(Tok, diag::ext_keyword_as_ident) << Tok.getIdentifierInfo()->getName() << 0;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp:10:8: warning: keyword \'__is_pod\' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]","clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp:18:8: warning: keyword \'__is_same\' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]","clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp:27:21: warning: keyword \'__is_signed\' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]"} | ["clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp:10:8: warning: keyword \'__is_pod\' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]","clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp:18:8: warning: keyword \'__is_same\' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]","clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp:27:21: warning: keyword \'__is_signed\' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]"} | ||
| Line 779: | Line 780: | ||
}, | }, | ||
["ext_lambda_missing_parens"]={ | ["ext_lambda_missing_parens"]={ | ||
[ | [l]={"c++23-extensions","c++2b-extensions"}, | ||
[ | [k]="c++23-extensions", | ||
[ | [i]={{nil,x,"ext_lambda_missing_parens"}}, | ||
[b]="lambda without a parameter clause is a C++23 extension", | [b]="lambda without a parameter clause is a C++23 extension", | ||
[ | [g]="lambda without a parameter clause is a C++23 extension", | ||
[ | [f]=n, | ||
[ | [e]="lambda without a parameter clause is a C\\+\\+23 extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+23\\-extensions[^\\]]*\\]", | ||
[ | [a]={{nil,x,G}}, | ||
[ | [h]={ad,1612659633,Zc,Yc}, | ||
[ | [d]={{"clang/lib/Parse/ParseExprCXX.cpp",1511,"/// ParseLambdaExpressionAfterIntroducer - Parse the rest of a lambda\n/// expression.\nExprResult Parser::ParseLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro) {\n // ...\n if (HasSpecifiers && !HasParentheses && !getLangOpts().CPlusPlus23) {\n // ...\n Diag(Tok, diag::ext_lambda_missing_parens) << FixItHint::CreateInsertion(Tok.getLocation(), \"() \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx-concepts-requires-clause.cpp"]={"clang/test/Parser/cxx-concepts-requires-clause.cpp:167:19: warning: lambda without a parameter clause is a C++23 extension [-Wc++23-extensions]"} | ["clang/test/Parser/cxx-concepts-requires-clause.cpp"]={"clang/test/Parser/cxx-concepts-requires-clause.cpp:167:19: warning: lambda without a parameter clause is a C++23 extension [-Wc++23-extensions]"} | ||
| Line 795: | Line 796: | ||
}, | }, | ||
["ext_lambda_template_parameter_list"]={ | ["ext_lambda_template_parameter_list"]={ | ||
[ | [l]={kb,hc}, | ||
[ | [k]=kb, | ||
[ | [i]={{nil,r,"ext_lambda_template_parameter_list"}}, | ||
[b]={{nil,p,"explicit template parameter list for lambdas is a C++20 extension"},{r,r,"explicit template parameter list for lambdas is a C++2a extension"}}, | [b]={{nil,p,"explicit template parameter list for lambdas is a C++20 extension"},{r,r,"explicit template parameter list for lambdas is a C++2a extension"}}, | ||
[ | [g]={{nil,p,"explicit template parameter list for lambdas is a C++20 extension"},{r,r,"explicit template parameter list for lambdas is a C++2a extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="explicit template parameter list for lambdas is a C\\+\\+20 extension", | ||
[ | [c]=cc, | ||
[ | [a]={{nil,r,G}}, | ||
[ | [h]={"8205a814a691",1556966986,"[c++20] Implement P0428R2 - Familiar template syntax for generic lambdas","[c++20] Implement P0428R2 - Familiar template syntax for generic lambdas\n\nDifferential Revision: https://reviews.llvm.org/D36527\n\nllvm-svn: 359967"}, | ||
[ | [d]={{"clang/lib/Parse/ParseExprCXX.cpp",1331,"/// ParseLambdaExpressionAfterIntroducer - Parse the rest of a lambda\n/// expression.\nExprResult Parser::ParseLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro) {\n // ...\n if (Tok.is(tok::less)) {\n Diag(Tok, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_lambda_template_parameter_list : diag::ext_lambda_template_parameter_list);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp"]={"clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp:138:12: warning: explicit template parameter list for lambdas is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp:139:12: warning: explicit template parameter list for lambdas is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp:140:12: warning: explicit template parameter list for lambdas is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp"]={"clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp:138:12: warning: explicit template parameter list for lambdas is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp:139:12: warning: explicit template parameter list for lambdas is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp:140:12: warning: explicit template parameter list for lambdas is a C++20 extension [-Wc++20-extensions]"} | ||
| Line 811: | Line 812: | ||
}, | }, | ||
["ext_line_comment"]={ | ["ext_line_comment"]={ | ||
[ | [l]={jb,qb,"comment","comments",pb,t}, | ||
[ | [k]="comment", | ||
[ | [i]="ext_line_comment", | ||
[b]="// comments are not allowed in this language", | [b]="// comments are not allowed in this language", | ||
[ | [g]="// comments are not allowed in this language", | ||
[ | [f]=n, | ||
[ | [e]="\\/\\/ comments are not allowed in this language", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcomment[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/","s/BCPLComment/LineComment/\n\nllvm-svn: 167690"}, | ||
[ | [d]={{Kb,2444,"/// We have just read the // characters from input. Skip until we find the\n/// newline character that terminates the comment. Then update BufferPtr and\n/// return.\n///\n/// If we\'re in KeepCommentMode or any CommentHandler has inserted\n/// some tokens, this will store the first token and return true.\nbool Lexer::SkipLineComment(Token &Result, const char *CurPtr, bool &TokAtPhysicalStartOfLine) {\n // If Line comments aren\'t explicitly enabled for this language, emit an\n // extension warning.\n if (!LineComment) {\n if (!isLexingRawMode()) // There\'s no PP in raw mode, so can\'t emit diags.\n Diag(BufferPtr, diag::ext_line_comment);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:12:1: error: // comments are not allowed in this language [-Werror,-Wcomment]"} | ["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:12:1: error: // comments are not allowed in this language [-Werror,-Wcomment]"} | ||
| Line 827: | Line 828: | ||
}, | }, | ||
["ext_main_returns_nonint"]={ | ["ext_main_returns_nonint"]={ | ||
[ | [l]={"main-return-type"}, | ||
[ | [k]="main-return-type", | ||
[ | [i]="ext_main_returns_nonint", | ||
[b]="return type of \'main\' is not \'int\'", | [b]="return type of \'main\' is not \'int\'", | ||
[g]="return type of \'main\' is not \'int\'", | [g]="return type of \'main\' is not \'int\'", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmain\\-return\\-type[^\\]]*\\]", | [f]=n, | ||
[ | [e]="return type of \'main\' is not \'int\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmain\\-return\\-type[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"5ed3caf2e364",1329249052,"Warn about non-int main() results in GNU C mode instead of erroring.","Warn about non-int main() results in GNU C mode instead of erroring.\n\nBased on a patch by Vasiliy Korchagin!\n\nllvm-svn: 150500"}, | |||
[d]={{w,12128,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (getLangOpts().GNUMode && !getLangOpts().CPlusPlus) {\n // ...\n // GCC in C mode accepts qualified \'int\'.\n if (Context.hasSameUnqualifiedType(FT->getReturnType(), Context.IntTy))\n // ...\n else {\n Diag(FD->getTypeSpecStartLoc(), diag::ext_main_returns_nonint);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/gnu89.c"]={"clang/test/Sema/gnu89.c:5:1: warning: return type of \'main\' is not \'int\' [-Wmain-return-type]"} | ["clang/test/Sema/gnu89.c"]={"clang/test/Sema/gnu89.c:5:1: warning: return type of \'main\' is not \'int\' [-Wmain-return-type]"} | ||
| Line 843: | Line 844: | ||
}, | }, | ||
["ext_main_used"]={ | ["ext_main_used"]={ | ||
[ | [l]={yc,t}, | ||
[ | [k]=yc, | ||
[ | [i]="ext_main_used", | ||
[b]="ISO C++ does not allow \'main\' to be used by a program", | [b]="ISO C++ does not allow \'main\' to be used by a program", | ||
[ | [g]="ISO C++ does not allow \'main\' to be used by a program", | ||
[ | [f]=n, | ||
[ | [e]="ISO C\\+\\+ does not allow \'main\' to be used by a program", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"b63b6ee9a00e",1390354999,"Enforce restrictions that \'main\' is not allowed to be deleted, or to be used by","Enforce restrictions that \'main\' is not allowed to be deleted, or to be used by\nthe program, in C++. (We allow the latter as an extension, since we\'ve always\npermitted it, and GCC does the same, and our supported C++ ABIs don\'t do\nanything special in main.)\n\nllvm-svn: 199782"}, | ||
[ | [d]={{v,249,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // ...\n if (getLangOpts().CPlusPlus && isa<FunctionDecl>(D)) {\n // ...\n // C++ [basic.start.main]p3:\n // The function \'main\' shall not be used within a program.\n if (cast<FunctionDecl>(D)->isMain())\n Diag(Loc, diag::ext_main_used);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp"]={"clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp:19:32: error: ISO C++ does not allow \'main\' to be used by a program [-Werror,-Wmain]","clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp:22:5: error: ISO C++ does not allow \'main\' to be used by a program [-Werror,-Wmain]"} | ["clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp"]={"clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp:19:32: error: ISO C++ does not allow \'main\' to be used by a program [-Werror,-Wmain]","clang/test/CXX/basic/basic.start/basic.start.init/p3.cpp:22:5: error: ISO C++ does not allow \'main\' to be used by a program [-Werror,-Wmain]"} | ||
| Line 859: | Line 860: | ||
}, | }, | ||
["ext_many_braces_around_init"]={ | ["ext_many_braces_around_init"]={ | ||
[ | [l]={"many-braces-around-scalar-init"}, | ||
[ | [k]="many-braces-around-scalar-init", | ||
[ | [i]={{nil,A,"ext_many_braces_around_init"}}, | ||
[b]={{nil, | [b]={{nil,A,"too many braces around %select{scalar |}0initializer"}}, | ||
[ | [g]={{nil,A,{"too many braces around ",{"scalar ",o},"initializer"}}}, | ||
[ | [f]=n, | ||
[ | [e]="too many braces around (?:scalar |)initializer", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmany\\-braces\\-around\\-scalar\\-init[^\\]]*\\]", | ||
[ | [a]={{nil,A,m}}, | ||
[ | [h]={"931fcd3ba011",1576908663,"[WebAssembly] Improve clang diagnostics for wasm attributes","[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"}, | ||
[ | [d]={{sb,1655,"void InitListChecker::CheckScalarType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\n if (InitListExpr *SubIList = dyn_cast<InitListExpr>(expr)) {\n // FIXME: This is invalid, and accepting it causes overload resolution\n // to pick the wrong overload in some corner cases.\n if (!VerifyOnly)\n SemaRef.Diag(SubIList->getBeginLoc(), diag::ext_many_braces_around_init) << DeclType->isSizelessBuiltinType() << SubIList->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/array-init.c"]={"clang/test/Sema/array-init.c:225:11: warning: too many braces around scalar initializer [-Wmany-braces-around-scalar-init]"} | ["clang/test/Sema/array-init.c"]={"clang/test/Sema/array-init.c:225:11: warning: too many braces around scalar initializer [-Wmany-braces-around-scalar-init]"} | ||
| Line 875: | Line 876: | ||
}, | }, | ||
["ext_mathematical_notation"]={ | ["ext_mathematical_notation"]={ | ||
[ | [l]={"mathematical-notation-identifier-extension"}, | ||
[ | [k]="mathematical-notation-identifier-extension", | ||
[ | [i]={{nil,P,"ext_mathematical_notation"}}, | ||
[b]={{nil, | [b]={{nil,P,"mathematical notation character <U+%0> in an identifier is a Clang extension"}}, | ||
[ | [g]={{nil,P,"mathematical notation character <U+A> in an identifier is a Clang extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="mathematical notation character \\<U\\+(.*?)\\> in an identifier is a Clang extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmathematical\\-notation\\-identifier\\-extension[^\\]]*\\]", | ||
[ | [a]={{nil,P,B}}, | ||
[ | [h]={ic,1625925174,fc,ec}, | ||
[ | [d]={{Kb,1556,"static void diagnoseExtensionInIdentifier(DiagnosticsEngine &Diags, uint32_t C, CharSourceRange Range) {\n // ...\n Diags.Report(Range.getBegin(), diag::ext_mathematical_notation) << codepointAsHexString(C) << Range;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:49:12: warning: mathematical notation character <U+1D6DB> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:6: warning: mathematical notation character <U+00B9> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:9: warning: mathematical notation character <U+208D> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:12: warning: mathematical notation character <U+2084> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:15: warning: mathematical notation character <U+2082> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:18: warning: mathematical notation character <U+208E> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:21: warning: mathematical notation character <U+2207> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:55:5: warning: mathematical notation character <U+221E> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:56:5: warning: mathematical notation character <U+1D7C3> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:59:6: warning: mathematical notation character <U+208C> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]"} | ["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:49:12: warning: mathematical notation character <U+1D6DB> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:6: warning: mathematical notation character <U+00B9> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:9: warning: mathematical notation character <U+208D> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:12: warning: mathematical notation character <U+2084> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:15: warning: mathematical notation character <U+2082> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:18: warning: mathematical notation character <U+208E> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:53:21: warning: mathematical notation character <U+2207> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:55:5: warning: mathematical notation character <U+221E> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:56:5: warning: mathematical notation character <U+1D7C3> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]","clang/test/Lexer/unicode.c:59:6: warning: mathematical notation character <U+208C> in an identifier is a Clang extension [-Wmathematical-notation-identifier-extension]"} | ||
| Line 891: | Line 892: | ||
}, | }, | ||
["ext_member_redeclared"]={ | ["ext_member_redeclared"]={ | ||
[ | [l]={W,"redeclared-class-member"}, | ||
[ | [k]="redeclared-class-member", | ||
[ | [i]="ext_member_redeclared", | ||
[b]="class member cannot be redeclared", | [b]="class member cannot be redeclared", | ||
[g]="class member cannot be redeclared", | [g]="class member cannot be redeclared", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wredeclared\\-class\\-member[^\\]]*\\]", | [f]=n, | ||
[ | [e]="class member cannot be redeclared", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wredeclared\\-class\\-member[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"55890bfaa6c2",1370922683,"Implement DR85: Redeclaration of member is forbidden","Implement DR85: Redeclaration of member is forbidden\n\nDisallow the existence of a declaration of a member class that isn\'t a\nforward declaration before it\'s definition.\n\nllvm-svn: 183722"}, | |||
[d]={{w,17285,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // If this is a use of a previous tag, or if the tag is already declared\n // in the same scope (so that the definition/declaration completes or\n // rementions the tag), reuse the decl.\n if (TUK == TUK_Reference || TUK == TUK_Friend || isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // ...\n // C++11 [class.mem]p1:\n // A member shall not be declared twice in the member-specification,\n // except that a nested class or member class template can be declared\n // and then later defined.\n if (TUK == TUK_Declaration && PrevDecl->isCXXClassMember() && S->isDeclScope(PrevDecl)) {\n Diag(NameLoc, diag::ext_member_redeclared);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/access.cpp"]={"clang/test/SemaCXX/access.cpp:32:11: warning: class member cannot be redeclared [-Wredeclared-class-member]"} | ["clang/test/SemaCXX/access.cpp"]={"clang/test/SemaCXX/access.cpp:32:11: warning: class member cannot be redeclared [-Wredeclared-class-member]"} | ||
| Line 907: | Line 908: | ||
}, | }, | ||
["ext_mismatched_exception_spec"]={ | ["ext_mismatched_exception_spec"]={ | ||
[ | [l]={F,Xb}, | ||
[ | [k]=Xb, | ||
[ | [i]="ext_mismatched_exception_spec", | ||
[b]="exception specification in declaration does not match previous declaration", | [b]="exception specification in declaration does not match previous declaration", | ||
[g]="exception specification in declaration does not match previous declaration", | [g]="exception specification in declaration does not match previous declaration", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-exception\\-spec[^\\]]*\\]", | [f]=n, | ||
[ | [e]="exception specification in declaration does not match previous declaration", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-exception\\-spec[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={vb,1405733957,ub,tb}, | |||
[d]={{Qb,314,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat) {\n DiagID = diag::ext_mismatched_exception_spec;"},{Qb,506,"/// CheckEquivalentExceptionSpec - Check if the two types have equivalent\n/// exception specifications. Exception specifications are equivalent if\n/// they allow exactly the same set of exception types. It does not matter how\n/// that is achieved. See C++ [except.spec]p2.\nbool Sema::CheckEquivalentExceptionSpec(const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc) {\n // ...\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_mismatched_exception_spec;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/pr18661.cpp"]={"clang/test/CodeGenCXX/pr18661.cpp:7:8: warning: exception specification in declaration does not match previous declaration [-Wmicrosoft-exception-spec]"} | ["clang/test/CodeGenCXX/pr18661.cpp"]={"clang/test/CodeGenCXX/pr18661.cpp:7:8: warning: exception specification in declaration does not match previous declaration [-Wmicrosoft-exception-spec]"} | ||
| Line 923: | Line 924: | ||
}, | }, | ||
["ext_mismatched_exception_spec_explicit_instantiation"]={ | ["ext_mismatched_exception_spec_explicit_instantiation"]={ | ||
[ | [l]={F,Xb}, | ||
[ | [k]=Xb, | ||
[ | [i]="ext_mismatched_exception_spec_explicit_instantiation", | ||
[b]="exception specification in explicit instantiation does not match instantiated one", | [b]="exception specification in explicit instantiation does not match instantiated one", | ||
[g]="exception specification in explicit instantiation does not match instantiated one", | [g]="exception specification in explicit instantiation does not match instantiated one", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-exception\\-spec[^\\]]*\\]", | [f]=n, | ||
[ | [e]="exception specification in explicit instantiation does not match instantiated one", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-exception\\-spec[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"73983918c45b",1415268650,"Fix for exception specification mismatch in explicit instantiation.","Fix for exception specification mismatch in explicit instantiation.\nAccording to C++ standard if an exception-specification is specified in an explicit instantiation directive, it shall be compatible with the exception-specifications of other declarations of that function. This patch adds checks for this.\nDifferential Revision: http://reviews.llvm.org/D5822\n\nllvm-svn: 221448"}, | |||
[d]={{O,10669,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n // C++11 [except.spec]p4\n // In an explicit instantiation an exception-specification may be specified,\n // but is not required.\n // If an exception-specification is specified in an explicit instantiation\n // directive, it shall be compatible with the exception-specifications of\n // other declarations of that function.\n if (auto *FPT = R->getAs<FunctionProtoType>())\n if (FPT->hasExceptionSpec()) {\n // ...\n if (getLangOpts().MicrosoftExt)\n DiagID = diag::ext_mismatched_exception_spec_explicit_instantiation;"}} | |||
}, | }, | ||
["ext_missing_exception_specification"]={ | ["ext_missing_exception_specification"]={ | ||
[ | [l]={"missing-exception-spec"}, | ||
[ | [k]="missing-exception-spec", | ||
[ | [i]="ext_missing_exception_specification", | ||
[b]="%0 is missing exception specification \'%1\'", | [b]="%0 is missing exception specification \'%1\'", | ||
[ | [g]="A is missing exception specification \'B\'", | ||
[ | [f]=n, | ||
[ | [e]="(.*?) is missing exception specification \'(.*?)\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmissing\\-exception\\-spec[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"a91de375f278",1443574130,"Promote a warning on ill-formed code (redeclaration missing an exception","Promote a warning on ill-formed code (redeclaration missing an exception\nspecification) to an error. No compiler other than Clang seems to allow this,\nand it doesn\'t seem like a useful thing to accept as an extension in general.\n\nThe current behavior was added for PR5957, where the problem was specifically\nrelated to mismatches of the exception specification on the implicitly-declared\nglobal operator new and delete. To retain that workaround, we downgrade the\nerror to an ExtWarn when the declaration is of a replaceable global allocation\nfunction.\n\nNow that this is an error, stop trying (and failing) to recover from a missing\ncomputed noexcept specification. That recovery didn\'t work, and led to crashes\nin code like the added testcase.\n\nllvm-svn: 248867"}, | ||
[ | [d]={{Qb,401,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n DiagID = diag::ext_missing_exception_specification;"},{Qb,407,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n // ...\n } else if (New->isReplaceableGlobalAllocationFunction() && ESI.Type != EST_DependentNoexcept) {\n // ...\n DiagID = diag::ext_missing_exception_specification;"},{Qb,416,"bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {\n // ...\n if (getLangOpts().MSVCCompat && isDynamicExceptionSpec(ESI.Type)) {\n // ...\n } else if (New->isReplaceableGlobalAllocationFunction() && ESI.Type != EST_DependentNoexcept) {\n // ...\n } else if (ESI.Type == EST_NoThrow) {\n // ...\n DiagID = diag::ext_missing_exception_specification;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/nothrow-vs-exception-specs.cpp"]={"clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:83:12: warning: \'bar\' is missing exception specification \'__attribute__((nothrow))\' [-Wmissing-exception-spec]"} | ["clang/test/SemaCXX/nothrow-vs-exception-specs.cpp"]={"clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:83:12: warning: \'bar\' is missing exception specification \'__attribute__((nothrow))\' [-Wmissing-exception-spec]"} | ||
| Line 952: | Line 953: | ||
}, | }, | ||
["ext_missing_type_specifier"]={ | ["ext_missing_type_specifier"]={ | ||
[ | [l]={jb,qb,dc,"implicit-int",pb}, | ||
[ | [k]="implicit-int", | ||
[ | [i]="ext_missing_type_specifier", | ||
[b]={{nil, | [b]={{nil,y,"type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int"},{V,nil,"type specifier missing, defaults to \'int\'"}}, | ||
[ | [g]={{nil,y,"type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int"},{V,nil,"type specifier missing, defaults to \'int\'"}}, | ||
[ | [f]=Q, | ||
[ | [e]="type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int", | ||
[ | [c]=" \\[[^\\]]*\\-Wimplicit\\-int[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"aef810900a7a",1244031721,"Minor cleanup for implicit int warnings.","Minor cleanup for implicit int warnings.\n\nllvm-svn: 72770"}, | ||
[ | [d]={{Bb,1384,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n // ...\n case DeclSpec::TST_unspecified:\n // ...\n // Unspecified typespec defaults to int in C90. However, the C90 grammar\n // [C90 6.5] only allows a decl-spec if there was *some* type-specifier,\n // type-qualifier, or storage-class-specifier. If not, emit an extwarn.\n // Note that the one exception to this is function definitions, which are\n // allowed to be completely missing a declspec. This is handled in the\n // parser already though by it pretending to have seen an \'int\' in this\n // case.\n if (S.getLangOpts().isImplicitIntRequired()) {\n // ...\n } else if (!DS.hasTypeSpecifier()) {\n // C99 and C++ require a type specifier. For example, C99 6.7.2p2 says:\n // \"At least one type specifier shall be given in the declaration\n // specifiers in each declaration, and in the specifier-qualifier list in\n // each struct declaration and type name.\"\n if (!S.getLangOpts().isImplicitIntAllowed() && !DS.isTypeSpecPipe()) {\n // ...\n } else if (S.getLangOpts().getOpenCLCompatibleVersion() >= 200 && DS.isTypeSpecPipe()) {\n // ...\n } else {\n // ...\n S.Diag(DeclLoc, diag::ext_missing_type_specifier) << DS.getSourceRange() << FixItHint::CreateInsertion(DS.getBeginLoc(), \"int\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/crash-invalid-builtin.c"]={"clang/test/Sema/crash-invalid-builtin.c:4:1: error: type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int [-Wimplicit-int]"} | ["clang/test/Sema/crash-invalid-builtin.c"]={"clang/test/Sema/crash-invalid-builtin.c:4:1: error: type specifier missing, defaults to \'int\'; ISO C99 and later do not support implicit int [-Wimplicit-int]"} | ||
| Line 968: | Line 969: | ||
}, | }, | ||
["ext_missing_varargs_arg"]={ | ["ext_missing_varargs_arg"]={ | ||
[ | [l]={W,"gnu-zero-variadic-macro-arguments",t}, | ||
[ | [k]="gnu-zero-variadic-macro-arguments", | ||
[ | [i]="ext_missing_varargs_arg", | ||
[b]="must specify at least one argument for \'...\' parameter of variadic macro", | [b]="must specify at least one argument for \'...\' parameter of variadic macro", | ||
[ | [g]="must specify at least one argument for \'...\' parameter of variadic macro", | ||
[ | [f]=n, | ||
[ | [e]="must specify at least one argument for \'\\.\\.\\.\' parameter of variadic macro", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-variadic\\-macro\\-arguments[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{"clang/lib/Lex/PPMacroExpansion.cpp",1001,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n // ...\n if (NumActuals < MinArgsExpected) {\n // There are several cases where too few arguments is ok, handle them now.\n if (NumActuals == 0 && MinArgsExpected == 1) {\n // ...\n } else if ((FoundElidedComma || MI->isVariadic()) && (NumActuals + 1 == MinArgsExpected || // A(x, ...) -> A(X)\n // ...\n // Varargs where the named vararg parameter is missing: OK as extension.\n // #define A(x, ...)\n // A(\"blah\")\n //\n // If the macro contains the comma pasting extension, the diagnostic\n // is suppressed; we know we\'ll get another diagnostic later.\n if (!MI->hasCommaPasting()) {\n // ...\n Diag(Tok, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_missing_varargs_arg : diag::ext_missing_varargs_arg);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:40:10: warning: must specify at least one argument for \'...\' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]","clang/test/Preprocessor/macro_fn.c:41:9: warning: must specify at least one argument for \'...\' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]"} | ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:40:10: warning: must specify at least one argument for \'...\' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]","clang/test/Preprocessor/macro_fn.c:41:9: warning: must specify at least one argument for \'...\' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]"} | ||
| Line 984: | Line 985: | ||
}, | }, | ||
["ext_missing_whitespace_after_macro_name"]={ | ["ext_missing_whitespace_after_macro_name"]={ | ||
[ | [i]="ext_missing_whitespace_after_macro_name", | ||
[b]="whitespace required after macro name", | [b]="whitespace required after macro name", | ||
[g]="whitespace required after macro name", | [g]="whitespace required after macro name", | ||
[f]= | [f]=n, | ||
[e]= | [e]="whitespace required after macro name", | ||
[ | [c]=lc, | ||
[ | [a]=B, | ||
[h]={"2425bcb49ae4",1240021405,"enforce requirements imposed by C90 6.8 TC1, fixing PR3919.","enforce requirements imposed by C90 6.8 TC1, fixing PR3919.\n\nllvm-svn: 69415"}, | |||
[d]={{bb,2875,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // If this is a function-like macro definition, parse the argument list,\n // marking each of the identifiers as being used as macro arguments. Also,\n // check other constraints on the first token of the macro body.\n if (Tok.is(tok::eod)) {\n // ...\n } else if (Tok.hasLeadingSpace()) {\n // ...\n } else if (Tok.is(tok::l_paren)) {\n // ...\n } else if (LangOpts.C99 || LangOpts.CPlusPlus11) {\n // ...\n } else {\n // ...\n if (isInvalid)\n Diag(Tok, diag::ext_missing_whitespace_after_macro_name);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/c90.c"]={"clang/test/Preprocessor/c90.c:7:12: warning: whitespace required after macro name"} | ["clang/test/Preprocessor/c90.c"]={"clang/test/Preprocessor/c90.c:7:12: warning: whitespace required after macro name"} | ||
| Line 998: | Line 999: | ||
}, | }, | ||
["ext_mixed_decls_code"]={ | ["ext_mixed_decls_code"]={ | ||
[ | [l]={"declaration-after-statement",t}, | ||
[ | [k]="declaration-after-statement", | ||
[ | [i]="ext_mixed_decls_code", | ||
[b]={{nil, | [b]={{nil,V,"mixing declarations and code is a C99 extension"},{x,nil,"ISO C90 forbids mixing declarations and code"}}, | ||
[ | [g]={{nil,V,"mixing declarations and code is a C99 extension"},{x,nil,"ISO C90 forbids mixing declarations and code"}}, | ||
[ | [f]=n, | ||
[ | [e]="mixing declarations and code is a C99 extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeclaration\\-after\\-statement[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{wb,420,"StmtResult Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R, ArrayRef<Stmt *> Elts, bool isStmtExpr) {\n // ...\n const unsigned MixedDeclsCodeID = getLangOpts().C99 ? diag::warn_mixed_decls_code : diag::ext_mixed_decls_code;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/c89.c"]={"clang/test/Sema/c89.c:7:9: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]","clang/test/Sema/c89.c:12:9: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]","clang/test/Sema/c89.c:17:23: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]"} | ["clang/test/Sema/c89.c"]={"clang/test/Sema/c89.c:7:9: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]","clang/test/Sema/c89.c:12:9: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]","clang/test/Sema/c89.c:17:23: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]"} | ||
| Line 1,014: | Line 1,015: | ||
}, | }, | ||
["ext_module_import_in_extern_c"]={ | ["ext_module_import_in_extern_c"]={ | ||
[ | [l]={"module-import-in-extern-c"}, | ||
[ | [k]="module-import-in-extern-c", | ||
[ | [i]="ext_module_import_in_extern_c", | ||
[b]="import of C++ module \'%0\' appears within extern \"C\" language linkage specification", | [b]="import of C++ module \'%0\' appears within extern \"C\" language linkage specification", | ||
[ | [g]="import of C++ module \'A\' appears within extern \"C\" language linkage specification", | ||
[ | [f]=Q, | ||
[ | [e]="import of C\\+\\+ module \'(.*?)\' appears within extern \"C\" language linkage specification", | ||
[ | [c]=" \\[[^\\]]*\\-Wmodule\\-import\\-in\\-extern\\-c[^\\]]*\\]", | ||
[ | [a]="Modules Issue", | ||
[ | [h]={"e69bdd10ead6",1444696780,"[modules] Allow the error on importing a C++ module within an extern \"C\"","[modules] Allow the error on importing a C++ module within an extern \"C\"\ncontext (but otherwise at the top level) to be disabled, to support use of C++\nstandard library implementations that (legitimately) mark their <blah.h>\nheaders as being C++ headers from C libraries that wrap things in \'extern \"C\"\'\na bit too enthusiastically.\n\nllvm-svn: 250137"}, | ||
[ | [d]={{"clang/lib/Sema/SemaModule.cpp",54,"static void checkModuleImportContext(Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude = false) {\n // ...\n if (!isa<TranslationUnitDecl>(DC)) {\n // ...\n } else if (!M->IsExternC && ExternCLoc.isValid()) {\n S.Diag(ImportLoc, diag::ext_module_import_in_extern_c) << M->getFullModuleName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/auto-module-import.m"]={"clang/test/Modules/auto-module-import.m:98:1: error: import of C++ module \'NoUmbrella.A\' appears within extern \"C\" language linkage specification [-Wmodule-import-in-extern-c]"} | ["clang/test/Modules/auto-module-import.m"]={"clang/test/Modules/auto-module-import.m:98:1: error: import of C++ module \'NoUmbrella.A\' appears within extern \"C\" language linkage specification [-Wmodule-import-in-extern-c]"} | ||
| Line 1,030: | Line 1,031: | ||
}, | }, | ||
["ext_module_import_not_at_top_level_noop"]={ | ["ext_module_import_not_at_top_level_noop"]={ | ||
[ | [l]={"modules-import-nested-redundant"}, | ||
[ | [k]="modules-import-nested-redundant", | ||
[ | [i]="ext_module_import_not_at_top_level_noop", | ||
[b]="redundant #include of module \'%0\' appears within %1", | [b]="redundant #include of module \'%0\' appears within %1", | ||
[ | [g]="redundant #include of module \'A\' appears within B", | ||
[ | [f]=Q, | ||
[ | [e]="redundant \\#include of module \'(.*?)\' appears within (.*?)", | ||
[ | [c]=" \\[[^\\]]*\\-Wmodules\\-import\\-nested\\-redundant[^\\]]*\\]", | ||
[ | [a]="Modules Issue", | ||
[ | [h]={"752ada870d7b",1447803121,"[modules] When a #include is mapped to a module import and appears somewhere","[modules] When a #include is mapped to a module import and appears somewhere\nother than the top level, we issue an error. This breaks a fair amount of C++\ncode wrapping C libraries, where the C library is #included within a namespace\n/ extern \"C\" combination, because the C library (probably) includes C++\nstandard library headers which may be within modules.\n\nWithout modules, this setup is harmless if (and *only* if) the corresponding\nstandard library module was already included outside the namespace, so\ndowngrade the error to a default-error extension in that case, so that it can\nbe selectively disabled for such misbehaving libraries.\n\nllvm-svn: 253398"}, | ||
[ | [d]={{"clang/lib/Sema/SemaModule.cpp",47,"static void checkModuleImportContext(Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude = false) {\n // ...\n if (!isa<TranslationUnitDecl>(DC)) {\n S.Diag(ImportLoc, (FromInclude && S.isModuleVisible(M)) ? diag::ext_module_import_not_at_top_level_noop : diag::err_module_import_not_at_top_level_fatal) << M->getFullModuleName() << DC;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/redundant-include.mm"]={"clang/test/Modules/redundant-include.mm:7:3: error: redundant #include of module \'cxx_library\' appears within function \'includeNotAtTopLevel\' [-Wmodules-import-nested-redundant]","clang/test/Modules/redundant-include.mm:11:3: error: redundant #include of module \'cxx_library\' appears within namespace \'NS\' [-Wmodules-import-nested-redundant]"} | ["clang/test/Modules/redundant-include.mm"]={"clang/test/Modules/redundant-include.mm:7:3: error: redundant #include of module \'cxx_library\' appears within function \'includeNotAtTopLevel\' [-Wmodules-import-nested-redundant]","clang/test/Modules/redundant-include.mm:11:3: error: redundant #include of module \'cxx_library\' appears within namespace \'NS\' [-Wmodules-import-nested-redundant]"} | ||
| Line 1,046: | Line 1,047: | ||
}, | }, | ||
["ext_ms_abstract_keyword"]={ | ["ext_ms_abstract_keyword"]={ | ||
[ | [l]={F,"microsoft-abstract"}, | ||
[ | [k]="microsoft-abstract", | ||
[ | [i]={{nil,x,"ext_ms_abstract_keyword"}}, | ||
[b]={{nil, | [b]={{nil,x,"\'abstract\' keyword is a Microsoft extension"}}, | ||
[ | [g]={{nil,x,"\'abstract\' keyword is a Microsoft extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="\'abstract\' keyword is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-abstract[^\\]]*\\]", | ||
[ | [a]={{nil,x,G}}, | ||
[ | [h]={ad,1612659633,Zc,Yc}, | ||
[ | [d]={{R,2467,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Abstract) {\n Diag(Tok.getLocation(), diag::ext_ms_abstract_keyword);"},{R,3534,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Final)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Sealed)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Abstract)\n Diag(AbstractLoc, diag::ext_ms_abstract_keyword);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:479:21: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:490:30: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:516:36: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:524:30: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:524:30: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:532:20: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:534:12: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:537:20: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:543:20: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]"} | ["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:479:21: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:490:30: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:516:36: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:524:30: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:524:30: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:532:20: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:534:12: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:537:20: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]","clang/test/SemaCXX/MicrosoftExtensions.cpp:543:20: warning: \'abstract\' keyword is a Microsoft extension [-Wmicrosoft-abstract]"} | ||
| Line 1,062: | Line 1,063: | ||
}, | }, | ||
["ext_ms_ambiguous_direct_base"]={ | ["ext_ms_ambiguous_direct_base"]={ | ||
[ | [l]={"microsoft-inaccessible-base"}, | ||
[ | [k]="microsoft-inaccessible-base", | ||
[ | [i]={{nil,E,"ext_ms_ambiguous_direct_base"}}, | ||
[b]={{nil, | [b]={{nil,E,"accessing inaccessible direct base %0 of %1 is a Microsoft extension"}}, | ||
[ | [g]={{nil,E,"accessing inaccessible direct base A of B is a Microsoft extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="accessing inaccessible direct base (.*?) of (.*?) is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-inaccessible\\-base[^\\]]*\\]", | ||
[ | [a]={{nil,E,m}}, | ||
[ | [h]={"2e87a21c7cac",1509144521,"[MS] Allow access to ambiguous, inaccessible direct bases","[MS] Allow access to ambiguous, inaccessible direct bases\n\nSummary:\nClang typically warns that in the following class hierarchy, \'A\' is\ninaccessible because there is no series of casts that the user can\nwrite to access it unambiguously:\n struct A { };\n struct B : A { };\n struct C : A, B { };\n\nMSVC allows the user to convert from C* to A*, though, and we\'ve\nencountered this issue in the latest Windows SDK headers.\n\nThis patch allows this conversion when -fms-compatibility is set and\nadds a warning for it under -Wmicrosoft-inaccessible-base.\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D39389\n\nllvm-svn: 316807"}, | ||
[ | [d]={{Z,3108,"/// CheckDerivedToBaseConversion - Check whether the Derived-to-Base\n/// conversion (where Derived and Base are class types) is\n/// well-formed, meaning that the conversion is unambiguous (and\n/// that all of the base classes are accessible). Returns true\n/// and emits a diagnostic if the code is ill-formed, returns false\n/// otherwise. Loc is the location where this routine should point to\n/// if there is an error, and Range is the source range to highlight\n/// if there is an error.\n///\n/// If either InaccessibleBaseID or AmbiguousBaseConvID are 0, then the\n/// diagnostic for the respective type of error will be suppressed, but the\n/// check for ill-formed code will still be performed.\nbool Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base, unsigned InaccessibleBaseID, unsigned AmbiguousBaseConvID, SourceLocation Loc, SourceRange Range, DeclarationName Name, CXXCastPath *BasePath, bool IgnoreAccess) {\n // ...\n // For MSVC compatibility, check if Derived directly inherits from Base. Clang\n // warns about this hierarchy under -Winaccessible-base, but MSVC allows the\n // user to access such bases.\n if (!Path && getLangOpts().MSVCCompat) {\n for (const CXXBasePath &PossiblePath : Paths) {\n if (PossiblePath.size() == 1) {\n // ...\n if (AmbiguousBaseConvID)\n Diag(Loc, diag::ext_ms_ambiguous_direct_base) << Base << Derived << Range;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/microsoft-inaccessible-base.cpp"]={"clang/test/CodeGenCXX/microsoft-inaccessible-base.cpp:9:39: warning: accessing inaccessible direct base \'A\' of \'C\' is a Microsoft extension [-Wmicrosoft-inaccessible-base]","clang/test/CodeGenCXX/microsoft-inaccessible-base.cpp:17:39: warning: accessing inaccessible direct base \'A\' of \'D\' is a Microsoft extension [-Wmicrosoft-inaccessible-base]"} | ["clang/test/CodeGenCXX/microsoft-inaccessible-base.cpp"]={"clang/test/CodeGenCXX/microsoft-inaccessible-base.cpp:9:39: warning: accessing inaccessible direct base \'A\' of \'C\' is a Microsoft extension [-Wmicrosoft-inaccessible-base]","clang/test/CodeGenCXX/microsoft-inaccessible-base.cpp:17:39: warning: accessing inaccessible direct base \'A\' of \'D\' is a Microsoft extension [-Wmicrosoft-inaccessible-base]"} | ||
| Line 1,078: | Line 1,079: | ||
}, | }, | ||
["ext_ms_anonymous_record"]={ | ["ext_ms_anonymous_record"]={ | ||
[ | [l]={F,"microsoft-anon-tag"}, | ||
[ | [k]="microsoft-anon-tag", | ||
[ | [i]="ext_ms_anonymous_record", | ||
[b]="anonymous %select{structs|unions}0 are a Microsoft extension", | [b]="anonymous %select{structs|unions}0 are a Microsoft extension", | ||
[ | [g]={{nil,nil,{"anonymous ",{"structs","unions"}," are a Microsoft extension"}}}, | ||
[ | [f]=n, | ||
[ | [e]="anonymous (?:structs|unions) are a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-anon\\-tag[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"8f0ed914902f",1407742194,"Sema: Handle declspecs without declarators in records properly in C mode","Sema: Handle declspecs without declarators in records properly in C mode\n\nWe had two bugs:\n- We wouldn\'t properly warn when a struct/union/enum was mentioned\n inside of a record definition if no declarator was provided. We\n should have mentioned that this declaration declares nothing.\n- We didn\'t properly support Microsoft\'s extension where certain\n declspecs without declarators would act as anonymous structs/unions.\n * We completely ignored the case where such a declspec could be a\n union.\n * We didn\'t properly handle the case where a record was defined inside\n another record:\n struct X {\n int a;\n struct Y {\n int b;\n };\n };\n\nllvm-svn: 215347"}, | ||
[ | [d]={{w,5215,"/// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with\n/// no declarator (e.g. \"struct foo;\") is parsed. It also accepts template\n/// parameters to cope with template friend declarations.\nDecl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord) {\n // ...\n // C11 6.7.2.1p2:\n // A struct-declaration that does not declare an anonymous structure or\n // anonymous union shall contain a struct-declarator-list.\n //\n // This rule also existed in C89 and C99; the grammar for struct-declaration\n // did not permit a struct-declaration without a struct-declarator-list.\n if (!getLangOpts().CPlusPlus && CurContext->isRecord() && DS.getStorageClassSpec() == DeclSpec::SCS_unspecified) {\n // Check for Microsoft C extension: anonymous struct/union member.\n // Handle 2 kinds of anonymous struct/union:\n // struct STRUCT;\n // union UNION;\n // and\n // STRUCT_TYPE; <- where STRUCT_TYPE is a typedef struct.\n // UNION_TYPE; <- where UNION_TYPE is a typedef union.\n if ((Tag && Tag->getDeclName()) || DS.getTypeSpecType() == DeclSpec::TST_typename) {\n // ...\n if (Record && getLangOpts().MicrosoftExt) {\n Diag(DS.getBeginLoc(), diag::ext_ms_anonymous_record) << Record->isUnion() << DS.getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/MicrosoftExtensions.c"]={"clang/test/Sema/MicrosoftExtensions.c:46:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:53:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:56:3: warning: anonymous unions are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:67:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:68:3: warning: anonymous unions are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:109:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:113:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]"} | ["clang/test/Sema/MicrosoftExtensions.c"]={"clang/test/Sema/MicrosoftExtensions.c:46:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:53:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:56:3: warning: anonymous unions are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:67:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:68:3: warning: anonymous unions are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:109:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]","clang/test/Sema/MicrosoftExtensions.c:113:3: warning: anonymous structs are a Microsoft extension [-Wmicrosoft-anon-tag]"} | ||
| Line 1,094: | Line 1,095: | ||
}, | }, | ||
["ext_ms_c_enum_fixed_underlying_type"]={ | ["ext_ms_c_enum_fixed_underlying_type"]={ | ||
[ | [l]={F,"microsoft-fixed-enum",t}, | ||
[ | [k]="microsoft-fixed-enum", | ||
[ | [i]={{nil,D,"ext_ms_c_enum_fixed_underlying_type"}}, | ||
[b]={{nil, | [b]={{nil,D,"enumeration types with a fixed underlying type are a Microsoft extension"}}, | ||
[ | [g]={{nil,D,"enumeration types with a fixed underlying type are a Microsoft extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="enumeration types with a fixed underlying type are a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-fixed\\-enum[^\\]]*\\]", | ||
[ | [a]={{nil,D,G}}, | ||
[ | [h]={"6f11db137034",1538166298,"Support enums with a fixed underlying type in all language modes.","Support enums with a fixed underlying type in all language modes.\n\nPreviously we supported these in C++, ObjC, and C with -fms-extensions.\n\nrdar://43831380\n\nDifferential revision: https://reviews.llvm.org/D52339\n\nllvm-svn: 343360"}, | ||
[ | [d]={{xb,4946,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n // Parse the fixed underlying type.\n if (Tok.is(tok::colon)) {\n // ...\n if (CanBeBitfield && !isEnumBase(CanBeOpaqueEnumDeclaration)) {\n // ...\n } else if (CanHaveEnumBase || !ColonIsSacred) {\n // ...\n if (!getLangOpts().ObjC) {\n if (getLangOpts().CPlusPlus11)\n // ...\n else if (getLangOpts().CPlusPlus)\n // ...\n else if (getLangOpts().MicrosoftExt)\n Diag(ColonLoc, diag::ext_ms_c_enum_fixed_underlying_type) << BaseRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/MicrosoftExtensions.c"]={"clang/test/Sema/MicrosoftExtensions.c:86:11: warning: enumeration types with a fixed underlying type are a Microsoft extension [-Wmicrosoft-fixed-enum]","clang/test/Sema/MicrosoftExtensions.c:90:6: warning: enumeration types with a fixed underlying type are a Microsoft extension [-Wmicrosoft-fixed-enum]"} | ["clang/test/Sema/MicrosoftExtensions.c"]={"clang/test/Sema/MicrosoftExtensions.c:86:11: warning: enumeration types with a fixed underlying type are a Microsoft extension [-Wmicrosoft-fixed-enum]","clang/test/Sema/MicrosoftExtensions.c:90:6: warning: enumeration types with a fixed underlying type are a Microsoft extension [-Wmicrosoft-fixed-enum]"} | ||
| Line 1,110: | Line 1,111: | ||
}, | }, | ||
["ext_ms_cast_fn_obj"]={ | ["ext_ms_cast_fn_obj"]={ | ||
[ | [l]={F,"microsoft-cast"}, | ||
[ | [k]="microsoft-cast", | ||
[ | [i]="ext_ms_cast_fn_obj", | ||
[b]="static_cast between pointer-to-function and pointer-to-object is a Microsoft extension", | [b]="static_cast between pointer-to-function and pointer-to-object is a Microsoft extension", | ||
[ | [g]="static_cast between pointer-to-function and pointer-to-object is a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="static_cast between pointer\\-to\\-function and pointer\\-to\\-object is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-cast[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"85bd1206796d",1433283312,"[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr","[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr\n\nThe MSVC 2013 and 2015 implementation of std::atomic is specialized for\npointer types. The member functions are implemented using a static_cast\nfrom void-ptr to function-ptr which is not allowed in the standard.\nPermit this conversion if -fms-compatibility is present.\n\nThis fixes PR23733.\n\nllvm-svn: 238877"}, | ||
[ | [d]={{Uc,1469,"/// TryStaticCast - Check if a static cast can be performed, and do so if\n/// possible. If @p CStyle, ignore access restrictions on hierarchy casting\n/// and casting away constness.\nstatic TryCastResult TryStaticCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, Sema::CheckedConversionKind CCK, SourceRange OpRange, unsigned &msg, CastKind &Kind, CXXCastPath &BasePath, bool ListInitialization) {\n // ...\n // Reverse pointer conversion to void*. C++ 4.10.p2 specifies conversion to\n // void*. C++ 5.2.9p10 specifies additional restrictions, which really is\n // just the usual constness stuff.\n if (const PointerType *SrcPointer = SrcType->getAs<PointerType>()) {\n // ...\n if (SrcPointee->isVoidType()) {\n if (const PointerType *DestPointer = DestType->getAs<PointerType>()) {\n // ...\n // Microsoft permits static_cast from \'pointer-to-void\' to\n // \'pointer-to-function\'.\n if (!CStyle && Self.getLangOpts().MSVCCompat && DestPointee->isFunctionType()) {\n Self.Diag(OpRange.getBegin(), diag::ext_ms_cast_fn_obj) << OpRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:315:23: warning: static_cast between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]"} | ["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:315:23: warning: static_cast between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]"} | ||
| Line 1,126: | Line 1,127: | ||
}, | }, | ||
["ext_ms_delayed_template_argument"]={ | ["ext_ms_delayed_template_argument"]={ | ||
[ | [l]={F,hb}, | ||
[ | [k]=hb, | ||
[ | [i]="ext_ms_delayed_template_argument", | ||
[b]="using the undeclared type %0 as a default template argument is a Microsoft extension", | [b]="using the undeclared type %0 as a default template argument is a Microsoft extension", | ||
[ | [g]="using the undeclared type A as a default template argument is a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="using the undeclared type (.*?) as a default template argument is a Microsoft extension", | ||
[ | [c]=rc, | ||
[ | [a]=m, | ||
[ | [h]={"df6e4a06e42b",1402094196,"Delay lookup of simple default template arguments under -fms-compatibility","Delay lookup of simple default template arguments under -fms-compatibility\n\nMSVC delays parsing of default arguments until instantiation. If the\ndefault argument is never used, it is never parsed. We don\'t model\nthis.\n\nInstead, if lookup of a type name fails in a template argument context,\nwe form a DependentNameType, which will be looked up at instantiation\ntime.\n\nThis fixes errors about \'CControlWinTraits\' in atlwin.h.\n\nReviewers: rsmith\n\nDifferential Revision: http://reviews.llvm.org/D3995\n\nllvm-svn: 210382"}, | ||
[ | [d]={{w,635,"ParsedType Sema::ActOnMSVCUnknownTypeName(const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg) {\n // ...\n if (IsTemplateTypeArg && getCurScope()->isTemplateParamScope()) {\n // ...\n Diag(NameLoc, diag::ext_ms_delayed_template_argument) << &II;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/ms-delayed-default-template-args.cpp"]={"clang/test/SemaTemplate/ms-delayed-default-template-args.cpp:6:24: warning: using the undeclared type \'Baz\' as a default template argument is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-delayed-default-template-args.cpp:14:24: warning: using the undeclared type \'Baz\' as a default template argument is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-delayed-default-template-args.cpp:26:26: warning: using the undeclared type \'Baz\' as a default template argument is a Microsoft extension [-Wmicrosoft-template]"} | ["clang/test/SemaTemplate/ms-delayed-default-template-args.cpp"]={"clang/test/SemaTemplate/ms-delayed-default-template-args.cpp:6:24: warning: using the undeclared type \'Baz\' as a default template argument is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-delayed-default-template-args.cpp:14:24: warning: using the undeclared type \'Baz\' as a default template argument is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-delayed-default-template-args.cpp:26:26: warning: using the undeclared type \'Baz\' as a default template argument is a Microsoft extension [-Wmicrosoft-template]"} | ||
| Line 1,142: | Line 1,143: | ||
}, | }, | ||
["ext_ms_deref_template_argument"]={ | ["ext_ms_deref_template_argument"]={ | ||
[ | [l]={F,hb}, | ||
[ | [k]=hb, | ||
[ | [i]="ext_ms_deref_template_argument", | ||
[b]="non-type template argument containing a dereference operation is a Microsoft extension", | [b]="non-type template argument containing a dereference operation is a Microsoft extension", | ||
[ | [g]="non-type template argument containing a dereference operation is a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="non\\-type template argument containing a dereference operation is a Microsoft extension", | ||
[ | [c]=rc, | ||
[ | [a]=m, | ||
[ | [h]={"da45a0fa6f72",1377236539,"arc commit didn\'t add this because it wasn\'t in the patch...","arc commit didn\'t add this because it wasn\'t in the patch...\n\nllvm-svn: 189088"}, | ||
[ | [d]={{O,6732,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // ...\n if (S.getLangOpts().MicrosoftExt) {\n // ...\n if (FirstOpLoc.isValid()) {\n if (ExtWarnMSTemplateArg)\n S.Diag(ArgIn->getBeginLoc(), diag::ext_ms_deref_template_argument) << ArgIn->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:132:46: warning: non-type template argument containing a dereference operation is a Microsoft extension [-Wmicrosoft-template]"} | ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:132:46: warning: non-type template argument containing a dereference operation is a Microsoft extension [-Wmicrosoft-template]"} | ||
| Line 1,158: | Line 1,159: | ||
}, | }, | ||
["ext_ms_explicit_constructor_call"]={ | ["ext_ms_explicit_constructor_call"]={ | ||
[ | [l]={F,"microsoft-explicit-constructor-call"}, | ||
[ | [k]="microsoft-explicit-constructor-call", | ||
[ | [i]="ext_ms_explicit_constructor_call", | ||
[b]="explicit constructor calls are a Microsoft extension", | [b]="explicit constructor calls are a Microsoft extension", | ||
[g]="explicit constructor calls are a Microsoft extension", | [g]="explicit constructor calls are a Microsoft extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-explicit\\-constructor\\-call[^\\]]*\\]", | [f]=n, | ||
[ | [e]="explicit constructor calls are a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-explicit\\-constructor\\-call[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"64225794119e",1295327079,"Add support for explicit constructor calls in Microsoft mode.","Add support for explicit constructor calls in Microsoft mode.\nFor example: \n\nclass A{ \npublic:\n A& operator=(const A& that) {\n if (this != &that) {\n this->A::~A();\n this->A::A(that); // <=== explicit constructor call.\n }\n return *this;\n }\n};\n\nMore work will be needed to support an explicit call to a template constructor.\n\nllvm-svn: 123735"}, | |||
[d]={{"clang/lib/Sema/SemaExprMember.cpp",1721,"/// The main callback when the parser finds something like\n/// expression . [nested-name-specifier] identifier\n/// expression -> [nested-name-specifier] identifier\n/// where \'identifier\' encompasses a fairly broad spectrum of\n/// possibilities, including destructor and operator references.\n///\n/// \\param OpKind either tok::arrow or tok::period\n/// \\param ObjCImpDecl the current Objective-C \\@implementation\n/// decl; this is an ugly hack around the fact that Objective-C\n/// \\@implementations aren\'t properly put in the context chain\nExprResult Sema::ActOnMemberAccessExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, Decl *ObjCImpDecl) {\n // ...\n // Warn about the explicit constructor calls Microsoft extension.\n if (getLangOpts().MicrosoftExt && Id.getKind() == UnqualifiedIdKind::IK_ConstructorName)\n Diag(Id.getSourceRange().getBegin(), diag::ext_ms_explicit_constructor_call);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:180:25: warning: explicit constructor calls are a Microsoft extension [-Wmicrosoft-explicit-constructor-call]"} | ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:180:25: warning: explicit constructor calls are a Microsoft extension [-Wmicrosoft-explicit-constructor-call]"} | ||
| Line 1,174: | Line 1,175: | ||
}, | }, | ||
["ext_ms_forward_ref_enum"]={ | ["ext_ms_forward_ref_enum"]={ | ||
[ | [l]={F,"microsoft-enum-forward-reference"}, | ||
[ | [k]="microsoft-enum-forward-reference", | ||
[ | [i]="ext_ms_forward_ref_enum", | ||
[b]="forward references to \'enum\' types are a Microsoft extension", | [b]="forward references to \'enum\' types are a Microsoft extension", | ||
[g]="forward references to \'enum\' types are a Microsoft extension", | [g]="forward references to \'enum\' types are a Microsoft extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-enum\\-forward\\-reference[^\\]]*\\]", | [f]=n, | ||
[ | [e]="forward references to \'enum\' types are a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-enum\\-forward\\-reference[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"488b4a7d943b",1284268015,"Add basic support for Microsoft enum forward declaration. ","Add basic support for Microsoft enum forward declaration. \nAssigning an underlying integral type to an enum forward declaration will come in a next patch.\n\nllvm-svn: 113716"}, | |||
[d]={{w,17512,"CreateNewDecl:\n // ...\n if (Kind == TTK_Enum) {\n // ...\n // If this is an undefined enum, warn.\n if (TUK != TUK_Definition && !Invalid) {\n // ...\n if (IsFixed && cast<EnumDecl>(New)->isFixed()) {\n // ...\n } else if (PrevDecl && (Def = cast<EnumDecl>(PrevDecl)->getDefinition())) {\n // ...\n } else {\n // ...\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_ms_forward_ref_enum;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/enum-forward.cpp"]={"clang/test/SemaTemplate/enum-forward.cpp:5:8: warning: forward references to \'enum\' types are a Microsoft extension [-Wmicrosoft-enum-forward-reference]"} | ["clang/test/SemaTemplate/enum-forward.cpp"]={"clang/test/SemaTemplate/enum-forward.cpp:5:8: warning: forward references to \'enum\' types are a Microsoft extension [-Wmicrosoft-enum-forward-reference]"} | ||
| Line 1,190: | Line 1,191: | ||
}, | }, | ||
["ext_ms_impcast_fn_obj"]={ | ["ext_ms_impcast_fn_obj"]={ | ||
[ | [l]={F,"microsoft-cast"}, | ||
[ | [k]="microsoft-cast", | ||
[ | [i]="ext_ms_impcast_fn_obj", | ||
[b]="implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension", | [b]="implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension", | ||
[ | [g]="implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="implicit conversion between pointer\\-to\\-function and pointer\\-to\\-object is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-cast[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"6bf02820bced",1446280934,"[MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff -fms-compatibilit...","[MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff -fms-compatibility\n\nWe permit implicit conversion from pointer-to-function to\npointer-to-object when -fms-extensions is specified. This is rather\nunfortunate, move this into -fms-compatibility and only permit it within\nsystem headers unless -Wno-error=microsoft-cast is specified.\n\nllvm-svn: 251738"}, | ||
[ | [d]={{pc,3163,"/// CheckPointerConversion - Check the pointer conversion from the\n/// expression From to the type ToType. This routine checks for\n/// ambiguous or inaccessible derived-to-base pointer\n/// conversions for which IsPointerConversion has already returned\n/// true. It returns true and produces a diagnostic if there was an\n/// error, or returns false otherwise.\nbool Sema::CheckPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose) {\n // ...\n if (const PointerType *ToPtrType = ToType->getAs<PointerType>()) {\n if (const PointerType *FromPtrType = FromType->getAs<PointerType>()) {\n // ...\n if (Diagnose && !IsCStyleOrFunctionalCast && FromPointeeType->isFunctionType() && ToPointeeType->isVoidType()) {\n // ...\n Diag(From->getExprLoc(), diag::ext_ms_impcast_fn_obj) << From->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:324:14: warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:325:14: warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:326:14: warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]"} | ["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:324:14: warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:325:14: warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]","clang/test/SemaCXX/MicrosoftCompatibility.cpp:326:14: warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]"} | ||
| Line 1,206: | Line 1,207: | ||
}, | }, | ||
["ext_ms_reserved_user_defined_literal"]={ | ["ext_ms_reserved_user_defined_literal"]={ | ||
[ | [l]={"reserved-user-defined-literal"}, | ||
[ | [k]="reserved-user-defined-literal", | ||
[ | [i]="ext_ms_reserved_user_defined_literal", | ||
[b]="invalid suffix on literal; C++11 requires a space between literal and identifier", | [b]="invalid suffix on literal; C++11 requires a space between literal and identifier", | ||
[ | [g]="invalid suffix on literal; C++11 requires a space between literal and identifier", | ||
[ | [f]=n, | ||
[ | [e]="invalid suffix on literal; C\\+\\+11 requires a space between literal and identifier", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wreserved\\-user\\-defined\\-literal[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"7ebc4c191058",1333840163,"ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_re...","ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_reserved_user_defined_literal that doesn\'t default to Error; otherwise MSVC headers won\'t parse. \n\nFixes PR12383.\n\nllvm-svn: 154273"}, | ||
[ | [d]={{Kb,2052,"/// LexUDSuffix - Lex the ud-suffix production for user-defined literal suffixes\n/// in C++11, or warn on a ud-suffix in C++98.\nconst char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr, bool IsStringLiteral) {\n // ...\n // C++11 [lex.ext]p10, [usrlit.suffix]p1: A program containing a ud-suffix\n // that does not start with an underscore is ill-formed. As a conforming\n // extension, we treat all such suffixes as if they had whitespace before\n // them. We assume a suffix beginning with a UCN or UTF-8 character is more\n // likely to be a ud-suffix than a macro, however, and accept that.\n if (!Consumed) {\n // ...\n if (!IsUDSuffix) {\n if (!isLexingRawMode())\n Diag(CurPtr, LangOpts.MSVCCompat ? diag::ext_ms_reserved_user_defined_literal : diag::ext_reserved_user_defined_literal) << FixItHint::CreateInsertion(getSourceLocation(CurPtr), \" \");"}} | ||
}, | }, | ||
["ext_ms_sealed_keyword"]={ | ["ext_ms_sealed_keyword"]={ | ||
[ | [l]={F,"microsoft-sealed"}, | ||
[ | [k]="microsoft-sealed", | ||
[ | [i]="ext_ms_sealed_keyword", | ||
[b]="\'sealed\' keyword is a Microsoft extension", | [b]="\'sealed\' keyword is a Microsoft extension", | ||
[g]="\'sealed\' keyword is a Microsoft extension", | [g]="\'sealed\' keyword is a Microsoft extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-sealed[^\\]]*\\]", | [f]=n, | ||
[ | [e]="\'sealed\' keyword is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-sealed[^\\]]*\\]", | ||
[ | [a]=G, | ||
[h]={"a543308ce556",1382056411,"[-fms-extensions] Permit \'override\' in C++98 and \'sealed\' as a synonym for \'final\'","[-fms-extensions] Permit \'override\' in C++98 and \'sealed\' as a synonym for \'final\'\n\nSummary: Some MS headers use these features.\n\nReviewers: rnk, rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1948\n\nllvm-svn: 192936"}, | |||
[d]={{R,2465,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n Diag(Tok.getLocation(), diag::ext_ms_sealed_keyword);"},{R,3532,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Final)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Sealed)\n Diag(FinalLoc, diag::ext_ms_sealed_keyword);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:454:33: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:459:19: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:475:33: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:490:39: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:508:30: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]"} | ["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:454:33: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:459:19: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:475:33: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:490:39: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]","clang/test/SemaCXX/MicrosoftExtensions.cpp:508:30: warning: \'sealed\' keyword is a Microsoft extension [-Wmicrosoft-sealed]"} | ||
| Line 1,235: | Line 1,236: | ||
}, | }, | ||
["ext_ms_static_assert"]={ | ["ext_ms_static_assert"]={ | ||
[ | [l]={F,"microsoft-static-assert"}, | ||
[ | [k]="microsoft-static-assert", | ||
[ | [i]={{nil,x,"ext_ms_static_assert"}}, | ||
[b]={{nil, | [b]={{nil,x,"use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension"}}, | ||
[ | [g]={{nil,x,"use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="use of \'static_assert\' without inclusion of \\<assert\\.h\\> is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-static\\-assert[^\\]]*\\]", | ||
[ | [a]={{nil,x,G}}, | ||
[ | [h]={ad,1612659633,Zc,Yc}, | ||
[ | [d]={{R,978,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n // ...\n if (Tok.is(tok::kw_static_assert)) {\n if (!getLangOpts().CPlusPlus) {\n if (getLangOpts().C2x)\n // ...\n else\n Diag(Tok, diag::ext_ms_static_assert) << FixItHint::CreateReplacement(Tok.getLocation(), \"_Static_assert\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/static-assert.c"]={"clang/test/Sema/static-assert.c:16:1: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]","clang/test/Sema/static-assert.c:24:3: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]","clang/test/Sema/static-assert.c:37:3: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]","clang/test/Sema/static-assert.c:72:1: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]"} | ["clang/test/Sema/static-assert.c"]={"clang/test/Sema/static-assert.c:16:1: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]","clang/test/Sema/static-assert.c:24:3: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]","clang/test/Sema/static-assert.c:37:3: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]","clang/test/Sema/static-assert.c:72:1: warning: use of \'static_assert\' without inclusion of <assert.h> is a Microsoft extension [-Wmicrosoft-static-assert]"} | ||
| Line 1,251: | Line 1,252: | ||
}, | }, | ||
["ext_ms_template_spec_redecl_out_of_scope"]={ | ["ext_ms_template_spec_redecl_out_of_scope"]={ | ||
[ | [l]={F,hb}, | ||
[ | [k]=hb, | ||
[ | [i]="ext_ms_template_spec_redecl_out_of_scope", | ||
[b]={{nil, | [b]={{nil,nb,"%select{class template|class template partial|variable template|variable template partial|function template|member function|static data member|member class|member enumeration}0 specialization of %1 not in %select{a namespace enclosing %2|class %2 or an enclosing namespace}3 is a Microsoft extension"},{E,nil,"%select{class template|class template partial|variable template|variable template partial|function template|member function|static data member|member class|member enumeration}0 specialization of %1 outside namespace enclosing %2 is a Microsoft extension"}}, | ||
[ | [g]={{nil,nb,{{"class template","class template partial","variable template","variable template partial","function template","member function","static data member","member class","member enumeration"}," specialization of B not in ",{"a namespace enclosing C","class C or an enclosing namespace"}," is a Microsoft extension"}},{E,nil,{{"class template","class template partial","variable template","variable template partial","function template","member function","static data member","member class","member enumeration"}," specialization of B outside namespace enclosing C is a Microsoft extension"}}}, | ||
[ | [f]=n, | ||
[ | [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) is a Microsoft extension", | ||
[ | [c]=rc, | ||
[ | [a]=m, | ||
[ | [h]={"0068cb249965",1426836106,"[MSVC] Explicit specializations can be declared in any namespace (fix for http://llvm.org/PR13738)","[MSVC] Explicit specializations can be declared in any namespace (fix for http://llvm.org/PR13738)\n\nMS compiler emits no errors in case of explicit specializations outside declaration enclosing namespaces, even when language extensions are disabled.\nThe patch is to suppress errors and emit extension warnings if explicit specializations are not declared in the corresponding namespaces.\nThis fixes PR13738.\n\nPatch by Alexey Frolov.\n\nDifferential Revision: http://reviews.llvm.org/D8283\n\nllvm-svn: 232800"}, | ||
[ | [d]={{O,8451,"/// Check whether a specialization is well-formed in the current\n/// context.\n///\n/// This routine determines whether a template specialization can be declared\n/// in the current context (C++ [temp.expl.spec]p2).\n///\n/// \\param S the semantic analysis object for which this check is being\n/// performed.\n///\n/// \\param Specialized the entity being specialized or instantiated, which\n/// may be a kind of template (class template, function template, etc.) or\n/// a member of a class template (member function, static data member,\n/// member class).\n///\n/// \\param PrevDecl the previous declaration of this entity, if any.\n///\n/// \\param Loc the location of the explicit specialization or instantiation of\n/// this entity.\n///\n/// \\param IsPartialSpecialization whether this is a partial specialization of\n/// a class template.\n///\n/// \\returns true if there was an error that we cannot recover from, false\n/// otherwise.\nstatic bool CheckTemplateSpecializationScope(Sema &S, NamedDecl *Specialized, NamedDecl *PrevDecl, SourceLocation Loc, bool IsPartialSpecialization) {\n // ...\n // Make sure that this redeclaration (or definition) occurs in the same\n // scope or an enclosing namespace.\n if (!(DC->isFileContext() ? DC->Encloses(SpecializedContext) : DC->Equals(SpecializedContext))) {\n if (isa<TranslationUnitDecl>(SpecializedContext))\n // ...\n else {\n // ...\n if (S.getLangOpts().MicrosoftExt && !DC->isRecord())\n Diag = diag::ext_ms_template_spec_redecl_out_of_scope;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/ext_ms_template_spec.cpp"]={"clang/test/SemaTemplate/ext_ms_template_spec.cpp:21:10: warning: class template specialization of \'ClassTemplate\' not in a namespace enclosing \'A\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ext_ms_template_spec.cpp:24:10: warning: class template partial specialization of \'ClassTemplatePartial\' not in a namespace enclosing \'A\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ext_ms_template_spec.cpp:27:19: warning: member class specialization of \'MemberClass\' not in class \'X\' or an enclosing namespace is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ext_ms_template_spec.cpp:30:17: warning: member enumeration specialization of \'MemberEnumeration\' not in class \'X\' or an enclosing namespace is a Microsoft extension [-Wmicrosoft-template]"} | ["clang/test/SemaTemplate/ext_ms_template_spec.cpp"]={"clang/test/SemaTemplate/ext_ms_template_spec.cpp:21:10: warning: class template specialization of \'ClassTemplate\' not in a namespace enclosing \'A\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ext_ms_template_spec.cpp:24:10: warning: class template partial specialization of \'ClassTemplatePartial\' not in a namespace enclosing \'A\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ext_ms_template_spec.cpp:27:19: warning: member class specialization of \'MemberClass\' not in class \'X\' or an enclosing namespace is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ext_ms_template_spec.cpp:30:17: warning: member enumeration specialization of \'MemberEnumeration\' not in class \'X\' or an enclosing namespace is a Microsoft extension [-Wmicrosoft-template]"} | ||
| Line 1,267: | Line 1,268: | ||
}, | }, | ||
["ext_ms_template_type_arg_missing_typename"]={ | ["ext_ms_template_type_arg_missing_typename"]={ | ||
[ | [l]={F,hb}, | ||
[ | [k]=hb, | ||
[ | [i]="ext_ms_template_type_arg_missing_typename", | ||
[b]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", | [b]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", | ||
[g]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", | [g]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", | ||
[f]= | [f]=n, | ||
[e]= | [e]="template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension", | ||
[ | [c]=rc, | ||
[ | [a]=m, | ||
[h]={"377c1592f8d3",1402442988,"Recover from missing typenames on template args for MSVC compatibility","Recover from missing typenames on template args for MSVC compatibility\n\nWhile matching a non-type template argument against a known template\ntype parameter we now modify the AST\'s TemplateArgumentLoc to assume the\nuser wrote typename. Under -fms-compatibility, we downgrade our\ndiagnostic from an error to an extwarn.\n\nReviewed by: rsmith\n\nDifferential Revision: http://reviews.llvm.org/D4049\n\nllvm-svn: 210607"}, | |||
[d]={{O,5254,"bool Sema::CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, TemplateArgumentLoc &AL, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted) {\n // ...\n case TemplateArgument::Expression: {\n // ...\n if (auto *II = NameInfo.getName().getAsIdentifierInfo()) {\n // ...\n if (Result.getAsSingle<TypeDecl>() || Result.getResultKind() == LookupResult::NotFoundInCurrentInstantiation) {\n // ...\n Diag(Loc, getLangOpts().MSVCCompat ? diag::ext_ms_template_type_arg_missing_typename : diag::err_template_arg_must_be_type_suggest) << FixItHint::CreateInsertion(Loc, \"typename \");"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/typename-specifier.cpp"]={"clang/test/SemaTemplate/typename-specifier.cpp:174:8: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:192:8: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:165:10: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:185:10: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:210:7: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:217:7: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]"} | ["clang/test/SemaTemplate/typename-specifier.cpp"]={"clang/test/SemaTemplate/typename-specifier.cpp:174:8: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:192:8: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:165:10: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:185:10: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:210:7: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/typename-specifier.cpp:217:7: warning: template argument for template type parameter must be a type; omitted \'typename\' is a Microsoft extension [-Wmicrosoft-template]"} | ||
| Line 1,283: | Line 1,284: | ||
}, | }, | ||
["ext_ms_using_declaration_inaccessible"]={ | ["ext_ms_using_declaration_inaccessible"]={ | ||
[ | [l]={F,"microsoft-using-decl"}, | ||
[ | [k]="microsoft-using-decl", | ||
[ | [i]="ext_ms_using_declaration_inaccessible", | ||
[b]="using declaration referring to inaccessible member \'%0\' (which refers to accessible member \'%1\') is a Microsoft compatibility extension", | [b]="using declaration referring to inaccessible member \'%0\' (which refers to accessible member \'%1\') is a Microsoft compatibility extension", | ||
[ | [g]="using declaration referring to inaccessible member \'A\' (which refers to accessible member \'B\') is a Microsoft compatibility extension", | ||
[ | [f]=n, | ||
[ | [e]="using declaration referring to inaccessible member \'(.*?)\' \\(which refers to accessible member \'(.*?)\'\\) is a Microsoft compatibility extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-using\\-decl[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"e434590bd90d",1325195853,"Change the diagnostics which said \'accepted as an extension\' to instead say","Change the diagnostics which said \'accepted as an extension\' to instead say\n\'is an extension\'. The former is inappropriate and confusing when building with\n-Werror/-pedantic-errors.\n\nllvm-svn: 147357"}, | ||
[ | [d]={{Wb,1328,"/// MSVC has a bug where if during an using declaration name lookup,\n/// the declaration found is unaccessible (private) and that declaration\n/// was bring into scope via another using declaration whose target\n/// declaration is accessible (public) then no error is generated.\n/// Example:\n/// class A {\n/// public:\n/// int f();\n/// };\n/// class B : public A {\n/// private:\n/// using A::f;\n/// };\n/// class C : public B {\n/// private:\n/// using B::f;\n/// };\n///\n/// Here, B::f is private so this should fail in Standard C++, but\n/// because B::f refers to A::f which is public MSVC accepts it.\nstatic bool IsMicrosoftUsingDeclarationAccessBug(Sema &S, SourceLocation AccessLoc, AccessTarget &Entity) {\n if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(Entity.getTargetDecl()))\n if (UsingDecl *UD = dyn_cast<UsingDecl>(Shadow->getIntroducer())) {\n // ...\n if (Entity.getTargetDecl()->getAccess() == AS_private && (OrigDecl->getAccess() == AS_public || OrigDecl->getAccess() == AS_protected)) {\n S.Diag(AccessLoc, diag::ext_ms_using_declaration_inaccessible) << UD->getQualifiedNameAsString() << OrigDecl->getQualifiedNameAsString();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:167:12: warning: using declaration referring to inaccessible member \'ms_using_declaration_bug::B::f\' (which refers to accessible member \'ms_using_declaration_bug::A::f\') is a Microsoft compatibility extension [-Wmicrosoft-using-decl]"} | ["clang/test/SemaCXX/MicrosoftCompatibility.cpp"]={"clang/test/SemaCXX/MicrosoftCompatibility.cpp:167:12: warning: using declaration referring to inaccessible member \'ms_using_declaration_bug::B::f\' (which refers to accessible member \'ms_using_declaration_bug::A::f\') is a Microsoft compatibility extension [-Wmicrosoft-using-decl]"} | ||
| Line 1,299: | Line 1,300: | ||
}, | }, | ||
["ext_multi_line_line_comment"]={ | ["ext_multi_line_line_comment"]={ | ||
[ | [l]={jb,qb,"comment","comments",pb,t}, | ||
[ | [k]="comment", | ||
[ | [i]="ext_multi_line_line_comment", | ||
[b]="multi-line // comment", | [b]="multi-line // comment", | ||
[ | [g]="multi-line // comment", | ||
[ | [f]=n, | ||
[ | [e]="multi\\-line \\/\\/ comment", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcomment[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"158a31abe2c2",1352617334,"s/BCPLComment/LineComment/","s/BCPLComment/LineComment/\n\nllvm-svn: 167690"}, | ||
[ | [d]={{Kb,2549,"/// We have just read the // characters from input. Skip until we find the\n/// newline character that terminates the comment. Then update BufferPtr and\n/// return.\n///\n/// If we\'re in KeepCommentMode or any CommentHandler has inserted\n/// some tokens, this will store the first token and return true.\nbool Lexer::SkipLineComment(Token &Result, const char *CurPtr, bool &TokAtPhysicalStartOfLine) {\n // ...\n while (true) {\n // ...\n // If we read multiple characters, and one of those characters was a \\r or\n // \\n, then we had an escaped newline within the comment. Emit diagnostic\n // unless the next line is also a // comment.\n if (CurPtr != OldPtr + 1 && C != \'/\' && (CurPtr == BufferEnd + 1 || CurPtr[0] != \'/\')) {\n for (; OldPtr != CurPtr; ++OldPtr)\n if (OldPtr[0] == \'\\n\' || OldPtr[0] == \'\\r\') {\n // ...\n if (!isLexingRawMode())\n Diag(OldPtr - 1, diag::ext_multi_line_line_comment);"}} | ||
}, | }, | ||
["ext_multi_using_declaration"]={ | ["ext_multi_using_declaration"]={ | ||
[ | [l]={Y,Cb}, | ||
[ | [k]=Y, | ||
[ | [i]="ext_multi_using_declaration", | ||
[b]="use of multiple declarators in a single using declaration is a C++1z extension", | [b]="use of multiple declarators in a single using declaration is a C++1z extension", | ||
[ | [g]="use of multiple declarators in a single using declaration is a C++1z extension", | ||
[ | [f]=n, | ||
[ | [e]="use of multiple declarators in a single using declaration is a C\\+\\+17 extension", | ||
[ | [c]=zb, | ||
[ | [a]=G, | ||
[ | [h]={"6f1daa4660ed",1481849928,"[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration.","[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration.\n\nllvm-svn: 289905"}, | ||
[ | [d]={{R,855,"/// ParseUsingDeclaration - Parse C++ using-declaration or alias-declaration.\n/// Assumes that \'using\' was already seen.\n///\n/// using-declaration: [C++ 7.3.p3: namespace.udecl]\n/// \'using\' using-declarator-list[opt] ;\n///\n/// using-declarator-list: [C++1z]\n/// using-declarator \'...\'[opt]\n/// using-declarator-list \',\' using-declarator \'...\'[opt]\n///\n/// using-declarator-list: [C++98-14]\n/// using-declarator\n///\n/// alias-declaration: C++11 [dcl.dcl]p1\n/// \'using\' identifier attribute-specifier-seq[opt] = type-id ;\n///\n/// using-enum-declaration: [C++20, dcl.enum]\n/// \'using\' elaborated-enum-specifier ;\n/// The terminal name of the elaborated-enum-specifier undergoes\n/// ordinary lookup\n///\n/// elaborated-enum-specifier:\n/// \'enum\' nested-name-specifier[opt] identifier\nParser::DeclGroupPtrTy Parser::ParseUsingDeclaration(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &PrefixAttrs, AccessSpecifier AS) {\n // ...\n if (DeclsInGroup.size() > 1)\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx17_compat_multi_using_declaration : diag::ext_multi_using_declaration);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx0x-keyword-attributes.cpp"]={"clang/test/Parser/cxx0x-keyword-attributes.cpp:144:51: warning: use of multiple declarators in a single using declaration is a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx0x-keyword-attributes.cpp:155:105: warning: use of multiple declarators in a single using declaration is a C++17 extension [-Wc++17-extensions]"} | ["clang/test/Parser/cxx0x-keyword-attributes.cpp"]={"clang/test/Parser/cxx0x-keyword-attributes.cpp:144:51: warning: use of multiple declarators in a single using declaration is a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx0x-keyword-attributes.cpp:155:105: warning: use of multiple declarators in a single using declaration is a C++17 extension [-Wc++17-extensions]"} | ||
| Line 1,328: | Line 1,329: | ||
}, | }, | ||
["ext_mutable_reference"]={ | ["ext_mutable_reference"]={ | ||
[ | [l]={F,"microsoft-mutable-reference"}, | ||
[ | [k]="microsoft-mutable-reference", | ||
[ | [i]="ext_mutable_reference", | ||
[b]="\'mutable\' on a reference type is a Microsoft extension", | [b]="\'mutable\' on a reference type is a Microsoft extension", | ||
[g]="\'mutable\' on a reference type is a Microsoft extension", | [g]="\'mutable\' on a reference type is a Microsoft extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-mutable\\-reference[^\\]]*\\]", | [f]=n, | ||
[ | [e]="\'mutable\' on a reference type is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-mutable\\-reference[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"8f01bb983c2a",1423025132,"[MSVC2012] Allow \'mutable\' references","[MSVC2012] Allow \'mutable\' references\nSome standard header files from MSVC2012 use \'mutable\' on references, though it is directly prohibited by the standard.\nFix for http://llvm.org/PR22444\nDifferential Revision: http://reviews.llvm.org/D7370\n\nllvm-svn: 228113"}, | |||
[d]={{w,18186,"/// Build a new FieldDecl and check its well-formedness.\n///\n/// This routine builds a new FieldDecl given the fields name, type,\n/// record, etc. \\p PrevDecl should refer to any previous declaration\n/// with the same name and in the same scope as the field to be\n/// created.\n///\n/// \\returns a new FieldDecl.\n///\n/// \\todo The Declarator argument is a hack. It will be removed once\nFieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D) {\n // ...\n // Check that \'mutable\' is consistent with the type of the declaration.\n if (!InvalidDecl && Mutable) {\n // ...\n if (T->isReferenceType())\n DiagID = getLangOpts().MSVCCompat ? diag::ext_mutable_reference : diag::err_mutable_reference;"},{w,18196,"/// Build a new FieldDecl and check its well-formedness.\n///\n/// This routine builds a new FieldDecl given the fields name, type,\n/// record, etc. \\p PrevDecl should refer to any previous declaration\n/// with the same name and in the same scope as the field to be\n/// created.\n///\n/// \\returns a new FieldDecl.\n///\n/// \\todo The Declarator argument is a hack. It will be removed once\nFieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D) {\n // ...\n // Check that \'mutable\' is consistent with the type of the declaration.\n if (!InvalidDecl && Mutable) {\n // ...\n if (DiagID) {\n // ...\n if (DiagID != diag::ext_mutable_reference) {"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/ms_mutable_reference_member.cpp"]={"clang/test/SemaCXX/ms_mutable_reference_member.cpp:4:3: warning: \'mutable\' on a reference type is a Microsoft extension [-Wmicrosoft-mutable-reference]"} | ["clang/test/SemaCXX/ms_mutable_reference_member.cpp"]={"clang/test/SemaCXX/ms_mutable_reference_member.cpp:4:3: warning: \'mutable\' on a reference type is a Microsoft extension [-Wmicrosoft-mutable-reference]"} | ||
| Line 1,344: | Line 1,345: | ||
}, | }, | ||
["ext_named_variadic_macro"]={ | ["ext_named_variadic_macro"]={ | ||
[ | [l]={t,Mc}, | ||
[ | [k]=Mc, | ||
[ | [i]="ext_named_variadic_macro", | ||
[b]="named variadic macros are a GNU extension", | [b]="named variadic macros are a GNU extension", | ||
[g]="named variadic macros are a GNU extension", | [g]="named variadic macros are a GNU extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", | [f]=n, | ||
[ | [e]="named variadic macros are a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{bb,2735,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n case tok::ellipsis: // #define X(A... -> GCC extension\n // ...\n Diag(Tok, diag::ext_named_variadic_macro);"}} | |||
}, | }, | ||
["ext_nested_name_member_ref_lookup_ambiguous"]={ | ["ext_nested_name_member_ref_lookup_ambiguous"]={ | ||
[ | [l]={"ambiguous-member-template"}, | ||
[ | [k]="ambiguous-member-template", | ||
[ | [i]="ext_nested_name_member_ref_lookup_ambiguous", | ||
[b]="lookup of %0 in member access expression is ambiguous; using member of %1", | [b]="lookup of %0 in member access expression is ambiguous; using member of %1", | ||
[ | [g]="lookup of A in member access expression is ambiguous; using member of B", | ||
[ | [f]=n, | ||
[ | [e]="lookup of (.*?) in member access expression is ambiguous; using member of (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wambiguous\\-member\\-template[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"2f96e9f5c90d",1275701997,"Add an extension to avoid an error when a global template has the same name as","Add an extension to avoid an error when a global template has the same name as\na member template, and you try to call the member template with an explicit\ntemplate argument. See PR7247 \n\nFor example, this downgrades the error to a warning in:\n\ntemplate<typename T> struct set{};\nstruct Value {\n template<typename T>\n void set(T value) {\n }\n};\nvoid foo() {\n Value v;\n v.set<double>(3.2); // Warning here.\n}\n\nllvm-svn: 105518"}, | ||
[ | [d]={{O,605,"bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate, AssumedTemplateKind *ATK, bool AllowTypoCorrection) {\n // ...\n if (S && !ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (FoundOuter.empty()) {\n // ...\n } else if (FoundOuter.isAmbiguous() || !FoundOuter.isSingleResult() || !(OuterTemplate = getAsTemplateNameDecl(FoundOuter.getFoundDecl()))) {\n // ...\n } else if (!Found.isSuppressingDiagnostics()) {\n // - if the name found is a class template, it must refer to the same\n // entity as the one found in the class of the object expression,\n // otherwise the program is ill-formed.\n if (!Found.isSingleResult() || getAsTemplateNameDecl(Found.getFoundDecl())->getCanonicalDecl() != OuterTemplate->getCanonicalDecl()) {\n Diag(Found.getNameLoc(), diag::ext_nested_name_member_ref_lookup_ambiguous) << Found.getLookupName() << ObjectType;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp:47:7: warning: lookup of \'set\' in member access expression is ambiguous; using member of \'Value\' [-Wambiguous-member-template]"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp:47:7: warning: lookup of \'set\' in member access expression is ambiguous; using member of \'Value\' [-Wambiguous-member-template]"} | ||
| Line 1,373: | Line 1,374: | ||
}, | }, | ||
["ext_nested_name_spec_is_enum"]={ | ["ext_nested_name_spec_is_enum"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_nested_name_spec_is_enum", | ||
[b]="use of enumeration in a nested name specifier is a C++11 extension", | [b]="use of enumeration in a nested name specifier is a C++11 extension", | ||
[ | [g]="use of enumeration in a nested name specifier is a C++11 extension", | ||
[ | [f]=n, | ||
[ | [e]="use of enumeration in a nested name specifier is a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=m, | ||
[ | [h]={"25a8afa9579e",1421611475,"Handle unscoped enumeration in nested name specifier.","Handle unscoped enumeration in nested name specifier.\n\nIf an unscoped enum is used as a nested name specifier and the language dialect\nis not C++ 11, issue an extension warning.\nThis fixes PR16951.\n\nDifferential Revision: http://reviews.llvm.org/D6389\n\nllvm-svn: 226413"}, | ||
[ | [d]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",648,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (!AcceptSpec && IsExtension) {\n // ...\n Diag(IdInfo.IdentifierLoc, diag::ext_nested_name_spec_is_enum);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:119:14: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:428:16: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:430:16: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:433:16: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:440:12: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:441:12: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]"} | ["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:119:14: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:428:16: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:430:16: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:433:16: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:440:12: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/nested-name-spec.cpp:441:12: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]"} | ||
| Line 1,389: | Line 1,390: | ||
}, | }, | ||
["ext_nested_namespace_definition"]={ | ["ext_nested_namespace_definition"]={ | ||
[ | [l]={Y,Cb}, | ||
[ | [k]=Y, | ||
[ | [i]="ext_nested_namespace_definition", | ||
[b]="nested namespace definition is a C++1z extension; define each namespace separately", | [b]="nested namespace definition is a C++1z extension; define each namespace separately", | ||
[ | [g]="nested namespace definition is a C++1z extension; define each namespace separately", | ||
[ | [f]=n, | ||
[ | [e]="nested namespace definition is a C\\+\\+17 extension; define each namespace separately", | ||
[ | [c]=zb, | ||
[ | [a]=G, | ||
[ | [h]={"13307f5f2429",1415425054,"[c++1z] Implement nested-namespace-definitions.","[c++1z] Implement nested-namespace-definitions.\n\nThis allows \'namespace A::B { ... }\' as a shorthand for \'namespace A {\nnamespace B { ... } }\'. We already supported this correctly for error recovery;\npromote that support to a full implementation.\n\nThis is not the right implementation: we do not maintain source fidelity\nbecause we desugar the nested namespace definition in the parser. This is\ntricky to avoid, since the definition genuinely does inject one named\nentity per level in the namespace name.\n\nllvm-svn: 221574"}, | ||
[ | [d]={{R,191,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n if (ExtraNSs.empty()) {\n // ...\n } else if (InlineLoc.isValid()) {\n // ...\n } else if (getLangOpts().CPlusPlus20) {\n // ...\n } else if (getLangOpts().CPlusPlus17) {\n // ...\n } else {\n // ...\n if (!rBraceToken.is(tok::r_brace)) {\n Diag(ExtraNSs[0].NamespaceLoc, diag::ext_nested_namespace_definition) << SourceRange(ExtraNSs.front().NamespaceLoc, ExtraNSs.back().IdentLoc);"},{R,208,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n if (ExtraNSs.empty()) {\n // ...\n } else if (InlineLoc.isValid()) {\n // ...\n } else if (getLangOpts().CPlusPlus20) {\n // ...\n } else if (getLangOpts().CPlusPlus17) {\n // ...\n } else {\n // ...\n if (!rBraceToken.is(tok::r_brace)) {\n // ...\n } else {\n // ...\n Diag(ExtraNSs[0].NamespaceLoc, diag::ext_nested_namespace_definition) << FixItHint::CreateReplacement(SourceRange(ExtraNSs.front().NamespaceLoc, ExtraNSs.back().IdentLoc), NamespaceFix) << FixItHint::CreateInsertion(rBraceToken.getLocation(), RBraces);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp"]={"clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:19:17: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]","clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:26:17: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]","clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:36:17: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]"} | ["clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp"]={"clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:19:17: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]","clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:26:17: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]","clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp:36:17: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]"} | ||
| Line 1,405: | Line 1,406: | ||
}, | }, | ||
["ext_nested_pointer_qualifier_mismatch"]={ | ["ext_nested_pointer_qualifier_mismatch"]={ | ||
[ | [l]={Xc,"incompatible-pointer-types-discards-qualifiers"}, | ||
[ | [k]="incompatible-pointer-types-discards-qualifiers", | ||
[ | [i]="ext_nested_pointer_qualifier_mismatch", | ||
[b]="%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 discards qualifiers in nested pointer types", | [b]="%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 discards qualifiers in nested pointer types", | ||
[ | [g]={{nil,nil,{{{{Fb,Vb}},{{Lb,Ob}},{{Mb,Ub}},{{Ib,Hb}},{{Nb,Gb}},{{Jb,Pb}},{{Sb,Rb}}}," discards qualifiers in nested pointer types"}}}, | ||
[ | [f]=n, | ||
[ | [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 in nested pointer types", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types\\-discards\\-qualifiers[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"b98dade25bc9",1257804997,"Changed error for nested type qualifier mismatch to","Changed error for nested type qualifier mismatch to\nwarning, to match gcc. It used to be warning, so\nbetter keep it a warning (it broke a certain project).\n\nllvm-svn: 86597"}, | ||
[ | [d]={{Uc,2678,"void CastOperation::checkAddressSpaceCast(QualType SrcType, QualType DestType) {\n // ...\n // Converting the top level pointee addrspace is permitted for compatible\n // addrspaces (such as \'generic int *\' to \'local int *\' or vice versa), but\n // if any of the nested pointee addrspaces differ, we emit a warning\n // regardless of addrspace compatibility. This makes\n // local int ** p;\n // return (generic int **) p;\n // warn even though local -> generic is permitted.\n if (Self.getLangOpts().OpenCL) {\n // ...\n while (isa<PointerType>(DestPtr) && isa<PointerType>(SrcPtr)) {\n // ...\n DiagID = diag::ext_nested_pointer_qualifier_mismatch;"},{v,17644,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatibleNestedPointerQualifiers:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_nested_pointer_qualifier_mismatch;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/pointer-conversion.c"]={"clang/test/Sema/pointer-conversion.c:4:15: warning: initializing \'const char **\' with an expression of type \'char **\' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]","clang/test/Sema/pointer-conversion.c:7:11: warning: initializing \'dchar ***\' (aka \'char ***\') with an expression of type \'const char ***\' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]","clang/test/Sema/pointer-conversion.c:10:9: warning: initializing \'char **\' with an expression of type \'volatile char **\' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]"} | ["clang/test/Sema/pointer-conversion.c"]={"clang/test/Sema/pointer-conversion.c:4:15: warning: initializing \'const char **\' with an expression of type \'char **\' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]","clang/test/Sema/pointer-conversion.c:7:11: warning: initializing \'dchar ***\' (aka \'char ***\') with an expression of type \'const char ***\' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]","clang/test/Sema/pointer-conversion.c:10:9: warning: initializing \'char **\' with an expression of type \'volatile char **\' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]"} | ||
| Line 1,421: | Line 1,422: | ||
}, | }, | ||
["ext_new_paren_array_nonconst"]={ | ["ext_new_paren_array_nonconst"]={ | ||
[ | [i]="ext_new_paren_array_nonconst", | ||
[b]="when type is in parentheses, array cannot have dynamic size", | [b]="when type is in parentheses, array cannot have dynamic size", | ||
[g]="when type is in parentheses, array cannot have dynamic size", | [g]="when type is in parentheses, array cannot have dynamic size", | ||
[f]= | [f]=n, | ||
[e]= | [e]="when type is in parentheses, array cannot have dynamic size", | ||
[ | [c]=lc, | ||
[ | [a]=m, | ||
[h]={"f2753b3b4efb",1279036472,"Downgrade the \"when type is in parentheses, array cannot have dynamic","Downgrade the \"when type is in parentheses, array cannot have dynamic\nsize\" error for code like \n\n new (int [size])\n\nto a warning, add a Fix-It to remove the parentheses, and make this\ndiagnostic work properly when it occurs in a template\ninstantiation. <rdar://problem/8018245>.\n\nllvm-svn: 108242"}, | |||
[d]={{Tb,2237,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n // ...\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n // ...\n // We\'ve already performed any required implicit conversion to integer or\n // unscoped enumeration type.\n // FIXME: Per CWG1464, we are required to check the value prior to\n // converting to size_t. This will never find a negative array size in\n // C++14 onwards, because Value is always unsigned here!\n if (std::optional<llvm::APSInt> Value = (*ArraySize)->getIntegerConstantExpr(Context)) {\n // ...\n } else if (TypeIdParens.isValid()) {\n // ...\n Diag((*ArraySize)->getBeginLoc(), diag::ext_new_paren_array_nonconst) << (*ArraySize)->getSourceRange() << FixItHint::CreateRemoval(TypeIdParens.getBegin()) << FixItHint::CreateRemoval(TypeIdParens.getEnd());"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/new-delete.cpp"]={"clang/test/SemaCXX/new-delete.cpp:108:18: warning: when type is in parentheses, array cannot have dynamic size","clang/test/SemaCXX/new-delete.cpp:402:21: warning: when type is in parentheses, array cannot have dynamic size"} | ["clang/test/SemaCXX/new-delete.cpp"]={"clang/test/SemaCXX/new-delete.cpp:108:18: warning: when type is in parentheses, array cannot have dynamic size","clang/test/SemaCXX/new-delete.cpp:402:21: warning: when type is in parentheses, array cannot have dynamic size"} | ||
| Line 1,435: | Line 1,436: | ||
}, | }, | ||
["ext_no_declarators"]={ | ["ext_no_declarators"]={ | ||
[ | [l]={wc}, | ||
[ | [k]=wc, | ||
[ | [i]="ext_no_declarators", | ||
[b]="declaration does not declare anything", | [b]="declaration does not declare anything", | ||
[g]="declaration does not declare anything", | [g]="declaration does not declare anything", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", | [f]=n, | ||
[ | [e]="declaration does not declare anything", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"f19ac0ede900",1270762403,"Downgrade the \"declaration does not declare anything\" error to a","Downgrade the \"declaration does not declare anything\" error to a\nwarning. It\'s not harmful to have such pointless declarations, and GCC\ndoes not diagnose this issue consistently.\n\nllvm-svn: 100814"}, | |||
[d]={{w,5266,"/// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with\n/// no declarator (e.g. \"struct foo;\") is parsed. It also accepts template\n/// parameters to cope with template friend declarations.\nDecl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord) {\n // ...\n // C 6.7/2:\n // A declaration [...] shall declare at least a declarator [...], a tag,\n // or the members of an enumeration.\n // C++ [dcl.dcl]p3:\n // [If there are no declarators], and except for the declaration of an\n // unnamed bit-field, the decl-specifier-seq shall introduce one or more\n // names into the program, or shall redeclare a name introduced by a\n // previous declaration.\n if (!DeclaresAnything) {\n // ...\n Diag(DS.getBeginLoc(), (IsExplicitInstantiation || !TemplateParams.empty()) ? diag::err_no_declarators : diag::ext_no_declarators) << DS.getSourceRange();"},{w,5690,"/// BuildAnonymousStructOrUnion - Handle the declaration of an\n/// anonymous structure or union. Anonymous unions are a C++ feature\n/// (C++ [class.union]) and a C11 feature; anonymous structures\n/// are a C11 feature and GNU C++ extension.\nDecl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy) {\n // ...\n // C++ [dcl.dcl]p3:\n // [If there are no declarators], and except for the declaration of an\n // unnamed bit-field, the decl-specifier-seq shall introduce one or more\n // names into the program\n // C++ [class.mem]p2:\n // each such member-declaration shall either declare at least one member\n // name of the class or declare at least one unnamed bit-field\n //\n // For C this is an error even for a named struct, and is diagnosed elsewhere.\n if (getLangOpts().CPlusPlus && Record->field_empty())\n Diag(DS.getBeginLoc(), diag::ext_no_declarators) << DS.getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:116:3: warning: declaration does not declare anything [-Wmissing-declarations]"} | ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:116:3: warning: declaration does not declare anything [-Wmissing-declarations]"} | ||
| Line 1,451: | Line 1,452: | ||
}, | }, | ||
["ext_no_named_members_in_struct_union"]={ | ["ext_no_named_members_in_struct_union"]={ | ||
[ | [l]={W,"gnu-empty-struct",t}, | ||
[ | [k]="gnu-empty-struct", | ||
[ | [i]="ext_no_named_members_in_struct_union", | ||
[b]="%select{struct|union}0 without named members is a GNU extension", | [b]="%select{struct|union}0 without named members is a GNU extension", | ||
[ | [g]={{nil,nil,{{"struct","union"}," without named members is a GNU extension"}}}, | ||
[ | [f]=n, | ||
[ | [e]="(?:struct|union) without named members is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-empty\\-struct[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"89578fd43981",1370698198,"Recognition of empty structures and unions is moved to semantic stage","Recognition of empty structures and unions is moved to semantic stage\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D586\n\nllvm-svn: 183609"}, | ||
[ | [d]={{w,19136,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n // Okay, we successfully defined \'Record\'.\n if (Record) {\n // ...\n if (CheckForZeroSize) {\n // ...\n // Structs without named members are extension in C (C99 6.7.2.1p7),\n // but are accepted by GCC.\n if (NonBitFields == 0 && !getLangOpts().CPlusPlus) {\n Diag(RecLoc, IsEmpty ? diag::ext_empty_struct_union : diag::ext_no_named_members_in_struct_union) << Record->isUnion();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:114:1: warning: struct without named members is a GNU extension [-Wgnu-empty-struct]"} | ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:114:1: warning: struct without named members is a GNU extension [-Wgnu-empty-struct]"} | ||
| Line 1,467: | Line 1,468: | ||
}, | }, | ||
["ext_no_newline_eof"]={ | ["ext_no_newline_eof"]={ | ||
[ | [l]={"newline-eof",t}, | ||
[ | [k]="newline-eof", | ||
[ | [i]="ext_no_newline_eof", | ||
[b]="no newline at end of file", | [b]="no newline at end of file", | ||
[g]="no newline at end of file", | [g]="no newline at end of file", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wnewline\\-eof[^\\]]*\\]", | [f]=n, | ||
[ | [e]="no newline at end of file", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnewline\\-eof[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{Kb,3058,"/// LexEndOfFile - CurPtr points to the end of this file. Handle this\n/// condition, reporting diagnostics and handling other edge cases as required.\n/// This returns true if Result contains a token, false if PP.Lex should be\n/// called again.\nbool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {\n // ...\n // C99 5.1.1.2p2: If the file is non-empty and didn\'t end in a newline, issue\n // a pedwarn.\n if (CurPtr != BufferStart && (CurPtr[-1] != \'\\n\' && CurPtr[-1] != \'\\r\')) {\n // ...\n if (LangOpts.CPlusPlus11) {\n // ...\n } else {\n DiagID = diag::ext_no_newline_eof;"}} | |||
}, | }, | ||
["ext_non_c_like_anon_struct_in_typedef"]={ | ["ext_non_c_like_anon_struct_in_typedef"]={ | ||
[ | [l]={"non-c-typedef-for-linkage"}, | ||
[ | [k]="non-c-typedef-for-linkage", | ||
[ | [i]={{nil,A,"ext_non_c_like_anon_struct_in_typedef"}}, | ||
[b]={{nil, | [b]={{nil,A,"anonymous non-C-compatible type given name for linkage purposes by %select{typedef|alias}0 declaration; add a tag name here"}}, | ||
[ | [g]={{nil,A,{"anonymous non-C-compatible type given name for linkage purposes by ",{"typedef","alias"}," declaration; add a tag name here"}}}, | ||
[ | [f]=n, | ||
[ | [e]="anonymous non\\-C\\-compatible type given name for linkage purposes by (?:typedef|alias) declaration; add a tag name here", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnon\\-c\\-typedef\\-for\\-linkage[^\\]]*\\]", | ||
[ | [a]={{nil,A,m}}, | ||
[ | [h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | ||
[ | [d]={{w,5011,"void Sema::setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD) {\n // ...\n if (NonCLike || ChangesLinkage) {\n // ...\n unsigned DiagID = diag::ext_non_c_like_anon_struct_in_typedef;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-unused-local-typedef.cpp"]={"clang/test/SemaCXX/warn-unused-local-typedef.cpp:111:17: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]","clang/test/SemaCXX/warn-unused-local-typedef.cpp:116:20: warning: anonymous non-C-compatible type given name for linkage purposes by alias declaration; add a tag name here [-Wnon-c-typedef-for-linkage]"} | ["clang/test/SemaCXX/warn-unused-local-typedef.cpp"]={"clang/test/SemaCXX/warn-unused-local-typedef.cpp:111:17: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]","clang/test/SemaCXX/warn-unused-local-typedef.cpp:116:20: warning: anonymous non-C-compatible type given name for linkage purposes by alias declaration; add a tag name here [-Wnon-c-typedef-for-linkage]"} | ||
| Line 1,496: | Line 1,497: | ||
}, | }, | ||
["ext_nonclass_type_friend"]={ | ["ext_nonclass_type_friend"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_nonclass_type_friend", | ||
[b]="non-class friend type %0 is a C++11 extension", | [b]="non-class friend type %0 is a C++11 extension", | ||
[ | [g]="non-class friend type A is a C++11 extension", | ||
[ | [f]=n, | ||
[ | [e]="non\\-class friend type (.*?) is a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=m, | ||
[ | [h]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:","Improve handling of friend types in several ways:\n - When instantiating a friend type template, perform semantic\n analysis on the resulting type.\n - Downgrade the errors concerning friend type declarations that do\n not refer to classes to ExtWarns in C++98/03. C++0x allows\n practically any type to be befriended, and ignores the friend\n declaration if the type is not a class.\n\nllvm-svn: 100635"}, | ||
[ | [d]={{Z,17221,"/// Perform semantic analysis of the given friend type declaration.\n///\n/// \\returns A friend declaration that.\nFriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo) {\n // ...\n // C++03 [class.friend]p2:\n // An elaborated-type-specifier shall be used in a friend declaration\n // for a class.*\n //\n // * The class-key of the elaborated-type-specifier is required.\n if (!CodeSynthesisContexts.empty()) {\n // ...\n } else {\n if (!T->isElaboratedTypeSpecifier()) {\n // If we evaluated the type to a record type, suggest putting\n // a tag in front.\n if (const RecordType *RT = T->getAs<RecordType>()) {\n // ...\n } else {\n Diag(FriendLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_nonclass_type_friend : diag::ext_nonclass_type_friend) << T << TypeRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class.access/class.friend/p2-cxx03.cpp"]={"clang/test/CXX/class.access/class.friend/p2-cxx03.cpp:6:3: warning: non-class friend type \'T\' is a C++11 extension [-Wc++11-extensions]"} | ["clang/test/CXX/class.access/class.friend/p2-cxx03.cpp"]={"clang/test/CXX/class.access/class.friend/p2-cxx03.cpp:6:3: warning: non-class friend type \'T\' is a C++11 extension [-Wc++11-extensions]"} | ||
| Line 1,512: | Line 1,513: | ||
}, | }, | ||
["ext_nonstandard_escape"]={ | ["ext_nonstandard_escape"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_nonstandard_escape", | ||
[b]="use of non-standard escape character \'\\%0\'", | [b]="use of non-standard escape character \'\\%0\'", | ||
[ | [g]="use of non-standard escape character \'\\A\'", | ||
[ | [f]=n, | ||
[ | [e]="use of non\\-standard escape character \'\\\\(.*?)\'", | ||
[ | [c]=X, | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{Yb,164,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n case \'e\':\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_nonstandard_escape) << \"e\";"},{Yb,170,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n case \'E\':\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_nonstandard_escape) << \"E\";"},{Yb,331,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n case \'(\':\n case \'{\':\n case \'[\':\n case \'%\':\n // GCC accepts these as extensions. We warn about them as such though.\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_nonstandard_escape) << std::string(1, ResultChar);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Lexer/char-escapes.c"]={"clang/test/Lexer/char-escapes.c:10:11: warning: use of non-standard escape character \'\\e\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:11:11: warning: use of non-standard escape character \'\\E\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:19:11: warning: use of non-standard escape character \'\\(\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:20:11: warning: use of non-standard escape character \'\\{\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:21:11: warning: use of non-standard escape character \'\\[\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:22:11: warning: use of non-standard escape character \'\\%\' [-Wpedantic]"} | ["clang/test/Lexer/char-escapes.c"]={"clang/test/Lexer/char-escapes.c:10:11: warning: use of non-standard escape character \'\\e\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:11:11: warning: use of non-standard escape character \'\\E\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:19:11: warning: use of non-standard escape character \'\\(\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:20:11: warning: use of non-standard escape character \'\\{\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:21:11: warning: use of non-standard escape character \'\\[\' [-Wpedantic]","clang/test/Lexer/char-escapes.c:22:11: warning: use of non-standard escape character \'\\%\' [-Wpedantic]"} | ||
| Line 1,528: | Line 1,529: | ||
}, | }, | ||
["ext_nonstatic_member_init"]={ | ["ext_nonstatic_member_init"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_nonstatic_member_init", | ||
[b]={{nil, | [b]={{nil,z,"default member initializer for non-static data member is a C++11 extension"},{Lc,nil,"in-class initialization of non-static data member is a C++11 extension"}}, | ||
[ | [g]={{nil,z,"default member initializer for non-static data member is a C++11 extension"},{Lc,nil,"in-class initialization of non-static data member is a C++11 extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="default member initializer for non\\-static data member is a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=G, | ||
[ | [h]={"bffe88027cc2",1318650917,"Rename an ExtWarn to ext_ for consistency.","Rename an ExtWarn to ext_ for consistency.\n\nllvm-svn: 142049"}, | ||
[ | [d]={{R,3103,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n // ...\n while (true) {\n // ...\n // Handle the initializer.\n if (HasInClassInit != ICIS_NoInit) {\n // ...\n Diag(Tok, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_nonstatic_member_init : diag::ext_nonstatic_member_init);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:45:9: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]"} | ["clang/test/SemaCXX/class.cpp"]={"clang/test/SemaCXX/class.cpp:45:9: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]"} | ||
| Line 1,544: | Line 1,545: | ||
}, | }, | ||
["ext_noreturn_main"]={ | ["ext_noreturn_main"]={ | ||
[ | [l]={yc}, | ||
[ | [k]=yc, | ||
[ | [i]="ext_noreturn_main", | ||
[b]="\'main\' is not allowed to be declared _Noreturn", | [b]="\'main\' is not allowed to be declared _Noreturn", | ||
[g]="\'main\' is not allowed to be declared _Noreturn", | [g]="\'main\' is not allowed to be declared _Noreturn", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", | [f]=n, | ||
[ | [e]="\'main\' is not allowed to be declared _Noreturn", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"0015f0987792",1358460971,"Parsing support for C11\'s _Noreturn keyword. No semantics yet.","Parsing support for C11\'s _Noreturn keyword. No semantics yet.\n\nllvm-svn: 172761"}, | |||
[d]={{w,12085,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (DS.isNoreturnSpecified()) {\n // ...\n Diag(NoreturnLoc, diag::ext_noreturn_main);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:27:1: warning: \'main\' is not allowed to be declared _Noreturn [-Wmain]"} | ["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:27:1: warning: \'main\' is not allowed to be declared _Noreturn [-Wmain]"} | ||
| Line 1,560: | Line 1,561: | ||
}, | }, | ||
["ext_ns_enum_attribute"]={ | ["ext_ns_enum_attribute"]={ | ||
[ | [l]={Y,Cb,t}, | ||
[ | [k]=Y, | ||
[ | [i]={{nil,E,"ext_ns_enum_attribute"}}, | ||
[b]={{nil, | [b]={{nil,E,"attributes on %select{a namespace|an enumerator}0 declaration are a C++17 extension"}}, | ||
[ | [g]={{nil,E,{"attributes on ",{"a namespace","an enumerator"}," declaration are a C++17 extension"}}}, | ||
[ | [f]=n, | ||
[ | [e]="attributes on (?:a namespace|an enumerator) declaration are a C\\+\\+17 extension", | ||
[ | [c]=zb, | ||
[ | [a]={{nil,E,G}}, | ||
[ | [h]={"40e202f7d996",1507942584,"Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature.","Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature.\n\nllvm-svn: 315784"}, | ||
[ | [d]={{xb,5203,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // ...\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // ...\n if (isAllowedCXX11AttributeSpecifier()) {\n if (getLangOpts().CPlusPlus)\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_ns_enum_attribute : diag::ext_ns_enum_attribute) << 1 /*enumerator*/;"},{R,94,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n auto ReadAttributes = [&] {\n // ...\n do {\n // ...\n if (getLangOpts().CPlusPlus11 && isCXX11AttributeSpecifier()) {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_ns_enum_attribute : diag::ext_ns_enum_attribute) << 0 /*namespace*/;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx0x-keyword-attributes.cpp"]={"clang/test/Parser/cxx0x-keyword-attributes.cpp:127:11: warning: attributes on a namespace declaration are a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx0x-keyword-attributes.cpp:188:9: warning: attributes on an enumerator declaration are a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx0x-keyword-attributes.cpp:344:11: warning: attributes on a namespace declaration are a C++17 extension [-Wc++17-extensions]"} | ["clang/test/Parser/cxx0x-keyword-attributes.cpp"]={"clang/test/Parser/cxx0x-keyword-attributes.cpp:127:11: warning: attributes on a namespace declaration are a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx0x-keyword-attributes.cpp:188:9: warning: attributes on an enumerator declaration are a C++17 extension [-Wc++17-extensions]","clang/test/Parser/cxx0x-keyword-attributes.cpp:344:11: warning: attributes on a namespace declaration are a C++17 extension [-Wc++17-extensions]"} | ||
| Line 1,576: | Line 1,577: | ||
}, | }, | ||
["ext_nullability"]={ | ["ext_nullability"]={ | ||
[ | [l]={"nullability-extension",t}, | ||
[ | [k]="nullability-extension", | ||
[ | [i]="ext_nullability", | ||
[b]="type nullability specifier %0 is a Clang extension", | [b]="type nullability specifier %0 is a Clang extension", | ||
[ | [g]="type nullability specifier A is a Clang extension", | ||
[ | [f]=n, | ||
[ | [e]="type nullability specifier (.*?) is a Clang extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnullability\\-extension[^\\]]*\\]", | ||
[ | [a]=G, | ||
[ | [h]={"261a89b0f70b",1434736265,"Introduce type nullability specifiers for C/C++.","Introduce type nullability specifiers for C/C++.\n\nIntroduces the type specifiers __nonnull, __nullable, and\n__null_unspecified that describe the nullability of the pointer type\nto which the specifier appertains. Nullability type specifiers improve\non the existing nonnull attributes in a few ways:\n - They apply to types, so one can represent a pointer to a non-null\n pointer, use them in function pointer types, etc.\n - As type specifiers, they are syntactically more lightweight than\n __attribute__s or [[attribute]]s.\n - They can express both the notion of \'should never be null\' and\n also \'it makes sense for this to be null\', and therefore can more\n easily catch errors of omission where one forgot to annotate the\n nullability of a particular pointer (this will come in a subsequent\n patch).\n\nNullability type specifiers are maintained as type sugar, and\ntherefore have no effect on mangling, encoding, overloading,\netc. Nonetheless, they will be used for warnings about, e.g., passing\n\'null\' to a method that does not accept it.\n\nThis is the C/C++ part of rdar://problem/18868820.\n\nllvm-svn: 240146"}, | ||
[ | [d]={{xb,969,"void Parser::ParseNullabilityTypeSpecifiers(ParsedAttributes &attrs) {\n // Treat these like attributes, even though they\'re type specifiers.\n while (true) {\n // ...\n case tok::kw__Nonnull:\n case tok::kw__Nullable:\n case tok::kw__Nullable_result:\n case tok::kw__Null_unspecified: {\n // ...\n if (!getLangOpts().ObjC)\n Diag(AttrNameLoc, diag::ext_nullability) << AttrName;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/nullability.c"]={"clang/test/Parser/nullability.c:3:1: warning: type nullability specifier \'_Nonnull\' is a Clang extension [-Wnullability-extension]"} | ["clang/test/Parser/nullability.c"]={"clang/test/Parser/nullability.c:3:1: warning: type nullability specifier \'_Nonnull\' is a Clang extension [-Wnullability-extension]"} | ||
| Line 1,592: | Line 1,593: | ||
}, | }, | ||
["ext_offsetof_non_pod_type"]={ | ["ext_offsetof_non_pod_type"]={ | ||
[ | [l]={"invalid-offsetof"}, | ||
[ | [k]="invalid-offsetof", | ||
[ | [i]="ext_offsetof_non_pod_type", | ||
[b]="offset of on non-POD type %0", | [b]="offset of on non-POD type %0", | ||
[ | [g]="offset of on non-POD type A", | ||
[ | [f]=n, | ||
[ | [e]="offset of on non\\-POD type (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winvalid\\-offsetof[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={vb,1405733957,ub,tb}, | ||
[ | [d]={{v,16678,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n // ...\n for (const OffsetOfComponent &OC : Components) {\n // ...\n // C++ [lib.support.types]p5:\n // The macro offsetof accepts a restricted set of type arguments in this\n // International Standard. type shall be a POD structure or a POD union\n // (clause 9).\n // C++11 [support.types]p4:\n // If type is not a standard-layout class (Clause 9), the results are\n // undefined.\n if (CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {\n // ...\n unsigned DiagID = LangOpts.CPlusPlus11 ? diag::ext_offsetof_non_standardlayout_type : diag::ext_offsetof_non_pod_type;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/offsetof.cpp"]={"clang/test/SemaCXX/offsetof.cpp:13:11: warning: offset of on non-POD type \'P\' [-Winvalid-offsetof]","clang/test/SemaCXX/offsetof.cpp:18:9: warning: offset of on non-POD type \'Derived\' [-Winvalid-offsetof]","clang/test/SemaCXX/offsetof.cpp:82:22: warning: offset of on non-POD type \'Derived\' [-Winvalid-offsetof]"} | ["clang/test/SemaCXX/offsetof.cpp"]={"clang/test/SemaCXX/offsetof.cpp:13:11: warning: offset of on non-POD type \'P\' [-Winvalid-offsetof]","clang/test/SemaCXX/offsetof.cpp:18:9: warning: offset of on non-POD type \'Derived\' [-Winvalid-offsetof]","clang/test/SemaCXX/offsetof.cpp:82:22: warning: offset of on non-POD type \'Derived\' [-Winvalid-offsetof]"} | ||
| Line 1,608: | Line 1,609: | ||
}, | }, | ||
["ext_offsetof_non_standardlayout_type"]={ | ["ext_offsetof_non_standardlayout_type"]={ | ||
[ | [l]={"invalid-offsetof"}, | ||
[ | [k]="invalid-offsetof", | ||
[ | [i]="ext_offsetof_non_standardlayout_type", | ||
[b]="offset of on non-standard-layout type %0", | [b]="offset of on non-standard-layout type %0", | ||
[ | [g]="offset of on non-standard-layout type A", | ||
[ | [f]=n, | ||
[ | [e]="offset of on non\\-standard\\-layout type (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winvalid\\-offsetof[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={vb,1405733957,ub,tb}, | ||
[ | [d]={{v,16657,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n // ...\n for (const OffsetOfComponent &OC : Components) {\n // ...\n // C++ [lib.support.types]p5:\n // The macro offsetof accepts a restricted set of type arguments in this\n // International Standard. type shall be a POD structure or a POD union\n // (clause 9).\n // C++11 [support.types]p4:\n // If type is not a standard-layout class (Clause 9), the results are\n // undefined.\n if (CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {\n // ...\n unsigned DiagID = LangOpts.CPlusPlus11 ? diag::ext_offsetof_non_standardlayout_type : diag::ext_offsetof_non_pod_type;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/offsetof-0x.cpp"]={"clang/test/SemaCXX/offsetof-0x.cpp:13:11: warning: offset of on non-standard-layout type \'P\' [-Winvalid-offsetof]"} | ["clang/test/SemaCXX/offsetof-0x.cpp"]={"clang/test/SemaCXX/offsetof-0x.cpp:13:11: warning: offset of on non-standard-layout type \'P\' [-Winvalid-offsetof]"} | ||
| Line 1,624: | Line 1,625: | ||
}, | }, | ||
["ext_old_implicitly_unsigned_long_cxx"]={ | ["ext_old_implicitly_unsigned_long_cxx"]={ | ||
[ | [l]={Sc,Ac,Jc}, | ||
[ | [k]=Ac, | ||
[ | [i]="ext_old_implicitly_unsigned_long_cxx", | ||
[b]="integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C++98, interpreting as \'unsigned long\'; this literal will %select{have type \'long long\'|be ill-formed}0 in C++11 onwards", | [b]="integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C++98, interpreting as \'unsigned long\'; this literal will %select{have type \'long long\'|be ill-formed}0 in C++11 onwards", | ||
[ | [g]={{nil,nil,{"integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C++98, interpreting as \'unsigned long\'; this literal will ",{"have type \'long long\'","be ill-formed"}," in C++11 onwards"}}}, | ||
[ | [f]=n, | ||
[ | [e]="integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C\\+\\+98, interpreting as \'unsigned long\'; this literal will (?:have type \'long long\'|be ill\\-formed) in C\\+\\+11 onwards", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-compat[^\\]]*\\]", | ||
[ | [a]=u, | ||
[ | [h]={"13234ae40db3",1433800799,"Consider unsigned long for non-u/U decimal literals (C90/C++03)","Consider unsigned long for non-u/U decimal literals (C90/C++03)\n\nSummary:\nThis modifies Clang to reflect that under pre-C99 ISO C, decimal\nconstants may have type `unsigned long` even if they do not contain `u`\nor `U` in their suffix (C90 subclause 6.1.3.2 paragraph 5). The same is\ndone for C++ without C++11 which--because of undefined behaviour--allows\nfor behaviour compatible with ISO C90 in the case of an unsuffixed\ndecimal literal and is otherwise identical to C90 in its treatment of\ninteger literals (C++03 subclause 2.13.1 [lex.icon] paragraph 2).\n\nMessages are added to the `c99-compat` and `c++11-compat` groups to warn\non such literals, since they behave differently under the newer\nstandards.\n\nFixes PR 16678.\n\nTest Plan:\nA new test file is added to exercise both pre-C99/C++11 and C99/C++11-up\non decimal literals with no suffix or suffixes `l`/`L` for both 32-bit\nand 64-bit `long`.\n\nIn the file, 2^31 (being `INT_MAX+1`) is tested for the expected type\nusing `__typeof__` and multiple declarations of the same entity. 2^63\nis similarly tested when it is within the range of `unsigned long`.\n\nPreprocessor arithmetic tests are added to ensure consistency given\nthat Clang (like GCC) uses greater than 32 bits for preprocessor\narithmetic even when `long` and `unsigned long` is 32 bits and a\npre-C99/C++11 mode is in effect.\n\nTests added:\n test/Sema/PR16678.c\n\nReviewers: fraggamuffin, rsmith\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D9794\n\nllvm-svn: 239356"}, | ||
[ | [d]={{v,4196,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n } else if (Literal.isFloatingLiteral()) {\n // ...\n } else if (!Literal.isIntegerLiteral()) {\n // ...\n } else {\n // ...\n if (Literal.GetIntegerValue(ResultVal)) {\n // ...\n } else {\n // ...\n // Are long/unsigned long possibilities?\n if (Ty.isNull() && !Literal.isLongLong && !Literal.isSizeT) {\n // ...\n // Does it fit in a unsigned long?\n if (ResultVal.isIntN(LongSize)) {\n // Does it fit in a signed long?\n if (!Literal.isUnsigned && ResultVal[LongSize - 1] == 0)\n // ...\n else if (AllowUnsigned)\n // ...\n // Check according to the rules of C90 6.1.3.2p5. C++03 [lex.icon]p2\n // is compatible.\n else if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11) {\n // ...\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus ? Literal.isLong ? diag::warn_old_implicitly_unsigned_long_cxx : /*C++98 UB*/ diag::ext_old_implicitly_unsigned_long_cxx : diag::warn_old_implicitly_unsigned_long) << (LongLongSize > LongSize ? /*will have type \'long long\'*/ 0 : /*will be ill-formed*/ 1);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/PR16678.c"]={"clang/test/Sema/PR16678.c:74:19: warning: integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C++98, interpreting as \'unsigned long\'; this literal will be ill-formed in C++11 onwards [-Wc++11-compat]"} | ["clang/test/Sema/PR16678.c"]={"clang/test/Sema/PR16678.c:74:19: warning: integer literal is too large to be represented in type \'long\' and is subject to undefined behavior under C++98, interpreting as \'unsigned long\'; this literal will be ill-formed in C++11 onwards [-Wc++11-compat]"} | ||
| Line 1,640: | Line 1,641: | ||
}, | }, | ||
["ext_omp_attributes"]={ | ["ext_omp_attributes"]={ | ||
[ | [l]={"openmp","openmp-51-extensions"}, | ||
[ | [k]="openmp-51-extensions", | ||
[ | [i]={{nil,x,"ext_omp_attributes"}}, | ||
[b]={{nil, | [b]={{nil,x,"specifying OpenMP directives with [[]] is an OpenMP 5.1 extension"}}, | ||
[ | [g]={{nil,x,"specifying OpenMP directives with [[]] is an OpenMP 5.1 extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="specifying OpenMP directives with \\[\\[\\]\\] is an OpenMP 5\\.1 extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-51\\-extensions[^\\]]*\\]", | ||
[ | [a]={{nil,x,G}}, | ||
[ | [h]={ad,1612659633,Zc,Yc}, | ||
[ | [d]={{R,4432,"/// ParseCXX11AttributeArgs -- Parse a C++11 attribute-argument-clause.\n///\n/// [C++11] attribute-argument-clause:\n/// \'(\' balanced-token-seq \')\'\n///\n/// [C++11] balanced-token-seq:\n/// balanced-token\n/// balanced-token-seq balanced-token\n///\n/// [C++11] balanced-token:\n/// \'(\' balanced-token-seq \')\'\n/// \'[\' balanced-token-seq \']\'\n/// \'{\' balanced-token-seq \'}\'\n/// any token but \'(\', \')\', \'[\', \']\', \'{\', or \'}\'\nbool Parser::ParseCXX11AttributeArgs(IdentifierInfo *AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, CachedTokens &OpenMPTokens) {\n // ...\n if (ScopeName && ScopeName->isStr(\"omp\")) {\n Diag(AttrNameLoc, getLangOpts().OpenMP >= 51 ? diag::warn_omp51_compat_attributes : diag::ext_omp_attributes);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/OpenMP/openmp_attribute_compat.cpp"]={"clang/test/OpenMP/openmp_attribute_compat.cpp:17:8: warning: specifying OpenMP directives with [[]] is an OpenMP 5.1 extension [-Wopenmp-51-extensions]"} | ["clang/test/OpenMP/openmp_attribute_compat.cpp"]={"clang/test/OpenMP/openmp_attribute_compat.cpp:17:8: warning: specifying OpenMP directives with [[]] is an OpenMP 5.1 extension [-Wopenmp-51-extensions]"} | ||
| Line 1,656: | Line 1,657: | ||
}, | }, | ||
["ext_omp_loop_not_canonical_init"]={ | ["ext_omp_loop_not_canonical_init"]={ | ||
[ | [l]={"openmp","openmp-loop-form"}, | ||
[ | [k]="openmp-loop-form", | ||
[ | [i]="ext_omp_loop_not_canonical_init", | ||
[b]="initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\')", | [b]="initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\')", | ||
[ | [g]="initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\')", | ||
[ | [f]=n, | ||
[ | [e]="initialization clause of OpenMP for loop is not in canonical form \\(\'var \\= init\' or \'T var \\= init\'\\)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-loop\\-form[^\\]]*\\]", | ||
[ | [a]="OpenMP Issue", | ||
[ | [h]={"a8e9d2eccc6e",1401790607,"[OPENMP] Loop canonical form analysis (Sema)","[OPENMP] Loop canonical form analysis (Sema)\n\nThis patch implements semantic analysis to make sure that the loop is in OpenMP canonical form.\nThis is the form required for \'omp simd\', \'omp for\' and other loop pragmas.\n\nDifferential revision: http://reviews.llvm.org/D3778\n\nllvm-svn: 210095"}, | ||
[ | [d]={{"clang/lib/Sema/SemaOpenMP.cpp",8200,"bool OpenMPIterationSpaceChecker::checkAndSetInit(Stmt *S, bool EmitDiags) {\n // ...\n if (auto *BO = dyn_cast<BinaryOperator>(S)) {\n // ...\n } else if (auto *DS = dyn_cast<DeclStmt>(S)) {\n if (DS->isSingleDecl()) {\n if (auto *Var = dyn_cast_or_null<VarDecl>(DS->getSingleDecl())) {\n if (Var->hasInit() && !Var->getType()->isReferenceType()) {\n // Accept non-canonical init form here but emit ext. warning.\n if (Var->getInitStyle() != VarDecl::CInit && EmitDiags)\n SemaRef.Diag(S->getBeginLoc(), diag::ext_omp_loop_not_canonical_init) << S->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/OpenMP/parallel_for_simd_loop_messages.cpp"]={"clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:306:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:393:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:397:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:401:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:405:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:463:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:481:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]"} | ["clang/test/OpenMP/parallel_for_simd_loop_messages.cpp"]={"clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:306:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:393:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:397:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:401:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:405:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:463:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:481:8: warning: initialization clause of OpenMP for loop is not in canonical form (\'var = init\' or \'T var = init\') [-Wopenmp-loop-form]"} | ||
| Line 1,672: | Line 1,673: | ||
}, | }, | ||
["ext_on_off_switch_syntax"]={ | ["ext_on_off_switch_syntax"]={ | ||
[ | [l]={jb,qb,pb,"pragmas",xc}, | ||
[ | [k]=xc, | ||
[ | [i]="ext_on_off_switch_syntax", | ||
[b]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", | [b]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", | ||
[g]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", | [g]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", | [f]=n, | ||
[ | [e]="expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={"3bffa5293303",1297647744,"Make LexOnOffSwitch a Preprocessor member function","Make LexOnOffSwitch a Preprocessor member function\n\nllvm-svn: 125473"}, | |||
[d]={{ib,974,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::ext_on_off_switch_syntax);"},{ib,985,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n // ...\n if (II->isStr(\"ON\"))\n // ...\n else if (II->isStr(\"OFF\"))\n // ...\n else if (II->isStr(\"DEFAULT\"))\n // ...\n else {\n Diag(Tok, diag::ext_on_off_switch_syntax);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Parser/opencl-pragma.cl"]={"clang/test/Parser/opencl-pragma.cl:15:28: warning: expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma [-Wunknown-pragmas]"} | ["clang/test/Parser/opencl-pragma.cl"]={"clang/test/Parser/opencl-pragma.cl:15:28: warning: expected \'ON\' or \'OFF\' or \'DEFAULT\' in pragma [-Wunknown-pragmas]"} | ||
| Line 1,688: | Line 1,689: | ||
}, | }, | ||
["ext_opencl_double_without_pragma"]={ | ["ext_opencl_double_without_pragma"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]={{nil,x,"ext_opencl_double_without_pragma"}}, | ||
[b]={{nil, | [b]={{nil,x,"Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported"}}, | ||
[ | [g]={{nil,x,"Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported"}}, | ||
[ | [f]=n, | ||
[ | [e]="Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported", | ||
[ | [c]=X, | ||
[ | [a]={{nil,x,m}}, | ||
[ | [h]={"3dbcea8b957a",1615397021,"Reland [clang] Check unsupported types in expressions","Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"}, | ||
[ | [d]={{Bb,1546,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n // ...\n case DeclSpec::TST_double:\n // ...\n if (S.getLangOpts().OpenCL) {\n if (!S.getOpenCLOptions().isSupported(\"cl_khr_fp64\", S.getLangOpts()))\n // ...\n else if (!S.getOpenCLOptions().isAvailableOption(\"cl_khr_fp64\", S.getLangOpts()))\n S.Diag(DS.getTypeSpecTypeLoc(), diag::ext_opencl_double_without_pragma);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaOpenCL/fp64-fp16-options.cl"]={"clang/test/SemaOpenCL/fp64-fp16-options.cl:61:9: warning: Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported [-Wpedantic]","clang/test/SemaOpenCL/fp64-fp16-options.cl:67:3: warning: Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported [-Wpedantic]","clang/test/SemaOpenCL/fp64-fp16-options.cl:136:3: warning: Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported [-Wpedantic]"} | ["clang/test/SemaOpenCL/fp64-fp16-options.cl"]={"clang/test/SemaOpenCL/fp64-fp16-options.cl:61:9: warning: Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported [-Wpedantic]","clang/test/SemaOpenCL/fp64-fp16-options.cl:67:3: warning: Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported [-Wpedantic]","clang/test/SemaOpenCL/fp64-fp16-options.cl:136:3: warning: Clang permits use of type \'double\' regardless pragma if \'cl_khr_fp64\' is supported [-Wpedantic]"} | ||
| Line 1,704: | Line 1,705: | ||
}, | }, | ||
["ext_opencl_ext_vector_type_rgba_selector"]={ | ["ext_opencl_ext_vector_type_rgba_selector"]={ | ||
[ | [l]={"opencl-unsupported-rgba"}, | ||
[ | [k]="opencl-unsupported-rgba", | ||
[ | [i]="ext_opencl_ext_vector_type_rgba_selector", | ||
[b]={{nil, | [b]={{nil,V,"vector component name \'%0\' is a feature from OpenCL version 3.0 onwards"},{x,x,"vector component name \'%0\' is an OpenCL C version 3.0 feature"},{z,nil,"vector component name \'%0\' is an OpenCL version 2.2 feature"}}, | ||
[ | [g]={{nil,V,"vector component name \'A\' is a feature from OpenCL version 3.0 onwards"},{x,x,"vector component name \'A\' is an OpenCL C version 3.0 feature"},{z,nil,"vector component name \'A\' is an OpenCL version 2.2 feature"}}, | ||
[ | [f]=n, | ||
[ | [e]="vector component name \'(.*?)\' is a feature from OpenCL version 3\\.0 onwards", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wopencl\\-unsupported\\-rgba[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"98eaa62e369d",1469213383,"Add .rgba syntax extension to ext_vector_type types","Add .rgba syntax extension to ext_vector_type types\n\nSummary:\nThis patch enables .rgba accessors to ext_vector_type types and adds\ntests for syntax validation and code generation.\n\n\'a\' and \'b\' can appear either in the point access mode or the numeric\naccess mode (for indices 10 and 11). To disambiguate between the two\nusages, the accessor type is explicitly passed to relevant methods.\n\nReviewers: rsmith\n\nSubscribers: Anastasia, bader, srhines, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D20602\n\nllvm-svn: 276455"}, | ||
[ | [d]={{"clang/lib/Sema/SemaExprMember.cpp",351,"/// Check an ext-vector component access expression.\n///\n/// VK should be set in advance to the value kind of the base\n/// expression.\nstatic QualType CheckExtVectorComponent(Sema &S, QualType baseType, ExprValueKind &VK, SourceLocation OpLoc, const IdentifierInfo *CompName, SourceLocation CompLoc) {\n // ...\n // Check that we\'ve found one of the special components, or that the component\n // names must come from the same set.\n if (!strcmp(compStr, \"hi\") || !strcmp(compStr, \"lo\") || !strcmp(compStr, \"even\") || !strcmp(compStr, \"odd\")) {\n // ...\n } else if (!HexSwizzle && (Idx = vecType->getPointAccessorIdx(*compStr)) != -1) {\n // ...\n // Emit a warning if an rgba selector is used earlier than OpenCL C 3.0.\n if (HasRGBA || (*compStr && IsRGBA(*compStr))) {\n if (S.getLangOpts().OpenCL && S.getLangOpts().getOpenCLCompatibleVersion() < 300) {\n // ...\n S.Diag(OpLoc, diag::ext_opencl_ext_vector_type_rgba_selector) << StringRef(DiagBegin, 1) << SourceRange(CompLoc);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaOpenCL/ext_vectors.cl"]={"clang/test/SemaOpenCL/ext_vectors.cl:13:8: warning: vector component name \'a\' is a feature from OpenCL version 3.0 onwards [-Wopencl-unsupported-rgba]","clang/test/SemaOpenCL/ext_vectors.cl:18:8: warning: vector component name \'r\' is a feature from OpenCL version 3.0 onwards [-Wopencl-unsupported-rgba]"} | ["clang/test/SemaOpenCL/ext_vectors.cl"]={"clang/test/SemaOpenCL/ext_vectors.cl:13:8: warning: vector component name \'a\' is a feature from OpenCL version 3.0 onwards [-Wopencl-unsupported-rgba]","clang/test/SemaOpenCL/ext_vectors.cl:18:8: warning: vector component name \'r\' is a feature from OpenCL version 3.0 onwards [-Wopencl-unsupported-rgba]"} | ||
| Line 1,720: | Line 1,721: | ||
}, | }, | ||
["ext_operator_new_delete_declared_inline"]={ | ["ext_operator_new_delete_declared_inline"]={ | ||
[ | [l]={"inline-new-delete"}, | ||
[ | [k]="inline-new-delete", | ||
[ | [i]="ext_operator_new_delete_declared_inline", | ||
[b]="replacement function %0 cannot be declared \'inline\'", | [b]="replacement function %0 cannot be declared \'inline\'", | ||
[ | [g]="replacement function A cannot be declared \'inline\'", | ||
[ | [f]=n, | ||
[ | [e]="replacement function (.*?) cannot be declared \'inline\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winline\\-new\\-delete[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"13dfdc88a9a2",1384562858,"Downgrade the Error on an \'inline\' operator new or delete to an ExtWarn. Some","Downgrade the Error on an \'inline\' operator new or delete to an ExtWarn. Some\nprojects are relying on such (questionable) practices, so we should give them\na way to opt out of this diagnostic.\n\nllvm-svn: 194905"}, | ||
[ | [d]={{w,10344,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else {\n // C++11 [replacement.functions]p3:\n // The program\'s definitions shall not be specified as inline.\n //\n // N.B. We diagnose declarations instead of definitions per LWG issue 2340.\n //\n // Suppress the diagnostic if the function is __attribute__((used)), since\n // that forces an external definition to be emitted.\n if (D.getDeclSpec().isInlineSpecified() && NewFD->isReplaceableGlobalAllocationFunction() && !NewFD->hasAttr<UsedAttr>())\n Diag(D.getDeclSpec().getInlineSpecLoc(), diag::ext_operator_new_delete_declared_inline) << NewFD->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/drs/dr412.cpp"]={"clang/test/CXX/drs/dr412.cpp:14:1: error: replacement function \'operator new\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]","clang/test/CXX/drs/dr412.cpp:15:1: error: replacement function \'operator new[]\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]","clang/test/CXX/drs/dr412.cpp:16:1: error: replacement function \'operator delete\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]","clang/test/CXX/drs/dr412.cpp:17:1: error: replacement function \'operator delete[]\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]"} | ["clang/test/CXX/drs/dr412.cpp"]={"clang/test/CXX/drs/dr412.cpp:14:1: error: replacement function \'operator new\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]","clang/test/CXX/drs/dr412.cpp:15:1: error: replacement function \'operator new[]\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]","clang/test/CXX/drs/dr412.cpp:16:1: error: replacement function \'operator delete\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]","clang/test/CXX/drs/dr412.cpp:17:1: error: replacement function \'operator delete[]\' cannot be declared \'inline\' [-Werror,-Winline-new-delete]"} | ||
| Line 1,736: | Line 1,737: | ||
}, | }, | ||
["ext_operator_overload_static"]={ | ["ext_operator_overload_static"]={ | ||
[ | [l]={"c++23-extensions","c++2b-extensions"}, | ||
[ | [k]="c++23-extensions", | ||
[ | [i]={{nil,P,"ext_operator_overload_static"}}, | ||
[b]="declaring overloaded %0 as \'static\' is a C++23 extension", | [b]="declaring overloaded %0 as \'static\' is a C++23 extension", | ||
[ | [g]="declaring overloaded A as \'static\' is a C++23 extension", | ||
[ | [f]=n, | ||
[ | [e]="declaring overloaded (.*?) as \'static\' is a C\\+\\+23 extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+23\\-extensions[^\\]]*\\]", | ||
[ | [a]={{nil,P,m}}, | ||
[ | [h]={ic,1625925174,fc,ec}, | ||
[ | [d]={{Z,16152,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n // C++ [over.oper]p7:\n // An operator function shall either be a member function or\n // be a non-member function and have at least one parameter\n // whose type is a class, a reference to a class, an enumeration,\n // or a reference to an enumeration.\n // Note: Before C++23, a member function could not be static. The only member\n // function allowed to be static is the call operator function.\n if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(FnDecl)) {\n if (MethodDecl->isStatic()) {\n if (Op == OO_Call || Op == OO_Subscript)\n Diag(FnDecl->getLocation(), (LangOpts.CPlusPlus23 ? diag::warn_cxx20_compat_operator_overload_static : diag::ext_operator_overload_static)) << FnDecl;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/overloaded-operator-decl.cpp"]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:54:17: warning: declaring overloaded \'operator()\' as \'static\' is a C++23 extension [-Wc++23-extensions]"} | ["clang/test/SemaCXX/overloaded-operator-decl.cpp"]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:54:17: warning: declaring overloaded \'operator()\' as \'static\' is a C++23 extension [-Wc++23-extensions]"} | ||
| Line 1,752: | Line 1,753: | ||
}, | }, | ||
["ext_out_of_line_declaration"]={ | ["ext_out_of_line_declaration"]={ | ||
[ | [l]={"out-of-line-declaration"}, | ||
[ | [k]="out-of-line-declaration", | ||
[ | [i]="ext_out_of_line_declaration", | ||
[b]="out-of-line declaration of a member must be a definition", | [b]="out-of-line declaration of a member must be a definition", | ||
[ | [g]="out-of-line declaration of a member must be a definition", | ||
[ | [f]=Q, | ||
[ | [e]="out\\-of\\-line declaration of a member must be a definition", | ||
[ | [c]=" \\[[^\\]]*\\-Wout\\-of\\-line\\-declaration[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"9339605c3545",1279254748,"Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.","Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.\n\nllvm-svn: 108505"}, | ||
[ | [d]={{w,10576,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else {\n // ...\n if (NewFD->isInvalidDecl()) {\n // ...\n } else if (!D.isRedeclaration()) {\n // ...\n } else if (!D.isFunctionDefinition() && isa<CXXMethodDecl>(NewFD) && NewFD->isOutOfLine() && !isFriend && !isFunctionTemplateSpecialization && !isMemberSpecialization) {\n // ...\n Diag(NewFD->getLocation(), diag::ext_out_of_line_declaration) << D.getCXXScopeSpec().getRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:107:18: error: out-of-line declaration of a member must be a definition [-Wout-of-line-declaration]"} | ["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:107:18: error: out-of-line declaration of a member must be a definition [-Wout-of-line-declaration]"} | ||
| Line 1,768: | Line 1,769: | ||
}, | }, | ||
["ext_out_of_line_qualified_id_type_names_constructor"]={ | ["ext_out_of_line_qualified_id_type_names_constructor"]={ | ||
[ | [l]={"injected-class-name"}, | ||
[ | [k]="injected-class-name", | ||
[ | [i]={{nil,ab,"ext_out_of_line_qualified_id_type_names_constructor"}}, | ||
[b]={{nil, | [b]={{nil,ab,"ISO C++ specifies that qualified reference to %0 is a constructor name rather than a %select{template name|type}1 in this context, despite preceding %select{\'typename\'|\'template\'}2 keyword"}}, | ||
[ | [g]={{nil,ab,{"ISO C++ specifies that qualified reference to A is a constructor name rather than a ",{"template name","type"}," in this context, despite preceding ",{"\'typename\'","\'template\'"}," keyword"}}}, | ||
[ | [f]=n, | ||
[ | [e]="ISO C\\+\\+ specifies that qualified reference to (.*?) is a constructor name rather than a (?:template name|type) in this context, despite preceding (?:\'typename\'|\'template\') keyword", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winjected\\-class\\-name[^\\]]*\\]", | ||
[ | [a]={{nil,ab,m}}, | ||
[ | [h]={"74f02347ca16",1484859613,"PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).","PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).\n\nUnder this defect resolution, the injected-class-name of a class or class\ntemplate cannot be used except in very limited circumstances (when declaring a\nconstructor, in a nested-name-specifier, in a base-specifier, or in an\nelaborated-type-specifier). This is apparently done to make parsing easier, but\nit\'s a pain for us since we don\'t know whether a template-id using the\ninjected-class-name is valid at the point when we annotate it (we don\'t yet\nknow whether the template-id will become part of an elaborated-type-specifier).\n\nAs a tentative resolution to a perceived language defect, mem-initializer-ids\nare added to the list of exceptions here (they generally follow the same rules\nas base-specifiers).\n\nWhen the reference to the injected-class-name uses the \'typename\' or \'template\'\nkeywords, we permit it to be used to name a type or template as an extension;\nother compilers also accept some cases in this area. There are also a couple of\ncorner cases with dependent template names that we do not yet diagnose, but\nwhich will also get this treatment.\n\nllvm-svn: 292518"}, | ||
[ | [d]={{O,4173,"TypeResult Sema::ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, bool IsCtorOrDtorName, bool IsClassName, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n if (!IsCtorOrDtorName && !IsClassName && SS.isSet()) {\n // ...\n if (LookupRD && LookupRD->getIdentifier() == TemplateII) {\n Diag(TemplateIILoc, TemplateKWLoc.isInvalid() ? diag::err_out_of_line_qualified_id_type_names_constructor : diag::ext_out_of_line_qualified_id_type_names_constructor) << TemplateII << 0 /*injected-class-name used as template name*/"},{O,5133,"/// Form a template name from a name that is syntactically required to name a\n/// template, either due to use of the \'template\' keyword or because a name in\n/// this syntactic context is assumed to name a template (C++ [temp.names]p2-4).\n///\n/// This action forms a template name given the name of the template and its\n/// optional scope specifier. This is used when the \'template\' keyword is used\n/// or when the parsing context unambiguously treats a following \'<\' as\n/// introducing a template argument list. Note that this may produce a\n/// non-dependent template name if we can perform the lookup now and identify\n/// the named template.\n///\n/// For example, given \"x.MetaFun::template apply\", the scope specifier\n/// \\p SS will be \"MetaFun::\", \\p TemplateKWLoc contains the location\n/// of the \"template\" keyword, and \"apply\" is the \\p Name.\nTemplateNameKind Sema::ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Result, bool AllowInjectedClassName) {\n // ...\n if (TNK != TNK_Non_template) {\n // ...\n if (!AllowInjectedClassName && SS.isNotEmpty() && LookupRD && Name.getKind() == UnqualifiedIdKind::IK_Identifier && Name.Identifier && LookupRD->getIdentifier() == Name.Identifier) {\n // ...\n Diag(Name.getBeginLoc(), diag::ext_out_of_line_qualified_id_type_names_constructor) << Name.Identifier << 0 /*injected-class-name used as template name*/"},{O,10853,"TypeResult Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateIn, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) {\n // ...\n // Strangely, non-type results are not ignored by this lookup, so the\n // program is ill-formed if it finds an injected-class-name.\n if (TypenameLoc.isValid()) {\n // ...\n if (LookupRD && LookupRD->getIdentifier() == TemplateII) {\n Diag(TemplateIILoc, diag::ext_out_of_line_qualified_id_type_names_constructor) << TemplateII << 0 /*injected-class-name used as template name*/"},{O,11108,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::Found:\n if (TypeDecl *Type = dyn_cast<TypeDecl>(Result.getFoundDecl())) {\n // ...\n if (Keyword == ETK_Typename && LookupRD && FoundRD && FoundRD->isInjectedClassName() && declaresSameEntity(LookupRD, cast<Decl>(FoundRD->getParent())))\n Diag(IILoc, diag::ext_out_of_line_qualified_id_type_names_constructor) << &II << 1 << 0 /*\'typename\' keyword used*/;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:38:47: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'template\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:39:47: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'template\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:61:18: warning: ISO C++ specifies that qualified reference to \'X0\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:62:23: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:81:15: warning: ISO C++ specifies that qualified reference to \'X0\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:88:15: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:89:24: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'template\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:106:17: warning: ISO C++ specifies that qualified reference to \'B\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:38:47: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'template\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:39:47: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'template\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:61:18: warning: ISO C++ specifies that qualified reference to \'X0\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:62:23: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:81:15: warning: ISO C++ specifies that qualified reference to \'X0\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:88:15: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:89:24: warning: ISO C++ specifies that qualified reference to \'X1\' is a constructor name rather than a template name in this context, despite preceding \'template\' keyword [-Winjected-class-name]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:106:17: warning: ISO C++ specifies that qualified reference to \'B\' is a constructor name rather than a type in this context, despite preceding \'typename\' keyword [-Winjected-class-name]"} | ||
| Line 1,784: | Line 1,785: | ||
}, | }, | ||
["ext_override_control_keyword"]={ | ["ext_override_control_keyword"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_override_control_keyword", | ||
[b]="\'%0\' keyword is a C++11 extension", | [b]="\'%0\' keyword is a C++11 extension", | ||
[ | [g]="\'A\' keyword is a C++11 extension", | ||
[ | [f]=n, | ||
[ | [e]="\'(.*?)\' keyword is a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=G, | ||
[ | [h]={"5a72fdb05b64",1295737309,"Accept the C++0x override control keywords as an extension in C++98. This is OK since the new syntax...","Accept the C++0x override control keywords as an extension in C++98. This is OK since the new syntax is unambiguous and can\'t be confused with C++98 syntax. If anyone disagrees, please shout!\n\nllvm-svn: 124048"}, | ||
[ | [d]={{R,2474,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Abstract) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_GNU_Final) {\n // ...\n } else {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_override_control_keyword : diag::ext_override_control_keyword) << VirtSpecifiers::getSpecifierName(Specifier);"},{R,3529,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Final)\n Diag(FinalLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_override_control_keyword : diag::ext_override_control_keyword) << VirtSpecifiers::getSpecifierName(Specifier);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:15:10: warning: \'final\' keyword is a C++11 extension [-Wc++11-extensions]","clang/test/Parser/cxx0x-in-cxx98.cpp:16:20: warning: \'override\' keyword is a C++11 extension [-Wc++11-extensions]","clang/test/Parser/cxx0x-in-cxx98.cpp:17:20: warning: \'final\' keyword is a C++11 extension [-Wc++11-extensions]"} | ["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:15:10: warning: \'final\' keyword is a C++11 extension [-Wc++11-extensions]","clang/test/Parser/cxx0x-in-cxx98.cpp:16:20: warning: \'override\' keyword is a C++11 extension [-Wc++11-extensions]","clang/test/Parser/cxx0x-in-cxx98.cpp:17:20: warning: \'final\' keyword is a C++11 extension [-Wc++11-extensions]"} | ||
| Line 1,800: | Line 1,801: | ||
}, | }, | ||
["ext_override_exception_spec"]={ | ["ext_override_exception_spec"]={ | ||
[ | [l]={F,Xb}, | ||
[ | [k]=Xb, | ||
[ | [i]="ext_override_exception_spec", | ||
[b]="exception specification of overriding function is more lax than base version", | [b]="exception specification of overriding function is more lax than base version", | ||
[g]="exception specification of overriding function is more lax than base version", | [g]="exception specification of overriding function is more lax than base version", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-exception\\-spec[^\\]]*\\]", | [f]=n, | ||
[ | [e]="exception specification of overriding function is more lax than base version", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-exception\\-spec[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={vb,1405733957,ub,tb}, | |||
[d]={{Qb,992,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n if (getLangOpts().MSVCCompat)\n DiagID = diag::ext_override_exception_spec;"},{Qb,996,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n return CheckExceptionSpecSubset(PDiag(DiagID), PDiag(diag::err_deep_exception_specs_differ), PDiag(diag::note_overridden_virtual_function), PDiag(diag::ext_override_exception_spec), Old->getType()->castAs<FunctionProtoType>(), Old->getLocation(), New->getType()->castAs<FunctionProtoType>(), New->getLocation());"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/nothrow-vs-exception-specs.cpp"]={"clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:88:8: warning: exception specification of overriding function is more lax than base version [-Wmicrosoft-exception-spec]"} | ["clang/test/SemaCXX/nothrow-vs-exception-specs.cpp"]={"clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:88:8: warning: exception specification of overriding function is more lax than base version [-Wmicrosoft-exception-spec]"} | ||
| Line 1,816: | Line 1,817: | ||
}, | }, | ||
["ext_ovl_ambiguous_oper_binary_reversed"]={ | ["ext_ovl_ambiguous_oper_binary_reversed"]={ | ||
[ | [l]={"ambiguous-reversed-operator"}, | ||
[ | [k]="ambiguous-reversed-operator", | ||
[ | [i]={{nil,p,"ext_ovl_ambiguous_oper_binary_reversed"}}, | ||
[b]={{nil, | [b]={{nil,A,"ISO C++20 considers use of overloaded operator \'%0\' (with operand types %1 and %2) to be ambiguous despite there being a unique best viable function%select{ with non-reversed arguments|}3"},{p,p,"ISO C++20 considers use of overloaded operator \'%0\' (with operand types %1 and %2) to be ambiguous despite there being a unique best viable function"}}, | ||
[ | [g]={{nil,A,{"ISO C++20 considers use of overloaded operator \'A\' (with operand types B and C) to be ambiguous despite there being a unique best viable function",{" with non-reversed arguments",o}}},{p,p,"ISO C++20 considers use of overloaded operator \'A\' (with operand types B and C) to be ambiguous despite there being a unique best viable function"}}, | ||
[ | [f]=n, | ||
[ | [e]="ISO C\\+\\+20 considers use of overloaded operator \'(.*?)\' \\(with operand types (.*?) and (.*?)\\) to be ambiguous despite there being a unique best viable function(?: with non\\-reversed arguments|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wambiguous\\-reversed\\-operator[^\\]]*\\]", | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Qc,1567434909,Pc,md}, | ||
[ | [d]={{pc,14045,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_Success: {\n // ...\n if (FnDecl) {\n // ...\n if (AllowRewrittenCandidates && !IsReversed && CandidateSet.getRewriteInfo().isReversible()) {\n // ...\n if (!AmbiguousWith.empty()) {\n // ...\n Diag(OpLoc, diag::ext_ovl_ambiguous_oper_binary_reversed) << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getType() << Args[1]->getType() << AmbiguousWithSelf << Args[0]->getSourceRange() << Args[1]->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class/class.compare/class.eq/p2.cpp"]={"clang/test/CXX/class/class.compare/class.eq/p2.cpp:130:45: warning: ISO C++20 considers use of overloaded operator \'==\' (with operand types \'Y\' and \'Y\') to be ambiguous despite there being a unique best viable function [-Wambiguous-reversed-operator]"} | ["clang/test/CXX/class/class.compare/class.eq/p2.cpp"]={"clang/test/CXX/class/class.compare/class.eq/p2.cpp:130:45: warning: ISO C++20 considers use of overloaded operator \'==\' (with operand types \'Y\' and \'Y\') to be ambiguous despite there being a unique best viable function [-Wambiguous-reversed-operator]"} | ||
| Line 1,832: | Line 1,833: | ||
}, | }, | ||
["ext_ovl_rewrite_equalequal_not_bool"]={ | ["ext_ovl_rewrite_equalequal_not_bool"]={ | ||
[ | [l]={"rewrite-not-bool"}, | ||
[ | [k]="rewrite-not-bool", | ||
[ | [i]={{nil,A,"ext_ovl_rewrite_equalequal_not_bool"}}, | ||
[b]={{nil, | [b]={{nil,A,"ISO C++20 requires return type of selected \'operator==\' function for rewritten \'%1\' comparison to be \'bool\', not %0"}}, | ||
[ | [g]={{nil,A,"ISO C++20 requires return type of selected \'operator==\' function for rewritten \'B\' comparison to be \'bool\', not A"}}, | ||
[ | [f]=n, | ||
[ | [e]="ISO C\\+\\+20 requires return type of selected \'operator\\=\\=\' function for rewritten \'(.*?)\' comparison to be \'bool\', not (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wrewrite\\-not\\-bool[^\\]]*\\]", | ||
[ | [a]={{nil,A,m}}, | ||
[ | [h]={"931fcd3ba011",1576908663,"[WebAssembly] Improve clang diagnostics for wasm attributes","[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"}, | ||
[ | [d]={{pc,14010,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_Success: {\n // ...\n if (FnDecl) {\n // ...\n // C++2a [over.match.oper]p9:\n // If a rewritten operator== candidate is selected by overload\n // resolution for an operator@, its return type shall be cv bool\n if (Best->RewriteKind && ChosenOp == OO_EqualEqual && !FnDecl->getReturnType()->isBooleanType()) {\n // ...\n Diag(OpLoc, IsExtension ? diag::ext_ovl_rewrite_equalequal_not_bool : diag::err_ovl_rewrite_equalequal_not_bool) << FnDecl->getReturnType() << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getSourceRange() << Args[1]->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp"]={"clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:24:14: warning: ISO C++20 requires return type of selected \'operator==\' function for rewritten \'==\' comparison to be \'bool\', not \'int\' [-Wrewrite-not-bool]","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:28:14: warning: ISO C++20 requires return type of selected \'operator==\' function for rewritten \'==\' comparison to be \'bool\', not \'E\' [-Wrewrite-not-bool]"} | ["clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp"]={"clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:24:14: warning: ISO C++20 requires return type of selected \'operator==\' function for rewritten \'==\' comparison to be \'bool\', not \'int\' [-Wrewrite-not-bool]","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:28:14: warning: ISO C++20 requires return type of selected \'operator==\' function for rewritten \'==\' comparison to be \'bool\', not \'E\' [-Wrewrite-not-bool]"} | ||
| Line 1,848: | Line 1,849: | ||
}, | }, | ||
["ext_param_default_argument_redefinition"]={ | ["ext_param_default_argument_redefinition"]={ | ||
[ | [l]={F,"microsoft-default-arg-redefinition"}, | ||
[ | [k]="microsoft-default-arg-redefinition", | ||
[ | [i]="ext_param_default_argument_redefinition", | ||
[b]="redefinition of default argument", | [b]="redefinition of default argument", | ||
[g]="redefinition of default argument", | [g]="redefinition of default argument", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-default\\-arg\\-redefinition[^\\]]*\\]", | [f]=n, | ||
[ | [e]="redefinition of default argument", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-default\\-arg\\-redefinition[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={vb,1405733957,ub,tb}, | |||
[d]={{Z,553,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // ...\n // C++ [dcl.fct.default]p4:\n // For non-template functions, default arguments can be added in\n // later declarations of a function in the same\n // scope. Declarations in different scopes have completely\n // distinct sets of default arguments. That is, declarations in\n // inner scopes do not acquire default arguments from\n // declarations in outer scopes, and vice versa. In a given\n // function declaration, all parameters subsequent to a\n // parameter with a default argument shall have default\n // arguments supplied in this or previous declarations. A\n // default argument shall not be redefined by a later\n // declaration (not even to the same value).\n //\n // C++ [dcl.fct.default]p6:\n // Except for member functions of class templates, the default arguments\n // in a member function definition that appears outside of the class\n // definition are added to the set of default arguments provided by the\n // member function declaration in the class definition.\n for (unsigned p = 0, NumParams = PrevForDefaultArgs ? PrevForDefaultArgs->getNumParams() : 0; p < NumParams; ++p) {\n // ...\n if (OldParamHasDfl && NewParamHasDfl) {\n // ...\n if (getLangOpts().MicrosoftExt) {\n // ...\n if (MD && MD->getParent()->getDescribedClassTemplate()) {\n // ...\n DiagDefaultParamID = diag::ext_param_default_argument_redefinition;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:202:19: warning: redefinition of default argument [-Wmicrosoft-default-arg-redefinition]"} | ["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:202:19: warning: redefinition of default argument [-Wmicrosoft-default-arg-redefinition]"} | ||
| Line 1,864: | Line 1,865: | ||
}, | }, | ||
["ext_param_not_declared"]={ | ["ext_param_not_declared"]={ | ||
[ | [l]={jb,qb,dc,"implicit-int",pb}, | ||
[ | [k]="implicit-int", | ||
[ | [i]="ext_param_not_declared", | ||
[b]={{nil, | [b]={{nil,y,"parameter %0 was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int"},{V,nil,"parameter %0 was not declared, defaulting to type \'int\'"}}, | ||
[ | [g]={{nil,y,"parameter A was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int"},{V,nil,"parameter A was not declared, defaulting to type \'int\'"}}, | ||
[ | [f]=Q, | ||
[ | [e]="parameter (.*?) was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int", | ||
[ | [c]=" \\[[^\\]]*\\-Wimplicit\\-int[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{w,14993,"void Sema::ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D, SourceLocation LocAfterDecls) {\n // ...\n // C99 6.9.1p6 \"If a declarator includes an identifier list, each declaration\n // in the declaration list shall have at least one declarator, those\n // declarators shall only declare identifiers from the identifier list, and\n // every identifier in the identifier list shall be declared.\n //\n // C89 3.7.1p5 \"If a declarator includes an identifier list, only the\n // identifiers it names shall be declared in the declaration list.\"\n //\n // This is why we only diagnose in C99 and later. Note, the other conditions\n // listed are checked elsewhere.\n if (!FTI.hasPrototype) {\n for (int i = FTI.NumParams; i != 0; /* decrement in loop */) {\n // ...\n if (FTI.Params[i].Param == nullptr) {\n if (getLangOpts().C99) {\n // ...\n Diag(FTI.Params[i].IdentLoc, diag::ext_param_not_declared) << FTI.Params[i].Ident << FixItHint::CreateInsertion(LocAfterDecls, Code);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/redefinition.c"]={"clang/test/Sema/redefinition.c:7:9: error: parameter \'x\' was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int [-Wimplicit-int]"} | ["clang/test/Sema/redefinition.c"]={"clang/test/Sema/redefinition.c:7:9: error: parameter \'x\' was not declared, defaults to \'int\'; ISO C99 and later do not support implicit int [-Wimplicit-int]"} | ||
| Line 1,880: | Line 1,881: | ||
}, | }, | ||
["ext_param_promoted_not_compatible_with_prototype"]={ | ["ext_param_promoted_not_compatible_with_prototype"]={ | ||
[ | [l]={"knr-promoted-parameter"}, | ||
[ | [k]="knr-promoted-parameter", | ||
[ | [i]="ext_param_promoted_not_compatible_with_prototype", | ||
[b]="%diff{promoted type $ of K&R function parameter is not compatible with the parameter type $|promoted type of K&R function parameter is not compatible with parameter type}0,1 declared in a previous prototype", | [b]="%diff{promoted type $ of K&R function parameter is not compatible with the parameter type $|promoted type of K&R function parameter is not compatible with parameter type}0,1 declared in a previous prototype", | ||
[ | [g]={{nil,nil,{{"promoted type A of K&R function parameter is not compatible with the parameter type B","promoted type of K&R function parameter is not compatible with parameter type"}," declared in a previous prototype"}}}, | ||
[ | [f]=n, | ||
[ | [e]="(?:promoted type (.*?) of K&R function parameter is not compatible with the parameter type (.*?)|promoted type of K&R function parameter is not compatible with parameter type) declared in a previous prototype", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wknr\\-promoted\\-parameter[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{w,4269,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n // GNU C permits a K&R definition to follow a prototype declaration\n // if the declared types of the parameters in the K&R definition\n // match the types in the prototype declaration, even when the\n // promoted types of the parameters from the K&R definition differ\n // from the types in the prototype. GCC then keeps the types from\n // the prototype.\n //\n // If a variadic prototype is followed by a non-variadic K&R definition,\n // the K&R definition becomes variadic. This is sort of an edge case, but\n // it\'s legal per the standard depending on how you read C99 6.7.5.3p15 and\n // C99 6.9.1p8.\n if (!getLangOpts().CPlusPlus && Old->hasPrototype() && !New->hasPrototype() && New->getType()->getAs<FunctionProtoType>() && Old->getNumParams() == New->getNumParams()) {\n // ...\n if (LooseCompatible) {\n for (unsigned Warn = 0; Warn < Warnings.size(); ++Warn) {\n Diag(Warnings[Warn].NewParm->getLocation(), diag::ext_param_promoted_not_compatible_with_prototype) << Warnings[Warn].PromotedType << Warnings[Warn].OldParm->getType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/knr-def-call.c"]={"clang/test/Sema/knr-def-call.c:15:18: warning: promoted type \'double\' of K&R function parameter is not compatible with the parameter type \'float\' declared in a previous prototype [-Wknr-promoted-parameter]","clang/test/Sema/knr-def-call.c:29:21: warning: promoted type \'char *\' of K&R function parameter is not compatible with the parameter type \'const char *\' declared in a previous prototype [-Wknr-promoted-parameter]","clang/test/Sema/knr-def-call.c:49:9: warning: promoted type \'int\' of K&R function parameter is not compatible with the parameter type \'short\' declared in a previous prototype [-Wknr-promoted-parameter]"} | ["clang/test/Sema/knr-def-call.c"]={"clang/test/Sema/knr-def-call.c:15:18: warning: promoted type \'double\' of K&R function parameter is not compatible with the parameter type \'float\' declared in a previous prototype [-Wknr-promoted-parameter]","clang/test/Sema/knr-def-call.c:29:21: warning: promoted type \'char *\' of K&R function parameter is not compatible with the parameter type \'const char *\' declared in a previous prototype [-Wknr-promoted-parameter]","clang/test/Sema/knr-def-call.c:49:9: warning: promoted type \'int\' of K&R function parameter is not compatible with the parameter type \'short\' declared in a previous prototype [-Wknr-promoted-parameter]"} | ||
| Line 1,896: | Line 1,897: | ||
}, | }, | ||
["ext_parameter_name_omitted_c2x"]={ | ["ext_parameter_name_omitted_c2x"]={ | ||
[ | [l]={"c2x-extensions"}, | ||
[ | [k]="c2x-extensions", | ||
[ | [i]={{nil,A,"ext_parameter_name_omitted_c2x"}}, | ||
[b]={{nil, | [b]={{nil,A,"omitting the parameter name in a function definition is a C2x extension"}}, | ||
[ | [g]={{nil,A,"omitting the parameter name in a function definition is a C2x extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="omitting the parameter name in a function definition is a C2x extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc2x\\-extensions[^\\]]*\\]", | ||
[ | [a]={{nil,A,m}}, | ||
[ | [h]={"931fcd3ba011",1576908663,"[WebAssembly] Improve clang diagnostics for wasm attributes","[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"}, | ||
[ | [d]={{ac,16654,"/// CheckParmsForFunctionDef - Check that the parameters of the given\n/// function are appropriate for the definition of a function. This\n/// takes care of any checks that cannot be performed on the\n/// declaration itself, e.g., that the types of each of the function\n/// parameters are complete.\nbool Sema::CheckParmsForFunctionDef(ArrayRef<ParmVarDecl *> Parameters, bool CheckParameterNames) {\n // ...\n for (ParmVarDecl *Param : Parameters) {\n // ...\n // C99 6.9.1p5: If the declarator includes a parameter type list, the\n // declaration of each parameter shall include an identifier.\n if (CheckParameterNames && Param->getIdentifier() == nullptr && !Param->isImplicit() && !getLangOpts().CPlusPlus) {\n // Diagnose this as an extension in C17 and earlier.\n if (!getLangOpts().C2x)\n Diag(Param->getLocation(), diag::ext_parameter_name_omitted_c2x);"},{v,16955,"void Sema::ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope) {\n // ...\n if (ExplicitSignature) {\n for (unsigned I = 0, E = ExplicitSignature.getNumParams(); I != E; ++I) {\n // ...\n if (Param->getIdentifier() == nullptr && !Param->isImplicit() && !Param->isInvalidDecl() && !getLangOpts().CPlusPlus) {\n // Diagnose this as an extension in C17 and earlier.\n if (!getLangOpts().C2x)\n Diag(Param->getLocation(), diag::ext_parameter_name_omitted_c2x);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/function.c"]={"clang/test/Sema/function.c:33:13: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]","clang/test/Sema/function.c:83:23: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]"} | ["clang/test/Sema/function.c"]={"clang/test/Sema/function.c:33:13: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]","clang/test/Sema/function.c:83:23: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]"} | ||
| Line 1,912: | Line 1,913: | ||
}, | }, | ||
["ext_partial_spec_not_more_specialized_than_primary"]={ | ["ext_partial_spec_not_more_specialized_than_primary"]={ | ||
[ | [l]={"invalid-partial-specialization"}, | ||
[ | [k]="invalid-partial-specialization", | ||
[ | [i]="ext_partial_spec_not_more_specialized_than_primary", | ||
[b]="%select{class|variable}0 template partial specialization is not more specialized than the primary template", | [b]="%select{class|variable}0 template partial specialization is not more specialized than the primary template", | ||
[ | [g]={{nil,nil,{{"class",Zb}," template partial specialization is not more specialized than the primary template"}}}, | ||
[ | [f]=Q, | ||
[ | [e]="(?:class|variable) template partial specialization is not more specialized than the primary template", | ||
[ | [c]=" \\[[^\\]]*\\-Winvalid\\-partial\\-specialization[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"fa4a09d8afbf",1482868989,"Add warning flag for \"partial specialization is not more specialized than primary template\" error (s...","Add warning flag for \"partial specialization is not more specialized than primary template\" error (since Eigen hits it), and while I\'m here also add a warning flag for \"partial specialization is not usable because one or more of its parameters cannot be deduced\" warning.\n\nllvm-svn: 290625"}, | ||
[ | [d]={{O,4412,"template <typename PartialSpecDecl> static void checkMoreSpecializedThanPrimary(Sema &S, PartialSpecDecl *Partial) {\n // ...\n S.Diag(Partial->getLocation(), diag::ext_partial_spec_not_more_specialized_than_primary) << isa<VarTemplateDecl>(Template);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:9:6: error: variable template partial specialization is not more specialized than the primary template [-Winvalid-partial-specialization]"} | ["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:9:6: error: variable template partial specialization is not more specialized than the primary template [-Winvalid-partial-specialization]"} | ||
| Line 1,928: | Line 1,929: | ||
}, | }, | ||
["ext_partial_specs_not_deducible"]={ | ["ext_partial_specs_not_deducible"]={ | ||
[ | [l]={"unusable-partial-specialization"}, | ||
[ | [k]="unusable-partial-specialization", | ||
[ | [i]="ext_partial_specs_not_deducible", | ||
[b]="%select{class|variable}0 template partial specialization contains %select{a template parameter|template parameters}1 that cannot be deduced; this partial specialization will never be used", | [b]="%select{class|variable}0 template partial specialization contains %select{a template parameter|template parameters}1 that cannot be deduced; this partial specialization will never be used", | ||
[ | [g]={{nil,nil,{{"class",Zb}," template partial specialization contains ",{"a template parameter","template parameters"}," that cannot be deduced; this partial specialization will never be used"}}}, | ||
[ | [f]=Q, | ||
[ | [e]="(?:class|variable) template partial specialization contains (?:a template parameter|template parameters) that cannot be deduced; this partial specialization will never be used", | ||
[ | [c]=" \\[[^\\]]*\\-Wunusable\\-partial\\-specialization[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"57aae07b4a31",1482892645,"DR1315: a non-type template argument in a partial specialization is permitted","DR1315: a non-type template argument in a partial specialization is permitted\nto make reference to template parameters. This is only a partial\nimplementation; we retain the restriction that the argument must not be\ntype-dependent, since it\'s unclear how that would work given the existence of\nother language rules requiring an exact type match in this context, even for\ntype-dependent cases (a question has been raised on the core reflector).\n\nllvm-svn: 290647"}, | ||
[ | [d]={{O,4473,"template <typename PartialSpecDecl> static void checkTemplatePartialSpecialization(Sema &S, PartialSpecDecl *Partial) {\n // ...\n if (!DeducibleParams.all()) {\n // ...\n S.Diag(Partial->getLocation(), diag::ext_partial_specs_not_deducible) << isa<VarTemplatePartialSpecializationDecl>(Partial) << (NumNonDeducible > 1) << SourceRange(Partial->getLocation(), Partial->getTemplateArgsAsWritten()->RAngleLoc);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:39: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:31:65: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:39: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:39: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]"} | ["clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:39: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:31:65: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:39: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:39: error: variable template partial specialization contains a template parameter that cannot be deduced; this partial specialization will never be used [-Wunusable-partial-specialization]"} | ||
| Line 1,944: | Line 1,945: | ||
}, | }, | ||
["ext_paste_comma"]={ | ["ext_paste_comma"]={ | ||
[ | [l]={W,"gnu-zero-variadic-macro-arguments",t}, | ||
[ | [k]="gnu-zero-variadic-macro-arguments", | ||
[ | [i]="ext_paste_comma", | ||
[b]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", | [b]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", | ||
[g]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", | [g]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-variadic\\-macro\\-arguments[^\\]]*\\]", | [f]=n, | ||
[ | [e]="token pasting of \',\' and __VA_ARGS__ is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-variadic\\-macro\\-arguments[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{"clang/lib/Lex/TokenLexer.cpp",168,"bool TokenLexer::MaybeRemoveCommaBeforeVaArgs(SmallVectorImpl<Token> &ResultToks, bool HasPasteOperator, MacroInfo *Macro, unsigned MacroArgNo, Preprocessor &PP) {\n // ...\n // Issue an extension diagnostic for the paste operator.\n if (HasPasteOperator)\n PP.Diag(ResultToks.back().getLocation(), diag::ext_paste_comma);"},{"clang/lib/Lex/TokenLexer.cpp",526,"/// Expand the arguments of a function-like macro so that we can quickly\n/// return preexpanded tokens from Tokens.\nvoid TokenLexer::ExpandFunctionArguments() {\n // ...\n for (unsigned I = 0, E = NumTokens; I != E; ++I) {\n // ...\n if (NumToks) { // Not an empty argument?\n // ...\n // If this is the GNU \", ## __VA_ARGS__\" extension, and we just learned\n // that __VA_ARGS__ expands to multiple tokens, avoid a pasting error when\n // the expander tries to paste \',\' with the first token of the __VA_ARGS__\n // expansion.\n if (NonEmptyPasteBefore && ResultToks.size() >= 2 && ResultToks[ResultToks.size() - 2].is(tok::comma) && (unsigned)ArgNo == Macro->getNumParams() - 1 && Macro->isVariadic()) {\n // ...\n PP.Diag(ResultToks.pop_back_val().getLocation(), diag::ext_paste_comma);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:52:32: warning: token pasting of \',\' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]"} | ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:52:32: warning: token pasting of \',\' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]"} | ||
| Line 1,960: | Line 1,961: | ||
}, | }, | ||
["ext_plain_complex"]={ | ["ext_plain_complex"]={ | ||
[ | [i]="ext_plain_complex", | ||
[b]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", | [b]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", | ||
[g]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", | [g]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", | ||
[f]= | [f]=n, | ||
[e]= | [e]="plain \'_Complex\' requires a type specifier; assuming \'_Complex double\'", | ||
[ | [c]=lc, | ||
[ | [a]=m, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{cd,1307,"/// Finish - This does final analysis of the declspec, rejecting things like\n/// \"_Imaginary\" (lacking an FP type). After calling this method, DeclSpec is\n/// guaranteed to be self-consistent, even if an error occurred.\nvoid DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {\n // ...\n // TODO: if the implementation does not implement _Complex or _Imaginary,\n // disallow their use. Need information about the backend.\n if (TypeSpecComplex != TSC_unspecified) {\n if (TypeSpecType == TST_unspecified) {\n S.Diag(TSCLoc, diag::ext_plain_complex) << FixItHint::CreateInsertion(S.getLocForEndOfToken(getTypeSpecComplexLoc()), \" double\");"}}, | |||
[j]={ | [j]={ | ||
["clang/test/FixIt/fixit-recompile.c"]={"clang/test/FixIt/fixit-recompile.c:4:1: error: plain \'_Complex\' requires a type specifier; assuming \'_Complex double\' [-Werror]"} | ["clang/test/FixIt/fixit-recompile.c"]={"clang/test/FixIt/fixit-recompile.c:4:1: error: plain \'_Complex\' requires a type specifier; assuming \'_Complex double\' [-Werror]"} | ||
| Line 1,974: | Line 1,975: | ||
}, | }, | ||
["ext_pointer_to_const_ref_member_on_rvalue"]={ | ["ext_pointer_to_const_ref_member_on_rvalue"]={ | ||
[ | [l]={kb,hc,t}, | ||
[ | [k]=kb, | ||
[ | [i]={{nil,E,"ext_pointer_to_const_ref_member_on_rvalue"}}, | ||
[b]={{nil,p,"invoking a pointer to a \'const &\' member function on an rvalue is a C++20 extension"},{r, | [b]={{nil,p,"invoking a pointer to a \'const &\' member function on an rvalue is a C++20 extension"},{r,E,"invoking a pointer to a \'const &\' member function on an rvalue is a C++2a extension"}}, | ||
[ | [g]={{nil,p,"invoking a pointer to a \'const &\' member function on an rvalue is a C++20 extension"},{r,E,"invoking a pointer to a \'const &\' member function on an rvalue is a C++2a extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="invoking a pointer to a \'const &\' member function on an rvalue is a C\\+\\+20 extension", | ||
[ | [c]=cc, | ||
[ | [a]={{nil,E,m}}, | ||
[ | [h]={"2592327dae05",1503625675,"[c++2a] P0704R1: Allow pointers to const& member functions to be called on rvalues.","[c++2a] P0704R1: Allow pointers to const& member functions to be called on rvalues.\n\nPatch by Blitz Rakete!\n\nllvm-svn: 311744"}, | ||
[ | [d]={{Tb,6092,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n // ...\n // C++0x [expr.mptr.oper]p6:\n // In a .* expression whose object expression is an rvalue, the program is\n // ill-formed if the second operand is a pointer to member function with\n // ref-qualifier &. In a ->* expression or in a .* expression whose object\n // expression is an lvalue, the program is ill-formed if the second operand\n // is a pointer to member function with ref-qualifier &&.\n if (const FunctionProtoType *Proto = Result->getAs<FunctionProtoType>()) {\n // ...\n case RQ_LValue:\n if (!isIndirect && !LHS.get()->Classify(Context).isLValue()) {\n // C++2a allows functions with ref-qualifier & if their cv-qualifier-seq\n // is (exactly) \'const\'.\n if (Proto->isConst() && !Proto->isVolatile())\n Diag(Loc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_pointer_to_const_ref_member_on_rvalue : diag::ext_pointer_to_const_ref_member_on_rvalue);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx17-compat.cpp"]={"clang/test/SemaCXX/cxx17-compat.cpp:6:18: warning: invoking a pointer to a \'const &\' member function on an rvalue is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/SemaCXX/cxx17-compat.cpp"]={"clang/test/SemaCXX/cxx17-compat.cpp:6:18: warning: invoking a pointer to a \'const &\' member function on an rvalue is a C++20 extension [-Wc++20-extensions]"} | ||
| Line 1,990: | Line 1,991: | ||
}, | }, | ||
["ext_pp_bad_paste_ms"]={ | ["ext_pp_bad_paste_ms"]={ | ||
[ | [l]={"invalid-token-paste"}, | ||
[ | [k]="invalid-token-paste", | ||
[ | [i]="ext_pp_bad_paste_ms", | ||
[b]="pasting formed \'%0\', an invalid preprocessing token", | [b]="pasting formed \'%0\', an invalid preprocessing token", | ||
[ | [g]="pasting formed \'A\', an invalid preprocessing token", | ||
[ | [f]=Q, | ||
[ | [e]="pasting formed \'(.*?)\', an invalid preprocessing token", | ||
[ | [c]=" \\[[^\\]]*\\-Winvalid\\-token\\-paste[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"7b1573451eac",1392684350,"Fix a non-error diagnostic that had an err_ name. Also move it from Warning to","Fix a non-error diagnostic that had an err_ name. Also move it from Warning to\nExtWarn, since it\'s an extension.\n\nllvm-svn: 201540"}, | ||
[ | [d]={{"clang/lib/Lex/TokenLexer.cpp",869,"/// LHSTok is the LHS of a ## operator, and CurTokenIdx is the ##\n/// operator. Read the ## and RHS, and paste the LHS/RHS together. If there\n/// are more ## after it, chomp them iteratively. Return the result as LHSTok.\n/// If this returns true, the caller should immediately return the token.\nbool TokenLexer::pasteTokens(Token &LHSTok, ArrayRef<Token> TokenStream, unsigned int &CurIdx) {\n // ...\n do {\n // ...\n if (LHSTok.isAnyIdentifier() && RHS.isAnyIdentifier()) {\n // ...\n } else {\n // ...\n // If pasting the two tokens didn\'t form a full new token, this is an\n // error. This occurs with \"x ## +\" and other stuff. Return with LHSTok\n // unmodified and with RHS as the next token to lex.\n if (isInvalid) {\n // ...\n // Do not emit the error when preprocessing assembler code.\n if (!PP.getLangOpts().AsmPreprocessor) {\n // ...\n PP.Diag(Loc, PP.getLangOpts().MicrosoftExt ? diag::ext_pp_bad_paste_ms : diag::err_pp_bad_paste) << Buffer;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro_paste_msextensions.c"]={"clang/test/Preprocessor/macro_paste_msextensions.c:35:1: error: pasting formed \'(baz\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'1a-\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'-b2\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'b2-\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'-3c\', an invalid preprocessing token [-Winvalid-token-paste]"} | ["clang/test/Preprocessor/macro_paste_msextensions.c"]={"clang/test/Preprocessor/macro_paste_msextensions.c:35:1: error: pasting formed \'(baz\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'1a-\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'-b2\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'b2-\', an invalid preprocessing token [-Winvalid-token-paste]","clang/test/Preprocessor/macro_paste_msextensions.c:42:1: error: pasting formed \'-3c\', an invalid preprocessing token [-Winvalid-token-paste]"} | ||
| Line 2,006: | Line 2,007: | ||
}, | }, | ||
["ext_pp_bad_vaargs_use"]={ | ["ext_pp_bad_vaargs_use"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_pp_bad_vaargs_use", | ||
[b]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", | [b]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", | ||
[g]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", | [g]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", | ||
[f]=X, | [f]=n, | ||
[ | [e]="__VA_ARGS__ can only appear in the expansion of a C99 variadic macro", | ||
[ | [c]=X, | ||
[ | [a]=B, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{"clang/lib/Lex/Preprocessor.cpp",122,"Preprocessor::Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts, DiagnosticsEngine &diags, LangOptions &opts, SourceManager &SM, HeaderSearch &Headers, ModuleLoader &TheModuleLoader, IdentifierInfoLookup *IILookup, bool OwnsHeaders, TranslationUnitKind TUKind)\n // ...\n SetPoisonReason(Ident__VA_ARGS__, diag::ext_pp_bad_vaargs_use);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro_paste_bad.c"]={"clang/test/Preprocessor/macro_paste_bad.c:33:5: warning: __VA_ARGS__ can only appear in the expansion of a C99 variadic macro [-Wpedantic]"} | ["clang/test/Preprocessor/macro_paste_bad.c"]={"clang/test/Preprocessor/macro_paste_bad.c:33:5: warning: __VA_ARGS__ can only appear in the expansion of a C99 variadic macro [-Wpedantic]"} | ||
| Line 2,022: | Line 2,023: | ||
}, | }, | ||
["ext_pp_bad_vaopt_use"]={ | ["ext_pp_bad_vaopt_use"]={ | ||
[ | [l]={Mc}, | ||
[ | [k]=Mc, | ||
[ | [i]={{nil,E,"ext_pp_bad_vaopt_use"}}, | ||
[b]={{nil, | [b]={{nil,E,"__VA_OPT__ can only appear in the expansion of a variadic macro"}}, | ||
[ | [g]={{nil,E,"__VA_OPT__ can only appear in the expansion of a variadic macro"}}, | ||
[ | [f]=n, | ||
[ | [e]="__VA_OPT__ can only appear in the expansion of a variadic macro", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", | ||
[ | [a]={{nil,E,B}}, | ||
[ | [h]={"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"}, | ||
[ | [d]={{"clang/lib/Lex/Preprocessor.cpp",124,"Preprocessor::Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts, DiagnosticsEngine &diags, LangOptions &opts, SourceManager &SM, HeaderSearch &Headers, ModuleLoader &TheModuleLoader, IdentifierInfoLookup *IILookup, bool OwnsHeaders, TranslationUnitKind TUKind)\n // ...\n SetPoisonReason(Ident__VA_OPT__, diag::ext_pp_bad_vaopt_use);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:13:14: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:68:5: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:72:8: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:73:10: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:76:13: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]"} | ["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:13:14: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:68:5: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:72:8: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:73:10: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]","clang/test/Preprocessor/macro_vaopt_check.cpp:76:13: warning: __VA_OPT__ can only appear in the expansion of a variadic macro [-Wvariadic-macros]"} | ||
| Line 2,038: | Line 2,039: | ||
}, | }, | ||
["ext_pp_comma_expr"]={ | ["ext_pp_comma_expr"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_pp_comma_expr", | ||
[b]="comma operator in operand of #if", | [b]="comma operator in operand of #if", | ||
[ | [g]="comma operator in operand of #if", | ||
[ | [f]=n, | ||
[ | [e]="comma operator in operand of \\#if", | ||
[ | [c]=X, | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{"clang/lib/Lex/PPExpressions.cpp",808,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n case tok::comma:\n // Comma is invalid in pp expressions in c89/c++ mode, but is valid in C99\n // if not being evaluated.\n if (!PP.getLangOpts().C99 || ValueLive)\n PP.Diag(OpLoc, diag::ext_pp_comma_expr) << LHS.getRange() << RHS.getRange();"}} | ||
}, | }, | ||
["ext_pp_extra_tokens_at_eol"]={ | ["ext_pp_extra_tokens_at_eol"]={ | ||
[ | [l]={"endif-labels","extra-tokens"}, | ||
[ | [k]="extra-tokens", | ||
[ | [i]="ext_pp_extra_tokens_at_eol", | ||
[b]="extra tokens at end of #%0 directive", | [b]="extra tokens at end of #%0 directive", | ||
[ | [g]="extra tokens at end of #A directive", | ||
[ | [f]=n, | ||
[ | [e]="extra tokens at end of \\#(.*?) directive", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wextra\\-tokens[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{"clang/examples/AnnotateFunctions/AnnotateFunctions.cpp",69,"class PragmaAnnotateHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PragmaTok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{bb,440,"/// Ensure that the next token is a tok::eod token.\n///\n/// If not, emit a diagnostic and consume up until the eod. If EnableMacros is\n/// true, then we consider macros that expand to zero tokens as being ok.\n///\n/// Returns the location of the end of the directive.\nSourceLocation Preprocessor::CheckEndOfDirective(const char *DirType, bool EnableMacros) {\n // ...\n Diag(Tmp, diag::ext_pp_extra_tokens_at_eol) << DirType << Hint;"},{ib,818,"void Preprocessor::HandlePragmaModuleBuild(Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{ib,898,"void Preprocessor::HandlePragmaHdrstop(Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod))\n Diag(Tok.getLocation(), diag::ext_pp_extra_tokens_at_eol) << \"pragma hdrstop\";"},{ib,1220,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandleCaptured(Preprocessor &PP) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma clang __debug captured\";"},{ib,1522,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma warning\";"},{ib,1586,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma execution_character_set\";"},{ib,1704,"/// Handle the clang \\#pragma module import extension. The syntax is:\n/// \\code\n/// #pragma clang module import some.module.name\n/// \\endcode\nstruct PragmaModuleImportHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{ib,1741,"/// Handle the clang \\#pragma module begin extension. The syntax is:\n/// \\code\n/// #pragma clang module begin some.module.name\n/// ...\n/// #pragma clang module end\n/// \\endcode\nstruct PragmaModuleBeginHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{ib,1796,"/// Handle the clang \\#pragma module end extension.\nstruct PragmaModuleEndHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{ib,1831,"/// Handle the clang \\#pragma module load extension.\nstruct PragmaModuleLoadHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{ib,1888,"/// PragmaARCCFCodeAuditedHandler -\n/// \\#pragma clang arc_cf_code_audited begin/end\nstruct PragmaARCCFCodeAuditedHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"},{ib,1943,"/// PragmaAssumeNonNullHandler -\n/// \\#pragma clang assume_nonnull begin/end\nstruct PragmaAssumeNonNullHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << \"pragma\";"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:28:7: warning: extra tokens at end of #else directive [-Wextra-tokens]"} | ["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:28:7: warning: extra tokens at end of #else directive [-Wextra-tokens]"} | ||
| Line 2,067: | Line 2,068: | ||
}, | }, | ||
["ext_pp_gnu_line_directive"]={ | ["ext_pp_gnu_line_directive"]={ | ||
[ | [l]={W,"gnu-line-marker",t}, | ||
[ | [k]="gnu-line-marker", | ||
[ | [i]={{nil,y,"ext_pp_gnu_line_directive"}}, | ||
[b]={{nil, | [b]={{nil,y,"this style of line directive is a GNU extension"}}, | ||
[ | [g]={{nil,y,"this style of line directive is a GNU extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="this style of line directive is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-line\\-marker[^\\]]*\\]", | ||
[ | [a]={{nil,y,B}}, | ||
[ | [h]={ic,1625925174,fc,ec}, | ||
[ | [d]={{bb,1583,"/// HandleDigitDirective - Handle a GNU line marker directive, whose syntax is\n/// one of the following forms:\n///\n/// # 42\n/// # 42 \"file\" (\'1\' | \'2\')?\n/// # 42 \"file\" (\'1\' | \'2\')? \'3\' \'4\'?\n///\nvoid Preprocessor::HandleDigitDirective(Token &DigitTok) {\n // ...\n // If the StrTok is \"eod\", then it wasn\'t present. Otherwise, it must be a\n // string followed by eod.\n if (StrTok.is(tok::eod)) {\n Diag(StrTok, diag::ext_pp_gnu_line_directive);"},{bb,1613,"/// HandleDigitDirective - Handle a GNU line marker directive, whose syntax is\n/// one of the following forms:\n///\n/// # 42\n/// # 42 \"file\" (\'1\' | \'2\')?\n/// # 42 \"file\" (\'1\' | \'2\')? \'3\' \'4\'?\n///\nvoid Preprocessor::HandleDigitDirective(Token &DigitTok) {\n // ...\n // If the StrTok is \"eod\", then it wasn\'t present. Otherwise, it must be a\n // string followed by eod.\n if (StrTok.is(tok::eod)) {\n // ...\n } else if (StrTok.isNot(tok::string_literal)) {\n // ...\n } else if (StrTok.hasUDSuffix()) {\n // ...\n } else {\n // ...\n if (!SourceMgr.isWrittenInBuiltinFile(DigitTok.getLocation()) && !SourceMgr.isWrittenInCommandLineFile(DigitTok.getLocation()))\n Diag(StrTok, diag::ext_pp_gnu_line_directive);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/line-directive-system-headers.c"]={"clang/test/Preprocessor/line-directive-system-headers.c:6:11: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","clang/test/Preprocessor/line-directive-system-headers.c:44:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:47:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:44:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:47:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:48:7: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","glomp.h:195:7: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","blonk.h:43:51: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","blonk.h:100:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]"} | ["clang/test/Preprocessor/line-directive-system-headers.c"]={"clang/test/Preprocessor/line-directive-system-headers.c:6:11: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","clang/test/Preprocessor/line-directive-system-headers.c:44:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:47:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:44:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:47:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","foo:48:7: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","glomp.h:195:7: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","blonk.h:43:51: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]","blonk.h:100:6: warning: this style of line directive is a GNU extension [-Wgnu-line-marker]"} | ||
| Line 2,083: | Line 2,084: | ||
}, | }, | ||
["ext_pp_ident_directive"]={ | ["ext_pp_ident_directive"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_pp_ident_directive", | ||
[b]="#ident is a language extension", | [b]="#ident is a language extension", | ||
[ | [g]="#ident is a language extension", | ||
[ | [f]=n, | ||
[ | [e]="\\#ident is a language extension", | ||
[ | [c]=X, | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{bb,1665,"/// HandleIdentSCCSDirective - Handle a #ident/#sccs directive.\n///\nvoid Preprocessor::HandleIdentSCCSDirective(Token &Tok) {\n // ...\n Diag(Tok, diag::ext_pp_ident_directive);"}} | ||
}, | }, | ||
["ext_pp_import_directive"]={ | ["ext_pp_import_directive"]={ | ||
[ | [l]={"import-preprocessor-directive-pedantic",t}, | ||
[ | [k]="import-preprocessor-directive-pedantic", | ||
[ | [i]="ext_pp_import_directive", | ||
[b]="#import is a language extension", | [b]="#import is a language extension", | ||
[ | [g]="#import is a language extension", | ||
[ | [f]=n, | ||
[ | [e]="\\#import is a language extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wimport\\-preprocessor\\-directive\\-pedantic[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{bb,2623,"/// HandleImportDirective - Implements \\#import.\n///\nvoid Preprocessor::HandleImportDirective(SourceLocation HashLoc, Token &ImportTok) {\n if (!LangOpts.ObjC) { // #import is standard for ObjC.\n // ...\n Diag(ImportTok, diag::ext_pp_import_directive);"}} | ||
}, | }, | ||
["ext_pp_include_next_directive"]={ | ["ext_pp_include_next_directive"]={ | ||
[ | [l]={W,"gnu-include-next",t}, | ||
[ | [k]="gnu-include-next", | ||
[ | [i]="ext_pp_include_next_directive", | ||
[b]="#include_next is a language extension", | [b]="#include_next is a language extension", | ||
[ | [g]="#include_next is a language extension", | ||
[ | [f]=n, | ||
[ | [e]="\\#include_next is a language extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-include\\-next[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{bb,2592,"/// HandleIncludeNextDirective - Implements \\#include_next.\n///\nvoid Preprocessor::HandleIncludeNextDirective(SourceLocation HashLoc, Token &IncludeNextTok) {\n Diag(IncludeNextTok, diag::ext_pp_include_next_directive);"}} | ||
}, | }, | ||
["ext_pp_include_search_ms"]={ | ["ext_pp_include_search_ms"]={ | ||
[ | [l]={F,"microsoft-include","msvc-include"}, | ||
[ | [k]="microsoft-include", | ||
[ | [i]="ext_pp_include_search_ms", | ||
[b]="#include resolved using non-portable Microsoft search rules as: %0", | [b]="#include resolved using non-portable Microsoft search rules as: %0", | ||
[ | [g]="#include resolved using non-portable Microsoft search rules as: A", | ||
[ | [f]=n, | ||
[ | [e]="\\#include resolved using non\\-portable Microsoft search rules as\\: (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-include[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"0fafd34a6e7a",1388173576,"Implement MSVC header search algorithm in MicrosoftMode.","Implement MSVC header search algorithm in MicrosoftMode.\nFollows algorithm described here: http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx\n\nllvm-svn: 198082"}, | ||
[ | [d]={{"clang/lib/Lex/HeaderSearch.cpp",763,"/// Return true with a diagnostic if the file that MSVC would have found\n/// fails to match the one that Clang would have found with MSVC header search\n/// disabled.\nstatic bool checkMSVCHeaderSearch(DiagnosticsEngine &Diags, const FileEntry *MSFE, const FileEntry *FE, SourceLocation IncludeLoc) {\n if (MSFE && FE != MSFE) {\n Diags.Report(IncludeLoc, diag::ext_pp_include_search_ms) << MSFE->getName();"},{"clang/lib/Lex/HeaderSearch.cpp",977,"/// LookupFile - Given a \"foo\" or \\<foo> reference, look up the indicated file,\n/// return null on failure. isAngled indicates whether the file reference is\n/// for system \\#include\'s or not (i.e. using <> instead of \"\"). Includers, if\n/// non-empty, indicates where the \\#including file(s) are, in case a relative\n/// search is needed. Microsoft mode will pass all \\#including files.\nOptionalFileEntryRef HeaderSearch::LookupFile(StringRef Filename, SourceLocation IncludeLoc, bool isAngled, ConstSearchDirIterator FromDir, ConstSearchDirIterator *CurDirArg, ArrayRef<std::pair<const FileEntry *, DirectoryEntryRef>> Includers, SmallVectorImpl<char> *SearchPath, SmallVectorImpl<char> *RelativePath, Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, bool *IsMapped, bool *IsFrameworkFound, bool SkipCache, bool BuildSystemModule, bool OpenFile, bool CacheFailures) {\n // ...\n // Unless disabled, check to see if the file is in the #includer\'s\n // directory. This cannot be based on CurDir, because each includer could be\n // a #include of a subdirectory (#include \"foo/bar.h\") and a subsequent\n // include of \"baz.h\" should resolve to \"whatever/foo/baz.h\".\n // This search is not done for <> headers.\n if (!Includers.empty() && !isAngled && !NoCurDirSearch) {\n // ...\n for (const auto &IncluderAndDir : Includers) {\n // ...\n if (OptionalFileEntryRef FE = getFileAndSuggestModule(TmpDir, IncludeLoc, IncluderAndDir.second, IncluderIsSystemHeader, RequestingModule, SuggestedModule)) {\n // ...\n if (Diags.isIgnored(diag::ext_pp_include_search_ms, IncludeLoc)) {"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/microsoft-header-search.c"]={"clang/test/Preprocessor/Inputs/microsoft-header-search/a/b/include3.h:3:10: warning: #include resolved using non-portable Microsoft search rules as: clang/test/Preprocessor/Inputs/microsoft-header-search/a/findme.h [-Wmicrosoft-include]"} | ["clang/test/Preprocessor/microsoft-header-search.c"]={"clang/test/Preprocessor/Inputs/microsoft-header-search/a/b/include3.h:3:10: warning: #include resolved using non-portable Microsoft search rules as: clang/test/Preprocessor/Inputs/microsoft-header-search/a/findme.h [-Wmicrosoft-include]"} | ||
| Line 2,138: | Line 2,139: | ||
}, | }, | ||
["ext_pp_line_too_big"]={ | ["ext_pp_line_too_big"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_pp_line_too_big", | ||
[b]="C requires #line number to be less than %0, allowed as extension", | [b]="C requires #line number to be less than %0, allowed as extension", | ||
[ | [g]="C requires #line number to be less than A, allowed as extension", | ||
[ | [f]=n, | ||
[ | [e]="C requires \\#line number to be less than (.*?), allowed as extension", | ||
[ | [c]=X, | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{bb,1423,"/// Handle a \\#line directive: C99 6.10.4.\n///\n/// The two acceptable forms are:\n/// \\verbatim\n/// # line digit-sequence\n/// # line digit-sequence \"s-char-sequence\"\n/// \\endverbatim\nvoid Preprocessor::HandleLineDirective() {\n // ...\n if (LineNo >= LineLimit)\n Diag(DigitTok, diag::ext_pp_line_too_big) << LineLimit;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/line-directive.c"]={"clang/test/Preprocessor/line-directive.c:0:7: warning: C requires #line number to be less than 2147483648, allowed as extension [-Wpedantic]"} | ["clang/test/Preprocessor/line-directive.c"]={"clang/test/Preprocessor/line-directive.c:0:7: warning: C requires #line number to be less than 2147483648, allowed as extension [-Wpedantic]"} | ||
| Line 2,154: | Line 2,155: | ||
}, | }, | ||
["ext_pp_line_zero"]={ | ["ext_pp_line_zero"]={ | ||
[ | [l]={W,"gnu-zero-line-directive",t}, | ||
[ | [k]="gnu-zero-line-directive", | ||
[ | [i]="ext_pp_line_zero", | ||
[b]="#line directive with zero argument is a GNU extension", | [b]="#line directive with zero argument is a GNU extension", | ||
[ | [g]="#line directive with zero argument is a GNU extension", | ||
[ | [f]=n, | ||
[ | [e]="\\#line directive with zero argument is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-zero\\-line\\-directive[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"0638c15a52d3",1340745560,"preprocessing: gcc supports #line 0. So, treat this","preprocessing: gcc supports #line 0. So, treat this\nas a gcc supported extension with usual treatment\nwith -pedantic (warn) and -pedantic-errors (error).\n// rdar://11550996\n\nllvm-svn: 159226"}, | ||
[ | [d]={{bb,1415,"/// Handle a \\#line directive: C99 6.10.4.\n///\n/// The two acceptable forms are:\n/// \\verbatim\n/// # line digit-sequence\n/// # line digit-sequence \"s-char-sequence\"\n/// \\endverbatim\nvoid Preprocessor::HandleLineDirective() {\n // ...\n if (LineNo == 0)\n Diag(DigitTok, diag::ext_pp_line_zero);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Lexer/gnu-flags.c"]={"clang/test/Lexer/gnu-flags.c:51:7: warning: #line directive with zero argument is a GNU extension [-Wgnu-zero-line-directive]"} | ["clang/test/Lexer/gnu-flags.c"]={"clang/test/Lexer/gnu-flags.c:51:7: warning: #line directive with zero argument is a GNU extension [-Wgnu-zero-line-directive]"} | ||
| Line 2,170: | Line 2,171: | ||
}, | }, | ||
["ext_pp_macro_redef"]={ | ["ext_pp_macro_redef"]={ | ||
[ | [l]={"macro-redefined","pedantic-macros"}, | ||
[ | [k]="macro-redefined", | ||
[ | [i]="ext_pp_macro_redef", | ||
[b]="%0 macro redefined", | [b]="%0 macro redefined", | ||
[ | [g]="A macro redefined", | ||
[ | [f]=n, | ||
[ | [e]="(.*?) macro redefined", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmacro\\-redefined[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{bb,3141,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Finally, if this identifier already had a macro defined for it, verify that\n // the macro bodies are identical, and issue diagnostics if they are not.\n if (const MacroInfo *OtherMI = getMacroInfo(MacroNameTok.getIdentifierInfo())) {\n // ...\n // It is very common for system headers to have tons of macro redefinitions\n // and for warnings to be disabled in system headers. If this is the case,\n // then don\'t bother calling MacroInfo::isIdenticalTo.\n if (!getDiagnostics().getSuppressSystemWarnings() || !SourceMgr.isInSystemHeader(DefineTok.getLocation())) {\n // ...\n // Warn if defining \"__LINE__\" and other builtins, per C99 6.10.8/4 and\n // C++ [cpp.predefined]p4, but allow it as an extension.\n if (isLanguageDefinedBuiltin(SourceMgr, OtherMI, II->getName()))\n // ...\n // Macros must be identical. This means all tokens and whitespace\n // separation must be the same. C99 6.10.3p2.\n else if (!OtherMI->isAllowRedefinitionsWithoutWarning() && !MI->isIdenticalTo(*OtherMI, *this, /*Syntactic=*/LangOpts.MicrosoftExt)) {\n Diag(MI->getDefinitionLoc(), diag::ext_pp_macro_redef) << MacroNameTok.getIdentifierInfo();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/pragma-pushpop-macro.c"]={"clang/test/Preprocessor/pragma-pushpop-macro.c:17:9: warning: \'Y\' macro redefined [-Wmacro-redefined]"} | ["clang/test/Preprocessor/pragma-pushpop-macro.c"]={"clang/test/Preprocessor/pragma-pushpop-macro.c:17:9: warning: \'Y\' macro redefined [-Wmacro-redefined]"} | ||
| Line 2,186: | Line 2,187: | ||
}, | }, | ||
["ext_pp_opencl_variadic_macros"]={ | ["ext_pp_opencl_variadic_macros"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]={{nil,r,"ext_pp_opencl_variadic_macros"}}, | ||
[b]={{nil,r,"variadic macros are a Clang extension in OpenCL"}}, | [b]={{nil,r,"variadic macros are a Clang extension in OpenCL"}}, | ||
[ | [g]={{nil,r,"variadic macros are a Clang extension in OpenCL"}}, | ||
[ | [f]=n, | ||
[ | [e]="variadic macros are a Clang extension in OpenCL", | ||
[ | [c]=X, | ||
[ | [a]={{nil,r,B}}, | ||
[ | [h]={"545652b96485",1553599357,"[OpenCL] Allow variadic macros as Clang feature.","[OpenCL] Allow variadic macros as Clang feature.\n\nllvm-svn: 356987"}, | ||
[ | [d]={{bb,2684,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n case tok::ellipsis: // #define X(... -> C99 varargs\n // ...\n // OpenCL v1.2 s6.9.e: variadic macros are not supported.\n if (LangOpts.OpenCL && !LangOpts.OpenCLCPlusPlus) {\n Diag(Tok, diag::ext_pp_opencl_variadic_macros);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro_variadic.cl"]={"clang/test/Preprocessor/macro_variadic.cl:7:21: warning: variadic macros are a Clang extension in OpenCL [-Wpedantic]","clang/test/Preprocessor/macro_variadic.cl:8:18: warning: variadic macros are a Clang extension in OpenCL [-Wpedantic]","clang/test/Preprocessor/macro_variadic.cl:9:25: warning: variadic macros are a Clang extension in OpenCL [-Wpedantic]"} | ["clang/test/Preprocessor/macro_variadic.cl"]={"clang/test/Preprocessor/macro_variadic.cl:7:21: warning: variadic macros are a Clang extension in OpenCL [-Wpedantic]","clang/test/Preprocessor/macro_variadic.cl:8:18: warning: variadic macros are a Clang extension in OpenCL [-Wpedantic]","clang/test/Preprocessor/macro_variadic.cl:9:25: warning: variadic macros are a Clang extension in OpenCL [-Wpedantic]"} | ||
| Line 2,202: | Line 2,203: | ||
}, | }, | ||
["ext_pp_operator_used_as_macro_name"]={ | ["ext_pp_operator_used_as_macro_name"]={ | ||
[ | [l]={F,"microsoft-cpp-macro",t}, | ||
[ | [k]="microsoft-cpp-macro", | ||
[ | [i]="ext_pp_operator_used_as_macro_name", | ||
[b]="C++ operator %0 (aka %1) used as a macro name", | [b]="C++ operator %0 (aka %1) used as a macro name", | ||
[ | [g]="C++ operator A (aka B) used as a macro name", | ||
[ | [f]=n, | ||
[ | [e]="C\\+\\+ operator (.*?) \\(aka (.*?)\\) used as a macro name", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-cpp\\-macro[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"e03e9e15f2a6",1401553942,"Preprocessor: make C++ operator names as macro identifiers a compatible extension","Preprocessor: make C++ operator names as macro identifiers a compatible extension\n\nWith recent changes, this is now a compatible language extension and can be\nsafely enabled with -ms-extensions instead of requiring the full\n-ms-compatibility MSVC drop-in mode. As such we can now also emit an extension\nwarning under -Wmicrosoft to help users port their code.\n\nllvm-svn: 209978"}, | ||
[ | [d]={{bb,335,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // ...\n if (II->isCPlusPlusOperatorKeyword()) {\n // ...\n Diag(MacroNameTok, getLangOpts().MicrosoftExt ? diag::ext_pp_operator_used_as_macro_name : diag::err_pp_operator_used_as_macro_name) << II << MacroNameTok.getKind();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:385:9: warning: C++ operator \'and\' (aka \'&&\') used as a macro name [-Wmicrosoft-cpp-macro]"} | ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:385:9: warning: C++ operator \'and\' (aka \'&&\') used as a macro name [-Wmicrosoft-cpp-macro]"} | ||
| Line 2,218: | Line 2,219: | ||
}, | }, | ||
["ext_pp_redef_builtin_macro"]={ | ["ext_pp_redef_builtin_macro"]={ | ||
[ | [l]={"builtin-macro-redefined","pedantic-macros"}, | ||
[ | [k]="builtin-macro-redefined", | ||
[ | [i]="ext_pp_redef_builtin_macro", | ||
[b]="redefining builtin macro", | [b]="redefining builtin macro", | ||
[g]="redefining builtin macro", | [g]="redefining builtin macro", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-macro\\-redefined[^\\]]*\\]", | [f]=n, | ||
[ | [e]="redefining builtin macro", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-macro\\-redefined[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,","After issuing a diagnostic for undefining or redefining a builtin macro,\ncontinue parsing the directive rather than silently discarding it.\n\nAllowing undef or redef of __TIME__ and __DATE__ is important to folks\nwho want stable, reproducible builds.\n\nllvm-svn: 176540"}, | |||
[d]={{bb,3136,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Finally, if this identifier already had a macro defined for it, verify that\n // the macro bodies are identical, and issue diagnostics if they are not.\n if (const MacroInfo *OtherMI = getMacroInfo(MacroNameTok.getIdentifierInfo())) {\n // ...\n // It is very common for system headers to have tons of macro redefinitions\n // and for warnings to be disabled in system headers. If this is the case,\n // then don\'t bother calling MacroInfo::isIdenticalTo.\n if (!getDiagnostics().getSuppressSystemWarnings() || !SourceMgr.isInSystemHeader(DefineTok.getLocation())) {\n // ...\n // Warn if defining \"__LINE__\" and other builtins, per C99 6.10.8/4 and\n // C++ [cpp.predefined]p4, but allow it as an extension.\n if (isLanguageDefinedBuiltin(SourceMgr, OtherMI, II->getName()))\n Diag(MacroNameTok, diag::ext_pp_redef_builtin_macro);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:9:9: warning: redefining builtin macro [-Wbuiltin-macro-redefined]"} | ["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:9:9: warning: redefining builtin macro [-Wbuiltin-macro-redefined]"} | ||
| Line 2,234: | Line 2,235: | ||
}, | }, | ||
["ext_pp_undef_builtin_macro"]={ | ["ext_pp_undef_builtin_macro"]={ | ||
[ | [l]={"builtin-macro-redefined","pedantic-macros"}, | ||
[ | [k]="builtin-macro-redefined", | ||
[ | [i]="ext_pp_undef_builtin_macro", | ||
[b]="undefining builtin macro", | [b]="undefining builtin macro", | ||
[g]="undefining builtin macro", | [g]="undefining builtin macro", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-macro\\-redefined[^\\]]*\\]", | [f]=n, | ||
[ | [e]="undefining builtin macro", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-macro\\-redefined[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={"7b24254e91a0",1362530760,"After issuing a diagnostic for undefining or redefining a builtin macro,","After issuing a diagnostic for undefining or redefining a builtin macro,\ncontinue parsing the directive rather than silently discarding it.\n\nAllowing undef or redef of __TIME__ and __DATE__ is important to folks\nwho want stable, reproducible builds.\n\nllvm-svn: 176540"}, | |||
[d]={{bb,3218,"/// HandleUndefDirective - Implements \\#undef.\n///\nvoid Preprocessor::HandleUndefDirective() {\n // ...\n // If the macro is not defined, this is a noop undef.\n if (const MacroInfo *MI = MD.getMacroInfo()) {\n // ...\n // Warn if undefining \"__LINE__\" and other builtins, per C99 6.10.8/4 and\n // C++ [cpp.predefined]p4, but allow it as an extension.\n if (isLanguageDefinedBuiltin(SourceMgr, MI, II->getName()))\n Diag(MacroNameTok, diag::ext_pp_undef_builtin_macro);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:18:8: warning: undefining builtin macro [-Wbuiltin-macro-redefined]"} | ["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:18:8: warning: undefining builtin macro [-Wbuiltin-macro-redefined]"} | ||
| Line 2,250: | Line 2,251: | ||
}, | }, | ||
["ext_pp_warning_directive"]={ | ["ext_pp_warning_directive"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_pp_warning_directive", | ||
[b]="#warning is a %select{C2x|C++23}0 extension", | [b]="#warning is a %select{C2x|C++23}0 extension", | ||
[ | [g]={{nil,nil,{"#warning is a ",{"C2x","C++23"}," extension"}},{P,y,{"#warning is a ",{"C2x","C++2b"}," extension"}},{V,nil,"#warning is a language extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="\\#warning is a (?:C2x|C\\+\\+23) extension", | ||
[ | [c]=X, | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{bb,1278,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n // ...\n default:\n // ...\n case tok::pp_warning:\n if (LangOpts.CPlusPlus)\n Diag(Result, LangOpts.CPlusPlus23 ? diag::warn_cxx23_compat_warning_directive : diag::ext_pp_warning_directive) << /*C++23*/ 1;"},{bb,1282,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n // ...\n default:\n // ...\n case tok::pp_warning:\n if (LangOpts.CPlusPlus)\n // ...\n else\n Diag(Result, LangOpts.C2x ? diag::warn_c2x_compat_warning_directive : diag::ext_pp_warning_directive) << /*C2x*/ 0;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:61:2: warning: #warning is a C++23 extension [-Wpedantic]"} | ["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:61:2: warning: #warning is a C++23 extension [-Wpedantic]"} | ||
| Line 2,266: | Line 2,267: | ||
}, | }, | ||
["ext_pragma_syntax_eod"]={ | ["ext_pragma_syntax_eod"]={ | ||
[ | [l]={jb,qb,pb,"pragmas",xc}, | ||
[ | [k]=xc, | ||
[ | [i]="ext_pragma_syntax_eod", | ||
[b]="expected end of directive in pragma", | [b]="expected end of directive in pragma", | ||
[g]="expected end of directive in pragma", | [g]="expected end of directive in pragma", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", | [f]=n, | ||
[ | [e]="expected end of directive in pragma", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={"2f1e36bfd0c1",1298860671,"Rename tok::eom to tok::eod.","Rename tok::eom to tok::eod.\n\nThe previous name was inaccurate as this token in fact appears at\nthe end of every preprocessing directive, not just macro definitions.\nNo functionality change, except for a diagnostic tweak.\n\nllvm-svn: 126631"}, | |||
[d]={{ib,992,"bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {\n // ...\n if (Tok.isNot(tok::eod))\n Diag(Tok, diag::ext_pragma_syntax_eod);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/pragma_unknown.c"]={"clang/test/Preprocessor/pragma_unknown.c:29:34: warning: expected end of directive in pragma [-Wunknown-pragmas]"} | ["clang/test/Preprocessor/pragma_unknown.c"]={"clang/test/Preprocessor/pragma_unknown.c:29:34: warning: expected end of directive in pragma [-Wunknown-pragmas]"} | ||
| Line 2,282: | Line 2,283: | ||
}, | }, | ||
["ext_predef_outside_function"]={ | ["ext_predef_outside_function"]={ | ||
[ | [l]={"predefined-identifier-outside-function"}, | ||
[ | [k]="predefined-identifier-outside-function", | ||
[ | [i]="ext_predef_outside_function", | ||
[b]="predefined identifier is only valid inside function", | [b]="predefined identifier is only valid inside function", | ||
[g]="predefined identifier is only valid inside function", | [g]="predefined identifier is only valid inside function", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wpredefined\\-identifier\\-outside\\-function[^\\]]*\\]", | [f]=n, | ||
[ | [e]="predefined identifier is only valid inside function", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpredefined\\-identifier\\-outside\\-function[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{v,3641,"ExprResult Sema::BuildPredefinedExpr(SourceLocation Loc, PredefinedExpr::IdentKind IK) {\n // ...\n if (!currentDecl) {\n Diag(Loc, diag::ext_predef_outside_function);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/predef.c"]={"clang/test/Sema/predef.c:8:11: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]","clang/test/Sema/predef.c:16:17: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]","clang/test/Sema/predef.c:17:17: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]","clang/test/Sema/predef.c:18:17: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]"} | ["clang/test/Sema/predef.c"]={"clang/test/Sema/predef.c:8:11: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]","clang/test/Sema/predef.c:16:17: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]","clang/test/Sema/predef.c:17:17: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]","clang/test/Sema/predef.c:18:17: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]"} | ||
| Line 2,298: | Line 2,299: | ||
}, | }, | ||
["ext_pseudo_dtor_on_void"]={ | ["ext_pseudo_dtor_on_void"]={ | ||
[ | [l]={F,"microsoft-void-pseudo-dtor"}, | ||
[ | [k]="microsoft-void-pseudo-dtor", | ||
[ | [i]="ext_pseudo_dtor_on_void", | ||
[b]="pseudo-destructors on type void are a Microsoft extension", | [b]="pseudo-destructors on type void are a Microsoft extension", | ||
[ | [g]="pseudo-destructors on type void are a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="pseudo\\-destructors on type void are a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-void\\-pseudo\\-dtor[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"5882927d7a1f",1327297857,"In microsoft mode, downgrade pseudo-destructors on void from error to warning.","In microsoft mode, downgrade pseudo-destructors on void from error to warning.\n\nThis matches cl.exe\'s behavior and fixes PR11791.\n\nllvm-svn: 148682"}, | ||
[ | [d]={{Tb,7768,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n // ...\n if (!ObjectType->isDependentType() && !ObjectType->isScalarType() && !ObjectType->isVectorType()) {\n if (getLangOpts().MSVCCompat && ObjectType->isVoidType())\n Diag(OpLoc, diag::ext_pseudo_dtor_on_void) << Base->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/microsoft-compatibility.cpp"]={"clang/test/CodeGenCXX/microsoft-compatibility.cpp:15:4: warning: pseudo-destructors on type void are a Microsoft extension [-Wmicrosoft-void-pseudo-dtor]"} | ["clang/test/CodeGenCXX/microsoft-compatibility.cpp"]={"clang/test/CodeGenCXX/microsoft-compatibility.cpp:15:4: warning: pseudo-destructors on type void are a Microsoft extension [-Wmicrosoft-void-pseudo-dtor]"} | ||
| Line 2,314: | Line 2,315: | ||
}, | }, | ||
["ext_pure_function_definition"]={ | ["ext_pure_function_definition"]={ | ||
[ | [l]={F,"microsoft-pure-definition"}, | ||
[ | [k]="microsoft-pure-definition", | ||
[ | [i]="ext_pure_function_definition", | ||
[b]="function definition with pure-specifier is a Microsoft extension", | [b]="function definition with pure-specifier is a Microsoft extension", | ||
[ | [g]="function definition with pure-specifier is a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="function definition with pure\\-specifier is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-pure\\-definition[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={vb,1405733957,ub,tb}, | ||
[ | [d]={{w,15629,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n // MSVC permits the use of pure specifier (=0) on function definition,\n // defined at class scope, warn about this non-standard construct.\n if (getLangOpts().MicrosoftExt && FD->isPure() && !FD->isOutOfLine())\n Diag(FD->getLocation(), diag::ext_pure_function_definition);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:294:16: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]","clang/test/Parser/MicrosoftExtensions.cpp:304:11: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]","clang/test/Parser/MicrosoftExtensions.cpp:314:13: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]","clang/test/Parser/MicrosoftExtensions.cpp:314:13: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]"} | ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:294:16: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]","clang/test/Parser/MicrosoftExtensions.cpp:304:11: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]","clang/test/Parser/MicrosoftExtensions.cpp:314:13: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]","clang/test/Parser/MicrosoftExtensions.cpp:314:13: warning: function definition with pure-specifier is a Microsoft extension [-Wmicrosoft-pure-definition]"} | ||
| Line 2,330: | Line 2,331: | ||
}, | }, | ||
["ext_qualified_dtor_named_in_lexical_scope"]={ | ["ext_qualified_dtor_named_in_lexical_scope"]={ | ||
[ | [l]={"dtor-name"}, | ||
[ | [k]="dtor-name", | ||
[ | [i]={{nil,A,"ext_qualified_dtor_named_in_lexical_scope"}}, | ||
[b]={{nil, | [b]={{nil,A,"qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup"}}, | ||
[ | [g]={{nil,A,"qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup"}}, | ||
[ | [f]=n, | ||
[ | [e]="qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdtor\\-name[^\\]]*\\]", | ||
[ | [a]={{nil,A,m}}, | ||
[ | [h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | ||
[ | [d]={{Tb,400,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\n if (SS.isSet()) {\n // ...\n // For compatibility with other compilers and older versions of Clang,\n //\n // nested-name-specifier type-name :: ~ type-name\n //\n // also looks for type-name in the scope. Unfortunately, we can\'t\n // reasonably apply this fallback for dependent nested-name-specifiers.\n if (SS.isValid() && SS.getScopeRep()->getPrefix()) {\n if (ParsedType T = LookupInScope()) {\n Diag(SS.getEndLoc(), diag::ext_qualified_dtor_named_in_lexical_scope) << FixItHint::CreateRemoval(SS.getRange());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/drs/dr2xx.cpp"]={"clang/test/CXX/drs/dr2xx.cpp:556:11: error: qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup [-Werror,-Wdtor-name]"} | ["clang/test/CXX/drs/dr2xx.cpp"]={"clang/test/CXX/drs/dr2xx.cpp:556:11: error: qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup [-Werror,-Wdtor-name]"} | ||
| Line 2,346: | Line 2,347: | ||
}, | }, | ||
["ext_redefinition_of_typedef"]={ | ["ext_redefinition_of_typedef"]={ | ||
[ | [l]={"typedef-redefinition"}, | ||
[ | [k]="typedef-redefinition", | ||
[ | [i]="ext_redefinition_of_typedef", | ||
[b]="redefinition of typedef %0 is a C11 feature", | [b]="redefinition of typedef %0 is a C11 feature", | ||
[ | [g]="redefinition of typedef A is a C11 feature", | ||
[ | [f]=n, | ||
[ | [e]="redefinition of typedef (.*?) is a C11 feature", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtypedef\\-redefinition[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={vb,1405733957,ub,tb}, | ||
[ | [d]={{w,2740,"/// MergeTypedefNameDecl - We just parsed a typedef \'New\' which has the\n/// same name and scope as a previous declaration \'Old\'. Figure out\n/// how to resolve this situation, merging decls or emitting\n/// diagnostics as appropriate. If there was an error, set New to be invalid.\n///\nvoid Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, LookupResult &OldDecls) {\n // ...\n Diag(New->getLocation(), diag::ext_redefinition_of_typedef) << New->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/pragma_sysheader.c"]={"clang/test/Preprocessor/Inputs/pragma_sysheader.h:19:13: warning: redefinition of typedef \'x\' is a C11 feature [-Wtypedef-redefinition]"} | ["clang/test/Preprocessor/pragma_sysheader.c"]={"clang/test/Preprocessor/Inputs/pragma_sysheader.h:19:13: warning: redefinition of typedef \'x\' is a C11 feature [-Wtypedef-redefinition]"} | ||
| Line 2,362: | Line 2,363: | ||
}, | }, | ||
["ext_ref_qualifier"]={ | ["ext_ref_qualifier"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_ref_qualifier", | ||
[b]="reference qualifiers on functions are a C++11 extension", | [b]="reference qualifiers on functions are a C++11 extension", | ||
[ | [g]="reference qualifiers on functions are a C++11 extension", | ||
[ | [f]=n, | ||
[ | [e]="reference qualifiers on functions are a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=G, | ||
[ | [h]={"a52713096d31",1296074132,"Improve the extension warning for the use of ref-qualifiers, to","Improve the extension warning for the use of ref-qualifiers, to\ndistinguish them from rvalue references. Using the rvalue-references\nwarning was weird when the ref-qualifier was \'&\'.\n\nllvm-svn: 124316"}, | ||
[ | [d]={{xb,7160,"/// ParseRefQualifier - Parses a member function ref-qualifier. Returns\n/// true if a ref-qualifier is found.\nbool Parser::ParseRefQualifier(bool &RefQualifierIsLValueRef, SourceLocation &RefQualifierLoc) {\n if (Tok.isOneOf(tok::amp, tok::ampamp)) {\n Diag(Tok, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_ref_qualifier : diag::ext_ref_qualifier);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:6:22: warning: reference qualifiers on functions are a C++11 extension [-Wc++11-extensions]"} | ["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:6:22: warning: reference qualifiers on functions are a C++11 extension [-Wc++11-extensions]"} | ||
| Line 2,378: | Line 2,379: | ||
}, | }, | ||
["ext_register_storage_class"]={ | ["ext_register_storage_class"]={ | ||
[ | [l]={"register"}, | ||
[ | [k]="register", | ||
[ | [i]="ext_register_storage_class", | ||
[b]="ISO C++1z does not allow \'register\' storage class specifier", | [b]="ISO C++1z does not allow \'register\' storage class specifier", | ||
[ | [g]="ISO C++1z does not allow \'register\' storage class specifier", | ||
[ | [f]=Q, | ||
[ | [e]="ISO C\\+\\+17 does not allow \'register\' storage class specifier", | ||
[ | [c]=" \\[[^\\]]*\\-Wregister[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"291027692fe7",1448487261,"P0001R1: \'register\' storage class specifier is no longer permitted in C++1z.","P0001R1: \'register\' storage class specifier is no longer permitted in C++1z.\n\nWe will still allow it in system headers, in macros from system headers, when\ncombined with an \'asm\' label, and under the flag -Wno-register.\n\nllvm-svn: 254097"}, | ||
[ | [d]={{w,7496,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (getLangOpts().CPlusPlus11 && SCSpec == DeclSpec::SCS_register && !D.getAsmLabel() && !getSourceManager().isInSystemMacro(D.getDeclSpec().getStorageClassSpecLoc())) {\n // ...\n Diag(D.getDeclSpec().getStorageClassSpecLoc(), getLangOpts().CPlusPlus17 ? diag::ext_register_storage_class : diag::warn_deprecated_register) << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"},{w,14738,"/// ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator()\n/// to introduce parameters into function prototype scope.\nDecl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {\n // ...\n if (DS.getStorageClassSpec() == DeclSpec::SCS_register) {\n // ...\n // In C++11, the \'register\' storage class specifier is deprecated.\n // In C++17, it is not allowed, but we tolerate it as an extension.\n if (getLangOpts().CPlusPlus11) {\n Diag(DS.getStorageClassSpecLoc(), getLangOpts().CPlusPlus17 ? diag::ext_register_storage_class : diag::warn_deprecated_register) << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp:18:1: error: ISO C++17 does not allow \'register\' storage class specifier [-Wregister]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp:41:23: error: ISO C++17 does not allow \'register\' storage class specifier [-Wregister]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp:58:3: error: ISO C++17 does not allow \'register\' storage class specifier [-Wregister]"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp:18:1: error: ISO C++17 does not allow \'register\' storage class specifier [-Wregister]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp:41:23: error: ISO C++17 does not allow \'register\' storage class specifier [-Wregister]","clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp:58:3: error: ISO C++17 does not allow \'register\' storage class specifier [-Wregister]"} | ||
| Line 2,394: | Line 2,395: | ||
}, | }, | ||
["ext_reserved_user_defined_literal"]={ | ["ext_reserved_user_defined_literal"]={ | ||
[ | [l]={"reserved-user-defined-literal"}, | ||
[ | [k]="reserved-user-defined-literal", | ||
[ | [i]="ext_reserved_user_defined_literal", | ||
[b]="invalid suffix on literal; C++11 requires a space between literal and identifier", | [b]="invalid suffix on literal; C++11 requires a space between literal and identifier", | ||
[ | [g]="invalid suffix on literal; C++11 requires a space between literal and identifier", | ||
[ | [f]=Q, | ||
[ | [e]="invalid suffix on literal; C\\+\\+11 requires a space between literal and identifier", | ||
[ | [c]=" \\[[^\\]]*\\-Wreserved\\-user\\-defined\\-literal[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"0df56f4a9000",1331174361,"Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix not","Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix not\nstarting with an underscore is ill-formed.\n\nSince this rule rejects programs that were using <inttypes.h>\'s macros, recover\nfrom this error by treating the ud-suffix as a separate preprocessing-token,\nwith a DefaultError ExtWarn. The approach of treating such cases as two tokens\nis under discussion for standardization, but is in any case a conforming\nextension and allows existing codebases to keep building while the committee\nmakes up its mind.\n\nReword the warning on the definition of literal operators not starting with\nunderscores (which are, strangely, legal) to more explicitly state that such\noperators can\'t be called by literals. Remove the special-case diagnostic for\nhexfloats, since it was both triggering in the wrong cases and incorrect.\n\nllvm-svn: 152287"}, | ||
[ | [d]={{Kb,2053,"/// LexUDSuffix - Lex the ud-suffix production for user-defined literal suffixes\n/// in C++11, or warn on a ud-suffix in C++98.\nconst char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr, bool IsStringLiteral) {\n // ...\n // C++11 [lex.ext]p10, [usrlit.suffix]p1: A program containing a ud-suffix\n // that does not start with an underscore is ill-formed. As a conforming\n // extension, we treat all such suffixes as if they had whitespace before\n // them. We assume a suffix beginning with a UCN or UTF-8 character is more\n // likely to be a ud-suffix than a macro, however, and accept that.\n if (!Consumed) {\n // ...\n if (!IsUDSuffix) {\n if (!isLexingRawMode())\n Diag(CurPtr, LangOpts.MSVCCompat ? diag::ext_ms_reserved_user_defined_literal : diag::ext_reserved_user_defined_literal) << FixItHint::CreateInsertion(getSourceLocation(CurPtr), \" \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp"]={"clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:12:21: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]","clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:13:33: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]"} | ["clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp"]={"clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:12:21: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]","clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:13:33: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]"} | ||
| Line 2,410: | Line 2,411: | ||
}, | }, | ||
["ext_retained_language_linkage"]={ | ["ext_retained_language_linkage"]={ | ||
[ | [l]={t,"retained-language-linkage"}, | ||
[ | [k]="retained-language-linkage", | ||
[ | [i]="ext_retained_language_linkage", | ||
[b]="friend function %0 retaining previous language linkage is an extension", | [b]="friend function %0 retaining previous language linkage is an extension", | ||
[ | [g]="friend function A retaining previous language linkage is an extension", | ||
[ | [f]=n, | ||
[ | [e]="friend function (.*?) retaining previous language linkage is an extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wretained\\-language\\-linkage[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"dd551fc3ae9d",1382482381,"Retain previous language linkage of friend function declarations","Retain previous language linkage of friend function declarations\n\nWith this extension, friend function declarations will retain the language\nlinkage specified for previous declarations instead of emitting an error\ndiagnostic.\n\nThe feature is known to be compatible with GCC and MSVC and permits a\nlanguage to be specified indirectly where it cannot otherwise be written\ndirectly in class scope.\n\nWork is ongoing to improve linkage spec diagnostics.\n\nFixes PR17337.\n\nReviewed by Richard Smith.\n\nllvm-svn: 193206"}, | ||
[ | [d]={{w,4085,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n if (haveIncompatibleLanguageLinkages(Old, New)) {\n // As a special case, retain the language linkage from previous\n // declarations of a friend function as an extension.\n //\n // This liberal interpretation of C++ [class.friend]p3 matches GCC/MSVC\n // and is useful because there\'s otherwise no way to specify language\n // linkage within class scope.\n //\n // Check cautiously as the friend object kind isn\'t yet complete.\n if (New->getFriendObjectKind() != Decl::FOK_None) {\n Diag(New->getLocation(), diag::ext_retained_language_linkage) << New;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/linkage-spec.cpp"]={"clang/test/SemaCXX/linkage-spec.cpp:165:18: warning: friend function \'bar3\' retaining previous language linkage is an extension [-Wretained-language-linkage]"} | ["clang/test/SemaCXX/linkage-spec.cpp"]={"clang/test/SemaCXX/linkage-spec.cpp:165:18: warning: friend function \'bar3\' retaining previous language linkage is an extension [-Wretained-language-linkage]"} | ||
| Line 2,426: | Line 2,427: | ||
}, | }, | ||
["ext_return_has_expr"]={ | ["ext_return_has_expr"]={ | ||
[ | [l]={jb,qb,pb,"return-type"}, | ||
[ | [k]="return-type", | ||
[ | [i]="ext_return_has_expr", | ||
[b]="%select{void function|void method|constructor|destructor}1 %0 should not return a value", | [b]="%select{void function|void method|constructor|destructor}1 %0 should not return a value", | ||
[ | [g]={{nil,nil,{{"void function","void method","constructor","destructor"}," A should not return a value"}}}, | ||
[ | [f]=Q, | ||
[ | [e]="(?:void function|void method|constructor|destructor) (.*?) should not return a value", | ||
[ | [c]=" \\[[^\\]]*\\-Wreturn\\-type[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{wb,4074,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n // ...\n } else if (!RetValExp->isTypeDependent()) {\n // ...\n unsigned D = diag::ext_return_has_expr;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/null_in_arithmetic_ops.cpp"]={"clang/test/SemaCXX/null_in_arithmetic_ops.cpp:94:3: error: void function \'f\' should not return a value [-Wreturn-type]"} | ["clang/test/SemaCXX/null_in_arithmetic_ops.cpp"]={"clang/test/SemaCXX/null_in_arithmetic_ops.cpp:94:3: error: void function \'f\' should not return a value [-Wreturn-type]"} | ||
| Line 2,442: | Line 2,443: | ||
}, | }, | ||
["ext_return_has_void_expr"]={ | ["ext_return_has_void_expr"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_return_has_void_expr", | ||
[b]="void %select{function|method|block}1 %0 should not return void expression", | [b]="void %select{function|method|block}1 %0 should not return void expression", | ||
[ | [g]={{nil,nil,{"void ",{bc,"method","block"}," A should not return void expression"}}}, | ||
[ | [f]=n, | ||
[ | [e]="void (?:function|method|block) (.*?) should not return void expression", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{wb,3686,"/// ActOnCapScopeReturnStmt - Utility routine to type-check return statements\n/// for capturing scopes.\n///\nStmtResult Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, NamedReturnInfo &NRInfo, bool SupressSimplerImplicitMoves) {\n // ...\n // Otherwise, verify that this result type matches the previous one. We are\n // pickier with blocks than for normal functions because we don\'t have GCC\n // compatibility to worry about here.\n if (FnRetType->isDependentType()) {\n // ...\n } else if (FnRetType->isVoidType()) {\n if (RetValExp && !isa<InitListExpr>(RetValExp) && !(getLangOpts().CPlusPlus && (RetValExp->isTypeDependent() || RetValExp->getType()->isVoidType()))) {\n if (!getLangOpts().CPlusPlus && RetValExp->getType()->isVoidType())\n Diag(ReturnLoc, diag::ext_return_has_void_expr) << \"literal\" << 2;"},{wb,4081,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n // ...\n } else if (!RetValExp->isTypeDependent()) {\n // ...\n if (RetValExp->getType()->isVoidType()) {\n // ...\n if (isa<CXXConstructorDecl>(CurDecl) || isa<CXXDestructorDecl>(CurDecl))\n // ...\n else\n D = diag::ext_return_has_void_expr;"},{wb,4099,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n // ...\n } else if (!RetValExp->isTypeDependent()) {\n // ...\n else if (D != diag::ext_return_has_void_expr || !getLangOpts().CPlusPlus) {"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/block-return.c"]={"clang/test/Sema/block-return.c:137:5: warning: void block literal should not return void expression [-Wpedantic]"} | ["clang/test/Sema/block-return.c"]={"clang/test/Sema/block-return.c:137:5: warning: void block literal should not return void expression [-Wpedantic]"} | ||
| Line 2,458: | Line 2,459: | ||
}, | }, | ||
["ext_return_missing_expr"]={ | ["ext_return_missing_expr"]={ | ||
[ | [l]={jb,qb,pb,"return-type"}, | ||
[ | [k]="return-type", | ||
[ | [i]="ext_return_missing_expr", | ||
[b]="non-void %select{function|method}1 %0 should return a value", | [b]="non-void %select{function|method}1 %0 should return a value", | ||
[ | [g]={{nil,nil,{"non-void ",{bc,"method"}," A should return a value"}}}, | ||
[ | [f]=Q, | ||
[ | [e]="non\\-void (?:function|method) (.*?) should return a value", | ||
[ | [c]=" \\[[^\\]]*\\-Wreturn\\-type[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{wb,4140,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n // ...\n } else if (!RetValExp && !HasDependentReturnType) {\n // ...\n if ((FD && FD->isInvalidDecl()) || FnRetType->containsErrors()) {\n // ...\n } else if (getLangOpts().CPlusPlus11 && FD && FD->isConstexpr()) {\n // ...\n } else {\n // ...\n unsigned DiagID = getLangOpts().C99 ? diag::ext_return_missing_expr : diag::warn_return_missing_expr;"}} | ||
}, | }, | ||
["ext_rvalue_reference"]={ | ["ext_rvalue_reference"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_rvalue_reference", | ||
[b]="rvalue references are a C++11 extension", | [b]="rvalue references are a C++11 extension", | ||
[ | [g]="rvalue references are a C++11 extension", | ||
[ | [f]=n, | ||
[ | [e]="rvalue references are a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=G, | ||
[ | [h]={"0098499f7d8d",1295921852,"Downgrade the error about rvalue references to an extension warning","Downgrade the error about rvalue references to an extension warning\nand turn on __has_feature(cxx_rvalue_references). The core rvalue\nreferences proposal seems to be fully implemented now, pending lots\nmore testing.\n\nllvm-svn: 124169"}, | ||
[ | [d]={{xb,6274,"/// ParseDeclaratorInternal - Parse a C or C++ declarator. The direct-declarator\n/// is parsed by the function passed to it. Pass null, and the direct-declarator\n/// isn\'t parsed at all, making this function effectively parse the C++\n/// ptr-operator production.\n///\n/// If the grammar of this construct is extended, matching changes must also be\n/// made to TryParseDeclarator and MightBeDeclarator, and possibly to\n/// isConstructorDeclarator.\n///\n/// declarator: [C99 6.7.5] [C++ 8p4, dcl.decl]\n/// [C] pointer[opt] direct-declarator\n/// [C++] direct-declarator\n/// [C++] ptr-operator declarator\n///\n/// pointer: [C99 6.7.5]\n/// \'*\' type-qualifier-list[opt]\n/// \'*\' type-qualifier-list[opt] pointer\n///\n/// ptr-operator:\n/// \'*\' cv-qualifier-seq[opt]\n/// \'&\'\n/// [C++0x] \'&&\'\n/// [GNU] \'&\' restrict[opt] attributes[opt]\n/// [GNU?] \'&&\' restrict[opt] attributes[opt]\n/// \'::\'[opt] nested-name-specifier \'*\' cv-qualifier-seq[opt]\nvoid Parser::ParseDeclaratorInternal(Declarator &D, DirectDeclParseFunction DirectDeclParser) {\n // ...\n if (Kind == tok::star || Kind == tok::caret) {\n // ...\n } else {\n // ...\n // Complain about rvalue references in C++03, but then go on and build\n // the declarator.\n if (Kind == tok::ampamp)\n Diag(Loc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_rvalue_reference : diag::ext_rvalue_reference);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:6:15: warning: rvalue references are a C++11 extension [-Wc++11-extensions]"} | ["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:6:15: warning: rvalue references are a C++11 extension [-Wc++11-extensions]"} | ||
| Line 2,487: | Line 2,488: | ||
}, | }, | ||
["ext_rvalue_to_reference_access_ctor"]={ | ["ext_rvalue_to_reference_access_ctor"]={ | ||
[ | [l]={"bind-to-temporary-copy",t}, | ||
[ | [k]="bind-to-temporary-copy", | ||
[ | [i]="ext_rvalue_to_reference_access_ctor", | ||
[b]="C++98 requires an accessible copy constructor for class %2 when binding a reference to a temporary; was %select{private|protected}0", | [b]="C++98 requires an accessible copy constructor for class %2 when binding a reference to a temporary; was %select{private|protected}0", | ||
[ | [g]={{nil,nil,{"C++98 requires an accessible copy constructor for class C when binding a reference to a temporary; was ",{"private","protected"}}}}, | ||
[ | [f]=n, | ||
[ | [e]="C\\+\\+98 requires an accessible copy constructor for class (.*?) when binding a reference to a temporary; was (?:private|protected)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbind\\-to\\-temporary\\-copy[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy","PR7245: Make binding a reference to a temporary without a usable copy\nconstructor into an extension warning into the error that C++98 requires.\n\nllvm-svn: 105529"}, | ||
[ | [d]={{Wb,1654,"/// Checks access to a constructor.\nSema::AccessResult Sema::CheckConstructorAccess(SourceLocation UseLoc, CXXConstructorDecl *Constructor, DeclAccessPair Found, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp) {\n // ...\n default:\n PD = PDiag(IsCopyBindingRefToTemp ? diag::ext_rvalue_to_reference_access_ctor : diag::err_access_ctor);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp:57:6: warning: C++98 requires an accessible copy constructor for class \'X2\' when binding a reference to a temporary; was private [-Wbind-to-temporary-copy]"} | ["clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp:57:6: warning: C++98 requires an accessible copy constructor for class \'X2\' when binding a reference to a temporary; was private [-Wbind-to-temporary-copy]"} | ||
| Line 2,503: | Line 2,504: | ||
}, | }, | ||
["ext_rvalue_to_reference_temp_copy_no_viable"]={ | ["ext_rvalue_to_reference_temp_copy_no_viable"]={ | ||
[ | [l]={"bind-to-temporary-copy",t}, | ||
[ | [k]="bind-to-temporary-copy", | ||
[ | [i]="ext_rvalue_to_reference_temp_copy_no_viable", | ||
[b]={{nil, | [b]={{nil,z,"no viable constructor %select{copying variable|copying parameter|initializing template parameter|returning object|initializing statement expression result|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1; C++98 requires a copy constructor when binding a reference to a temporary"},{Lc,nb,"no viable constructor %select{copying variable|copying parameter|returning object|initializing statement expression result|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1; C++98 requires a copy constructor when binding a reference to a temporary"},{E,nil,"no viable constructor %select{copying variable|copying parameter|returning object|throwing object|copying member subobject|copying array element|allocating object|copying temporary|initializing base subobject|initializing vector element|capturing value}0 of type %1; C++98 requires a copy constructor when binding a reference to a temporary"}}, | ||
[ | [g]={{nil,z,{"no viable constructor ",{"copying variable","copying parameter","initializing template parameter","returning object","initializing statement expression result","throwing object","copying member subobject","copying array element","allocating object","copying temporary","initializing base subobject","initializing vector element","capturing value"}," of type B; C++98 requires a copy constructor when binding a reference to a temporary"}},{Lc,nb,{"no viable constructor ",{"copying variable","copying parameter","returning object","initializing statement expression result","throwing object","copying member subobject","copying array element","allocating object","copying temporary","initializing base subobject","initializing vector element","capturing value"}," of type B; C++98 requires a copy constructor when binding a reference to a temporary"}},{E,nil,{"no viable constructor ",{"copying variable","copying parameter","returning object","throwing object","copying member subobject","copying array element","allocating object","copying temporary","initializing base subobject","initializing vector element","capturing value"}," of type B; C++98 requires a copy constructor when binding a reference to a temporary"}}}, | ||
[ | [f]=n, | ||
[ | [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 (.*?); C\\+\\+98 requires a copy constructor when binding a reference to a temporary", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbind\\-to\\-temporary\\-copy[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"caa710dfd236",1275926285,"PR7245: Make binding a reference to a temporary without a usable copy","PR7245: Make binding a reference to a temporary without a usable copy\nconstructor into an extension warning into the error that C++98 requires.\n\nllvm-svn: 105529"}, | ||
[ | [d]={{sb,6788,"/// Make a (potentially elidable) temporary copy of the object\n/// provided by the given initializer by calling the appropriate copy\n/// constructor.\n///\n/// \\param S The Sema object used for type-checking.\n///\n/// \\param T The type of the temporary object, which must either be\n/// the type of the initializer expression or a superclass thereof.\n///\n/// \\param Entity The entity being initialized.\n///\n/// \\param CurInit The initializer expression.\n///\n/// \\param IsExtraneousCopy Whether this is an \"extraneous\" copy that\n/// is permitted in C++03 (but not C++0x) when binding a reference to\n/// an rvalue.\n///\n/// \\returns An expression that copies the initializer expression into\n/// a temporary object, or an error expression if a copy could not be\n/// created.\nstatic ExprResult CopyObject(Sema &S, QualType T, const InitializedEntity &Entity, ExprResult CurInit, bool IsExtraneousCopy) {\n // ...\n case OR_No_Viable_Function:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Loc, S.PDiag(IsExtraneousCopy && !S.isSFINAEContext() ? diag::ext_rvalue_to_reference_temp_copy_no_viable : diag::err_temp_copy_no_viable) << (int)Entity.getKind() << CurInitExpr->getType() << CurInitExpr->getSourceRange()), S, OCD_AllCandidates, CurInitExpr);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp:58:6: warning: no viable constructor copying parameter of type \'X3\'; C++98 requires a copy constructor when binding a reference to a temporary [-Wbind-to-temporary-copy]"} | ["clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp:58:6: warning: no viable constructor copying parameter of type \'X3\'; C++98 requires a copy constructor when binding a reference to a temporary [-Wbind-to-temporary-copy]"} | ||
| Line 2,519: | Line 2,520: | ||
}, | }, | ||
["ext_scoped_enum"]={ | ["ext_scoped_enum"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_scoped_enum", | ||
[b]="scoped enumerations are a C++11 extension", | [b]="scoped enumerations are a C++11 extension", | ||
[ | [g]="scoped enumerations are a C++11 extension", | ||
[ | [f]=n, | ||
[ | [e]="scoped enumerations are a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=G, | ||
[ | [h]={"d0d87b597259",1366685256,"Warn that scoped enumerations are a C++11 extenstion when compiling in","Warn that scoped enumerations are a C++11 extenstion when compiling in\nC++98 mode. This improves on the previous diagnostic message of:\n\nerror: expected identifier or \'{\'\nllvm-svn: 180076"}, | ||
[ | [d]={{xb,4793,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n // In C++11, recognize \'enum class\' and \'enum struct\'.\n if (Tok.isOneOf(tok::kw_class, tok::kw_struct) && getLangOpts().CPlusPlus) {\n Diag(Tok, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_scoped_enum : diag::ext_scoped_enum);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-c++11-extensions.cpp"]={"clang/test/SemaCXX/warn-c++11-extensions.cpp:8:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/warn-c++11-extensions.cpp:9:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]"} | ["clang/test/SemaCXX/warn-c++11-extensions.cpp"]={"clang/test/SemaCXX/warn-c++11-extensions.cpp:8:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]","clang/test/SemaCXX/warn-c++11-extensions.cpp:9:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]"} | ||
| Line 2,535: | Line 2,536: | ||
}, | }, | ||
["ext_sizeof_alignof_function_type"]={ | ["ext_sizeof_alignof_function_type"]={ | ||
[ | [l]={t,Nc}, | ||
[ | [k]=Nc, | ||
[ | [i]="ext_sizeof_alignof_function_type", | ||
[b]={{nil, | [b]={{nil,A,"invalid application of \'%0\' to a function type"},{p,D,"invalid application of \'%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align|__alignof}0\' to a function type"},{jc,nil,"invalid application of \'%select{sizeof|alignof|vec_step}0\' to a function type"}}, | ||
[ | [g]={{nil,A,"invalid application of \'A\' to a function type"},{p,D,{"invalid application of \'",{"sizeof","alignof","vec_step","__builtin_omp_required_simd_align","__alignof"},"\' to a function type"}},{jc,nil,{"invalid application of \'",{"sizeof","alignof","vec_step"},"\' to a function type"}}}, | ||
[ | [f]=n, | ||
[ | [e]="invalid application of \'(.*?)\' to a function type", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpointer\\-arith[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode.","Diagnose uses of \'alignof\' on functions in -pedantic mode.\n\nllvm-svn: 177354"}, | ||
[ | [d]={{v,4310,"static bool CheckExtensionTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) {\n // ...\n // C99 6.5.3.4p1:\n if (T->isFunctionType() && (TraitKind == UETT_SizeOf || TraitKind == UETT_AlignOf || TraitKind == UETT_PreferredAlignOf)) {\n // ...\n S.Diag(Loc, diag::ext_sizeof_alignof_function_type) << getTraitSpelling(TraitKind) << ArgRange;"}} | ||
}, | }, | ||
["ext_sizeof_alignof_void_type"]={ | ["ext_sizeof_alignof_void_type"]={ | ||
[ | [l]={t,Nc}, | ||
[ | [k]=Nc, | ||
[ | [i]="ext_sizeof_alignof_void_type", | ||
[b]={{nil, | [b]={{nil,A,"invalid application of \'%0\' to a void type"},{p,D,"invalid application of \'%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align|__alignof}0\' to a void type"},{jc,nil,"invalid application of \'%select{sizeof|alignof|vec_step}0\' to a void type"}}, | ||
[ | [g]={{nil,A,"invalid application of \'A\' to a void type"},{p,D,{"invalid application of \'",{"sizeof","alignof","vec_step","__builtin_omp_required_simd_align","__alignof"},"\' to a void type"}},{jc,nil,{"invalid application of \'",{"sizeof","alignof","vec_step"},"\' to a void type"}}}, | ||
[ | [f]=n, | ||
[ | [e]="invalid application of \'(.*?)\' to a void type", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpointer\\-arith[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"9cf21ae068bd",1363649845,"Diagnose uses of \'alignof\' on functions in -pedantic mode.","Diagnose uses of \'alignof\' on functions in -pedantic mode.\n\nllvm-svn: 177354"}, | ||
[ | [d]={{v,4326,"static bool CheckExtensionTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) {\n // ...\n // Allow sizeof(void)/alignof(void) as an extension, unless in OpenCL where\n // this is an error (OpenCL v1.1 s6.3.k)\n if (T->isVoidType()) {\n unsigned DiagID = S.LangOpts.OpenCL ? diag::err_opencl_sizeof_alignof_type : diag::ext_sizeof_alignof_void_type;"}} | ||
}, | }, | ||
["ext_standalone_specifier"]={ | ["ext_standalone_specifier"]={ | ||
[ | [l]={wc}, | ||
[ | [k]=wc, | ||
[ | [i]="ext_standalone_specifier", | ||
[b]="\'%0\' is not permitted on a declaration of a type", | [b]="\'%0\' is not permitted on a declaration of a type", | ||
[ | [g]="\'A\' is not permitted on a declaration of a type", | ||
[ | [f]=n, | ||
[ | [e]="\'(.*?)\' is not permitted on a declaration of a type", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"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"}, | ||
[ | [d]={{w,5281,"/// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with\n/// no declarator (e.g. \"struct foo;\") is parsed. It also accepts template\n/// parameters to cope with template friend declarations.\nDecl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord) {\n // ...\n if (getLangOpts().CPlusPlus)\n DiagID = diag::ext_standalone_specifier;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/storage-class.cpp"]={"clang/test/SemaCXX/storage-class.cpp:6:1: warning: \'extern\' is not permitted on a declaration of a type [-Wmissing-declarations]"} | ["clang/test/SemaCXX/storage-class.cpp"]={"clang/test/SemaCXX/storage-class.cpp:6:1: warning: \'extern\' is not permitted on a declaration of a type [-Wmissing-declarations]"} | ||
| Line 2,577: | Line 2,578: | ||
}, | }, | ||
["ext_star_this_lambda_capture_cxx17"]={ | ["ext_star_this_lambda_capture_cxx17"]={ | ||
[ | [l]={Y,Cb}, | ||
[ | [k]=Y, | ||
[ | [i]={{nil,E,"ext_star_this_lambda_capture_cxx17"}}, | ||
[b]={{nil, | [b]={{nil,E,"capture of \'*this\' by copy is a C++17 extension"}}, | ||
[ | [g]={{nil,E,"capture of \'*this\' by copy is a C++17 extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="capture of \'\\*this\' by copy is a C\\+\\+17 extension", | ||
[ | [c]=zb, | ||
[ | [a]={{nil,E,"Lambda Issue"}}, | ||
[ | [h]={"dc6b596ebbd3",1458552337,"[Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)","[Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)\n\nImplement lambda capture of *this by copy.\nFor e.g.:\nstruct A {\n\n int d = 10;\n auto foo() { return [*this] (auto a) mutable { d+=a; return d; }; }\n\n};\n\nauto L = A{}.foo(); // A{}\'s lifetime is gone.\n\n// Below is still ok, because *this was captured by value.\nassert(L(10) == 20);\nassert(L(100) == 120);\n\nIf the capture was implicit, or [this] (i.e. *this was captured by reference), this code would be otherwise undefined.\n\nImplementation Strategy:\n - amend the parser to accept *this in the lambda introducer\n - add a new king of capture LCK_StarThis\n - teach Sema::CheckCXXThisCapture to handle by copy captures of the\n enclosing object (i.e. *this)\n - when CheckCXXThisCapture does capture by copy, the corresponding \n initializer expression for the closure\'s data member \n direct-initializes it thus making a copy of \'*this\'.\n - in codegen, when assigning to CXXThisValue, if *this was captured by \n copy, make sure it points to the corresponding field member, and\n not, unlike when captured by reference, what the field member points\n to.\n - mark feature as implemented in svn\n\nMuch gratitude to Richard Smith for his carefully illuminating reviews! \n\nllvm-svn: 263921"}, | ||
[ | [d]={{"clang/lib/Sema/SemaLambda.cpp",1022,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n // ...\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n if (C->Kind == LCK_This || C->Kind == LCK_StarThis) {\n if (C->Kind == LCK_StarThis)\n Diag(C->Loc, !getLangOpts().CPlusPlus17 ? diag::ext_star_this_lambda_capture_cxx17 : diag::warn_cxx14_compat_star_this_lambda_capture);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp"]={"clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp:6:24: warning: capture of \'*this\' by copy is a C++17 extension [-Wc++17-extensions]"} | ["clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp"]={"clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp:6:24: warning: capture of \'*this\' by copy is a C++17 extension [-Wc++17-extensions]"} | ||
| Line 2,593: | Line 2,594: | ||
}, | }, | ||
["ext_static_data_member_in_union"]={ | ["ext_static_data_member_in_union"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_static_data_member_in_union", | ||
[b]="static data member %0 in union is a C++11 extension", | [b]="static data member %0 in union is a C++11 extension", | ||
[ | [g]="static data member A in union is a C++11 extension", | ||
[ | [f]=n, | ||
[ | [e]="static data member (.*?) in union is a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=m, | ||
[ | [h]={"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"}, | ||
[ | [d]={{w,7607,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else {\n // ...\n if (SC == SC_Static && CurContext->isRecord()) {\n if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(DC)) {\n // ...\n if (FunctionOrMethod) {\n // ...\n } else if (AnonStruct) {\n // ...\n } else if (RD->isUnion()) {\n // ...\n Diag(D.getIdentifierLoc(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_static_data_member_in_union : diag::ext_static_data_member_in_union) << Name;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class/class.union/p1.cpp"]={"clang/test/CXX/class/class.union/p1.cpp:100:14: warning: static data member \'i1\' in union is a C++11 extension [-Wc++11-extensions]"} | ["clang/test/CXX/class/class.union/p1.cpp"]={"clang/test/CXX/class/class.union/p1.cpp:100:14: warning: static data member \'i1\' in union is a C++11 extension [-Wc++11-extensions]"} | ||
| Line 2,609: | Line 2,610: | ||
}, | }, | ||
["ext_static_non_static"]={ | ["ext_static_non_static"]={ | ||
[ | [l]={F,"microsoft-redeclare-static",t}, | ||
[ | [k]="microsoft-redeclare-static", | ||
[ | [i]="ext_static_non_static", | ||
[b]="redeclaring non-static %0 as static is a Microsoft extension", | [b]="redeclaring non-static %0 as static is a Microsoft extension", | ||
[ | [g]="redeclaring non-static A as static is a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="redeclaring non\\-static (.*?) as static is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-redeclare\\-static[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"5b63fa02b2fa",1403133985,"Sema: Static redeclaration after extern declarations is a Microsoft Extension","Sema: Static redeclaration after extern declarations is a Microsoft Extension\n\nCL permits static redeclarations to follow extern declarations. The\nstorage specifier on the latter declaration has no effect.\n\nThis fixes PR20034.\n\nDifferential Revision: http://reviews.llvm.org/D4149\n\nllvm-svn: 211238"}, | ||
[ | [d]={{w,3699,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n // Don\'t complain about this if we\'re in GNU89 mode and the old function\n // is an extern inline function.\n // Don\'t complain about specializations. They are not supposed to have\n // storage classes.\n if (!isa<CXXMethodDecl>(New) && !isa<CXXMethodDecl>(Old) && New->getStorageClass() == SC_Static && Old->hasExternalFormalLinkage() && !New->getTemplateSpecializationInfo() && !canRedefineFunction(Old, getLangOpts())) {\n if (getLangOpts().MicrosoftExt) {\n Diag(New->getLocation(), diag::ext_static_non_static) << New;"},{w,4629,"/// MergeVarDecl - We just parsed a variable \'New\' which has the same name\n/// and scope as a previous declaration \'Old\'. Figure out how to resolve this\n/// situation, merging decls or emitting diagnostics as appropriate.\n///\n/// Tentative definition rules (C99 6.9.2p2) are checked by\n/// FinalizeDeclaratorGroup. Unfortunately, we can\'t analyze tentative\n/// definitions here, since the initializer hasn\'t been attached.\n///\nvoid Sema::MergeVarDecl(VarDecl *New, LookupResult &Previous) {\n // ...\n // [dcl.stc]p8: Check if we have a non-static decl followed by a static.\n if (New->getStorageClass() == SC_Static && !New->isStaticDataMember() && Old->hasExternalFormalLinkage()) {\n if (getLangOpts().MicrosoftExt) {\n Diag(New->getLocation(), diag::ext_static_non_static) << New->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:210:13: warning: redeclaring non-static \'static_func\' as static is a Microsoft extension [-Wmicrosoft-redeclare-static]","clang/test/SemaCXX/MicrosoftExtensions.cpp:216:18: warning: redeclaring non-static \'static_var\' as static is a Microsoft extension [-Wmicrosoft-redeclare-static]"} | ["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:210:13: warning: redeclaring non-static \'static_func\' as static is a Microsoft extension [-Wmicrosoft-redeclare-static]","clang/test/SemaCXX/MicrosoftExtensions.cpp:216:18: warning: redeclaring non-static \'static_var\' as static is a Microsoft extension [-Wmicrosoft-redeclare-static]"} | ||
| Line 2,625: | Line 2,626: | ||
}, | }, | ||
["ext_static_out_of_line"]={ | ["ext_static_out_of_line"]={ | ||
[ | [l]={F,hb}, | ||
[ | [k]=hb, | ||
[ | [i]={{nil,r,"ext_static_out_of_line"}}, | ||
[b]={{nil,r,"\'static\' can only be specified inside the class definition"}}, | [b]={{nil,r,"\'static\' can only be specified inside the class definition"}}, | ||
[ | [g]={{nil,r,"\'static\' can only be specified inside the class definition"}}, | ||
[ | [f]=n, | ||
[ | [e]="\'static\' can only be specified inside the class definition", | ||
[ | [c]=rc, | ||
[ | [a]={{nil,r,m}}, | ||
[ | [h]={"3e7fda229d3f",1548435702,"Allow \'static\' storage specifier on an out-of-line member function template","Allow \'static\' storage specifier on an out-of-line member function template\ndeclaration in MSVCCompat mode\n\nMicrosoft compiler permits the use of \'static\' storage specifier outside\nof a class definition if it\'s on an out-of-line member function template\ndeclaration.\n\nThis patch allows \'static\' storage specifier on an out-of-line member\nfunction template declaration with a warning in Clang (To be compatible\nwith Microsoft).\n\nIntel C/C++ compiler allows the \'static\' keyword with a warning in\nMicrosoft mode. GCC allows this with -fpermissive.\n\nPatch By: Manna\n\nDifferential Revision: https://reviews.llvm.org/D56473\n\nChange-Id: I97b2d9e9d57cecbcd545d17e2523142a85ca2702\nllvm-svn: 352219"}, | ||
[ | [d]={{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]={ | [j]={ | ||
["clang/test/SemaCXX/warn-static-outside-class-definition.cpp"]={"clang/test/SemaCXX/warn-static-outside-class-definition.cpp:8:23: warning: \'static\' can only be specified inside the class definition [-Wmicrosoft-template]","clang/test/SemaCXX/warn-static-outside-class-definition.cpp:17:20: warning: \'static\' can only be specified inside the class definition [-Wmicrosoft-template]"} | ["clang/test/SemaCXX/warn-static-outside-class-definition.cpp"]={"clang/test/SemaCXX/warn-static-outside-class-definition.cpp:8:23: warning: \'static\' can only be specified inside the class definition [-Wmicrosoft-template]","clang/test/SemaCXX/warn-static-outside-class-definition.cpp:17:20: warning: \'static\' can only be specified inside the class definition [-Wmicrosoft-template]"} | ||
| Line 2,641: | Line 2,642: | ||
}, | }, | ||
["ext_stdc_pragma_ignored"]={ | ["ext_stdc_pragma_ignored"]={ | ||
[ | [l]={jb,qb,pb,"pragmas",xc}, | ||
[ | [k]=xc, | ||
[ | [i]="ext_stdc_pragma_ignored", | ||
[b]="unknown pragma in STDC namespace", | [b]="unknown pragma in STDC namespace", | ||
[g]="unknown pragma in STDC namespace", | [g]="unknown pragma in STDC namespace", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", | [f]=n, | ||
[ | [e]="unknown pragma in STDC namespace", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]", | ||
[ | [a]={{nil,nb,G},{E,nil,B}}, | ||
[h]={"a0b1f76d1022",1240176337,"reject invalid stuff in the STDC namespace.","reject invalid stuff in the STDC namespace.\n\nllvm-svn: 69551"}, | |||
[d]={{"clang/lib/Parse/ParsePragma.cpp",160,"/// PragmaSTDC_UnknownHandler - \"\\#pragma STDC ...\".\nstruct PragmaSTDC_UnknownHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnknownTok) override {\n // ...\n PP.Diag(UnknownTok, diag::ext_stdc_pragma_ignored);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/pragma_unknown.c"]={"clang/test/Preprocessor/pragma_unknown.c:33:14: warning: unknown pragma in STDC namespace [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_unknown.c:34:72: warning: unknown pragma in STDC namespace [-Wunknown-pragmas]"} | ["clang/test/Preprocessor/pragma_unknown.c"]={"clang/test/Preprocessor/pragma_unknown.c:33:14: warning: unknown pragma in STDC namespace [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_unknown.c:34:72: warning: unknown pragma in STDC namespace [-Wunknown-pragmas]"} | ||
| Line 2,657: | Line 2,658: | ||
}, | }, | ||
["ext_string_literal_operator_template"]={ | ["ext_string_literal_operator_template"]={ | ||
[ | [l]={W,"gnu-string-literal-operator-template"}, | ||
[ | [k]="gnu-string-literal-operator-template", | ||
[ | [i]="ext_string_literal_operator_template", | ||
[b]="string literal operator templates are a GNU extension", | [b]="string literal operator templates are a GNU extension", | ||
[g]="string literal operator templates are a GNU extension", | [g]="string literal operator templates are a GNU extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-string\\-literal\\-operator\\-template[^\\]]*\\]", | [f]=n, | ||
[ | [e]="string literal operator templates are a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-string\\-literal\\-operator\\-template[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"b8b41d3ea444",1381175878,"Add support for WG21 N3599 (literal operator template for strings) as a GNU","Add support for WG21 N3599 (literal operator template for strings) as a GNU\nextension. The GCC folks have decided to support this even though the standard\ncommittee have not yet approved this feature.\n\nPatch by Hristo Venev!\n\nllvm-svn: 192128"}, | |||
[d]={{Z,16330,"static bool checkLiteralOperatorTemplateParameterList(Sema &SemaRef, FunctionTemplateDecl *TpDecl) {\n // ...\n // Must have one or two template parameters.\n if (TemplateParams->size() == 1) {\n // ...\n } else if (TemplateParams->size() == 2) {\n // ...\n // The second template parameter must be a parameter pack with the\n // first template parameter as its type.\n if (PmType && PmArgs && !PmType->isTemplateParameterPack() && PmArgs->isTemplateParameterPack()) {\n // ...\n if (TArgs && TArgs->getDepth() == PmType->getDepth() && TArgs->getIndex() == PmType->getIndex()) {\n if (!SemaRef.inTemplateInstantiation())\n SemaRef.Diag(TpDecl->getLocation(), diag::ext_string_literal_operator_template);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CXX/lex/lex.literal/lex.ext/p11.cpp"]={"clang/test/CXX/lex/lex.literal/lex.ext/p11.cpp:9:5: warning: string literal operator templates are a GNU extension [-Wgnu-string-literal-operator-template]"} | ["clang/test/CXX/lex/lex.literal/lex.ext/p11.cpp"]={"clang/test/CXX/lex/lex.literal/lex.ext/p11.cpp:9:5: warning: string literal operator templates are a GNU extension [-Wgnu-string-literal-operator-template]"} | ||
| Line 2,673: | Line 2,674: | ||
}, | }, | ||
["ext_string_too_long"]={ | ["ext_string_too_long"]={ | ||
[ | [l]={"overlength-strings",t}, | ||
[ | [k]="overlength-strings", | ||
[ | [i]="ext_string_too_long", | ||
[b]="string literal of length %0 exceeds maximum length %1 that %select{C90|ISO C99|C++}2 compilers are required to support", | [b]="string literal of length %0 exceeds maximum length %1 that %select{C90|ISO C99|C++}2 compilers are required to support", | ||
[ | [g]={{nil,nil,{"string literal of length A exceeds maximum length B that ",{"C90","ISO C99","C++"}," compilers are required to support"}}}, | ||
[ | [f]=n, | ||
[ | [e]="string literal of length (.*?) exceeds maximum length (.*?) that (?:C90|ISO C99|C\\+\\+) compilers are required to support", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Woverlength\\-strings[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"b37b46e488a3",1279636400,"Complain when string literals are too long for the active language","Complain when string literals are too long for the active language\nstandard\'s minimum requirements.\n\nllvm-svn: 108837"}, | ||
[ | [d]={{Yb,2221,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n // ...\n if (Pascal) {\n // ...\n } else if (Diags) {\n // ...\n if (GetNumStringChars() > MaxChars)\n Diags->Report(StringToks.front().getLocation(), diag::ext_string_too_long) << GetNumStringChars() << MaxChars << (Features.CPlusPlus ? 2 : Features.C99 ? 1 : 0) << SourceRange(StringToks.front().getLocation(), StringToks.back().getLocation());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:16:5: error: string literal of length 845 exceeds maximum length 509 that C90 compilers are required to support [-Werror,-Woverlength-strings]"} | ["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:16:5: error: string literal of length 845 exceeds maximum length 509 that C90 compilers are required to support [-Werror,-Woverlength-strings]"} | ||
| Line 2,689: | Line 2,690: | ||
}, | }, | ||
["ext_subscript_non_lvalue"]={ | ["ext_subscript_non_lvalue"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_subscript_non_lvalue", | ||
[b]="ISO C90 does not allow subscripting non-lvalue array", | [b]="ISO C90 does not allow subscripting non-lvalue array", | ||
[ | [g]="ISO C90 does not allow subscripting non-lvalue array", | ||
[ | [f]=n, | ||
[ | [e]="ISO C90 does not allow subscripting non\\-lvalue array", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[ | [h]={"ab2784f2c16e",1240703214,"Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.","Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.\n\nI wasn\'t originally going to use this approach, but cases like \ntest/Sema/expr-comma.c make things difficult.\n\nllvm-svn: 70096"}, | ||
[ | [d]={{v,5935,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n if (LHSTy->isDependentType() || RHSTy->isDependentType()) {\n // ...\n } else if (const PointerType *PTy = LHSTy->getAs<PointerType>()) {\n // ...\n } else if (const ObjCObjectPointerType *PTy = LHSTy->getAs<ObjCObjectPointerType>()) {\n // ...\n } else if (const PointerType *PTy = RHSTy->getAs<PointerType>()) {\n // ...\n } else if (const ObjCObjectPointerType *PTy = RHSTy->getAs<ObjCObjectPointerType>()) {\n // ...\n } else if (const VectorType *VTy = LHSTy->getAs<VectorType>()) {\n // ...\n } else if (LHSTy->isBuiltinType() && LHSTy->getAs<BuiltinType>()->isVLSTBuiltinType()) {\n // ...\n } else if (LHSTy->isArrayType()) {\n // ...\n Diag(LHSExp->getBeginLoc(), diag::ext_subscript_non_lvalue) << LHSExp->getSourceRange();"},{v,5945,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n if (LHSTy->isDependentType() || RHSTy->isDependentType()) {\n // ...\n } else if (const PointerType *PTy = LHSTy->getAs<PointerType>()) {\n // ...\n } else if (const ObjCObjectPointerType *PTy = LHSTy->getAs<ObjCObjectPointerType>()) {\n // ...\n } else if (const PointerType *PTy = RHSTy->getAs<PointerType>()) {\n // ...\n } else if (const ObjCObjectPointerType *PTy = RHSTy->getAs<ObjCObjectPointerType>()) {\n // ...\n } else if (const VectorType *VTy = LHSTy->getAs<VectorType>()) {\n // ...\n } else if (LHSTy->isBuiltinType() && LHSTy->getAs<BuiltinType>()->isVLSTBuiltinType()) {\n // ...\n } else if (LHSTy->isArrayType()) {\n // ...\n } else if (RHSTy->isArrayType()) {\n // ...\n Diag(RHSExp->getBeginLoc(), diag::ext_subscript_non_lvalue) << RHSExp->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/c89.c"]={"clang/test/Sema/c89.c:73:11: warning: ISO C90 does not allow subscripting non-lvalue array [-Wpedantic]","clang/test/Sema/c89.c:74:13: warning: ISO C90 does not allow subscripting non-lvalue array [-Wpedantic]"} | ["clang/test/Sema/c89.c"]={"clang/test/Sema/c89.c:73:11: warning: ISO C90 does not allow subscripting non-lvalue array [-Wpedantic]","clang/test/Sema/c89.c:74:13: warning: ISO C90 does not allow subscripting non-lvalue array [-Wpedantic]"} | ||
| Line 2,705: | Line 2,706: | ||
}, | }, | ||
["ext_subscript_overload"]={ | ["ext_subscript_overload"]={ | ||
[ | [l]={Sc,Ac,Jc,Jc,"c++14-compat","c++14-compat-pedantic","c++14-compat-pedantic","c++17-compat","c++17-compat-pedantic","c++17-compat-pedantic","c++1z-compat","c++20-compat","c++20-compat-pedantic","c++20-compat-pedantic","c++2a-compat","c++2a-compat-pedantic","c++2a-compat-pedantic","c++98-compat","c++98-compat-pedantic","c++98-compat-pedantic","pre-c++23-compat","pre-c++23-compat-pedantic"}, | ||
[ | [k]="pre-c++23-compat", | ||
[ | [i]={{nil,y,"ext_subscript_overload"}}, | ||
[b]="overloaded %0 with %select{no|a defaulted|more than one}1 parameter is a C++23 extension", | [b]="overloaded %0 with %select{no|a defaulted|more than one}1 parameter is a C++23 extension", | ||
[ | [g]={{nil,nil,{"overloaded A with ",{"no","a defaulted","more than one"}," parameter is a C++23 extension"}},{P,y,{"overloaded A with ",{"no","a defaulted","more than one"}," parameter is a C++2b extension"}}}, | ||
[ | [f]=n, | ||
[ | [e]="overloaded (.*?) with (?:no|a defaulted|more than one) parameter is a C\\+\\+23 extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpre\\-c\\+\\+23\\-compat[^\\]]*\\]", | ||
[ | [a]={{nil,y,m}}, | ||
[ | [h]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, | ||
[ | [d]={{Z,16192,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n // C++ [over.oper]p8:\n // An operator function cannot have default arguments (8.3.6),\n // except where explicitly stated below.\n //\n // Only the function-call operator (C++ [over.call]p1) and the subscript\n // operator (CWG2507) allow default arguments.\n if (Op != OO_Call) {\n // ...\n if (FirstDefaultedParam) {\n if (Op == OO_Subscript) {\n Diag(FnDecl->getLocation(), LangOpts.CPlusPlus23 ? diag::ext_subscript_overload : diag::error_subscript_overload) << FnDecl->getDeclName() << 1 << FirstDefaultedParam->getDefaultArgRange();"},{Z,16243,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n if (Op == OO_Subscript && NumParams != 2) {\n Diag(FnDecl->getLocation(), LangOpts.CPlusPlus23 ? diag::ext_subscript_overload : diag::error_subscript_overload) << FnDecl->getDeclName() << (NumParams == 1 ? 0 : 2);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2b-overloaded-operator-pedantic.cpp"]={"clang/test/SemaCXX/cxx2b-overloaded-operator-pedantic.cpp:9:8: warning: overloaded \'operator[]\' with more than one parameter is a C++23 extension [-Wpre-c++23-compat]"} | ["clang/test/SemaCXX/cxx2b-overloaded-operator-pedantic.cpp"]={"clang/test/SemaCXX/cxx2b-overloaded-operator-pedantic.cpp:9:8: warning: overloaded \'operator[]\' with more than one parameter is a C++23 extension [-Wpre-c++23-compat]"} | ||
| Line 2,721: | Line 2,722: | ||
}, | }, | ||
["ext_template_arg_extra_parens"]={ | ["ext_template_arg_extra_parens"]={ | ||
[ | [i]="ext_template_arg_extra_parens", | ||
[b]="address non-type template argument cannot be surrounded by parentheses", | [b]="address non-type template argument cannot be surrounded by parentheses", | ||
[ | [g]="address non-type template argument cannot be surrounded by parentheses", | ||
[ | [f]=n, | ||
[ | [e]="address non\\-type template argument cannot be surrounded by parentheses", | ||
[ | [c]=lc, | ||
[ | [a]=m, | ||
[ | [h]={"6a0c4097f142",1284358018,"Parentheses around address non-type template argument is demoted to an extension warning.","Parentheses around address non-type template argument is demoted to an extension warning.\n\nllvm-svn: 113739"}, | ||
[ | [d]={{O,6769,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // ...\n if (S.getLangOpts().MicrosoftExt) {\n // ...\n } else {\n // ...\n while (ParenExpr *Parens = dyn_cast<ParenExpr>(Arg)) {\n if (!Invalid && !ExtraParens) {\n S.Diag(Arg->getBeginLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_extra_parens : diag::ext_template_arg_extra_parens) << Arg->getSourceRange();"},{O,6992,"/// Checks whether the given template argument is a pointer to\n/// member constant according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentPointerToMember(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *&ResultArg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // ...\n while (ParenExpr *Parens = dyn_cast<ParenExpr>(Arg)) {\n if (!Invalid && !ExtraParens) {\n S.Diag(Arg->getBeginLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_extra_parens : diag::ext_template_arg_extra_parens) << Arg->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:93:5: warning: address non-type template argument cannot be surrounded by parentheses"} | ["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:93:5: warning: address non-type template argument cannot be surrounded by parentheses"} | ||
| Line 2,735: | Line 2,736: | ||
}, | }, | ||
["ext_template_arg_local_type"]={ | ["ext_template_arg_local_type"]={ | ||
[ | [l]={"local-type-template-args"}, | ||
[ | [k]="local-type-template-args", | ||
[ | [i]="ext_template_arg_local_type", | ||
[b]="template argument uses local type %0", | [b]="template argument uses local type %0", | ||
[ | [g]="template argument uses local type A", | ||
[ | [f]=n, | ||
[ | [e]="template argument uses local type (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wlocal\\-type\\-template\\-args[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,","Allow anonymous and local types. The support was already in place for these,\nbut this makes them work even as an extension in C++98. This resolves PR8077.\n\nllvm-svn: 113011"}, | ||
[ | [d]={{O,6459,"bool UnnamedLocalNoLinkageFinder::VisitTagDecl(const TagDecl *Tag) {\n if (Tag->getDeclContext()->isFunctionOrMethod()) {\n S.Diag(SR.getBegin(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_local_type : diag::ext_template_arg_local_type) << S.Context.getTypeDeclType(Tag) << SR;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/recovery-crash.cpp"]={"clang/test/SemaTemplate/recovery-crash.cpp:32:7: warning: template argument uses local type \'LocalStruct\' [-Wlocal-type-template-args]"} | ["clang/test/SemaTemplate/recovery-crash.cpp"]={"clang/test/SemaTemplate/recovery-crash.cpp:32:7: warning: template argument uses local type \'LocalStruct\' [-Wlocal-type-template-args]"} | ||
| Line 2,751: | Line 2,752: | ||
}, | }, | ||
["ext_template_arg_object_internal"]={ | ["ext_template_arg_object_internal"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_template_arg_object_internal", | ||
[b]="non-type template argument referring to %select{function|object}0 %1 with internal linkage is a C++11 extension", | [b]="non-type template argument referring to %select{function|object}0 %1 with internal linkage is a C++11 extension", | ||
[ | [g]={{nil,nil,{"non-type template argument referring to ",{bc,"object"}," B with internal linkage is a C++11 extension"}}}, | ||
[ | [f]=n, | ||
[ | [e]="non\\-type template argument referring to (?:function|object) (.*?) with internal linkage is a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=m, | ||
[ | [h]={"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"}, | ||
[ | [d]={{O,6873,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // ...\n // Address / reference template args must have external linkage in C++98.\n if (Entity->getFormalLinkage() == InternalLinkage) {\n S.Diag(Arg->getBeginLoc(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_object_internal : diag::ext_template_arg_object_internal) << !Func << Entity << Arg->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/drs/dr1xx.cpp"]={"clang/test/CXX/drs/dr1xx.cpp:114:5: error: non-type template argument referring to object \'a1\' with internal linkage is a C++11 extension [-Werror,-Wc++11-extensions]","clang/test/CXX/drs/dr1xx.cpp:116:5: error: non-type template argument referring to object \'a3\' with internal linkage is a C++11 extension [-Werror,-Wc++11-extensions]"} | ["clang/test/CXX/drs/dr1xx.cpp"]={"clang/test/CXX/drs/dr1xx.cpp:114:5: error: non-type template argument referring to object \'a1\' with internal linkage is a C++11 extension [-Werror,-Wc++11-extensions]","clang/test/CXX/drs/dr1xx.cpp:116:5: error: non-type template argument referring to object \'a3\' with internal linkage is a C++11 extension [-Werror,-Wc++11-extensions]"} | ||
| Line 2,767: | Line 2,768: | ||
}, | }, | ||
["ext_template_arg_unnamed_type"]={ | ["ext_template_arg_unnamed_type"]={ | ||
[ | [l]={"unnamed-type-template-args"}, | ||
[ | [k]="unnamed-type-template-args", | ||
[ | [i]="ext_template_arg_unnamed_type", | ||
[b]="template argument uses unnamed type", | [b]="template argument uses unnamed type", | ||
[g]="template argument uses unnamed type", | [g]="template argument uses unnamed type", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wunnamed\\-type\\-template\\-args[^\\]]*\\]", | [f]=n, | ||
[ | [e]="template argument uses unnamed type", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunnamed\\-type\\-template\\-args[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"9bb67f4d1ab7",1283548354,"Allow anonymous and local types. The support was already in place for these,","Allow anonymous and local types. The support was already in place for these,\nbut this makes them work even as an extension in C++98. This resolves PR8077.\n\nllvm-svn: 113011"}, | |||
[d]={{O,6468,"bool UnnamedLocalNoLinkageFinder::VisitTagDecl(const TagDecl *Tag) {\n // ...\n if (!Tag->hasNameForLinkage()) {\n S.Diag(SR.getBegin(), S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_arg_unnamed_type : diag::ext_template_arg_unnamed_type) << SR;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/mangle-unnamed.cpp"]={"clang/test/CodeGenCXX/mangle-unnamed.cpp:84:16: warning: template argument uses unnamed type [-Wunnamed-type-template-args]","clang/test/CodeGenCXX/mangle-unnamed.cpp:83:53: warning: template argument uses unnamed type [-Wunnamed-type-template-args]"} | ["clang/test/CodeGenCXX/mangle-unnamed.cpp"]={"clang/test/CodeGenCXX/mangle-unnamed.cpp:84:16: warning: template argument uses unnamed type [-Wunnamed-type-template-args]","clang/test/CodeGenCXX/mangle-unnamed.cpp:83:53: warning: template argument uses unnamed type [-Wunnamed-type-template-args]"} | ||
| Line 2,783: | Line 2,784: | ||
}, | }, | ||
["ext_template_outside_of_template"]={ | ["ext_template_outside_of_template"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_template_outside_of_template", | ||
[b]="\'template\' keyword outside of a template", | [b]="\'template\' keyword outside of a template", | ||
[g]="\'template\' keyword outside of a template", | [g]="\'template\' keyword outside of a template", | ||
[f]= | [f]=n, | ||
[e]= | [e]="\'template\' keyword outside of a template", | ||
[ | [c]=lb, | ||
[ | [a]=m, | ||
[h]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'","Fix the recently-added warning about \'typename\' and \'template\'\ndisambiguation keywords outside of templates in C++98/03. Previously,\nthe warning would fire when the associated nested-name-specifier was\nnot dependent, but that was a misreading of the C++98/03 standard:\nnow, we complain only when we\'re outside of any template.\n\nllvm-svn: 106161"}, | |||
[d]={{O,5084,"/// Form a template name from a name that is syntactically required to name a\n/// template, either due to use of the \'template\' keyword or because a name in\n/// this syntactic context is assumed to name a template (C++ [temp.names]p2-4).\n///\n/// This action forms a template name given the name of the template and its\n/// optional scope specifier. This is used when the \'template\' keyword is used\n/// or when the parsing context unambiguously treats a following \'<\' as\n/// introducing a template argument list. Note that this may produce a\n/// non-dependent template name if we can perform the lookup now and identify\n/// the named template.\n///\n/// For example, given \"x.MetaFun::template apply\", the scope specifier\n/// \\p SS will be \"MetaFun::\", \\p TemplateKWLoc contains the location\n/// of the \"template\" keyword, and \"apply\" is the \\p Name.\nTemplateNameKind Sema::ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Result, bool AllowInjectedClassName) {\n if (TemplateKWLoc.isValid() && S && !S->getTemplateParamParent())\n Diag(TemplateKWLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_outside_of_template : diag::ext_template_outside_of_template) << FixItHint::CreateRemoval(TemplateKWLoc);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/nested-name-spec-template.cpp"]={"clang/test/SemaTemplate/nested-name-spec-template.cpp:26:6: warning: \'template\' keyword outside of a template [-Wc++11-extensions]","clang/test/SemaTemplate/nested-name-spec-template.cpp:31:6: warning: \'template\' keyword outside of a template [-Wc++11-extensions]"} | ["clang/test/SemaTemplate/nested-name-spec-template.cpp"]={"clang/test/SemaTemplate/nested-name-spec-template.cpp:26:6: warning: \'template\' keyword outside of a template [-Wc++11-extensions]","clang/test/SemaTemplate/nested-name-spec-template.cpp:31:6: warning: \'template\' keyword outside of a template [-Wc++11-extensions]"} | ||
| Line 2,799: | Line 2,800: | ||
}, | }, | ||
["ext_template_param_shadow"]={ | ["ext_template_param_shadow"]={ | ||
[ | [l]={F,hb,"microsoft-template-shadow"}, | ||
[ | [k]="microsoft-template-shadow", | ||
[ | [i]={{nil,p,"ext_template_param_shadow"}}, | ||
[b]={{nil,p,"declaration of %0 shadows template parameter"}}, | [b]={{nil,p,"declaration of %0 shadows template parameter"}}, | ||
[ | [g]={{nil,p,"declaration of A shadows template parameter"}}, | ||
[ | [f]=n, | ||
[ | [e]="declaration of (.*?) shadows template parameter", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-template\\-shadow[^\\]]*\\]", | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Qc,1567434909,Pc,md}, | ||
[ | [d]={{O,897,"/// DiagnoseTemplateParameterShadow - Produce a diagnostic complaining\n/// that the template parameter \'PrevDecl\' is being shadowed by a new\n/// declaration at location Loc. Returns true to indicate that this is\n/// an error, and false otherwise.\nvoid Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) {\n // ...\n unsigned DiagId = getLangOpts().MSVCCompat ? diag::ext_template_param_shadow : diag::err_template_param_shadow;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/microsoft-template-shadow.cpp"]={"clang/test/SemaCXX/microsoft-template-shadow.cpp:5:22: warning: declaration of \'T\' shadows template parameter [-Wmicrosoft-template-shadow]"} | ["clang/test/SemaCXX/microsoft-template-shadow.cpp"]={"clang/test/SemaCXX/microsoft-template-shadow.cpp:5:22: warning: declaration of \'T\' shadows template parameter [-Wmicrosoft-template-shadow]"} | ||
| Line 2,815: | Line 2,816: | ||
}, | }, | ||
["ext_template_parameter_default_in_function_template"]={ | ["ext_template_parameter_default_in_function_template"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_template_parameter_default_in_function_template", | ||
[b]="default template arguments for a function template are a C++11 extension", | [b]="default template arguments for a function template are a C++11 extension", | ||
[ | [g]="default template arguments for a function template are a C++11 extension", | ||
[ | [f]=n, | ||
[ | [e]="default template arguments for a function template are a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=m, | ||
[ | [h]={"8b481d8ac2af",1296791842,"When a function template\'s template parameter has a default argument,","When a function template\'s template parameter has a default argument,\nit\'s okay for the following template parameters to not have default\narguments (since those template parameters can still be\ndeduced). Also, downgrade the error about default template arguments\nin function templates to an extension warning, since this is a\nharmless C++0x extension.\n\nllvm-svn: 124855"}, | ||
[ | [d]={{O,2724,"/// Diagnose the presence of a default template argument on a\n/// template parameter, which is ill-formed in certain contexts.\n///\n/// \\returns true if the default template argument should be dropped.\nstatic bool DiagnoseDefaultTemplateArgument(Sema &S, Sema::TemplateParamListContext TPC, SourceLocation ParamLoc, SourceRange DefArgRange) {\n // ...\n case Sema::TPC_FunctionTemplate:\n case Sema::TPC_FriendFunctionTemplateDefinition:\n // ...\n S.Diag(ParamLoc, S.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_template_parameter_default_in_function_template : diag::ext_template_parameter_default_in_function_template) << DefArgRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.param/p9.cpp"]={"clang/test/CXX/temp/temp.param/p9.cpp:5:19: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]","clang/test/CXX/temp/temp.param/p9.cpp:7:19: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]"} | ["clang/test/CXX/temp/temp.param/p9.cpp"]={"clang/test/CXX/temp/temp.param/p9.cpp:5:19: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]","clang/test/CXX/temp/temp.param/p9.cpp:7:19: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]"} | ||
| Line 2,831: | Line 2,832: | ||
}, | }, | ||
["ext_template_template_param_typename"]={ | ["ext_template_template_param_typename"]={ | ||
[ | [l]={Y,Cb}, | ||
[ | [k]=Y, | ||
[ | [i]="ext_template_template_param_typename", | ||
[b]="template template parameter using \'typename\' is a C++1z extension", | [b]="template template parameter using \'typename\' is a C++1z extension", | ||
[ | [g]="template template parameter using \'typename\' is a C++1z extension", | ||
[ | [f]=n, | ||
[ | [e]="template template parameter using \'typename\' is a C\\+\\+17 extension", | ||
[ | [c]=zb, | ||
[ | [a]=G, | ||
[ | [h]={"78e1ca692bf0",1402933882,"[C++1z] Implement N4051: \'typename\' is permitted instead of \'class\' when declaring a template templa...","[C++1z] Implement N4051: \'typename\' is permitted instead of \'class\' when declaring a template template parameter.\n\nllvm-svn: 211031"}, | ||
[ | [d]={{"clang/lib/Parse/ParseTemplate.cpp",935,"/// ParseTemplateTemplateParameter - Handle the parsing of template\n/// template parameters.\n///\n/// type-parameter: [C++ temp.param]\n/// template-head type-parameter-key ...[opt] identifier[opt]\n/// template-head type-parameter-key identifier[opt] = id-expression\n/// type-parameter-key:\n/// \'class\'\n/// \'typename\' [C++1z]\n/// template-head: [C++2a]\n/// \'template\' \'<\' template-parameter-list \'>\'\n/// requires-clause[opt]\nNamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) {\n // ...\n // Provide an ExtWarn if the C++1z feature of using \'typename\' here is used.\n // Generate a meaningful error if the user forgot to put class before the\n // identifier, comma, or greater. Provide a fixit if the identifier, comma,\n // or greater appear immediately or after \'struct\'. In the latter case,\n // replace the keyword with \'class\'.\n if (!TryConsumeToken(tok::kw_class)) {\n // ...\n if (Tok.is(tok::kw_typename)) {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_template_template_param_typename : diag::ext_template_template_param_typename) << (!getLangOpts().CPlusPlus17 ? FixItHint::CreateReplacement(Tok.getLocation(), \"class\") : FixItHint());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx-template-decl.cpp"]={"clang/test/Parser/cxx-template-decl.cpp:31:31: warning: template template parameter using \'typename\' is a C++17 extension [-Wc++17-extensions]"} | ["clang/test/Parser/cxx-template-decl.cpp"]={"clang/test/Parser/cxx-template-decl.cpp:31:31: warning: template template parameter using \'typename\' is a C++17 extension [-Wc++17-extensions]"} | ||
| Line 2,847: | Line 2,848: | ||
}, | }, | ||
["ext_thread_before"]={ | ["ext_thread_before"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_thread_before", | ||
[b]="\'__thread\' before \'%0\'", | [b]="\'__thread\' before \'%0\'", | ||
[ | [g]="\'__thread\' before \'A\'", | ||
[ | [f]=n, | ||
[ | [e]="\'__thread\' before \'(.*?)\'", | ||
[ | [c]=X, | ||
[ | [a]=G, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{xb,3946,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw_extern:\n if (DS.getThreadStorageClassSpec() == DeclSpec::TSCS___thread)\n Diag(Tok, diag::ext_thread_before) << \"extern\";"},{xb,3958,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw_static:\n if (DS.getThreadStorageClassSpec() == DeclSpec::TSCS___thread)\n Diag(Tok, diag::ext_thread_before) << \"static\";"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/thread-specifier.c"]={"clang/test/Sema/thread-specifier.c:10:10: warning: \'__thread\' before \'extern\' [-Wpedantic]","clang/test/Sema/thread-specifier.c:11:10: warning: \'__thread\' before \'static\' [-Wpedantic]"} | ["clang/test/Sema/thread-specifier.c"]={"clang/test/Sema/thread-specifier.c:10:10: warning: \'__thread\' before \'extern\' [-Wpedantic]","clang/test/Sema/thread-specifier.c:11:10: warning: \'__thread\' before \'static\' [-Wpedantic]"} | ||
| Line 2,863: | Line 2,864: | ||
}, | }, | ||
["ext_token_used"]={ | ["ext_token_used"]={ | ||
[ | [l]={"language-extension-token",t}, | ||
[ | [k]="language-extension-token", | ||
[ | [i]="ext_token_used", | ||
[b]="extension used", | [b]="extension used", | ||
[g]="extension used", | [g]="extension used", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wlanguage\\-extension\\-token[^\\]]*\\]", | [f]=n, | ||
[ | [e]="extension used", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wlanguage\\-extension\\-token[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{"clang/lib/Lex/Preprocessor.cpp",855,"/// HandleIdentifier - This callback is invoked when the lexer reads an\n/// identifier. This callback looks up the identifier in the map and/or\n/// potentially macro expands it or turns it into a named token (like \'for\').\n///\n/// Note that callers of this method are guarded by checking the\n/// IdentifierInfo\'s \'isHandleIdentifierCase\' bit. If this method changes, the\n/// IdentifierInfo methods that compute these properties will need to change to\n/// match.\nbool Preprocessor::HandleIdentifier(Token &Identifier) {\n // ...\n // If this is an extension token, diagnose its use.\n // We avoid diagnosing tokens that originate from macro definitions.\n // FIXME: This warning is disabled in cases where it shouldn\'t be,\n // like \"#define TY typeof\", \"TY(1) x\".\n if (II.isExtensionToken() && !DisableMacroExpansion)\n Diag(Identifier, diag::ext_token_used);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/extension-warning.c"]={"clang/test/Preprocessor/extension-warning.c:9:1: warning: extension used [-Wlanguage-extension-token]"} | ["clang/test/Preprocessor/extension-warning.c"]={"clang/test/Preprocessor/extension-warning.c:9:1: warning: extension used [-Wlanguage-extension-token]"} | ||
| Line 2,879: | Line 2,880: | ||
}, | }, | ||
["ext_type_defined_in_offsetof"]={ | ["ext_type_defined_in_offsetof"]={ | ||
[ | [l]={W,"gnu-offsetof-extensions",t}, | ||
[ | [k]="gnu-offsetof-extensions", | ||
[ | [i]={{nil,P,"ext_type_defined_in_offsetof"}}, | ||
[b]={{nil, | [b]={{nil,P,"defining a type within \'%select{__builtin_offsetof|offsetof}0\' is a Clang extension"}}, | ||
[ | [g]={{nil,P,{"defining a type within \'",{"__builtin_offsetof","offsetof"},"\' is a Clang extension"}}}, | ||
[ | [f]=n, | ||
[ | [e]="defining a type within \'(?:__builtin_offsetof|offsetof)\' is a Clang extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-offsetof\\-extensions[^\\]]*\\]", | ||
[ | [a]={{nil,P,m}}, | ||
[ | [h]={ic,1625925174,fc,ec}, | ||
[ | [d]={{w,17549,"CreateNewDecl:\n // ...\n if (OOK != OOK_Outside && TUK == TUK_Definition && !getLangOpts().CPlusPlus)\n Diag(New->getLocation(), diag::ext_type_defined_in_offsetof) << (OOK == OOK_Macro) << New->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/C/drs/dr4xx.c"]={"clang/test/C/drs/dr4xx.c:353:36: warning: defining a type within \'__builtin_offsetof\' is a Clang extension [-Wgnu-offsetof-extensions]"} | ["clang/test/C/drs/dr4xx.c"]={"clang/test/C/drs/dr4xx.c:353:36: warning: defining a type within \'__builtin_offsetof\' is a Clang extension [-Wgnu-offsetof-extensions]"} | ||
| Line 2,895: | Line 2,896: | ||
}, | }, | ||
["ext_typecheck_addrof_temporary"]={ | ["ext_typecheck_addrof_temporary"]={ | ||
[ | [l]={"address-of-temporary"}, | ||
[ | [k]="address-of-temporary", | ||
[ | [i]="ext_typecheck_addrof_temporary", | ||
[b]="taking the address of a temporary object of type %0", | [b]="taking the address of a temporary object of type %0", | ||
[ | [g]="taking the address of a temporary object of type A", | ||
[ | [f]=Q, | ||
[ | [e]="taking the address of a temporary object of type (.*?)", | ||
[ | [c]=" \\[[^\\]]*\\-Waddress\\-of\\-temporary[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"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"}, | ||
[ | [d]={{v,14950,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n // ...\n if (lval == Expr::LV_ClassTemporary || lval == Expr::LV_ArrayTemporary) {\n // ...\n Diag(OpLoc, isSFINAEContext() ? diag::err_typecheck_addrof_temporary : diag::ext_typecheck_addrof_temporary) << op->getType() << op->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/address-of-temporary.cpp"]={"clang/test/SemaCXX/address-of-temporary.cpp:8:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]","clang/test/SemaCXX/address-of-temporary.cpp:9:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]","clang/test/SemaCXX/address-of-temporary.cpp:10:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]","clang/test/SemaCXX/address-of-temporary.cpp:11:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]"} | ["clang/test/SemaCXX/address-of-temporary.cpp"]={"clang/test/SemaCXX/address-of-temporary.cpp:8:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]","clang/test/SemaCXX/address-of-temporary.cpp:9:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]","clang/test/SemaCXX/address-of-temporary.cpp:10:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]","clang/test/SemaCXX/address-of-temporary.cpp:11:19: warning: taking the address of a temporary object of type \'X\' [-Waddress-of-temporary]"} | ||
| Line 2,911: | Line 2,912: | ||
}, | }, | ||
["ext_typecheck_addrof_void"]={ | ["ext_typecheck_addrof_void"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_typecheck_addrof_void", | ||
[b]="ISO C forbids taking the address of an expression of type \'void\'", | [b]="ISO C forbids taking the address of an expression of type \'void\'", | ||
[g]="ISO C forbids taking the address of an expression of type \'void\'", | [g]="ISO C forbids taking the address of an expression of type \'void\'", | ||
[f]=X, | [f]=n, | ||
[ | [e]="ISO C forbids taking the address of an expression of type \'void\'", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[h]={"b8c4fd8cfd27",1241390165,"PR2524: downgrade taking address of expression of type \'void\' to an ","PR2524: downgrade taking address of expression of type \'void\' to an \nextension warning.\n\nllvm-svn: 70805"}, | |||
[d]={{v,15073,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n // ...\n if (lval == Expr::LV_IncompleteVoidType) {\n // ...\n Diag(OpLoc, diag::ext_typecheck_addrof_void) << op->getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/deref.c"]={"clang/test/Sema/deref.c:21:12: warning: ISO C forbids taking the address of an expression of type \'void\' [-Wpedantic]","clang/test/Sema/deref.c:35:10: warning: ISO C forbids taking the address of an expression of type \'void\' [-Wpedantic]"} | ["clang/test/Sema/deref.c"]={"clang/test/Sema/deref.c:21:12: warning: ISO C forbids taking the address of an expression of type \'void\' [-Wpedantic]","clang/test/Sema/deref.c:35:10: warning: ISO C forbids taking the address of an expression of type \'void\' [-Wpedantic]"} | ||
| Line 2,927: | Line 2,928: | ||
}, | }, | ||
["ext_typecheck_base_super"]={ | ["ext_typecheck_base_super"]={ | ||
[ | [l]={"super-class-method-mismatch"}, | ||
[ | [k]="super-class-method-mismatch", | ||
[ | [i]="ext_typecheck_base_super", | ||
[b]="method parameter type %diff{$ does not match super class method parameter type $|does not match super class method parameter type}0,1", | [b]="method parameter type %diff{$ does not match super class method parameter type $|does not match super class method parameter type}0,1", | ||
[ | [g]={{nil,nil,{"method parameter type ",{"A does not match super class method parameter type B","does not match super class method parameter type"}}}}, | ||
[ | [f]=n, | ||
[ | [e]="method parameter type (?:(.*?) does not match super class method parameter type (.*?)|does not match super class method parameter type)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wsuper\\-class\\-method\\-mismatch[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"10ff786e1eb8",1249348036,"Compare matching selectors in current and","Compare matching selectors in current and\nsuper class(s) and warn on any parameter\ntype mismatch if potentially unsafe. \n\nllvm-svn: 78029"}, | ||
[ | [d]={{mc,4528,"void Sema::CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC) {\n // ...\n for (ObjCMethodDecl *overridden : overrides) {\n // ...\n if (CurrentClass && overridden->getDeclContext() != CurrentClass && isa<ObjCInterfaceDecl>(overridden->getDeclContext()) && !overridden->isImplicit() /* not meant for properties */) {\n // ...\n for (; ParamI != E && PrevI != PrevE; ++ParamI, ++PrevI) {\n // ...\n // If type of argument of method in this class does not match its\n // respective argument type in the super class method, issue warning;\n if (!Context.typesAreCompatible(T1, T2)) {\n Diag((*ParamI)->getLocation(), diag::ext_typecheck_base_super) << T1 << T2;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/warn-superclass-method-mismatch.m"]={"clang/test/SemaObjC/warn-superclass-method-mismatch.m:24:29: warning: method parameter type \'struct A *\' does not match super class method parameter type \'int *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:25:25: warning: method parameter type \'Sub *\' does not match super class method parameter type \'Base *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:27:29: warning: method parameter type \'Sub *\' does not match super class method parameter type \'Base *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:29:50: warning: method parameter type \'Sub *\' does not match super class method parameter type \'int *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:30:30: warning: method parameter type \'float\' does not match super class method parameter type \'double\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:31:31: warning: method parameter type \'double\' does not match super class method parameter type \'float\' [-Wsuper-class-method-mismatch]"} | ["clang/test/SemaObjC/warn-superclass-method-mismatch.m"]={"clang/test/SemaObjC/warn-superclass-method-mismatch.m:24:29: warning: method parameter type \'struct A *\' does not match super class method parameter type \'int *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:25:25: warning: method parameter type \'Sub *\' does not match super class method parameter type \'Base *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:27:29: warning: method parameter type \'Sub *\' does not match super class method parameter type \'Base *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:29:50: warning: method parameter type \'Sub *\' does not match super class method parameter type \'int *\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:30:30: warning: method parameter type \'float\' does not match super class method parameter type \'double\' [-Wsuper-class-method-mismatch]","clang/test/SemaObjC/warn-superclass-method-mismatch.m:31:31: warning: method parameter type \'double\' does not match super class method parameter type \'float\' [-Wsuper-class-method-mismatch]"} | ||
| Line 2,943: | Line 2,944: | ||
}, | }, | ||
["ext_typecheck_cast_nonscalar"]={ | ["ext_typecheck_cast_nonscalar"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_typecheck_cast_nonscalar", | ||
[b]="C99 forbids casting nonscalar type %0 to the same type", | [b]="C99 forbids casting nonscalar type %0 to the same type", | ||
[ | [g]="C99 forbids casting nonscalar type A to the same type", | ||
[ | [f]=n, | ||
[ | [e]="C99 forbids casting nonscalar type (.*?) to the same type", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{Uc,3007,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n if (!DestType->isScalarType() && !DestType->isVectorType() && !DestType->isMatrixType()) {\n // ...\n if (DestRecordTy && Self.Context.hasSameUnqualifiedType(DestType, SrcType)) {\n // ...\n Self.Diag(OpRange.getBegin(), diag::ext_typecheck_cast_nonscalar) << DestType << SrcExpr.get()->getSourceRange();"}} | ||
}, | }, | ||
["ext_typecheck_cast_to_union"]={ | ["ext_typecheck_cast_to_union"]={ | ||
[ | [l]={W,"gnu-union-cast",t}, | ||
[ | [k]="gnu-union-cast", | ||
[ | [i]="ext_typecheck_cast_to_union", | ||
[b]="cast to union type is a GNU extension", | [b]="cast to union type is a GNU extension", | ||
[g]="cast to union type is a GNU extension", | [g]="cast to union type is a GNU extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-union\\-cast[^\\]]*\\]", | [f]=n, | ||
[ | [e]="cast to union type is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-union\\-cast[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={U,1237025389,T,S}, | |||
[d]={{Uc,3017,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n if (!DestType->isScalarType() && !DestType->isVectorType() && !DestType->isMatrixType()) {\n // ...\n // GCC\'s cast to union extension.\n if (DestRecordTy && DestRecordTy->getDecl()->isUnion()) {\n // ...\n if (CastExpr::getTargetFieldForToUnionCast(RD, SrcType)) {\n Self.Diag(OpRange.getBegin(), diag::ext_typecheck_cast_to_union) << SrcExpr.get()->getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/cast-to-union.c"]={"clang/test/Sema/cast-to-union.c:7:5: warning: cast to union type is a GNU extension [-Wgnu-union-cast]","clang/test/Sema/cast-to-union.c:12:13: warning: cast to union type is a GNU extension [-Wgnu-union-cast]","clang/test/Sema/cast-to-union.c:16:14: warning: cast to union type is a GNU extension [-Wgnu-union-cast]"} | ["clang/test/Sema/cast-to-union.c"]={"clang/test/Sema/cast-to-union.c:7:5: warning: cast to union type is a GNU extension [-Wgnu-union-cast]","clang/test/Sema/cast-to-union.c:12:13: warning: cast to union type is a GNU extension [-Wgnu-union-cast]","clang/test/Sema/cast-to-union.c:16:14: warning: cast to union type is a GNU extension [-Wgnu-union-cast]"} | ||
| Line 2,972: | Line 2,973: | ||
}, | }, | ||
["ext_typecheck_compare_complete_incomplete_pointers"]={ | ["ext_typecheck_compare_complete_incomplete_pointers"]={ | ||
[ | [l]={"c11-extensions",t}, | ||
[ | [k]="c11-extensions", | ||
[ | [i]={{nil,A,"ext_typecheck_compare_complete_incomplete_pointers"}}, | ||
[b]={{nil, | [b]={{nil,A,"pointer comparisons before C11 need to be between two complete or two incomplete types; %0 is %select{|in}2complete and %1 is %select{|in}3complete"}}, | ||
[ | [g]={{nil,A,{"pointer comparisons before C11 need to be between two complete or two incomplete types; A is ",{o,"in"},"complete and B is ",{o,"in"},"complete"}}}, | ||
[ | [f]=n, | ||
[ | [e]="pointer comparisons before C11 need to be between two complete or two incomplete types; (.*?) is (?:|in)complete and (.*?) is (?:|in)complete", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc11\\-extensions[^\\]]*\\]", | ||
[ | [a]={{nil,A,m}}, | ||
[ | [h]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata","[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the new objc_direct attribute, this change adds a new\nattribute that remotes metadata from Protocols that the programmer knows\nisn\'t going to be used at runtime. We simply have the frontend skip\ngenerating any protocol metadata entries (e.g. OBJC_CLASS_NAME,\n_OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol\nmarked with `__attribute__((objc_non_runtime_protocol))`.\n\nThere are a few APIs used to retrieve a protocol at runtime.\n`@protocol(SomeProtocol)` will now error out of the requested protocol\nis marked with attribute. `objc_getProtocol` will return `NULL` which\nis consistent with the behavior of a non-existing protocol.\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D75574"}, | ||
[ | [d]={{v,13131,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if ((LHSType->isIntegerType() && !LHSIsNull) || (RHSType->isIntegerType() && !RHSIsNull)) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else if (LHSType->isPointerType() && RHSType->isPointerType()) { // C99 6.5.8p2\n // ...\n // C99 6.5.9p2 and C99 6.5.8p2\n if (Context.typesAreCompatible(LCanPointeeTy.getUnqualifiedType(), RCanPointeeTy.getUnqualifiedType())) {\n if (IsRelational) {\n // Pointers both need to point to complete or incomplete types\n if ((LCanPointeeTy->isIncompleteType() != RCanPointeeTy->isIncompleteType()) && !getLangOpts().C11) {\n Diag(Loc, diag::ext_typecheck_compare_complete_incomplete_pointers) << LHS.get()->getSourceRange() << RHS.get()->getSourceRange() << LHSType << RHSType << LCanPointeeTy->isIncompleteType() << RCanPointeeTy->isIncompleteType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/complete-incomplete-pointer-relational-c99.c"]={"clang/test/Sema/complete-incomplete-pointer-relational-c99.c:8:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]","clang/test/Sema/complete-incomplete-pointer-relational-c99.c:9:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]","clang/test/Sema/complete-incomplete-pointer-relational-c99.c:10:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]","clang/test/Sema/complete-incomplete-pointer-relational-c99.c:11:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]"} | ["clang/test/Sema/complete-incomplete-pointer-relational-c99.c"]={"clang/test/Sema/complete-incomplete-pointer-relational-c99.c:8:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]","clang/test/Sema/complete-incomplete-pointer-relational-c99.c:9:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]","clang/test/Sema/complete-incomplete-pointer-relational-c99.c:10:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]","clang/test/Sema/complete-incomplete-pointer-relational-c99.c:11:23: warning: pointer comparisons before C11 need to be between two complete or two incomplete types; \'int (*)[]\' is incomplete and \'int (*)[6]\' is complete [-Wc11-extensions]"} | ||
| Line 2,988: | Line 2,989: | ||
}, | }, | ||
["ext_typecheck_comparison_of_distinct_pointers"]={ | ["ext_typecheck_comparison_of_distinct_pointers"]={ | ||
[ | [l]={"compare-distinct-pointer-types"}, | ||
[ | [k]="compare-distinct-pointer-types", | ||
[ | [i]="ext_typecheck_comparison_of_distinct_pointers", | ||
[b]="comparison of distinct pointer types%diff{ ($ and $)|}0,1", | [b]="comparison of distinct pointer types%diff{ ($ and $)|}0,1", | ||
[ | [g]={{nil,nil,{"comparison of distinct pointer types",{" (A and B)",o}}}}, | ||
[ | [f]=n, | ||
[ | [e]="comparison of distinct pointer types(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcompare\\-distinct\\-pointer\\-types[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{v,12364,"static void diagnoseDistinctPointerComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, bool IsError) { S.Diag(Loc, IsError ? diag::err_typecheck_comparison_of_distinct_pointers : diag::ext_typecheck_comparison_of_distinct_pointers) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); }"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:74:12: warning: comparison of distinct pointer types (\'id<P1>\' and \'A *\') [-Wcompare-distinct-pointer-types]"} | ["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:74:12: warning: comparison of distinct pointer types (\'id<P1>\' and \'A *\') [-Wcompare-distinct-pointer-types]"} | ||
| Line 3,004: | Line 3,005: | ||
}, | }, | ||
["ext_typecheck_comparison_of_fptr_to_void"]={ | ["ext_typecheck_comparison_of_fptr_to_void"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_typecheck_comparison_of_fptr_to_void", | ||
[b]="equality comparison between function pointer and void pointer (%0 and %1)", | [b]="equality comparison between function pointer and void pointer (%0 and %1)", | ||
[ | [g]="equality comparison between function pointer and void pointer (A and B)", | ||
[ | [f]=n, | ||
[ | [e]="equality comparison between function pointer and void pointer \\((.*?) and (.*?)\\)", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[ | [h]={"16c209610c8b",1250987267,"Catch a few more cases of illegal comparisons.","Catch a few more cases of illegal comparisons.\n\nllvm-svn: 79793"}, | ||
[ | [d]={{v,12500,"static void diagnoseFunctionPointerToVoidComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, bool IsError) { S.Diag(Loc, IsError ? diag::err_typecheck_comparison_of_fptr_to_void : diag::ext_typecheck_comparison_of_fptr_to_void) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); }"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:225:12: warning: equality comparison between function pointer and void pointer (\'int (*)(int)\' and \'void *\') [-Wpedantic]"} | ["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:225:12: warning: equality comparison between function pointer and void pointer (\'int (*)(int)\' and \'void *\') [-Wpedantic]"} | ||
| Line 3,020: | Line 3,021: | ||
}, | }, | ||
["ext_typecheck_comparison_of_pointer_integer"]={ | ["ext_typecheck_comparison_of_pointer_integer"]={ | ||
[ | [l]={"pointer-integer-compare"}, | ||
[ | [k]="pointer-integer-compare", | ||
[ | [i]="ext_typecheck_comparison_of_pointer_integer", | ||
[b]="comparison between pointer and integer (%0 and %1)", | [b]="comparison between pointer and integer (%0 and %1)", | ||
[ | [g]="comparison between pointer and integer (A and B)", | ||
[ | [f]=n, | ||
[ | [e]="comparison between pointer and integer \\((.*?) and (.*?)\\)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpointer\\-integer\\-compare[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{v,13479,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n // ...\n if (LangOpts.DebuggerSupport) {\n // ...\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else if (IsOrdered)\n // ...\n else\n DiagID = diag::ext_typecheck_comparison_of_pointer_integer;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/comptypes-7.m"]={"clang/test/SemaObjC/comptypes-7.m:49:11: warning: comparison between pointer and integer (\'id\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:50:9: warning: comparison between pointer and integer (\'int\' and \'id\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:54:13: warning: comparison between pointer and integer (\'MyClass *\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:55:9: warning: comparison between pointer and integer (\'int\' and \'MyClass *\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:59:13: warning: comparison between pointer and integer (\'id<MyProtocol>\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:60:9: warning: comparison between pointer and integer (\'int\' and \'id<MyProtocol>\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:64:13: warning: comparison between pointer and integer (\'Class\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:65:9: warning: comparison between pointer and integer (\'int\' and \'Class\') [-Wpointer-integer-compare]"} | ["clang/test/SemaObjC/comptypes-7.m"]={"clang/test/SemaObjC/comptypes-7.m:49:11: warning: comparison between pointer and integer (\'id\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:50:9: warning: comparison between pointer and integer (\'int\' and \'id\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:54:13: warning: comparison between pointer and integer (\'MyClass *\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:55:9: warning: comparison between pointer and integer (\'int\' and \'MyClass *\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:59:13: warning: comparison between pointer and integer (\'id<MyProtocol>\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:60:9: warning: comparison between pointer and integer (\'int\' and \'id<MyProtocol>\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:64:13: warning: comparison between pointer and integer (\'Class\' and \'int\') [-Wpointer-integer-compare]","clang/test/SemaObjC/comptypes-7.m:65:9: warning: comparison between pointer and integer (\'int\' and \'Class\') [-Wpointer-integer-compare]"} | ||
| Line 3,036: | Line 3,037: | ||
}, | }, | ||
["ext_typecheck_cond_incompatible_operands"]={ | ["ext_typecheck_cond_incompatible_operands"]={ | ||
[ | [i]="ext_typecheck_cond_incompatible_operands", | ||
[b]="incompatible operand types (%0 and %1)", | [b]="incompatible operand types (%0 and %1)", | ||
[ | [g]="incompatible operand types (A and B)", | ||
[ | [f]=n, | ||
[ | [e]="incompatible operand types \\((.*?) and (.*?)\\)", | ||
[ | [c]=lc, | ||
[ | [a]=m, | ||
[ | [h]={"1b821b4fc583",1241666054,"Improve semantic checking for blocks. Radar 6441502","Improve semantic checking for blocks. Radar 6441502\n\nllvm-svn: 71145"}, | ||
[ | [d]={{v,9352,"/// FindCompositeObjCPointerType - Helper method to find composite type of\n/// two objective-c pointer types of the two input expressions.\nQualType Sema::FindCompositeObjCPointerType(ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) {\n // ...\n // Check constraints for Objective-C object pointers types.\n if (LHSTy->isObjCObjectPointerType() && RHSTy->isObjCObjectPointerType()) {\n // ...\n // FIXME: Consider unifying with \'areComparableObjCPointerTypes\'.\n // It could return the composite type.\n if (!(compositeType = Context.areCommonBaseCompatible(LHSOPT, RHSOPT)).isNull()) {\n // ...\n } else if (Context.canAssignObjCInterfaces(LHSOPT, RHSOPT)) {\n // ...\n } else if (Context.canAssignObjCInterfaces(RHSOPT, LHSOPT)) {\n // ...\n } else if ((LHSOPT->isObjCQualifiedIdType() || RHSOPT->isObjCQualifiedIdType()) && Context.ObjCQualifiedIdTypesAreCompatible(LHSOPT, RHSOPT, true)) {\n // ...\n } else if (LHSTy->isObjCIdType() || RHSTy->isObjCIdType()) {\n // ...\n } else {\n Diag(QuestionLoc, diag::ext_typecheck_cond_incompatible_operands) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:78:16: warning: incompatible operand types (\'id<P1>\' and \'A *\')"} | ["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:78:16: warning: incompatible operand types (\'id<P1>\' and \'A *\')"} | ||
| Line 3,050: | Line 3,051: | ||
}, | }, | ||
["ext_typecheck_cond_incompatible_pointers"]={ | ["ext_typecheck_cond_incompatible_pointers"]={ | ||
[ | [l]={"pointer-type-mismatch"}, | ||
[ | [k]="pointer-type-mismatch", | ||
[ | [i]="ext_typecheck_cond_incompatible_pointers", | ||
[b]="pointer type mismatch%diff{ ($ and $)|}0,1", | [b]="pointer type mismatch%diff{ ($ and $)|}0,1", | ||
[ | [g]={{nil,nil,{"pointer type mismatch",{" (A and B)",o}}}}, | ||
[ | [f]=n, | ||
[ | [e]="pointer type mismatch(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpointer\\-type\\-mismatch[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={vb,1405733957,ub,tb}, | ||
[ | [d]={{v,8784,"/// Checks compatibility between two pointers and return the resulting\n/// type.\nstatic QualType checkConditionalPointerCompatibility(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) {\n // ...\n if (CompositeTy.isNull()) {\n // ...\n S.Diag(Loc, diag::ext_typecheck_cond_incompatible_pointers) << LHSTy << RHSTy << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:9:7: warning: pointer type mismatch (\'double *\' and \'int *\') [-Wpointer-type-mismatch]","clang/test/Sema/conditional-expr.c:38:21: warning: pointer type mismatch (\'int *\' and \'enum (unnamed enum at clang/test/Sema/conditional-expr.c:36:3) *\') [-Wpointer-type-mismatch]"} | ["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:9:7: warning: pointer type mismatch (\'double *\' and \'int *\') [-Wpointer-type-mismatch]","clang/test/Sema/conditional-expr.c:38:21: warning: pointer type mismatch (\'int *\' and \'enum (unnamed enum at clang/test/Sema/conditional-expr.c:36:3) *\') [-Wpointer-type-mismatch]"} | ||
| Line 3,066: | Line 3,067: | ||
}, | }, | ||
["ext_typecheck_cond_one_void"]={ | ["ext_typecheck_cond_one_void"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_typecheck_cond_one_void", | ||
[b]="C99 forbids conditional expressions with only one void side", | [b]="C99 forbids conditional expressions with only one void side", | ||
[g]="C99 forbids conditional expressions with only one void side", | [g]="C99 forbids conditional expressions with only one void side", | ||
[f]=X, | [f]=n, | ||
[ | [e]="C99 forbids conditional expressions with only one void side", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[h]={U,1237025389,T,S}, | |||
[d]={{v,9184,"/// Note that LHS is not null here, even if this is the gnu \"x ?: y\" extension.\n/// In that case, LHS = cond.\n/// C99 6.5.15\nQualType Sema::CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n // ...\n // C99 6.5.15p5: \"If both operands have void type, the result has void type.\"\n // The following || allows only one side to be void (a GCC-ism).\n if (LHSTy->isVoidType() || RHSTy->isVoidType()) {\n // ...\n if (LHSTy->isVoidType() && RHSTy->isVoidType()) {\n // ...\n } else if (RHSTy->isVoidType()) {\n // ...\n Diag(RHS.get()->getBeginLoc(), diag::ext_typecheck_cond_one_void) << RHS.get()->getSourceRange();"},{v,9243,"/// Note that LHS is not null here, even if this is the gnu \"x ?: y\" extension.\n/// In that case, LHS = cond.\n/// C99 6.5.15\nQualType Sema::CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) {\n // ...\n // C99 6.5.15p5: \"If both operands have void type, the result has void type.\"\n // The following || allows only one side to be void (a GCC-ism).\n if (LHSTy->isVoidType() || RHSTy->isVoidType()) {\n // ...\n if (LHSTy->isVoidType() && RHSTy->isVoidType()) {\n // ...\n } else if (RHSTy->isVoidType()) {\n // ...\n } else {\n // ...\n Diag(LHS.get()->getBeginLoc(), diag::ext_typecheck_cond_one_void) << LHS.get()->getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:89:60: warning: C99 forbids conditional expressions with only one void side [-Wpedantic]"} | ["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:89:60: warning: C99 forbids conditional expressions with only one void side [-Wpedantic]"} | ||
| Line 3,082: | Line 3,083: | ||
}, | }, | ||
["ext_typecheck_cond_pointer_integer_mismatch"]={ | ["ext_typecheck_cond_pointer_integer_mismatch"]={ | ||
[ | [l]={"conditional-type-mismatch"}, | ||
[ | [k]="conditional-type-mismatch", | ||
[ | [i]="ext_typecheck_cond_pointer_integer_mismatch", | ||
[b]="pointer/integer type mismatch in conditional expression%diff{ ($ and $)|}0,1", | [b]="pointer/integer type mismatch in conditional expression%diff{ ($ and $)|}0,1", | ||
[ | [g]={{nil,nil,{"pointer/integer type mismatch in conditional expression",{" (A and B)",o}}}}, | ||
[ | [f]=n, | ||
[ | [e]="pointer\\/integer type mismatch in conditional expression(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wconditional\\-type\\-mismatch[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={vb,1405733957,ub,tb}, | ||
[ | [d]={{v,8883,"/// Return false if the first expression is not an integer and the second\n/// expression is not a pointer, true otherwise.\nstatic bool checkPointerIntegerMismatch(Sema &S, ExprResult &Int, Expr *PointerExpr, SourceLocation Loc, bool IsIntFirstExpr) {\n // ...\n S.Diag(Loc, diag::ext_typecheck_cond_pointer_integer_mismatch) << Expr1->getType() << Expr2->getType() << Expr1->getSourceRange() << Expr2->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:99:12: warning: pointer/integer type mismatch in conditional expression (\'int\' and \'void *\') [-Wconditional-type-mismatch]"} | ["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:99:12: warning: pointer/integer type mismatch in conditional expression (\'int\' and \'void *\') [-Wconditional-type-mismatch]"} | ||
| Line 3,098: | Line 3,099: | ||
}, | }, | ||
["ext_typecheck_convert_discards_qualifiers"]={ | ["ext_typecheck_convert_discards_qualifiers"]={ | ||
[ | [l]={Xc,"incompatible-pointer-types-discards-qualifiers"}, | ||
[ | [k]="incompatible-pointer-types-discards-qualifiers", | ||
[ | [i]="ext_typecheck_convert_discards_qualifiers", | ||
[b]="%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 discards qualifiers", | [b]="%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,nil,{{{{Fb,Vb}},{{Lb,Ob}},{{Mb,Ub}},{{Ib,Hb}},{{Nb,Gb}},{{Jb,Pb}},{{Sb,Rb}}}," discards qualifiers"}}}, | ||
[ | [f]=n, | ||
[ | [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", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types\\-discards\\-qualifiers[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{ac,3199,"bool Sema::CheckARMBuiltinExclusiveCall(unsigned BuiltinID, CallExpr *TheCall, unsigned MaxWidth) {\n // ...\n if (!AddrType.isAtLeastAsQualifiedAs(ValType)) {\n // ...\n Diag(DRE->getBeginLoc(), diag::ext_typecheck_convert_discards_qualifiers) << PointerArg->getType() << Context.getPointerType(AddrType) << AA_Passing << PointerArg->getSourceRange();"},{v,17638,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case CompatiblePointerDiscardsQualifiers:\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_discards_qualifiers;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:29:9: warning: initializing \'void *\' with an expression of type \'const void *\' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]"} | ["clang/test/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:29:9: warning: initializing \'void *\' with an expression of type \'const void *\' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]"} | ||
| Line 3,114: | Line 3,115: | ||
}, | }, | ||
["ext_typecheck_convert_incompatible_function_pointer"]={ | ["ext_typecheck_convert_incompatible_function_pointer"]={ | ||
[ | [l]={"incompatible-function-pointer-types",Xc}, | ||
[ | [k]="incompatible-function-pointer-types", | ||
[ | [i]="ext_typecheck_convert_incompatible_function_pointer", | ||
[b]="incompatible function pointer types %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", | [b]="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,nil,{"incompatible function pointer types ",{{{Fb,Vb}},{{Lb,Ob}},{{Mb,Ub}},{{Ib,Hb}},{{Nb,Gb}},{{Jb,Pb}},{{Sb,Rb}}},{o,"; dereference with *","; take the address with &","; remove *","; remove &"}}}}, | ||
[ | [f]=Q, | ||
[ | [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 &)", | ||
[ | [c]=" \\[[^\\]]*\\-Wincompatible\\-function\\-pointer\\-types[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"d9b7dfe4a4df",1468874226,"[Sema] Create a separate group for incompatible function pointer warning","[Sema] Create a separate group for incompatible function pointer warning\n\nGive incompatible function pointer warning its own diagnostic group\nbut still leave it as a subgroup of incompatible-pointer-types. This is in\npreparation to promote -Wincompatible-function-pointer-types to error on\ndarwin.\n\nDifferential Revision: https://reviews.llvm.org/D22248\n\nrdar://problem/12907612\n\nllvm-svn: 275907"}, | ||
[ | [d]={{v,17561,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatibleFunctionPointer:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_incompatible_function_pointer;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/C/C2x/n2975.c"]={"clang/test/C/C2x/n2975.c:65:6: error: incompatible function pointer types initializing \'fp\' (aka \'void (*)(...)\') with an expression of type \'void (int, int, ...)\' [-Wincompatible-function-pointer-types]"} | ["clang/test/C/C2x/n2975.c"]={"clang/test/C/C2x/n2975.c:65:6: error: incompatible function pointer types initializing \'fp\' (aka \'void (*)(...)\') with an expression of type \'void (int, int, ...)\' [-Wincompatible-function-pointer-types]"} | ||
| Line 3,130: | Line 3,131: | ||
}, | }, | ||
["ext_typecheck_convert_incompatible_pointer"]={ | ["ext_typecheck_convert_incompatible_pointer"]={ | ||
[ | [l]={Xc}, | ||
[ | [k]=Xc, | ||
[ | [i]="ext_typecheck_convert_incompatible_pointer", | ||
[b]="incompatible pointer types %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", | [b]="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,nil,{"incompatible pointer types ",{{{Fb,Vb}},{{Lb,Ob}},{{Mb,Ub}},{{Ib,Hb}},{{Nb,Gb}},{{Jb,Pb}},{{Sb,Rb}}},{o,"; dereference with *","; take the address with &","; remove *","; remove &"}}}}, | ||
[ | [f]=n, | ||
[ | [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 &)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{v,17580,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatiblePointer:\n if (Action == AA_Passing_CFAudited) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_incompatible_pointer;"},{Tb,4479,"/// PerformImplicitConversion - Perform an implicit conversion of the\n/// expression From to the type ToType by following the standard\n/// conversion sequence SCS. Returns the converted\n/// expression. Flavor is the context in which we\'re performing this\n/// conversion, for use in error messages.\nExprResult Sema::PerformImplicitConversion(Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK) {\n // ...\n case ICK_Writeback_Conversion:\n case ICK_Pointer_Conversion: {\n if (SCS.IncompatibleObjC && Action != AA_Casting) {\n // Diagnose incompatible Objective-C conversions\n if (Action == AA_Initializing || Action == AA_Assigning)\n Diag(From->getBeginLoc(), diag::ext_typecheck_convert_incompatible_pointer) << ToType << From->getType() << Action << From->getSourceRange() << 0;"},{Tb,4484,"/// PerformImplicitConversion - Perform an implicit conversion of the\n/// expression From to the type ToType by following the standard\n/// conversion sequence SCS. Returns the converted\n/// expression. Flavor is the context in which we\'re performing this\n/// conversion, for use in error messages.\nExprResult Sema::PerformImplicitConversion(Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK) {\n // ...\n case ICK_Writeback_Conversion:\n case ICK_Pointer_Conversion: {\n if (SCS.IncompatibleObjC && Action != AA_Casting) {\n // Diagnose incompatible Objective-C conversions\n if (Action == AA_Initializing || Action == AA_Assigning)\n // ...\n else\n Diag(From->getBeginLoc(), diag::ext_typecheck_convert_incompatible_pointer) << From->getType() << ToType << Action << From->getSourceRange() << 0;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:60:10: warning: incompatible pointer types returning \'int *\' from a function with result type \'float *\' [-Wincompatible-pointer-types]"} | ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:60:10: warning: incompatible pointer types returning \'int *\' from a function with result type \'float *\' [-Wincompatible-pointer-types]"} | ||
| Line 3,146: | Line 3,147: | ||
}, | }, | ||
["ext_typecheck_convert_incompatible_pointer_sign"]={ | ["ext_typecheck_convert_incompatible_pointer_sign"]={ | ||
[ | [l]={"pointer-sign"}, | ||
[ | [k]="pointer-sign", | ||
[ | [i]="ext_typecheck_convert_incompatible_pointer_sign", | ||
[b]={{nil, | [b]={{nil,z,"%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"},{Lc,nil,"%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 converts between pointers to integer types with different sign"}}, | ||
[ | [g]={{nil,z,{{{{Fb,Vb}},{{Lb,Ob}},{{Mb,Ub}},{{Ib,Hb}},{{Nb,Gb}},{{Jb,Pb}},{{Sb,Rb}}}," converts between pointers to integer types ",{"with different sign","where one is of the unique plain \'char\' type and the other is not"}}},{Lc,nil,{{{{Fb,Vb}},{{Lb,Ob}},{{Mb,Ub}},{{Ib,Hb}},{{Nb,Gb}},{{Jb,Pb}},{{Sb,Rb}}}," converts between pointers to integer types with different sign"}}}, | ||
[ | [f]=n, | ||
[ | [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)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpointer\\-sign[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"80160bd483b3",1237766384,"Partial implementation of PR3342: break out pointer sign ","Partial implementation of PR3342: break out pointer sign \nincompatibilities in assignments from other pointer incompatibilities. \nBased off of the patch in PR3342. (This doesn\'t implement -Wno-pointer-sign,\nbut I don\'t know the driver code very well.)\n\nllvm-svn: 67494"}, | ||
[ | [d]={{v,17588,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatiblePointerSign:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_incompatible_pointer_sign;"},{v,17743,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n if (DiagKind == diag::ext_typecheck_convert_incompatible_pointer_sign || DiagKind == diag::err_typecheck_convert_incompatible_pointer_sign) {"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch-error.c:10:19: warning: passing \'volatile unsigned int *\' to parameter of type \'volatile int *\' converts between pointers to integer types with different sign [-Wpointer-sign]","clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch-error.c:17:21: warning: passing \'volatile unsigned long *\' to parameter of type \'volatile long *\' converts between pointers to integer types with different sign [-Wpointer-sign]"} | ["clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch-error.c:10:19: warning: passing \'volatile unsigned int *\' to parameter of type \'volatile int *\' converts between pointers to integer types with different sign [-Wpointer-sign]","clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-fetch-error.c:17:21: warning: passing \'volatile unsigned long *\' to parameter of type \'volatile long *\' converts between pointers to integer types with different sign [-Wpointer-sign]"} | ||
| Line 3,162: | Line 3,163: | ||
}, | }, | ||
["ext_typecheck_convert_int_pointer"]={ | ["ext_typecheck_convert_int_pointer"]={ | ||
[ | [l]={"conversion","int-conversion","int-conversions","non-gcc"}, | ||
[ | [k]="int-conversion", | ||
[ | [i]="ext_typecheck_convert_int_pointer", | ||
[b]="incompatible integer to pointer conversion %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", | [b]="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,nil,{"incompatible integer to pointer conversion ",{{{Fb,Vb}},{{Lb,Ob}},{{Mb,Ub}},{{Ib,Hb}},{{Nb,Gb}},{{Jb,Pb}},{{Sb,Rb}}},{o,"; dereference with *","; take the address with &","; remove *","; remove &"}}}}, | ||
[ | [f]=Q, | ||
[ | [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 &)", | ||
[ | [c]=" \\[[^\\]]*\\-Wint\\-conversion[^\\]]*\\]", | ||
[ | [a]="Value Conversion Issue", | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{v,17545,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IntToPointer:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_int_pointer;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:20:16: error: incompatible integer to pointer conversion passing \'int\' to parameter of type \'char *\' [-Wint-conversion]","clang/test/SemaObjC/argument-checking.m:23:21: error: incompatible integer to pointer conversion sending \'int\' to parameter of type \'char *\' [-Wint-conversion]"} | ["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:20:16: error: incompatible integer to pointer conversion passing \'int\' to parameter of type \'char *\' [-Wint-conversion]","clang/test/SemaObjC/argument-checking.m:23:21: error: incompatible integer to pointer conversion sending \'int\' to parameter of type \'char *\' [-Wint-conversion]"} | ||
| Line 3,178: | Line 3,179: | ||
}, | }, | ||
["ext_typecheck_convert_pointer_int"]={ | ["ext_typecheck_convert_pointer_int"]={ | ||
[ | [l]={"conversion","int-conversion","int-conversions","non-gcc"}, | ||
[ | [k]="int-conversion", | ||
[ | [i]="ext_typecheck_convert_pointer_int", | ||
[b]="incompatible pointer to integer conversion %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", | [b]="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,nil,{"incompatible pointer to integer conversion ",{{{Fb,Vb}},{{Lb,Ob}},{{Mb,Ub}},{{Ib,Hb}},{{Nb,Gb}},{{Jb,Pb}},{{Sb,Rb}}},{o,"; dereference with *","; take the address with &","; remove *","; remove &"}}}}, | ||
[ | [f]=Q, | ||
[ | [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 &)", | ||
[ | [c]=" \\[[^\\]]*\\-Wint\\-conversion[^\\]]*\\]", | ||
[ | [a]="Value Conversion Issue", | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{v,17535,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case PointerToInt:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_pointer_int;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:21:12: error: incompatible pointer to integer conversion passing \'char[4]\' to parameter of type \'char\' [-Wint-conversion]"} | ["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:21:12: error: incompatible pointer to integer conversion passing \'char[4]\' to parameter of type \'char\' [-Wint-conversion]"} | ||
| Line 3,194: | Line 3,195: | ||
}, | }, | ||
["ext_typecheck_convert_pointer_void_func"]={ | ["ext_typecheck_convert_pointer_void_func"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_typecheck_convert_pointer_void_func", | ||
[b]="%select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2 converts between void pointer and function pointer", | [b]="%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,nil,{{{{Fb,Vb}},{{Lb,Ob}},{{Mb,Ub}},{{Ib,Hb}},{{Nb,Gb}},{{Jb,Pb}},{{Sb,Rb}}}," converts between void pointer and function pointer"}}}, | ||
[ | [f]=n, | ||
[ | [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", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{v,17603,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case FunctionVoidPointer:\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n DiagKind = diag::ext_typecheck_convert_pointer_void_func;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/function-ptr.c"]={"clang/test/Sema/function-ptr.c:6:7: warning: assigning to \'unary_int_func *\' (aka \'int (*)(int)\') from \'void *\' converts between void pointer and function pointer [-Wpedantic]","clang/test/Sema/function-ptr.c:7:4: warning: assigning to \'void *\' from \'unary_int_func *\' (aka \'int (*)(int)\') converts between void pointer and function pointer [-Wpedantic]","clang/test/Sema/function-ptr.c:9:9: warning: returning \'void *\' from a function with result type \'unary_int_func *\' (aka \'int (*)(int)\') converts between void pointer and function pointer [-Wpedantic]"} | ["clang/test/Sema/function-ptr.c"]={"clang/test/Sema/function-ptr.c:6:7: warning: assigning to \'unary_int_func *\' (aka \'int (*)(int)\') from \'void *\' converts between void pointer and function pointer [-Wpedantic]","clang/test/Sema/function-ptr.c:7:4: warning: assigning to \'void *\' from \'unary_int_func *\' (aka \'int (*)(int)\') converts between void pointer and function pointer [-Wpedantic]","clang/test/Sema/function-ptr.c:9:9: warning: returning \'void *\' from a function with result type \'unary_int_func *\' (aka \'int (*)(int)\') converts between void pointer and function pointer [-Wpedantic]"} | ||
| Line 3,210: | Line 3,211: | ||
}, | }, | ||
["ext_typecheck_decl_incomplete_type"]={ | ["ext_typecheck_decl_incomplete_type"]={ | ||
[ | [l]={"tentative-definition-incomplete-type"}, | ||
[ | [k]="tentative-definition-incomplete-type", | ||
[ | [i]="ext_typecheck_decl_incomplete_type", | ||
[b]="tentative definition of variable with internal linkage has incomplete non-array type %0", | [b]="tentative definition of variable with internal linkage has incomplete non-array type %0", | ||
[ | [g]="tentative definition of variable with internal linkage has incomplete non-array type A", | ||
[ | [f]=n, | ||
[ | [e]="tentative definition of variable with internal linkage has incomplete non\\-array type (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtentative\\-definition\\-incomplete\\-type[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"47d2859b3e27",1248115619,"Improve GCC compatibility by allowing static tentative definitions of","Improve GCC compatibility by allowing static tentative definitions of\nincomplete type (with a warning), from Enea Zaffanella!\n\nllvm-svn: 76451"}, | ||
[ | [d]={{w,13816,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n case VarDecl::TentativeDefinition:\n // File scope. C99 6.9.2p2: A declaration of an identifier for an\n // object that has file scope without an initializer, and without a\n // storage-class specifier or with the storage-class specifier \"static\",\n // constitutes a tentative definition. Note: A tentative definition with\n // external linkage is valid (C99 6.2.2p5).\n if (!Var->isInvalidDecl()) {\n if (const IncompleteArrayType *ArrayT = Context.getAsIncompleteArrayType(Type)) {\n // ...\n } else if (Var->getStorageClass() == SC_Static) {\n // C99 6.9.2p3: If the declaration of an identifier for an object is\n // a tentative definition and has internal linkage (C99 6.2.2p3), the\n // declared type shall not be an incomplete type.\n // NOTE: code such as the following\n // static struct s;\n // struct s { int a; };\n // is accepted by gcc. Hence here we issue a warning instead of\n // an error and we do not invalidate the static declaration.\n // NOTE: to avoid multiple warnings, only check the first declaration.\n if (Var->isFirstDecl())\n RequireCompleteType(Var->getLocation(), Type, diag::ext_typecheck_decl_incomplete_type);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/tentative-decls.c"]={"clang/test/Sema/tentative-decls.c:5:17: warning: tentative definition of variable with internal linkage has incomplete non-array type \'struct a\' [-Wtentative-definition-incomplete-type]"} | ["clang/test/Sema/tentative-decls.c"]={"clang/test/Sema/tentative-decls.c:5:17: warning: tentative definition of variable with internal linkage has incomplete non-array type \'struct a\' [-Wtentative-definition-incomplete-type]"} | ||
| Line 3,226: | Line 3,227: | ||
}, | }, | ||
["ext_typecheck_indirection_through_void_pointer"]={ | ["ext_typecheck_indirection_through_void_pointer"]={ | ||
[ | [l]={"void-ptr-dereference"}, | ||
[ | [k]="void-ptr-dereference", | ||
[ | [i]="ext_typecheck_indirection_through_void_pointer", | ||
[b]={{nil, | [b]={{nil,P,"ISO C does not allow indirection on operand of type %0"},{y,nil,"ISO C++ does not allow indirection on operand of type %0"}}, | ||
[ | [g]={{nil,P,"ISO C does not allow indirection on operand of type A"},{y,nil,"ISO C++ does not allow indirection on operand of type A"}}, | ||
[ | [f]=n, | ||
[ | [e]="ISO C does not allow indirection on operand of type (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wvoid\\-ptr\\-dereference[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"80877c228d01",1399499607,"Add an Extension warning for applying unary * to an operand of type \'void*\' in","Add an Extension warning for applying unary * to an operand of type \'void*\' in\nC++. This seems like a pointless (and indeed harmful) restriction to me, so\nI\'ve suggested removing it to -core and disabled this diagnostic by default.\n\nllvm-svn: 208254"}, | ||
[ | [d]={{v,15294,"/// CheckIndirectionOperand - Type check unary indirection (prefix \'*\').\nstatic QualType CheckIndirectionOperand(Sema &S, Expr *Op, ExprValueKind &VK, SourceLocation OpLoc, bool IsAfterAmp = false) {\n // ...\n if (Result->isVoidType()) {\n // ...\n if (LO.CPlusPlus)\n // ...\n else if (!(LO.C99 && IsAfterAmp) && !S.isUnevaluatedContext())\n S.Diag(OpLoc, diag::ext_typecheck_indirection_through_void_pointer) << OpTy << Op->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/deref.c"]={"clang/test/Sema/deref.c:21:13: warning: ISO C does not allow indirection on operand of type \'void *\' [-Wvoid-ptr-dereference]"} | ["clang/test/Sema/deref.c"]={"clang/test/Sema/deref.c:21:13: warning: ISO C does not allow indirection on operand of type \'void *\' [-Wvoid-ptr-dereference]"} | ||
| Line 3,242: | Line 3,243: | ||
}, | }, | ||
["ext_typecheck_ordered_comparison_of_function_pointers"]={ | ["ext_typecheck_ordered_comparison_of_function_pointers"]={ | ||
[ | [l]={"ordered-compare-function-pointers"}, | ||
[ | [k]="ordered-compare-function-pointers", | ||
[ | [i]="ext_typecheck_ordered_comparison_of_function_pointers", | ||
[b]="ordered comparison of function pointers (%0 and %1)", | [b]="ordered comparison of function pointers (%0 and %1)", | ||
[ | [g]="ordered comparison of function pointers (A and B)", | ||
[ | [f]=n, | ||
[ | [e]="ordered comparison of function pointers \\((.*?) and (.*?)\\)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wordered\\-compare\\-function\\-pointers[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by","Implement PR4175, catching some questionable comparisons. Patch by\nDavid Majnemer!\n\nllvm-svn: 74513"}, | ||
[ | [d]={{v,13109,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if (IsOrdered && LHSType->isFunctionPointerType() && RHSType->isFunctionPointerType()) {\n // ...\n auto DiagID = IsError ? diag::err_typecheck_ordered_comparison_of_function_pointers : getLangOpts().CPlusPlus ? diag::warn_typecheck_ordered_comparison_of_function_pointers : diag::ext_typecheck_ordered_comparison_of_function_pointers;"}} | ||
}, | }, | ||
["ext_typecheck_ordered_comparison_of_pointer_and_zero"]={ | ["ext_typecheck_ordered_comparison_of_pointer_and_zero"]={ | ||
[ | [l]={t}, | ||
[ | [k]=t, | ||
[ | [i]="ext_typecheck_ordered_comparison_of_pointer_and_zero", | ||
[b]="ordered comparison between pointer and zero (%0 and %1) is an extension", | [b]="ordered comparison between pointer and zero (%0 and %1) is an extension", | ||
[ | [g]="ordered comparison between pointer and zero (A and B) is an extension", | ||
[ | [f]=n, | ||
[ | [e]="ordered comparison between pointer and zero \\((.*?) and (.*?)\\) is an extension", | ||
[ | [c]=X, | ||
[ | [a]=m, | ||
[ | [h]={"d99bd52c7395",1250985824,"Eli points out that we really must diagnose \"void* > 0\" as an extension. ","Eli points out that we really must diagnose \"void* > 0\" as an extension. \nExplicitly add it as an EXTENSION instead of an EXTWARN so that it only\ncomes out with -pedantic. Thanks Eli!\n\nllvm-svn: 79791"}, | ||
[ | [d]={{v,13352,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n // ...\n if (LangOpts.DebuggerSupport) {\n // ...\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n if (IsOrdered) {\n // ...\n DiagID = isError ? diag::err_typecheck_ordered_comparison_of_pointer_and_zero : diag::ext_typecheck_ordered_comparison_of_pointer_and_zero;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:215:12: warning: ordered comparison between pointer and zero (\'int *\' and \'int\') is an extension [-Wpedantic]"} | ["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:215:12: warning: ordered comparison between pointer and zero (\'int *\' and \'int\') is an extension [-Wpedantic]"} | ||
| Line 3,271: | Line 3,272: | ||
}, | }, | ||
["ext_typecheck_ordered_comparison_of_pointer_integer"]={ | ["ext_typecheck_ordered_comparison_of_pointer_integer"]={ | ||
[ | [i]="ext_typecheck_ordered_comparison_of_pointer_integer", | ||
[b]="ordered comparison between pointer and integer (%0 and %1)", | [b]="ordered comparison between pointer and integer (%0 and %1)", | ||
[ | [g]="ordered comparison between pointer and integer (A and B)", | ||
[ | [f]=n, | ||
[ | [e]="ordered comparison between pointer and integer \\((.*?) and (.*?)\\)", | ||
[ | [c]=lc, | ||
[ | [a]=m, | ||
[ | [h]={"d466ea1b0873",1246343045,"Implement PR4175, catching some questionable comparisons. Patch by","Implement PR4175, catching some questionable comparisons. Patch by\nDavid Majnemer!\n\nllvm-svn: 74513"}, | ||
[ | [d]={{v,13357,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) || (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {\n // ...\n if (LangOpts.DebuggerSupport) {\n // ...\n } else if ((LHSIsNull && LHSType->isIntegerType()) || (RHSIsNull && RHSType->isIntegerType())) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else if (IsOrdered)\n DiagID = diag::ext_typecheck_ordered_comparison_of_pointer_integer;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/pointer_promotion.c"]={"clang/test/Parser/pointer_promotion.c:14:10: warning: ordered comparison between pointer and integer (\'int *\' and \'int\')","clang/test/Parser/pointer_promotion.c:15:12: warning: ordered comparison between pointer and integer (\'short\' and \'int *\')"} | ["clang/test/Parser/pointer_promotion.c"]={"clang/test/Parser/pointer_promotion.c:14:10: warning: ordered comparison between pointer and integer (\'int *\' and \'int\')","clang/test/Parser/pointer_promotion.c:15:12: warning: ordered comparison between pointer and integer (\'short\' and \'int *\')"} | ||
| Line 3,285: | Line 3,286: | ||
}, | }, | ||
["ext_typecheck_zero_array_size"]={ | ["ext_typecheck_zero_array_size"]={ | ||
[ | [l]={W,t,"zero-length-array"}, | ||
[ | [k]="zero-length-array", | ||
[ | [i]="ext_typecheck_zero_array_size", | ||
[b]="zero size arrays are an extension", | [b]="zero size arrays are an extension", | ||
[g]="zero size arrays are an extension", | [g]="zero size arrays are an extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wzero\\-length\\-array[^\\]]*\\]", | [f]=n, | ||
[ | [e]="zero size arrays are an extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wzero\\-length\\-array[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={U,1237025389,T,S}, | |||
[d]={{sb,2075,"void InitListChecker::CheckArrayType(const InitializedEntity &Entity, InitListExpr *IList, QualType &DeclType, llvm::APSInt elementIndex, bool SubobjectIsDesignatorContext, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\n if (!hadError && DeclType->isIncompleteArrayType() && !VerifyOnly) {\n // ...\n if (maxElements == Zero && !Entity.isVariableLengthArrayNew()) {\n // ...\n SemaRef.Diag(IList->getBeginLoc(), diag::ext_typecheck_zero_array_size);"},{Bb,2649,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n if (!ArraySize) {\n // ...\n } else if (ArraySize->isTypeDependent() || ArraySize->isValueDependent()) {\n // ...\n } else {\n // ...\n if (!R.isUsable()) {\n // ...\n } else if (!T->isDependentType() && !T->isIncompleteType() && !T->isConstantSizeType()) {\n // ...\n } else {\n // ...\n if (ConstVal == 0 && !T.isWebAssemblyReferenceType()) {\n // ...\n Diag(ArraySize->getBeginLoc(), isSFINAEContext() ? diag::err_typecheck_zero_array_size : diag::ext_typecheck_zero_array_size) << 0 << ArraySize->getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:3:24: warning: zero size arrays are an extension [-Wzero-length-array]"} | ["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:3:24: warning: zero size arrays are an extension [-Wzero-length-array]"} | ||
| Line 3,301: | Line 3,302: | ||
}, | }, | ||
["ext_typedef_without_a_name"]={ | ["ext_typedef_without_a_name"]={ | ||
[ | [l]={wc}, | ||
[ | [k]=wc, | ||
[ | [i]="ext_typedef_without_a_name", | ||
[b]="typedef requires a name", | [b]="typedef requires a name", | ||
[g]="typedef requires a name", | [g]="typedef requires a name", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", | [f]=n, | ||
[ | [e]="typedef requires a name", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{w,5239,"/// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with\n/// no declarator (e.g. \"struct foo;\") is parsed. It also accepts template\n/// parameters to cope with template friend declarations.\nDecl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord) {\n // ...\n if (!DS.isMissingDeclaratorOk()) {\n // Customize diagnostic for a typedef missing a name.\n if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef)\n Diag(DS.getBeginLoc(), diag::ext_typedef_without_a_name) << DS.getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/decl-invalid.c"]={"clang/test/Sema/decl-invalid.c:4:1: warning: typedef requires a name [-Wmissing-declarations]","clang/test/Sema/decl-invalid.c:17:1: warning: typedef requires a name [-Wmissing-declarations]"} | ["clang/test/Sema/decl-invalid.c"]={"clang/test/Sema/decl-invalid.c:4:1: warning: typedef requires a name [-Wmissing-declarations]","clang/test/Sema/decl-invalid.c:17:1: warning: typedef requires a name [-Wmissing-declarations]"} | ||
| Line 3,317: | Line 3,318: | ||
}, | }, | ||
["ext_typename_missing"]={ | ["ext_typename_missing"]={ | ||
[ | [l]={"typename-missing"}, | ||
[ | [k]="typename-missing", | ||
[ | [i]="ext_typename_missing", | ||
[b]="missing \'typename\' prior to dependent type name \'%0%1\'", | [b]="missing \'typename\' prior to dependent type name \'%0%1\'", | ||
[ | [g]="missing \'typename\' prior to dependent type name \'AB\'", | ||
[ | [f]=n, | ||
[ | [e]="missing \'typename\' prior to dependent type name \'(.*?)(.*?)\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtypename\\-missing[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"32506ed8be37",1402614228,"Recover from missing \'typename\' in sizeof(T::InnerType)","Recover from missing \'typename\' in sizeof(T::InnerType)\n\nSummary:\n\'sizeof\' is a UnaryExprOrTypeTrait, and it can contain either a type or\nan expression. This change threads a RecoveryTSI parameter through the\nlayers between TransformUnaryExprOrTypeTrait the point at which we look\nup the type. If lookup finds a single type result after instantiation,\nwe now build TypeSourceInfo for it just like a normal transformation\nwould.\n\nThis fixes the last error in the hello world ATL app that I\'ve been\nworking with, and it now links and runs with clang. Please try it and\nfile bugs!\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D4108\n\nllvm-svn: 210855"}, | ||
[ | [d]={{w,821,"void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName) {\n // ...\n if (!SS || (!SS->isSet() && !SS->isInvalid()))\n // ...\n else if (DeclContext *DC = computeDeclContext(*SS, false))\n // ...\n else if (SS->isValid() && SS->getScopeRep()->containsErrors()) {\n // ...\n } else if (isDependentScopeSpecifier(*SS)) {\n // ...\n if (getLangOpts().MSVCCompat && isMicrosoftMissingTypename(SS, S))\n DiagID = diag::ext_typename_missing;"},{v,2880,"/// BuildQualifiedDeclarationNameExpr - Build a C++ qualified\n/// declaration name, generally during template instantiation.\n/// There\'s a large number of things which don\'t need to be done along\n/// this path.\nExprResult Sema::BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, const Scope *S, TypeSourceInfo **RecoveryTSI) {\n // ...\n if (const TypeDecl *TD = R.getAsSingle<TypeDecl>()) {\n // ...\n if (RecoveryTSI && getLangOpts().MSVCCompat)\n DiagID = diag::ext_typename_missing;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp"]={"clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:34:76: warning: missing \'typename\' prior to dependent type name \'Bar::InnerType\' [-Wtypename-missing]","clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:36:72: warning: missing \'typename\' prior to dependent type name \'Bar::InnerType\' [-Wtypename-missing]","clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:8:52: warning: missing \'typename\' prior to dependent type name \'X::type\' [-Wtypename-missing]"} | ["clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp"]={"clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:34:76: warning: missing \'typename\' prior to dependent type name \'Bar::InnerType\' [-Wtypename-missing]","clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:36:72: warning: missing \'typename\' prior to dependent type name \'Bar::InnerType\' [-Wtypename-missing]","clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:8:52: warning: missing \'typename\' prior to dependent type name \'X::type\' [-Wtypename-missing]"} | ||
| Line 3,333: | Line 3,334: | ||
}, | }, | ||
["ext_typename_outside_of_template"]={ | ["ext_typename_outside_of_template"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_typename_outside_of_template", | ||
[b]="\'typename\' occurs outside of a template", | [b]="\'typename\' occurs outside of a template", | ||
[g]="\'typename\' occurs outside of a template", | [g]="\'typename\' occurs outside of a template", | ||
[f]= | [f]=n, | ||
[e]= | [e]="\'typename\' occurs outside of a template", | ||
[ | [c]=lb, | ||
[ | [a]=m, | ||
[h]={"f7d77718123f",1276727468,"Fix the recently-added warning about \'typename\' and \'template\'","Fix the recently-added warning about \'typename\' and \'template\'\ndisambiguation keywords outside of templates in C++98/03. Previously,\nthe warning would fire when the associated nested-name-specifier was\nnot dependent, but that was a misreading of the C++98/03 standard:\nnow, we complain only when we\'re outside of any template.\n\nllvm-svn: 106161"}, | |||
[d]={{O,10811,"TypeResult Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc, ImplicitTypenameContext IsImplicitTypename) {\n // ...\n if (TypenameLoc.isValid() && S && !S->getTemplateParamParent())\n Diag(TypenameLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_typename_outside_of_template : diag::ext_typename_outside_of_template) << FixItHint::CreateRemoval(TypenameLoc);"},{O,10843,"TypeResult Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateIn, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) {\n if (TypenameLoc.isValid() && S && !S->getTemplateParamParent())\n Diag(TypenameLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_typename_outside_of_template : diag::ext_typename_outside_of_template) << FixItHint::CreateRemoval(TypenameLoc);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:61:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:62:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:63:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:64:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:61:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:62:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:63:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:64:5: warning: \'typename\' occurs outside of a template [-Wc++11-extensions]"} | ||
| Line 3,349: | Line 3,350: | ||
}, | }, | ||
["ext_undeclared_unqual_id_with_dependent_base"]={ | ["ext_undeclared_unqual_id_with_dependent_base"]={ | ||
[ | [l]={F,hb}, | ||
[ | [k]=hb, | ||
[ | [i]="ext_undeclared_unqual_id_with_dependent_base", | ||
[b]="use of undeclared identifier %0; unqualified lookup into dependent bases of class template %1 is a Microsoft extension", | [b]="use of undeclared identifier %0; unqualified lookup into dependent bases of class template %1 is a Microsoft extension", | ||
[ | [g]="use of undeclared identifier A; unqualified lookup into dependent bases of class template B is a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="use of undeclared identifier (.*?); unqualified lookup into dependent bases of class template (.*?) is a Microsoft extension", | ||
[ | [c]=rc, | ||
[ | [a]=m, | ||
[ | [h]={"10ca24c63162",1402444888,"Allow lookup into dependent bases in more places under -fms-compatibility","Allow lookup into dependent bases in more places under -fms-compatibility\n\nWe currently allow unqualified lookup for instance methods but not\nstatic methods because we can\'t recover with a semantic \'this->\'\ninsertion.\n\nATL headers have static methods that do unqualified lookup into\ndependent base classes. The pattern looks like:\n\n template <typename T> struct Foo : T {\n static int *getBarFromT() { return Bar; }\n };\n\nNow we recover as if the user had written:\n\n template <typename T> struct Foo : T {\n static int *getBarFromT() { return Foo::Bar; }\n };\n\n... which will eventually look up Bar in T at instantiation time.\n\nNow we emit a diagnostic in both cases, and delay lookup in other\ncontexts where \'this\' is available and refers to a class with dependent\nbases.\n\nReviewed by: rsmith\n\nDifferential Revision: http://reviews.llvm.org/D4079\n\nllvm-svn: 210611"}, | ||
[ | [d]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",798,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n // In Microsoft mode, if we are within a templated function and we can\'t\n // resolve Identifier, then extend the SS with Identifier. This will have\n // the effect of resolving Identifier during template instantiation.\n // The goal is to be able to resolve a function call whose\n // nested-name-specifier is located inside a dependent base class.\n // Example:\n //\n // class C {\n // public:\n // static void foo2() { }\n // };\n // template <class T> class A { public: typedef C D; };\n //\n // template <class T> class B : public A<T> {\n // public:\n // void foo() { D::foo2(); }\n // };\n if (getLangOpts().MSVCCompat) {\n // ...\n if (DC->isDependentContext() && DC->isFunctionOrMethod()) {\n // ...\n if (ContainingClass && ContainingClass->hasAnyDependentBases()) {\n Diag(IdInfo.IdentifierLoc, diag::ext_undeclared_unqual_id_with_dependent_base) << IdInfo.Identifier << ContainingClass;"},{w,645,"ParsedType Sema::ActOnMSVCUnknownTypeName(const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg) {\n // ...\n if (IsTemplateTypeArg && getCurScope()->isTemplateParamScope()) {\n // ...\n } else if (const CXXRecordDecl *RD = findRecordWithDependentBasesOfEnclosingMethod(CurContext)) {\n // ...\n Diag(NameLoc, diag::ext_undeclared_unqual_id_with_dependent_base) << &II << RD;"},{v,2561,"/// In Microsoft mode, if we are inside a template class whose parent class has\n/// dependent base classes, and we can\'t resolve an unqualified identifier, then\n/// assume the identifier is a member of a dependent base class. We can only\n/// recover successfully in static methods, instance methods, and other contexts\n/// where \'this\' is available. This doesn\'t precisely match MSVC\'s\n/// instantiation model, but it\'s close enough.\nstatic Expr *recoverFromMSUnqualifiedLookup(Sema &S, ASTContext &Context, DeclarationNameInfo &NameInfo, SourceLocation TemplateKWLoc, const TemplateArgumentListInfo *TemplateArgs) {\n // ...\n auto DB = S.Diag(Loc, diag::ext_undeclared_unqual_id_with_dependent_base);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/lookup-dependent-bases.cpp"]={"clang/test/SemaTemplate/lookup-dependent-bases.cpp:15:5: warning: use of undeclared identifier \'D\'; unqualified lookup into dependent bases of class template \'B\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/lookup-dependent-bases.cpp:49:7: warning: use of undeclared identifier \'D\'; unqualified lookup into dependent bases of class template \'C\' is a Microsoft extension [-Wmicrosoft-template]"} | ["clang/test/SemaTemplate/lookup-dependent-bases.cpp"]={"clang/test/SemaTemplate/lookup-dependent-bases.cpp:15:5: warning: use of undeclared identifier \'D\'; unqualified lookup into dependent bases of class template \'B\' is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/lookup-dependent-bases.cpp:49:7: warning: use of undeclared identifier \'D\'; unqualified lookup into dependent bases of class template \'C\' is a Microsoft extension [-Wmicrosoft-template]"} | ||
| Line 3,365: | Line 3,366: | ||
}, | }, | ||
["ext_undefined_internal_type"]={ | ["ext_undefined_internal_type"]={ | ||
[ | [l]={t,"undefined-internal-type"}, | ||
[ | [k]="undefined-internal-type", | ||
[ | [i]={{nil,E,"ext_undefined_internal_type"}}, | ||
[b]={{nil, | [b]={{nil,E,"ISO C++ requires a definition in this translation unit for %select{function|variable}0 %q1 because its type does not have linkage"}}, | ||
[ | [g]={{nil,E,{"ISO C++ requires a definition in this translation unit for ",{bc,Zb}," B because its type does not have linkage"}}}, | ||
[ | [f]=n, | ||
[ | [e]="ISO C\\+\\+ requires a definition in this translation unit for (?:function|variable) (.*?) because its type does not have linkage", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wundefined\\-internal\\-type[^\\]]*\\]", | ||
[ | [a]={{nil,E,m}}, | ||
[ | [h]={"405e2dbf3767",1505892120,"Implement C++ [basic.link]p8.","Implement C++ [basic.link]p8.\n\nIf a function or variable has a type with no linkage (and is not extern \"C\"),\nany use of it requires a definition within the same translation unit; the idea\nis that it is not possible to define the entity elsewhere, so any such use is\nnecessarily an error.\n\nThere is an exception, though: some types formally have no linkage but\nnonetheless can be referenced from other translation units (for example, this\nhappens to anonymous structures defined within inline functions). For entities\nwith those types, we suppress the diagnostic except under -pedantic.\n\nllvm-svn: 313729"}, | ||
[ | [d]={{"clang/lib/Sema/Sema.cpp",884,"/// checkUndefinedButUsed - Check for undefined objects with internal linkage\n/// or that are inline.\nstatic void checkUndefinedButUsed(Sema &S) {\n // ...\n for (const auto &Undef : Undefined) {\n // ...\n if (S.isExternalWithNoLinkageType(VD)) {\n // ...\n S.Diag(VD->getLocation(), isExternallyVisible(VD->getType()->getLinkage()) ? diag::ext_undefined_internal_type : diag::err_undefined_internal_type) << isa<VarDecl>(VD) << VD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.link/p8.cpp"]={"clang/test/CXX/basic/basic.link/p8.cpp:45:26: warning: ISO C++ requires a definition in this translation unit for function \'visible_no_linkage1\' because its type does not have linkage [-Wundefined-internal-type]","clang/test/CXX/basic/basic.link/p8.cpp:46:26: warning: ISO C++ requires a definition in this translation unit for function \'visible_no_linkage2\' because its type does not have linkage [-Wundefined-internal-type]","clang/test/CXX/basic/basic.link/p8.cpp:47:26: warning: ISO C++ requires a definition in this translation unit for function \'visible_no_linkage3\' because its type does not have linkage [-Wundefined-internal-type]"} | ["clang/test/CXX/basic/basic.link/p8.cpp"]={"clang/test/CXX/basic/basic.link/p8.cpp:45:26: warning: ISO C++ requires a definition in this translation unit for function \'visible_no_linkage1\' because its type does not have linkage [-Wundefined-internal-type]","clang/test/CXX/basic/basic.link/p8.cpp:46:26: warning: ISO C++ requires a definition in this translation unit for function \'visible_no_linkage2\' because its type does not have linkage [-Wundefined-internal-type]","clang/test/CXX/basic/basic.link/p8.cpp:47:26: warning: ISO C++ requires a definition in this translation unit for function \'visible_no_linkage3\' because its type does not have linkage [-Wundefined-internal-type]"} | ||
| Line 3,381: | Line 3,382: | ||
}, | }, | ||
["ext_unelaborated_friend_type"]={ | ["ext_unelaborated_friend_type"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_unelaborated_friend_type", | ||
[b]="unelaborated friend declaration is a C++11 extension; specify \'%select{struct|interface|union|class|enum}0\' to befriend %1", | [b]="unelaborated friend declaration is a C++11 extension; specify \'%select{struct|interface|union|class|enum}0\' to befriend %1", | ||
[ | [g]={{nil,nil,{"unelaborated friend declaration is a C++11 extension; specify \'",{"struct","interface","union","class","enum"},"\' to befriend B"}}}, | ||
[ | [f]=n, | ||
[ | [e]="unelaborated friend declaration is a C\\+\\+11 extension; specify \'(?:struct|interface|union|class|enum)\' to befriend (.*?)", | ||
[ | [c]=lb, | ||
[ | [a]=m, | ||
[ | [h]={"3b4abb679211",1270663032,"Improve handling of friend types in several ways:","Improve handling of friend types in several ways:\n - When instantiating a friend type template, perform semantic\n analysis on the resulting type.\n - Downgrade the errors concerning friend type declarations that do\n not refer to classes to ExtWarns in C++98/03. C++0x allows\n practically any type to be befriended, and ignores the friend\n declaration if the type is not a class.\n\nllvm-svn: 100635"}, | ||
[ | [d]={{Z,17212,"/// Perform semantic analysis of the given friend type declaration.\n///\n/// \\returns A friend declaration that.\nFriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo) {\n // ...\n // C++03 [class.friend]p2:\n // An elaborated-type-specifier shall be used in a friend declaration\n // for a class.*\n //\n // * The class-key of the elaborated-type-specifier is required.\n if (!CodeSynthesisContexts.empty()) {\n // ...\n } else {\n if (!T->isElaboratedTypeSpecifier()) {\n // If we evaluated the type to a record type, suggest putting\n // a tag in front.\n if (const RecordType *RT = T->getAs<RecordType>()) {\n // ...\n Diag(TypeRange.getBegin(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_unelaborated_friend_type : diag::ext_unelaborated_friend_type) << (unsigned)RD->getTagKind() << T << FixItHint::CreateInsertion(getLocForEndOfToken(FriendLoc), InsertionText);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class/class.friend/p2.cpp"]={"clang/test/CXX/class/class.friend/p2.cpp:13:10: warning: unelaborated friend declaration is a C++11 extension; specify \'struct\' to befriend \'B0\' [-Wc++11-extensions]"} | ["clang/test/CXX/class/class.friend/p2.cpp"]={"clang/test/CXX/class/class.friend/p2.cpp:13:10: warning: unelaborated friend declaration is a C++11 extension; specify \'struct\' to befriend \'B0\' [-Wc++11-extensions]"} | ||
| Line 3,397: | Line 3,398: | ||
}, | }, | ||
["ext_unicode_whitespace"]={ | ["ext_unicode_whitespace"]={ | ||
[ | [l]={"unicode-whitespace"}, | ||
[ | [k]="unicode-whitespace", | ||
[ | [i]="ext_unicode_whitespace", | ||
[b]="treating Unicode character as whitespace", | [b]="treating Unicode character as whitespace", | ||
[g]="treating Unicode character as whitespace", | [g]="treating Unicode character as whitespace", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wunicode\\-whitespace[^\\]]*\\]", | [f]=n, | ||
[ | [e]="treating Unicode character as whitespace", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunicode\\-whitespace[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={"7f43dddae066",1359060646,"Handle universal character names and Unicode characters outside of literals.","Handle universal character names and Unicode characters outside of literals.\n\nThis is a missing piece for C99 conformance.\n\nThis patch handles UCNs by adding a \'\\\\\' case to LexTokenInternal and\nLexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.\nIf the UCN is not syntactically well-formed, we fall back to the old\ntreatment: a backslash followed by an identifier beginning with \'u\' (or \'U\').\n\nBecause the spelling of an identifier with UCNs still has the UCN in it, we\nneed to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.\n\nOf course, valid code that does *not* use UCNs will see only a very minimal\nperformance hit (checks after each identifier for non-ASCII characters,\nchecks when converting raw_identifiers to identifiers that they do not\ncontain UCNs, and checks when getting the spelling of an identifier that it\ndoes not contain a UCN).\n\nThis patch also adds basic support for actual UTF-8 in the source. This is\ntreated almost exactly the same as UCNs except that we consider stray\nUnicode characters to be mistakes and offer a fixit to remove them.\n\nllvm-svn: 173369"}, | |||
[d]={{Kb,3537,"bool Lexer::CheckUnicodeWhitespace(Token &Result, uint32_t C, const char *CurPtr) {\n if (!isLexingRawMode() && !PP->isPreprocessedOutput() && isUnicodeWhitespace(C)) {\n Diag(BufferPtr, diag::ext_unicode_whitespace) << makeCharRange(*this, BufferPtr, CurPtr);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:9:11: warning: treating Unicode character as whitespace [-Wunicode-whitespace]","clang/test/Lexer/unicode.c:10:11: warning: treating Unicode character as whitespace [-Wunicode-whitespace]"} | ["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:9:11: warning: treating Unicode character as whitespace [-Wunicode-whitespace]","clang/test/Lexer/unicode.c:10:11: warning: treating Unicode character as whitespace [-Wunicode-whitespace]"} | ||
| Line 3,413: | Line 3,414: | ||
}, | }, | ||
["ext_union_member_of_reference_type"]={ | ["ext_union_member_of_reference_type"]={ | ||
[ | [l]={F,"microsoft-union-member-reference"}, | ||
[ | [k]="microsoft-union-member-reference", | ||
[ | [i]="ext_union_member_of_reference_type", | ||
[b]="union member %0 has reference type %1, which is a Microsoft extension", | [b]="union member %0 has reference type %1, which is a Microsoft extension", | ||
[ | [g]="union member A has reference type B, which is a Microsoft extension", | ||
[ | [f]=n, | ||
[ | [e]="union member (.*?) has reference type (.*?), which is a Microsoft extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-union\\-member\\-reference[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"ed0ae1d70bf8",1369930800,"Microsoft has a language extension which allows union members to be","Microsoft has a language extension which allows union members to be\nreferences. What\'s more, they use this language extension in their\nATL header files (which come as part of MFC and the Win32 SDK). This patch implements support for the Microsoft extension, and addresses PR13737.\n\nllvm-svn: 182936"}, | ||
[ | [d]={{w,18240,"/// Build a new FieldDecl and check its well-formedness.\n///\n/// This routine builds a new FieldDecl given the fields name, type,\n/// record, etc. \\p PrevDecl should refer to any previous declaration\n/// with the same name and in the same scope as the field to be\n/// created.\n///\n/// \\returns a new FieldDecl.\n///\n/// \\todo The Declarator argument is a hack. It will be removed once\nFieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D) {\n // ...\n if (!InvalidDecl && getLangOpts().CPlusPlus) {\n if (Record->isUnion()) {\n // ...\n // C++ [class.union]p1: If a union contains a member of reference type,\n // the program is ill-formed, except when compiling with MSVC extensions\n // enabled.\n if (EltTy->isReferenceType()) {\n Diag(NewFD->getLocation(), getLangOpts().MicrosoftExt ? diag::ext_union_member_of_reference_type : diag::err_union_member_of_reference_type) << NewFD->getDeclName() << EltTy;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/ms-union-member-ref.cpp"]={"clang/test/CodeGenCXX/ms-union-member-ref.cpp:4:9: warning: union member \'ref\' has reference type \'int *&\', which is a Microsoft extension [-Wmicrosoft-union-member-reference]"} | ["clang/test/CodeGenCXX/ms-union-member-ref.cpp"]={"clang/test/CodeGenCXX/ms-union-member-ref.cpp:4:9: warning: union member \'ref\' has reference type \'int *&\', which is a Microsoft extension [-Wmicrosoft-union-member-reference]"} | ||
| Line 3,429: | Line 3,430: | ||
}, | }, | ||
["ext_unknown_escape"]={ | ["ext_unknown_escape"]={ | ||
[ | [l]={"unknown-escape-sequence"}, | ||
[ | [k]="unknown-escape-sequence", | ||
[ | [i]="ext_unknown_escape", | ||
[b]="unknown escape sequence \'\\%0\'", | [b]="unknown escape sequence \'\\%0\'", | ||
[ | [g]="unknown escape sequence \'\\A\'", | ||
[ | [f]=n, | ||
[ | [e]="unknown escape sequence \'\\\\(.*?)\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunknown\\-escape\\-sequence[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{Yb,340,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n default:\n // ...\n if (isPrintable(ResultChar))\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_unknown_escape) << std::string(1, ResultChar);"},{Yb,344,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n default:\n // ...\n if (isPrintable(ResultChar))\n // ...\n else\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::ext_unknown_escape) << \"x\" + llvm::utohexstr(ResultChar);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Lexer/null-character-in-literal.c"]={"clang/test/Lexer/null-character-in-literal.c:7:11: warning: unknown escape sequence \'\\x0\' [-Wunknown-escape-sequence]","clang/test/Lexer/null-character-in-literal.c:11:16: warning: unknown escape sequence \'\\x0\' [-Wunknown-escape-sequence]"} | ["clang/test/Lexer/null-character-in-literal.c"]={"clang/test/Lexer/null-character-in-literal.c:7:11: warning: unknown escape sequence \'\\x0\' [-Wunknown-escape-sequence]","clang/test/Lexer/null-character-in-literal.c:11:16: warning: unknown escape sequence \'\\x0\' [-Wunknown-escape-sequence]"} | ||
| Line 3,445: | Line 3,446: | ||
}, | }, | ||
["ext_unqualified_base_class"]={ | ["ext_unqualified_base_class"]={ | ||
[ | [l]={F,hb}, | ||
[ | [k]=hb, | ||
[ | [i]={{nil,y,"ext_unqualified_base_class"}}, | ||
[b]={{nil, | [b]={{nil,y,"unqualified base initializer of class templates is a Microsoft extension"}}, | ||
[ | [g]={{nil,y,"unqualified base initializer of class templates is a Microsoft extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="unqualified base initializer of class templates is a Microsoft extension", | ||
[ | [c]=rc, | ||
[ | [a]={{nil,y,m}}, | ||
[ | [h]={fd,1620530452,Wc,dd}, | ||
[ | [d]={{Z,4461,"/// Handle a C++ member initializer.\nMemInitResult Sema::BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc) {\n // ...\n if (TemplateTypeTy) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype_auto) {\n // ...\n } else {\n // ...\n if (!TyD) {\n // ...\n if (getLangOpts().MSVCCompat && !getLangOpts().CPlusPlus20) {\n if (auto UnqualifiedBase = R.getAsSingle<ClassTemplateDecl>()) {\n // ...\n for (auto const &Base : ClassDecl->bases()) {\n // ...\n if (BaseTemplate && Context.hasSameTemplateName(BaseTemplate->getTemplateName(), TN)) {\n Diag(IdLoc, diag::ext_unqualified_base_class) << SourceRange(IdLoc, Init->getSourceRange().getEnd());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/ms-unqualified-base-class.cpp"]={"clang/test/SemaTemplate/ms-unqualified-base-class.cpp:17:15: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:31:27: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:43:25: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:52:22: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:91:13: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:98:13: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]"} | ["clang/test/SemaTemplate/ms-unqualified-base-class.cpp"]={"clang/test/SemaTemplate/ms-unqualified-base-class.cpp:17:15: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:31:27: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:43:25: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:52:22: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:91:13: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]","clang/test/SemaTemplate/ms-unqualified-base-class.cpp:98:13: warning: unqualified base initializer of class templates is a Microsoft extension [-Wmicrosoft-template]"} | ||
| Line 3,461: | Line 3,462: | ||
}, | }, | ||
["ext_unterminated_char_or_string"]={ | ["ext_unterminated_char_or_string"]={ | ||
[ | [l]={"invalid-pp-token"}, | ||
[ | [k]="invalid-pp-token", | ||
[ | [i]="ext_unterminated_char_or_string", | ||
[b]="missing terminating %select{\'|\'\"\'}0 character", | [b]="missing terminating %select{\'|\'\"\'}0 character", | ||
[ | [g]={{nil,nil,{"missing terminating ",{"\'","\'\"\'"}," character"}}}, | ||
[ | [f]=n, | ||
[ | [e]="missing terminating (?:\'|\'\"\') character", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winvalid\\-pp\\-token[^\\]]*\\]", | ||
[ | [a]=B, | ||
[ | [h]={"7f5ff2175f68",1447466995,"Use %select to merge similar diagnostics. NFC","Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119"}, | ||
[ | [d]={{Kb,2100,"/// LexStringLiteral - Lex the remainder of a string literal, after having lexed\n/// either \" or L\" or u8\" or u\" or U\".\nbool Lexer::LexStringLiteral(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n // ...\n while (C != \'\"\') {\n // ...\n if (C == \'\\n\' || C == \'\\r\' || // Newline.\n // ...\n if (!isLexingRawMode() && !LangOpts.AsmPreprocessor)\n Diag(BufferPtr, diag::ext_unterminated_char_or_string) << 1;"},{Kb,2325,"/// LexCharConstant - Lex the remainder of a character constant, after having\n/// lexed either \' or L\' or u8\' or u\' or U\'.\nbool Lexer::LexCharConstant(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n // ...\n while (C != \'\\\'\') {\n // ...\n if (C == \'\\n\' || C == \'\\r\' || // Newline.\n // ...\n if (!isLexingRawMode() && !LangOpts.AsmPreprocessor)\n Diag(BufferPtr, diag::ext_unterminated_char_or_string) << 0;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaHLSL/cb_error.hlsl"]={"clang/test/SemaHLSL/cb_error.hlsl:40:11: warning: missing terminating \' character [-Winvalid-pp-token]"} | ["clang/test/SemaHLSL/cb_error.hlsl"]={"clang/test/SemaHLSL/cb_error.hlsl:40:11: warning: missing terminating \' character [-Winvalid-pp-token]"} | ||
| Line 3,477: | Line 3,478: | ||
}, | }, | ||
["ext_use_out_of_scope_declaration"]={ | ["ext_use_out_of_scope_declaration"]={ | ||
[ | [l]={"out-of-scope-function"}, | ||
[ | [k]="out-of-scope-function", | ||
[ | [i]={{nil,E,"ext_use_out_of_scope_declaration"}}, | ||
[b]={{nil, | [b]={{nil,E,"use of out-of-scope declaration of %0%select{| whose type is not compatible with that of an implicit declaration}1"}}, | ||
[ | [g]={{nil,E,{"use of out-of-scope declaration of A",{o," whose type is not compatible with that of an implicit declaration"}}}}, | ||
[ | [f]=n, | ||
[ | [e]="use of out\\-of\\-scope declaration of (.*?)(?:| whose type is not compatible with that of an implicit declaration)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wout\\-of\\-scope\\-function[^\\]]*\\]", | ||
[ | [a]={{nil,E,m}}, | ||
[ | [h]={"9bfa970a4009",1507081762,"PR34822: Fix a collection of related bugs with our handling of C89 implicit function declarations.","PR34822: Fix a collection of related bugs with our handling of C89 implicit function declarations.\n\nWe were injecting the function into the wrong semantic context, resulting in it\nfailing to be registered as a global for redeclaration lookup. As a\nconsequence, we accepted invalid code since r310616.\n\nFixing that resulted in the \"out-of-scope declaration\" diagnostic firing a lot\nmore often. It turned out that warning codepath was non-conforming, because it\ndid not cause us to inject the implicitly-declared function into the enclosing\nblock scope. We now only warn if the type of the out-of-scope declaration\ndoesn\'t match the type of an implicitly-declared function; in all other cases,\nwe produce the normal warning for an implicitly-declared function.\n\nllvm-svn: 314871"}, | ||
[ | [d]={{w,16040,"/// ImplicitlyDefineFunction - An undeclared identifier was used in a function\n/// call, forming a call to an implicitly defined function (per C99 6.5.1p2).\nNamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II, Scope *S) {\n // ...\n if (ExternCPrev) {\n // ...\n // C89 footnote 38:\n // If in fact it is not defined as having type \"function returning int\",\n // the behavior is undefined.\n if (!isa<FunctionDecl>(ExternCPrev) || !Context.typesAreCompatible(cast<FunctionDecl>(ExternCPrev)->getType(), Context.getFunctionNoProtoType(Context.IntTy))) {\n Diag(Loc, diag::ext_use_out_of_scope_declaration) << ExternCPrev << !getLangOpts().C99;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/function-redecl.c"]={"clang/test/Sema/function-redecl.c:87:13: warning: use of out-of-scope declaration of \'outer6\' [-Wout-of-scope-function]"} | ["clang/test/Sema/function-redecl.c"]={"clang/test/Sema/function-redecl.c:87:13: warning: use of out-of-scope declaration of \'outer6\' [-Wout-of-scope-function]"} | ||
| Line 3,493: | Line 3,494: | ||
}, | }, | ||
["ext_using_attribute_ns"]={ | ["ext_using_attribute_ns"]={ | ||
[ | [l]={Y,Cb}, | ||
[ | [k]=Y, | ||
[ | [i]="ext_using_attribute_ns", | ||
[b]="default scope specifier for attributes is a C++1z extension", | [b]="default scope specifier for attributes is a C++1z extension", | ||
[ | [g]="default scope specifier for attributes is a C++1z extension", | ||
[ | [f]=n, | ||
[ | [e]="default scope specifier for attributes is a C\\+\\+17 extension", | ||
[ | [c]=zb, | ||
[ | [a]=G, | ||
[ | [h]={"b7d7a046d8e0",1466770512,"Using for attributes voted into C++17.","Using for attributes voted into C++17.\n\nllvm-svn: 273666"}, | ||
[ | [d]={{R,4540,"/// Parse a C++11 or C2x attribute-specifier.\n///\n/// [C++11] attribute-specifier:\n/// \'[\' \'[\' attribute-list \']\' \']\'\n/// alignment-specifier\n///\n/// [C++11] attribute-list:\n/// attribute[opt]\n/// attribute-list \',\' attribute[opt]\n/// attribute \'...\'\n/// attribute-list \',\' attribute \'...\'\n///\n/// [C++11] attribute:\n/// attribute-token attribute-argument-clause[opt]\n///\n/// [C++11] attribute-token:\n/// identifier\n/// attribute-scoped-token\n///\n/// [C++11] attribute-scoped-token:\n/// attribute-namespace \'::\' identifier\n///\n/// [C++11] attribute-namespace:\n/// identifier\nvoid Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, CachedTokens &OpenMPTokens, SourceLocation *EndLoc) {\n // ...\n if (Tok.is(tok::kw_using)) {\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx14_compat_using_attribute_ns : diag::ext_using_attribute_ns);"}} | ||
}, | }, | ||
["ext_using_decl_scoped_enumerator"]={ | ["ext_using_decl_scoped_enumerator"]={ | ||
[ | [l]={kb,hc}, | ||
[ | [k]=kb, | ||
[ | [i]={{nil,x,"ext_using_decl_scoped_enumerator"}}, | ||
[b]={{nil, | [b]={{nil,x,"using declaration naming a scoped enumerator is a C++20 extension"}}, | ||
[ | [g]={{nil,x,"using declaration naming a scoped enumerator is a C++20 extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="using declaration naming a scoped enumerator is a C\\+\\+20 extension", | ||
[ | [c]=cc, | ||
[ | [a]={{nil,x,m}}, | ||
[ | [h]={"3dbcea8b957a",1615397021,"Reland [clang] Check unsupported types in expressions","Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"}, | ||
[ | [d]={{Z,13032,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n if (NamedContext) {\n // ...\n if (auto *ED = dyn_cast<EnumDecl>(NamedContext)) {\n // C++14 [namespace.udecl]p7:\n // A using-declaration shall not name a scoped enumerator.\n // C++20 p1099 permits enumerators.\n if (EC && R && ED->isScoped())\n Diag(SS.getBeginLoc(), getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_using_decl_scoped_enumerator : diag::ext_using_decl_scoped_enumerator) << SS.getRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:18:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:43:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:88:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:114:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:141:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:129:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:135:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:129:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:135:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:170:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:203:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:225:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:231:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:239:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:252:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:259:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:18:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:43:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:88:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:114:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:141:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:129:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:135:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:129:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:135:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:170:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:203:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:225:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:231:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:239:9: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:252:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp:259:7: warning: using declaration naming a scoped enumerator is a C++20 extension [-Wc++20-extensions]"} | ||
| Line 3,522: | Line 3,523: | ||
}, | }, | ||
["ext_using_declaration_pack"]={ | ["ext_using_declaration_pack"]={ | ||
[ | [l]={Y,Cb}, | ||
[ | [k]=Y, | ||
[ | [i]="ext_using_declaration_pack", | ||
[b]="pack expansion of using declaration is a C++1z extension", | [b]="pack expansion of using declaration is a C++1z extension", | ||
[ | [g]="pack expansion of using declaration is a C++1z extension", | ||
[ | [f]=n, | ||
[ | [e]="pack expansion of using declaration is a C\\+\\+17 extension", | ||
[ | [c]=zb, | ||
[ | [a]=G, | ||
[ | [h]={"22a250cd5d8e",1482120533,"[c++1z] P0195R2: Support pack-expansion of using-declarations.","[c++1z] P0195R2: Support pack-expansion of using-declarations.\n\nThis change introduces UsingPackDecl as a marker for the set of UsingDecls\nproduced by pack expansion of a single (unresolved) using declaration. This is\nnot strictly necessary (we just need to be able to map from the original using\ndeclaration to its expansions somehow), but it\'s useful to maintain the\ninvariant that each declaration reference instantiates to refer to one\ndeclaration.\n\nllvm-svn: 290080"}, | ||
[ | [d]={{R,662,"/// Parse a using-declarator (or the identifier in a C++11 alias-declaration).\n///\n/// using-declarator:\n/// \'typename\'[opt] nested-name-specifier unqualified-id\n///\nbool Parser::ParseUsingDeclarator(DeclaratorContext Context, UsingDeclarator &D) {\n // ...\n if (TryConsumeToken(tok::ellipsis, D.EllipsisLoc))\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus17 ? diag::warn_cxx17_compat_using_declaration_pack : diag::ext_using_declaration_pack);"}} | ||
}, | }, | ||
["ext_using_enum_declaration"]={ | ["ext_using_enum_declaration"]={ | ||
[ | [l]={kb,hc}, | ||
[ | [k]=kb, | ||
[ | [i]={{nil,x,"ext_using_enum_declaration"}}, | ||
[b]={{nil, | [b]={{nil,x,"using enum declaration is a C++20 extension"}}, | ||
[ | [g]={{nil,x,"using enum declaration is a C++20 extension"}}, | ||
[ | [f]=n, | ||
[ | [e]="using enum declaration is a C\\+\\+20 extension", | ||
[ | [c]=cc, | ||
[ | [a]={{nil,x,G}}, | ||
[ | [h]={ad,1612659633,Zc,Yc}, | ||
[ | [d]={{R,702,"/// ParseUsingDeclaration - Parse C++ using-declaration or alias-declaration.\n/// Assumes that \'using\' was already seen.\n///\n/// using-declaration: [C++ 7.3.p3: namespace.udecl]\n/// \'using\' using-declarator-list[opt] ;\n///\n/// using-declarator-list: [C++1z]\n/// using-declarator \'...\'[opt]\n/// using-declarator-list \',\' using-declarator \'...\'[opt]\n///\n/// using-declarator-list: [C++98-14]\n/// using-declarator\n///\n/// alias-declaration: C++11 [dcl.dcl]p1\n/// \'using\' identifier attribute-specifier-seq[opt] = type-id ;\n///\n/// using-enum-declaration: [C++20, dcl.enum]\n/// \'using\' elaborated-enum-specifier ;\n/// The terminal name of the elaborated-enum-specifier undergoes\n/// ordinary lookup\n///\n/// elaborated-enum-specifier:\n/// \'enum\' nested-name-specifier[opt] identifier\nParser::DeclGroupPtrTy Parser::ParseUsingDeclaration(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &PrefixAttrs, AccessSpecifier AS) {\n // ...\n if (TryConsumeToken(tok::kw_enum, UELoc) && !InInitStatement) {\n // ...\n Diag(UELoc, getLangOpts().CPlusPlus20 ? diag::warn_cxx17_compat_using_enum_declaration : diag::ext_using_enum_declaration);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:19:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:23:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:27:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:37:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:44:9: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:60:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]"} | ["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:19:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:23:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:27:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:37:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:44:9: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]","clang/test/SemaCXX/cxx20-using-enum.cpp:60:7: warning: using enum declaration is a C++20 extension [-Wc++20-extensions]"} | ||
| Line 3,551: | Line 3,552: | ||
}, | }, | ||
["ext_using_undefined_std"]={ | ["ext_using_undefined_std"]={ | ||
[ | [i]="ext_using_undefined_std", | ||
[b]="using directive refers to implicitly-defined namespace \'std\'", | [b]="using directive refers to implicitly-defined namespace \'std\'", | ||
[ | [g]="using directive refers to implicitly-defined namespace \'std\'", | ||
[ | [f]=n, | ||
[ | [e]="using directive refers to implicitly\\-defined namespace \'std\'", | ||
[ | [c]=lc, | ||
[ | [a]=m, | ||
[ | [h]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace","Allow a using directive to refer to the implicitly-defined namespace\n\"std\", with a warning, to improve GCC compatibility. Fixes PR7517.\n\nAs a drive-by, add typo correction for using directives.\n\nllvm-svn: 107172"}, | ||
[ | [d]={{Z,11948,"Decl *Sema::ActOnUsingDirective(Scope *S, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList) {\n // ...\n if (R.empty()) {\n // ...\n // Allow \"using namespace std;\" or \"using namespace ::std;\" even if\n // \"std\" hasn\'t been defined yet, for GCC compatibility.\n if ((!Qualifier || Qualifier->getKind() == NestedNameSpecifier::Global) && NamespcName->isStr(\"std\")) {\n Diag(IdentLoc, diag::ext_using_undefined_std);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/using-directive.cpp"]={"clang/test/SemaCXX/using-directive.cpp:126:17: warning: using directive refers to implicitly-defined namespace \'std\'","clang/test/SemaCXX/using-directive.cpp:127:19: warning: using directive refers to implicitly-defined namespace \'std\'"} | ["clang/test/SemaCXX/using-directive.cpp"]={"clang/test/SemaCXX/using-directive.cpp:126:17: warning: using directive refers to implicitly-defined namespace \'std\'","clang/test/SemaCXX/using-directive.cpp:127:19: warning: using directive refers to implicitly-defined namespace \'std\'"} | ||
| Line 3,565: | Line 3,566: | ||
}, | }, | ||
["ext_variable_sized_type_in_struct"]={ | ["ext_variable_sized_type_in_struct"]={ | ||
[ | [l]={W,"gnu-variable-sized-type-not-at-end"}, | ||
[ | [k]="gnu-variable-sized-type-not-at-end", | ||
[ | [i]="ext_variable_sized_type_in_struct", | ||
[b]="field %0 with variable sized type %1 not at the end of a struct or class is a GNU extension", | [b]="field %0 with variable sized type %1 not at the end of a struct or class is a GNU extension", | ||
[ | [g]="field A with variable sized type B not at the end of a struct or class is a GNU extension", | ||
[ | [f]=n, | ||
[ | [e]="field (.*?) with variable sized type (.*?) not at the end of a struct or class is a GNU extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-variable\\-sized\\-type\\-not\\-at\\-end[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{w,18864,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n // ...\n } else if (!FDTy->isDependentType() && RequireCompleteSizedType(FD->getLocation(), FD->getType(), diag::err_field_incomplete_or_sizeless)) {\n // ...\n } else if (const RecordType *FDTTy = FDTy->getAs<RecordType>()) {\n if (Record && FDTTy->getDecl()->hasFlexibleArrayMember()) {\n // ...\n if (!Record->isUnion()) {\n // If this is a struct/class and this is not the last element, reject\n // it. Note that GCC supports variable sized arrays in the middle of\n // structures.\n if (!IsLastField)\n Diag(FD->getLocation(), diag::ext_variable_sized_type_in_struct) << FD->getDeclName() << FD->getType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/flexible-array-test.cpp"]={"clang/test/SemaCXX/flexible-array-test.cpp:18:3: warning: field \'\' with variable sized type \'Rec::(anonymous union at clang/test/SemaCXX/flexible-array-test.cpp:18:3)\' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]"} | ["clang/test/SemaCXX/flexible-array-test.cpp"]={"clang/test/SemaCXX/flexible-array-test.cpp:18:3: warning: field \'\' with variable sized type \'Rec::(anonymous union at clang/test/SemaCXX/flexible-array-test.cpp:18:3)\' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]"} | ||
| Line 3,581: | Line 3,582: | ||
}, | }, | ||
["ext_variable_template"]={ | ["ext_variable_template"]={ | ||
[ | [l]={"c++14-extensions","c++1y-extensions"}, | ||
[ | [k]="c++14-extensions", | ||
[ | [i]="ext_variable_template", | ||
[b]="variable templates are a C++14 extension", | [b]="variable templates are a C++14 extension", | ||
[ | [g]="variable templates are a C++14 extension", | ||
[ | [f]=n, | ||
[ | [e]="variable templates are a C\\+\\+14 extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+14\\-extensions[^\\]]*\\]", | ||
[ | [a]=m, | ||
[ | [h]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som...","Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...\n\nllvm-svn: 187762"}, | ||
[ | [d]={{w,7653,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else {\n // ...\n if (TemplateParams) {\n if (!TemplateParams->size() && D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {\n // ...\n } else {\n // ...\n if (D.getName().getKind() == UnqualifiedIdKind::IK_TemplateId) {\n // ...\n } else { // if (TemplateParams->size() > 0)\n // ...\n Diag(D.getIdentifierLoc(), getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_variable_template : diag::ext_variable_template);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:41:39: warning: variable templates are a C++14 extension [-Wc++14-extensions]","clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:42:39: warning: variable templates are a C++14 extension [-Wc++14-extensions]"} | ["clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:41:39: warning: variable templates are a C++14 extension [-Wc++14-extensions]","clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:42:39: warning: variable templates are a C++14 extension [-Wc++14-extensions]"} | ||
| Line 3,597: | Line 3,598: | ||
}, | }, | ||
["ext_variadic_macro"]={ | ["ext_variadic_macro"]={ | ||
[ | [l]={t,Mc}, | ||
[ | [k]=Mc, | ||
[ | [i]="ext_variadic_macro", | ||
[b]="variadic macros are a C99 feature", | [b]="variadic macros are a C99 feature", | ||
[g]="variadic macros are a C99 feature", | [g]="variadic macros are a C99 feature", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", | [f]=n, | ||
[ | [e]="variadic macros are a C99 feature", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wvariadic\\-macros[^\\]]*\\]", | ||
[ | [a]=B, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{bb,2680,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n case tok::ellipsis: // #define X(... -> C99 varargs\n if (!LangOpts.C99)\n Diag(Tok, LangOpts.CPlusPlus11 ? diag::warn_cxx98_compat_variadic_macro : diag::ext_variadic_macro);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:7:18: warning: variadic macros are a C99 feature [-Wvariadic-macros]","clang/test/Preprocessor/macro_fn.c:8:20: warning: variadic macros are a C99 feature [-Wvariadic-macros]","clang/test/Preprocessor/macro_fn.c:35:11: warning: variadic macros are a C99 feature [-Wvariadic-macros]","clang/test/Preprocessor/macro_fn.c:51:35: warning: variadic macros are a C99 feature [-Wvariadic-macros]"} | ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:7:18: warning: variadic macros are a C99 feature [-Wvariadic-macros]","clang/test/Preprocessor/macro_fn.c:8:20: warning: variadic macros are a C99 feature [-Wvariadic-macros]","clang/test/Preprocessor/macro_fn.c:35:11: warning: variadic macros are a C99 feature [-Wvariadic-macros]","clang/test/Preprocessor/macro_fn.c:51:35: warning: variadic macros are a C99 feature [-Wvariadic-macros]"} | ||
| Line 3,613: | Line 3,614: | ||
}, | }, | ||
["ext_variadic_main"]={ | ["ext_variadic_main"]={ | ||
[ | [l]={yc}, | ||
[ | [k]=yc, | ||
[ | [i]="ext_variadic_main", | ||
[b]="\'main\' is not allowed to be declared variadic", | [b]="\'main\' is not allowed to be declared variadic", | ||
[g]="\'main\' is not allowed to be declared variadic", | [g]="\'main\' is not allowed to be declared variadic", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", | [f]=n, | ||
[ | [e]="\'main\' is not allowed to be declared variadic", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"1710cc994ecd",1429805562,"Diagnose variadic main() as an extension; addresses PR17905.","Diagnose variadic main() as an extension; addresses PR17905.\n\nllvm-svn: 235605"}, | |||
[d]={{w,12162,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (FTP->isVariadic()) {\n Diag(FD->getLocation(), diag::ext_variadic_main);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:33:5: warning: \'main\' is not allowed to be declared variadic [-Wmain]"} | ["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:33:5: warning: \'main\' is not allowed to be declared variadic [-Wmain]"} | ||
| Line 3,629: | Line 3,630: | ||
}, | }, | ||
["ext_variadic_templates"]={ | ["ext_variadic_templates"]={ | ||
[ | [l]={gb,H}, | ||
[ | [k]=H, | ||
[ | [i]="ext_variadic_templates", | ||
[b]="variadic templates are a C++11 extension", | [b]="variadic templates are a C++11 extension", | ||
[ | [g]="variadic templates are a C++11 extension", | ||
[ | [f]=n, | ||
[ | [e]="variadic templates are a C\\+\\+11 extension", | ||
[ | [c]=lb, | ||
[ | [a]=G, | ||
[ | [h]={"b25d8c3af4a9",1295474355,"Downgrade the \"variadic templates are a C++0x feature\" error to an","Downgrade the \"variadic templates are a C++0x feature\" error to an\nExtWarn. We want variadic templates to be usable in libc++/libstdc++\nheaders even when we\'re in C++98/03 mode, since it\'s the only clean\nway to implement TR1 <functional>.\n\nllvm-svn: 123852"}, | ||
[ | [d]={{"clang/lib/Parse/ParseTemplate.cpp",828,"/// ParseTypeParameter - Parse a template type parameter (C++ [temp.param]).\n/// Other kinds of template parameters are parsed in\n/// ParseTemplateTemplateParameter and ParseNonTypeTemplateParameter.\n///\n/// type-parameter: [C++ temp.param]\n/// \'class\' ...[opt][C++0x] identifier[opt]\n/// \'class\' identifier[opt] \'=\' type-id\n/// \'typename\' ...[opt][C++0x] identifier[opt]\n/// \'typename\' identifier[opt] \'=\' type-id\nNamedDecl *Parser::ParseTypeParameter(unsigned Depth, unsigned Position) {\n // ...\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) {\n Diag(EllipsisLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_variadic_templates : diag::ext_variadic_templates);"},{"clang/lib/Parse/ParseTemplate.cpp",960,"/// ParseTemplateTemplateParameter - Handle the parsing of template\n/// template parameters.\n///\n/// type-parameter: [C++ temp.param]\n/// template-head type-parameter-key ...[opt] identifier[opt]\n/// template-head type-parameter-key identifier[opt] = id-expression\n/// type-parameter-key:\n/// \'class\'\n/// \'typename\' [C++1z]\n/// template-head: [C++2a]\n/// \'template\' \'<\' template-parameter-list \'>\'\n/// requires-clause[opt]\nNamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) {\n // ...\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc))\n Diag(EllipsisLoc, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_variadic_templates : diag::ext_variadic_templates);"},{Bb,5946,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n // If there was an ellipsis in the declarator, the declaration declares a\n // parameter pack whose type may be a pack expansion type.\n if (D.hasEllipsis()) {\n // ...\n case DeclaratorContext::TemplateParam:\n // C++0x [temp.param]p15:\n // If a template-parameter is a [...] is a parameter-declaration that\n // declares a parameter pack (8.3.5), then the template-parameter is a\n // template parameter pack (14.5.3).\n //\n // Note: core issue 778 clarifies that, if there are any unexpanded\n // parameter packs in the type of the non-type template parameter, then\n // it expands those parameter packs.\n if (T->containsUnexpandedParameterPack())\n // ...\n else\n S.Diag(D.getEllipsisLoc(), LangOpts.CPlusPlus11 ? diag::warn_cxx98_compat_variadic_templates : diag::ext_variadic_templates);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:5:21: warning: variadic templates are a C++11 extension [-Wc++11-extensions]"} | ["clang/test/Parser/cxx0x-in-cxx98.cpp"]={"clang/test/Parser/cxx0x-in-cxx98.cpp:5:21: warning: variadic templates are a C++11 extension [-Wc++11-extensions]"} | ||
| Line 3,645: | Line 3,646: | ||
}, | }, | ||
["ext_vla"]={ | ["ext_vla"]={ | ||
[ | [l]={W,t,"vla","vla-extension"}, | ||
[ | [k]="vla-extension", | ||
[ | [i]="ext_vla", | ||
[b]="variable length arrays are a C99 feature", | [b]="variable length arrays are a C99 feature", | ||
[g]="variable length arrays are a C99 feature", | [g]="variable length arrays are a C99 feature", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wvla\\-extension[^\\]]*\\]", | [f]=n, | ||
[ | [e]="variable length arrays are a C99 feature", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wvla\\-extension[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={L,1236199783,M,N}, | |||
[d]={{Bb,2592,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n } else if (getLangOpts().C99) {\n // ...\n } else if (isSFINAEContext()) {\n // ...\n } else if (getLangOpts().OpenMP && isInOpenMPTaskUntiedContext()) {\n // ...\n } else {\n VLADiag = diag::ext_vla;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-vla.cpp"]={"clang/test/SemaCXX/warn-vla.cpp:4:9: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:7:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:10:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:14:9: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:18:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:22:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:25:23: warning: variable length arrays are a C99 feature [-Wvla-extension]"} | ["clang/test/SemaCXX/warn-vla.cpp"]={"clang/test/SemaCXX/warn-vla.cpp:4:9: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:7:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:10:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:14:9: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:18:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:22:25: warning: variable length arrays are a C99 feature [-Wvla-extension]","clang/test/SemaCXX/warn-vla.cpp:25:23: warning: variable length arrays are a C99 feature [-Wvla-extension]"} | ||
| Line 3,661: | Line 3,662: | ||
}, | }, | ||
["ext_vla_folded_to_constant"]={ | ["ext_vla_folded_to_constant"]={ | ||
[ | [l]={W,"gnu-folding-constant"}, | ||
[ | [k]="gnu-folding-constant", | ||
[ | [i]="ext_vla_folded_to_constant", | ||
[b]="variable length array folded to constant array as an extension", | [b]="variable length array folded to constant array as an extension", | ||
[g]="variable length array folded to constant array as an extension", | [g]="variable length array folded to constant array as an extension", | ||
[f]=" \\[(?:\\-Werror,)?\\-Wgnu\\-folding\\-constant[^\\]]*\\]", | [f]=n, | ||
[ | [e]="variable length array folded to constant array as an extension", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgnu\\-folding\\-constant[^\\]]*\\]", | ||
[ | [a]=m, | ||
[h]={"f35de48c9058",1308033490,"when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant","when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant\nas constant size arrays. This has slightly different semantics in some insane cases, but allows\nus to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other\nmodes. This addressed rdar://8733881 - error \"variable-sized object may not be initialized\"; g++ accepts same code\n\nllvm-svn: 132983"}, | |||
[d]={{w,6602,"/// Attempt to fold a variable-sized type to a constant-sized type, returning\n/// true if we were successful.\nbool Sema::tryToFixVariablyModifiedVarType(TypeSourceInfo *&TInfo, QualType &T, SourceLocation Loc, unsigned FailedFoldDiagID) {\n // ...\n if (FixedTInfo) {\n Diag(Loc, diag::ext_vla_folded_to_constant);"},{w,6722,"void Sema::CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *NewTD) {\n // ...\n if (T->isVariablyModifiedType()) {\n // ...\n if (S->getFnParent() == nullptr) {\n // ...\n if (FixedTInfo) {\n Diag(NewTD->getLocation(), diag::ext_vla_folded_to_constant);"},{w,8725,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if ((isVM && NewVD->hasLinkage()) || (T->isVariableArrayType() && NewVD->hasGlobalStorage())) {\n // ...\n Diag(NewVD->getLocation(), diag::ext_vla_folded_to_constant);"},{Bb,2425,"/// Check whether the specified array bound can be evaluated using the relevant\n/// language rules. If so, returns the possibly-converted expression and sets\n/// SizeVal to the size. If not, but the expression might be a VLA bound,\n/// returns ExprResult(). Otherwise, produces a diagnostic and returns\n/// ExprError().\nstatic ExprResult checkArraySize(Sema &S, Expr *&ArraySize, llvm::APSInt &SizeVal, unsigned VLADiag, bool VLAIsError) {\n // ...\n // If the size is an ICE, it certainly isn\'t a VLA. If we\'re in a GNU mode\n // (like gnu99, but not c99) accept any evaluatable value as an extension.\n class VLADiagnoser : public Sema::VerifyICEDiagnoser {\n // ...\n Sema::SemaDiagnosticBuilder diagnoseFold(Sema &S, SourceLocation Loc) override { return S.Diag(Loc, diag::ext_vla_folded_to_constant); }"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/offsetof-64.c"]={"clang/test/Sema/offsetof-64.c:8:8: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]","clang/test/Sema/offsetof-64.c:9:8: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]"} | ["clang/test/Sema/offsetof-64.c"]={"clang/test/Sema/offsetof-64.c:8:8: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]","clang/test/Sema/offsetof-64.c:9:8: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]"} | ||
| Line 3,677: | Line 3,678: | ||
}, | }, | ||
["ext_warn_duplicate_declspec"]={ | ["ext_warn_duplicate_declspec"]={ | ||
[ | [l]={"duplicate-decl-specifier"}, | ||
[ | [k]="duplicate-decl-specifier", | ||
[ | [i]={{nil,D,"ext_warn_duplicate_declspec"}}, | ||
[b]={{nil, | [b]={{nil,D,"duplicate \'%0\' declaration specifier"}}, | ||
[ | [g]={{nil,D,"duplicate \'A\' declaration specifier"}}, | ||
[ | [f]=n, | ||
[ | [e]="duplicate \'(.*?)\' declaration specifier", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wduplicate\\-decl\\-specifier[^\\]]*\\]", | ||
[ | [a]={{nil,D,u}}, | ||
[ | [h]={"150ca5309e7c",1538608169,"[SEMA] split ExtWarn dupl-decl-spec\'s into Extension and ExtWarn","[SEMA] split ExtWarn dupl-decl-spec\'s into Extension and ExtWarn\n\nSummary:\nFor types deduced from typedef\'s and typeof\'s, don\'t warn for duplicate\ndeclaration specifiers in C90 unless -pedantic.\n\nCreate a third diagnostic type for duplicate declaration specifiers.\nPreviously, we had an ExtWarn and a Warning. This change adds a third,\nExtension, which only warns when -pedantic is set, staying silent\notherwise.\n\nFixes PR32985.\n\nReviewers: rsmith\n\nReviewed By: rsmith\n\nSubscribers: srhines, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D52849\n\nllvm-svn: 343740"}, | ||
[ | [d]={{xb,4488,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n // If the specifier wasn\'t legal, issue a diagnostic.\n if (isInvalid) {\n // ...\n if (DiagID == diag::ext_duplicate_declspec || DiagID == diag::ext_warn_duplicate_declspec || DiagID == diag::err_duplicate_declspec)"},{cd,482,"template <class T> static bool BadSpecifier(T TNew, T TPrev, const char *&PrevSpec, unsigned &DiagID, bool IsExtension = true) {\n // ...\n if (TNew != TPrev)\n // ...\n else\n DiagID = IsExtension ? diag::ext_warn_duplicate_declspec : diag::warn_duplicate_declspec;"},{cd,1046,"bool DeclSpec::setFunctionSpecExplicit(SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, ExplicitSpecifier ExplicitSpec, SourceLocation CloseParenLoc) {\n // \'explicit explicit\' is ok, but warn as this is likely not what the user\n // intended.\n if (hasExplicitSpecifier()) {\n DiagID = (ExplicitSpec.getExpr() || FS_explicit_specifier.getExpr()) ? diag::err_duplicate_declspec : diag::ext_warn_duplicate_declspec;"},{cd,1093,"bool DeclSpec::setModulePrivateSpec(SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID) {\n if (isModulePrivateSpecified()) {\n // ...\n DiagID = diag::ext_warn_duplicate_declspec;"}} | ||
}, | }, | ||
["ext_warn_gnu_final"]={ | ["ext_warn_gnu_final"]={ | ||
[ | [l]={"gcc-compat"}, | ||
[ | [k]="gcc-compat", | ||
[ | [i]="ext_warn_gnu_final", | ||
[b]="__final is a GNU extension, consider using C++11 final", | [b]="__final is a GNU extension, consider using C++11 final", | ||
[ | [g]="__final is a GNU extension, consider using C++11 final", | ||
[ | [f]=n, | ||
[ | [e]="__final is a GNU extension, consider using C\\+\\+11 final", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgcc\\-compat[^\\]]*\\]", | ||
[ | [a]={{nil,D,G},{jc,nil,u}}, | ||
[ | [h]={"276055bb2f4a",1469788968,"[GCC] Support for __final specifier","[GCC] Support for __final specifier\n\nAs reported in bug 28473, GCC supports \"final\" functionality in pre-C++11 code using the __final keyword. Clang currently supports the \"final\" keyword in accordance with the C++11 specification, however it ALSO supports it in pre-C++11 mode, with a warning.\n\nThis patch adds the \"__final\" keyword for compatibility with GCC in GCC Keywords mode (so it is enabled with existing flags), and issues a warning on its usage (suggesting switching to the C++11 keyword). This patch also adds a regression test for the functionality described. I believe this patch has minimal impact, as it simply adds a new keyword for existing behavior.\n\nThis has been validated with check-clang to avoid regressions. Patch is created in reference to revisions 276665.\n\nPatch by Erich Keane.\n\nDifferential Revision: https://reviews.llvm.org/D22919\n\nllvm-svn: 277134"}, | ||
[ | [d]={{R,2469,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Sealed) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_Abstract) {\n // ...\n } else if (Specifier == VirtSpecifiers::VS_GNU_Final) {\n Diag(Tok.getLocation(), diag::ext_warn_gnu_final);"},{R,3536,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Final)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Sealed)\n // ...\n else if (Specifier == VirtSpecifiers::VS_Abstract)\n // ...\n else if (Specifier == VirtSpecifiers::VS_GNU_Final)\n Diag(FinalLoc, diag::ext_warn_gnu_final);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/gcc-__final-compatibility.cpp"]={"clang/test/Parser/gcc-__final-compatibility.cpp:7:10: warning: __final is a GNU extension, consider using C++11 final [-Wgcc-compat]","clang/test/Parser/gcc-__final-compatibility.cpp:8:20: warning: __final is a GNU extension, consider using C++11 final [-Wgcc-compat]"} | ["clang/test/Parser/gcc-__final-compatibility.cpp"]={"clang/test/Parser/gcc-__final-compatibility.cpp:7:10: warning: __final is a GNU extension, consider using C++11 final [-Wgcc-compat]","clang/test/Parser/gcc-__final-compatibility.cpp:8:20: warning: __final is a GNU extension, consider using C++11 final [-Wgcc-compat]"} | ||
| Line 3,706: | Line 3,707: | ||
}, | }, | ||
["ext_wchar_t_sign_spec"]={ | ["ext_wchar_t_sign_spec"]={ | ||
[ | [l]={"signed-unsigned-wchar"}, | ||
[ | [k]="signed-unsigned-wchar", | ||
[ | [i]={{nil,p,"ext_wchar_t_sign_spec"}}, | ||
[b]={{nil,p,"\'%0\' cannot be signed or unsigned"}}, | [b]={{nil,p,"\'%0\' cannot be signed or unsigned"}}, | ||
[ | [g]={{nil,p,"\'A\' cannot be signed or unsigned"}}, | ||
[ | [f]=Q, | ||
[ | [e]="\'(.*?)\' cannot be signed or unsigned", | ||
[ | [c]=" \\[[^\\]]*\\-Wsigned\\-unsigned\\-wchar[^\\]]*\\]", | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={"e8b659fc1ff0",1564430446,"Give the \'signed/unsigned wchar_t\' extension a warning flag, and follow","Give the \'signed/unsigned wchar_t\' extension a warning flag, and follow\nGCC 9 in promoting it to an error by default.\n\nllvm-svn: 367255"}, | ||
[ | [d]={{Bb,1307,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n // ...\n case DeclSpec::TST_wchar:\n if (DS.getTypeSpecSign() == TypeSpecifierSign::Unspecified)\n // ...\n else if (DS.getTypeSpecSign() == TypeSpecifierSign::Signed) {\n S.Diag(DS.getTypeSpecSignLoc(), diag::ext_wchar_t_sign_spec) << DS.getSpecifierName(DS.getTypeSpecType(), Context.getPrintingPolicy());"},{Bb,1314,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n // ...\n case DeclSpec::TST_wchar:\n if (DS.getTypeSpecSign() == TypeSpecifierSign::Unspecified)\n // ...\n else if (DS.getTypeSpecSign() == TypeSpecifierSign::Signed) {\n // ...\n } else {\n // ...\n S.Diag(DS.getTypeSpecSignLoc(), diag::ext_wchar_t_sign_spec) << DS.getSpecifierName(DS.getTypeSpecType(), Context.getPrintingPolicy());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/wchar_t.cpp"]={"clang/test/SemaCXX/wchar_t.cpp:8:3: error: \'wchar_t\' cannot be signed or unsigned [-Wsigned-unsigned-wchar]","clang/test/SemaCXX/wchar_t.cpp:9:3: error: \'wchar_t\' cannot be signed or unsigned [-Wsigned-unsigned-wchar]"} | ["clang/test/SemaCXX/wchar_t.cpp"]={"clang/test/SemaCXX/wchar_t.cpp:8:3: error: \'wchar_t\' cannot be signed or unsigned [-Wsigned-unsigned-wchar]","clang/test/SemaCXX/wchar_t.cpp:9:3: error: \'wchar_t\' cannot be signed or unsigned [-Wsigned-unsigned-wchar]"} | ||
| Line 3,722: | Line 3,723: | ||
}, | }, | ||
["fatal_too_many_errors"]={ | ["fatal_too_many_errors"]={ | ||
[ | [i]="fatal_too_many_errors", | ||
[b]="too many errors emitted, stopping now [-ferror-limit=]", | [b]="too many errors emitted, stopping now [-ferror-limit=]", | ||
[ | [g]="too many errors emitted, stopping now [-ferror-limit=]", | ||
[ | [f]="fatal error\\: ", | ||
[ | [e]="too many errors emitted, stopping now \\[\\-ferror\\-limit\\=\\]", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"75a0393eb580",1270671718,"add capabilities to stop emitting errors after some limit.","add capabilities to stop emitting errors after some limit.\nRight now the limit is 0 (aka disabled)\n\nllvm-svn: 100684"}, | ||
[ | [d]={{"clang/lib/Basic/DiagnosticIDs.cpp",563,"/// Based on the way the client configured the Diagnostic\n/// object, classify the specified diagnostic ID into a Level, consumable by\n/// the DiagnosticClient.\n///\n/// \\param Loc The source location we are interested in finding out the\n/// diagnostic state. Can be null in order to query the latest state.\ndiag::Severity DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, const DiagnosticsEngine &Diag) const {\n // ...\n if (Result == diag::Severity::Fatal && Diag.CurDiagID != diag::fatal_too_many_errors && Diag.FatalsAsError)"},{"clang/lib/Basic/DiagnosticIDs.cpp",806,"/// ProcessDiag - This is the method used to report a diagnostic that is\n/// finally fully formed.\nbool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const {\n // ...\n if (DiagLevel >= DiagnosticIDs::Error) {\n // ...\n // If we\'ve emitted a lot of errors, emit a fatal error instead of it to\n // stop a flood of bogus errors.\n if (Diag.ErrorLimit && Diag.NumErrors > Diag.ErrorLimit && DiagLevel == DiagnosticIDs::Error) {\n Diag.SetDelayedDiagnostic(diag::fatal_too_many_errors);"},{"clang/lib/Basic/DiagnosticIDs.cpp",813,"/// ProcessDiag - This is the method used to report a diagnostic that is\n/// finally fully formed.\nbool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const {\n // ...\n if (Diag.CurDiagID == diag::fatal_too_many_errors)"},{"clang/lib/Frontend/TextDiagnosticPrinter.cpp",59,"/// Print any diagnostic option information to a raw_ostream.\n///\n/// This implements all of the logic for adding diagnostic options to a message\n/// (via OS). Each relevant option is comma separated and all are enclosed in\n/// the standard bracketing: \" [...]\".\nstatic void printDiagnosticOptions(raw_ostream &OS, DiagnosticsEngine::Level Level, const Diagnostic &Info, const DiagnosticOptions &DiagOpts) {\n // ...\n if (DiagOpts.ShowOptionNames) {\n // ...\n if (Info.getID() == diag::fatal_too_many_errors) {"},{"clang/tools/libclang/CXStoredDiagnostic.cpp",62,"CXString CXStoredDiagnostic::getDiagnosticOption(CXString *Disable) const {\n // ...\n if (ID == diag::fatal_too_many_errors) {"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/concept-fatal-error.cpp"]={"fatal error: too many errors emitted, stopping now [-ferror-limit=]"} | ["clang/test/SemaCXX/concept-fatal-error.cpp"]={"fatal error: too many errors emitted, stopping now [-ferror-limit=]"} | ||
| Line 3,736: | Line 3,737: | ||
}, | }, | ||
["note_access_constrained_by_path"]={ | ["note_access_constrained_by_path"]={ | ||
[ | [i]="note_access_constrained_by_path", | ||
[b]="constrained by %select{|implicitly }1%select{private|protected}0 inheritance here", | [b]="constrained by %select{|implicitly }1%select{private|protected}0 inheritance here", | ||
[ | [g]={{nil,nil,{"constrained by ",{o,"implicitly "},{"private","protected"}," inheritance here"}}}, | ||
[ | [f]=q, | ||
[ | [e]="constrained by (?:|implicitly )(?:private|protected) inheritance here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"553c0796eedc",1264207592,"Implement elementary access control.","Implement elementary access control.\n\nllvm-svn: 94268"}, | ||
[ | [d]={{Wb,1266,"/// Diagnose the path which caused the given declaration or base class\n/// to become inaccessible.\nstatic void DiagnoseAccessPath(Sema &S, const EffectiveContext &EC, AccessTarget &entity) {\n // ...\n if (entity.isMemberAccess() || constrainingBase + 1 != path.end()) {\n diagnostic = diag::note_access_constrained_by_path;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/microsoft-super.cpp"]={"clang/test/SemaCXX/microsoft-super.cpp:23:14: note: constrained by private inheritance here"} | ["clang/test/SemaCXX/microsoft-super.cpp"]={"clang/test/SemaCXX/microsoft-super.cpp:23:14: note: constrained by private inheritance here"} | ||
| Line 3,750: | Line 3,751: | ||
}, | }, | ||
["note_access_natural"]={ | ["note_access_natural"]={ | ||
[ | [i]="note_access_natural", | ||
[b]="%select{|implicitly }1declared %select{private|protected}0 here", | [b]="%select{|implicitly }1declared %select{private|protected}0 here", | ||
[ | [g]={{nil,nil,{{o,"implicitly "},"declared ",{"private","protected"}," here"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:|implicitly )declared (?:private|protected) here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"553c0796eedc",1264207592,"Implement elementary access control.","Implement elementary access control.\n\nllvm-svn: 94268"}, | ||
[ | [d]={{Wb,1167,"/// We are unable to access a given declaration due to its direct\n/// access control; diagnose that.\nstatic void diagnoseBadDirectAccess(Sema &S, const EffectiveContext &EC, AccessTarget &entity) {\n // ...\n S.Diag(D->getLocation(), diag::note_access_natural) << (unsigned)(D->getAccess() == AS_protected) << isImplicit;"},{Wb,1268,"/// Diagnose the path which caused the given declaration or base class\n/// to become inaccessible.\nstatic void DiagnoseAccessPath(Sema &S, const EffectiveContext &EC, AccessTarget &entity) {\n // ...\n if (entity.isMemberAccess() || constrainingBase + 1 != path.end()) {\n // ...\n } else {\n diagnostic = diag::note_access_natural;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/access-control-check.cpp"]={"clang/test/SemaCXX/access-control-check.cpp:8:7: note: implicitly declared private here","clang/test/SemaCXX/access-control-check.cpp:9:7: note: implicitly declared private here"} | ["clang/test/SemaCXX/access-control-check.cpp"]={"clang/test/SemaCXX/access-control-check.cpp:8:7: note: implicitly declared private here","clang/test/SemaCXX/access-control-check.cpp:9:7: note: implicitly declared private here"} | ||
| Line 3,764: | Line 3,765: | ||
}, | }, | ||
["note_access_protected_restricted_ctordtor"]={ | ["note_access_protected_restricted_ctordtor"]={ | ||
[ | [i]="note_access_protected_restricted_ctordtor", | ||
[b]="protected %select{constructor|destructor}0 can only be used to %select{construct|destroy}0 a base class subobject", | [b]="protected %select{constructor|destructor}0 can only be used to %select{construct|destroy}0 a base class subobject", | ||
[ | [g]={{nil,nil,{"protected ",{"constructor","destructor"}," can only be used to ",{"construct","destroy"}," a base class subobject"}}}, | ||
[ | [f]=q, | ||
[ | [e]="protected (?:constructor|destructor) can only be used to (?:construct|destroy) a base class subobject", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, | ||
[ | [d]={{Wb,1102,"/// Given that an entity has protected natural access, check whether\n/// access might be denied because of the protected member access\n/// restriction.\n///\n/// \\return true if a note was emitted\nstatic bool TryDiagnoseProtectedAccess(Sema &S, const EffectiveContext &EC, AccessTarget &Target) {\n // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\n // Use a special diagnostic for constructors and destructors.\n if (isa<CXXConstructorDecl>(D) || isa<CXXDestructorDecl>(D) || (isa<FunctionTemplateDecl>(D) && isa<CXXConstructorDecl>(cast<FunctionTemplateDecl>(D)->getTemplatedDecl()))) {\n return S.Diag(D->getLocation(), diag::note_access_protected_restricted_ctordtor) << isa<CXXDestructorDecl>(D->getAsFunction());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class.access/class.protected/p1.cpp"]={"clang/test/CXX/class.access/class.protected/p1.cpp:463:5: note: protected constructor can only be used to construct a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:465:5: note: protected destructor can only be used to destroy a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:463:5: note: protected constructor can only be used to construct a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:465:5: note: protected destructor can only be used to destroy a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:464:5: note: protected constructor can only be used to construct a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:465:5: note: protected destructor can only be used to destroy a base class subobject"} | ["clang/test/CXX/class.access/class.protected/p1.cpp"]={"clang/test/CXX/class.access/class.protected/p1.cpp:463:5: note: protected constructor can only be used to construct a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:465:5: note: protected destructor can only be used to destroy a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:463:5: note: protected constructor can only be used to construct a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:465:5: note: protected destructor can only be used to destroy a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:464:5: note: protected constructor can only be used to construct a base class subobject","clang/test/CXX/class.access/class.protected/p1.cpp:465:5: note: protected destructor can only be used to destroy a base class subobject"} | ||
| Line 3,778: | Line 3,779: | ||
}, | }, | ||
["note_access_protected_restricted_noobject"]={ | ["note_access_protected_restricted_noobject"]={ | ||
[ | [i]="note_access_protected_restricted_noobject", | ||
[b]="must name member using the type of the current context %0", | [b]="must name member using the type of the current context %0", | ||
[ | [g]="must name member using the type of the current context A", | ||
[ | [f]=q, | ||
[ | [e]="must name member using the type of the current context (.*?)", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, | ||
[ | [d]={{Wb,1079,"/// Given that an entity has protected natural access, check whether\n/// access might be denied because of the protected member access\n/// restriction.\n///\n/// \\return true if a note was emitted\nstatic bool TryDiagnoseProtectedAccess(Sema &S, const EffectiveContext &EC, AccessTarget &Target) {\n // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\n // If we don\'t have an instance context, [class.protected] says the\n // naming class has to equal the context class.\n if (!Target.hasInstanceContext()) {\n // ...\n S.Diag(D->getLocation(), diag::note_access_protected_restricted_noobject) << S.Context.getTypeDeclType(ECRecord);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class.access/class.protected/p1.cpp"]={"clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::C\'","clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::D\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::C\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::D\'","clang/test/CXX/class.access/class.protected/p1.cpp:434:29: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:436:10: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:438:29: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:441:10: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:445:10: note: must name member using the type of the current context \'test14::B\'"} | ["clang/test/CXX/class.access/class.protected/p1.cpp"]={"clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::C\'","clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::D\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::C\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::D\'","clang/test/CXX/class.access/class.protected/p1.cpp:434:29: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:436:10: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:438:29: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:441:10: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:445:10: note: must name member using the type of the current context \'test14::B\'"} | ||
| Line 3,792: | Line 3,793: | ||
}, | }, | ||
["note_access_protected_restricted_object"]={ | ["note_access_protected_restricted_object"]={ | ||
[ | [i]="note_access_protected_restricted_object", | ||
[b]="can only access this member on an object of type %0", | [b]="can only access this member on an object of type %0", | ||
[ | [g]="can only access this member on an object of type A", | ||
[ | [f]=q, | ||
[ | [e]="can only access this member on an object of type (.*?)", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, | ||
[ | [d]={{Wb,1108,"/// Given that an entity has protected natural access, check whether\n/// access might be denied because of the protected member access\n/// restriction.\n///\n/// \\return true if a note was emitted\nstatic bool TryDiagnoseProtectedAccess(Sema &S, const EffectiveContext &EC, AccessTarget &Target) {\n // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\n return S.Diag(D->getLocation(), diag::note_access_protected_restricted_object) << S.Context.getTypeDeclType(ECRecord);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp"]={"clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp:223:9: note: can only access this member on an object of type \'p0969r0::D\'"} | ["clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp"]={"clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp:223:9: note: can only access this member on an object of type \'p0969r0::D\'"} | ||
| Line 3,806: | Line 3,807: | ||
}, | }, | ||
["note_add_deprecation_attr"]={ | ["note_add_deprecation_attr"]={ | ||
[ | [i]="note_add_deprecation_attr", | ||
[b]="add a deprecation attribute to the declaration to silence this warning", | [b]="add a deprecation attribute to the declaration to silence this warning", | ||
[g]="add a deprecation attribute to the declaration to silence this warning", | [g]="add a deprecation attribute to the declaration to silence this warning", | ||
[f]= | [f]=q, | ||
[e]="Documentation Issue", | [e]="add a deprecation attribute to the declaration to silence this warning", | ||
[ | [c]=o, | ||
[ | [a]="Documentation Issue", | ||
[h]={"1da888691587",1348350470,"Comment sema: warn when comment has \\deprecated but declaration does not have a","Comment sema: warn when comment has \\deprecated but declaration does not have a\ndeprecation attribute (\'deprecated\', \'availability\' or \'unavailable\').\n\nThis warning is under a separate flag, -Wdocumentation-deprecated-sync, so it\ncan be turned off easily while leaving other -Wdocumentation warnings on.\n\nllvm-svn: 164467"}, | |||
[d]={{"clang/lib/AST/CommentSema.cpp",700,"void Sema::checkDeprecatedCommand(const BlockCommandComment *Command) {\n // ...\n // Try to emit a fixit with a deprecation attribute.\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n Diag(Loc, diag::note_add_deprecation_attr) << FixItHint::CreateInsertion(Loc, TextToInsert);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-documentation-fixits.c"]={"clang/test/Sema/warn-documentation-fixits.c:7:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:11:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:17:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:24:1: note: add a deprecation attribute to the declaration to silence this warning"} | ["clang/test/Sema/warn-documentation-fixits.c"]={"clang/test/Sema/warn-documentation-fixits.c:7:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:11:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:17:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:24:1: note: add a deprecation attribute to the declaration to silence this warning"} | ||
| Line 3,820: | Line 3,821: | ||
}, | }, | ||
["note_add_synthesize_directive"]={ | ["note_add_synthesize_directive"]={ | ||
[ | [i]={{nil,ab,"note_add_synthesize_directive"}}, | ||
[b]={{nil, | [b]={{nil,ab,"add a \'@synthesize\' directive"}}, | ||
[ | [g]={{nil,ab,"add a \'@synthesize\' directive"}}, | ||
[ | [f]=q, | ||
[ | [e]="add a \'@synthesize\' directive", | ||
[ | [c]=o, | ||
[ | [a]={{nil,ab,m}}, | ||
[ | [h]={"6c9af50cc815",1499076744,"Add a fixit for -Wobjc-protocol-property-synthesis","Add a fixit for -Wobjc-protocol-property-synthesis\n\nrdar://32132756\n\nDifferential Revision: https://reviews.llvm.org/D34886\n\nllvm-svn: 307014"}, | ||
[ | [d]={{oc,1940,"/// Default synthesizes all properties which must be synthesized\n/// in class\'s \\@implementation.\nvoid Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd) {\n // ...\n for (const auto &PropEntry : PropMap) {\n // ...\n if (ObjCProtocolDecl *Proto = dyn_cast<ObjCProtocolDecl>(Prop->getDeclContext())) {\n // We won\'t auto-synthesize properties declared in protocols.\n // Suppress the warning if class\'s superclass implements property\'s\n // getter and implements property\'s setter (if readwrite property).\n // Or, if property is going to be implemented in its super class.\n if (!SuperClassImplementsProperty(IDecl, Prop) && !PropInSuperClass) {\n // ...\n Diag(AtEnd, diag::note_add_synthesize_directive) << FixItHint::CreateInsertion(AtEnd, FixIt);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:140:1: note: add a \'@synthesize\' directive"} | ["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:140:1: note: add a \'@synthesize\' directive"} | ||
| Line 3,834: | Line 3,835: | ||
}, | }, | ||
["note_additional_parens_for_variable_declaration"]={ | ["note_additional_parens_for_variable_declaration"]={ | ||
[ | [i]="note_additional_parens_for_variable_declaration", | ||
[b]="add a pair of parentheses to declare a variable", | [b]="add a pair of parentheses to declare a variable", | ||
[g]="add a pair of parentheses to declare a variable", | [g]="add a pair of parentheses to declare a variable", | ||
[f]= | [f]=q, | ||
[e]= | [e]="add a pair of parentheses to declare a variable", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"943c44045551",1343683852,"Improvements to vexing-parse warnings. Make the no-parameters case more","Improvements to vexing-parse warnings. Make the no-parameters case more\naccurate by asking the parser whether there was an ambiguity rather than trying\nto reverse-engineer it from the DeclSpec. Make the with-parameters case have\nbetter diagnostics by using semantic information to drive the warning,\nimproving the diagnostics and adding a fixit.\n\nPatch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for\ndeclarations of the form \'T (*x)(...)\', which seem to have a very high false\npositive rate, and to reduce indentation in \'warnAboutAmbiguousFunction\'.\n\nllvm-svn: 160998"}, | |||
[d]={{Bb,3893,"/// Produce an appropriate diagnostic for an ambiguity between a function\n/// declarator and a C++ direct-initializer.\nstatic void warnAboutAmbiguousFunction(Sema &S, Declarator &D, DeclaratorChunk &DeclType, QualType RT) {\n // ...\n if (FTI.NumParams > 0) {\n // ...\n S.Diag(B, diag::note_additional_parens_for_variable_declaration) << FixItHint::CreateInsertion(B, \"(\") << FixItHint::CreateInsertion(E, \")\");"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:16:7: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:18:8: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:73:9: note: add a pair of parentheses to declare a variable"} | ["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:16:7: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:18:8: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:73:9: note: add a pair of parentheses to declare a variable"} | ||
| Line 3,848: | Line 3,849: | ||
}, | }, | ||
["note_addrof_ovl_candidate_disabled_by_enable_if_attr"]={ | ["note_addrof_ovl_candidate_disabled_by_enable_if_attr"]={ | ||
[ | [i]="note_addrof_ovl_candidate_disabled_by_enable_if_attr", | ||
[b]="candidate function made ineligible by enable_if", | [b]="candidate function made ineligible by enable_if", | ||
[g]="candidate function made ineligible by enable_if", | [g]="candidate function made ineligible by enable_if", | ||
[f]= | [f]=q, | ||
[e]= | [e]="candidate function made ineligible by enable_if", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang.","Add the `pass_object_size` attribute to clang.\n\n`pass_object_size` is our way of enabling `__builtin_object_size` to\nproduce high quality results without requiring inlining to happen\neverywhere.\n\nA link to the design doc for this attribute is available at the\nDifferential review link below.\n\nDifferential Revision: http://reviews.llvm.org/D13263\n\nllvm-svn: 254554"}, | |||
[d]={{pc,10561,"/// Returns true if we can take the address of the function.\n///\n/// \\param Complain - If true, we\'ll emit a diagnostic\n/// \\param InOverloadResolution - For the purposes of emitting a diagnostic, are\n/// we in overload resolution?\n/// \\param Loc - The location of the statement we\'re complaining about. Ignored\n/// if we\'re not complaining, or if we\'re in overload resolution.\nstatic bool checkAddressOfFunctionIsAvailable(Sema &S, const FunctionDecl *FD, bool Complain, bool InOverloadResolution, SourceLocation Loc) {\n if (!isFunctionAlwaysEnabled(S.Context, FD)) {\n if (Complain) {\n if (InOverloadResolution)\n S.Diag(FD->getBeginLoc(), diag::note_addrof_ovl_candidate_disabled_by_enable_if_attr);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/overloadable.c"]={"clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if"} | ["clang/test/Sema/overloadable.c"]={"clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if"} | ||
| Line 3,862: | Line 3,863: | ||
}, | }, | ||
["note_alias_mangled_name_alternative"]={ | ["note_alias_mangled_name_alternative"]={ | ||
[ | [i]="note_alias_mangled_name_alternative", | ||
[b]="function by that name is mangled as \"%0\"", | [b]="function by that name is mangled as \"%0\"", | ||
[ | [g]="function by that name is mangled as \"A\"", | ||
[ | [f]=q, | ||
[ | [e]="function by that name is mangled as \"(.*?)\"", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"ba6e747f9b05",1670524276,"[clang] Set ShowInSystemHeader for module-build and module-import remarks","[clang] Set ShowInSystemHeader for module-build and module-import remarks\n\nWithout this change, the use of `-Rmodule-build` and `-Rmodule-import` only\nproduces diagnostics for modules built or imported by non-system code.\n\nFor example, if a project source file requires the Foundation module to be\nbuilt, then `-Rmodule-build` will show a single diagnostic for Foundation, but\nnot in turn for any of Foundation\'s (direct or indirect) dependencies. This is\nbecause the locations of those transitive module builds are initiated from\nsystem headers, which are ignored by default. When wanting to observe module\nbuilding/importing, the system modules can represent a significant amount of\nmodule diagnostics, and I think should be shown by default when\n`-Rmodule-build` and `-Rmodule-import` are specified.\n\nI noticed some other remarks use `ShowInSystemHeader`.\n\nDifferential Revision: https://reviews.llvm.org/D139653"}, | ||
[ | [d]={{"clang/lib/CodeGen/CodeGenModule.cpp",586,"static bool checkAliasedGlobal(DiagnosticsEngine &Diags, SourceLocation Location, bool IsIFunc, const llvm::GlobalValue *Alias, const llvm::GlobalValue *&GV, const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames, SourceRange AliasRange) {\n // ...\n if (GV->isDeclaration()) {\n // ...\n // Provide a note if the given function is not found and exists as a\n // mangled name.\n for (const auto &[Decl, Name] : MangledDeclNames) {\n if (const auto *ND = dyn_cast<NamedDecl>(Decl.getDecl())) {\n if (ND->getName() == GV->getName()) {\n Diags.Report(Location, diag::note_alias_mangled_name_alternative) << Name << FixItHint::CreateReplacement(AliasRange, (Twine(IsIFunc ? \"ifunc\" : \"alias\") + \"(\\\"\" + Name + \"\\\")\").str());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGen/attr-ifunc.cpp"]={"clang/test/CodeGen/attr-ifunc.cpp:5:30: note: function by that name is mangled as \"_Z8f1_ifuncv\"","clang/test/CodeGen/attr-ifunc.cpp:12:40: note: function by that name is mangled as \"_Z20f6_resolver_resolverv\"","clang/test/CodeGen/attr-ifunc.cpp:17:30: note: function by that name is mangled as \"_Z11f6_resolverv\""} | ["clang/test/CodeGen/attr-ifunc.cpp"]={"clang/test/CodeGen/attr-ifunc.cpp:5:30: note: function by that name is mangled as \"_Z8f1_ifuncv\"","clang/test/CodeGen/attr-ifunc.cpp:12:40: note: function by that name is mangled as \"_Z20f6_resolver_resolverv\"","clang/test/CodeGen/attr-ifunc.cpp:17:30: note: function by that name is mangled as \"_Z11f6_resolverv\""} | ||
| Line 3,876: | Line 3,877: | ||
}, | }, | ||
["note_alias_requires_mangled_name"]={ | ["note_alias_requires_mangled_name"]={ | ||
[ | [i]="note_alias_requires_mangled_name", | ||
[b]="the %select{function or variable|function}0 specified in an %select{alias|ifunc}1 must refer to its mangled name", | [b]="the %select{function or variable|function}0 specified in an %select{alias|ifunc}1 must refer to its mangled name", | ||
[ | [g]={{nil,nil,{"the ",{"function or variable",bc}," specified in an ",{"alias","ifunc"}," must refer to its mangled name"}}}, | ||
[ | [f]=q, | ||
[ | [e]="the (?:function or variable|function) specified in an (?:alias|ifunc) must refer to its mangled name", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"ba6e747f9b05",1670524276,"[clang] Set ShowInSystemHeader for module-build and module-import remarks","[clang] Set ShowInSystemHeader for module-build and module-import remarks\n\nWithout this change, the use of `-Rmodule-build` and `-Rmodule-import` only\nproduces diagnostics for modules built or imported by non-system code.\n\nFor example, if a project source file requires the Foundation module to be\nbuilt, then `-Rmodule-build` will show a single diagnostic for Foundation, but\nnot in turn for any of Foundation\'s (direct or indirect) dependencies. This is\nbecause the locations of those transitive module builds are initiated from\nsystem headers, which are ignored by default. When wanting to observe module\nbuilding/importing, the system modules can represent a significant amount of\nmodule diagnostics, and I think should be shown by default when\n`-Rmodule-build` and `-Rmodule-import` are specified.\n\nI noticed some other remarks use `ShowInSystemHeader`.\n\nDifferential Revision: https://reviews.llvm.org/D139653"}, | ||
[ | [d]={{"clang/lib/CodeGen/CodeGenModule.cpp",579,"static bool checkAliasedGlobal(DiagnosticsEngine &Diags, SourceLocation Location, bool IsIFunc, const llvm::GlobalValue *Alias, const llvm::GlobalValue *&GV, const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames, SourceRange AliasRange) {\n // ...\n if (GV->isDeclaration()) {\n // ...\n Diags.Report(Location, diag::note_alias_requires_mangled_name) << IsIFunc << IsIFunc;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/attr-alias-elf.c"]={"clang/test/Sema/attr-alias-elf.c:7:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:10:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:49:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:52:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:56:30: note: the function or variable specified in an alias must refer to its mangled name"} | ["clang/test/Sema/attr-alias-elf.c"]={"clang/test/Sema/attr-alias-elf.c:7:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:10:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:49:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:52:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:56:30: note: the function or variable specified in an alias must refer to its mangled name"} | ||
| Line 3,890: | Line 3,891: | ||
}, | }, | ||
["note_alignas_on_declaration"]={ | ["note_alignas_on_declaration"]={ | ||
[ | [i]="note_alignas_on_declaration", | ||
[b]="declared with %0 attribute here", | [b]="declared with %0 attribute here", | ||
[ | [g]="declared with A attribute here", | ||
[ | [f]=q, | ||
[ | [e]="declared with (.*?) attribute here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"bc8caaf05f09",1361508939,"Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of","Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of\nthe normal attribute-merging path, because we can\'t merge alignment attributes\nwithout knowing the complete set of alignment attributes which apply to a\nparticular declaration.\n\nllvm-svn: 175861"}, | ||
[ | [d]={{w,2859,"/// Merge alignment attributes from \\p Old to \\p New, taking into account the\n/// special semantics of C11\'s _Alignas specifier and C++11\'s alignas attribute.\n///\n/// \\return \\c true if any attributes were added to \\p New.\nstatic bool mergeAlignedAttrs(Sema &S, NamedDecl *New, Decl *Old) {\n // ...\n if (OldAlignasAttr && !NewAlignasAttr && isAttributeTargetADefinition(New)) {\n // ...\n S.Diag(OldAlignasAttr->getLocation(), diag::note_alignas_on_declaration) << OldAlignasAttr;"},{w,3087,"/// 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<C11NoReturnAttr>(NewAttribute)) {\n // ...\n } else if (isa<UuidAttr>(NewAttribute)) {\n // ...\n } else if (const AlignedAttr *AA = dyn_cast<AlignedAttr>(NewAttribute)) {\n if (AA->isAlignas()) {\n // ...\n S.Diag(NewAttribute->getLocation(), diag::note_alignas_on_declaration) << AA;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:19:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:24:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:28:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:31:8: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:44:8: note: declared with \'alignas\' attribute here"} | ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:19:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:24:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:28:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:31:8: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:44:8: note: declared with \'alignas\' attribute here"} | ||
| Line 3,904: | Line 3,905: | ||
}, | }, | ||
["note_allocated_here"]={ | ["note_allocated_here"]={ | ||
[ | [i]="note_allocated_here", | ||
[b]="allocated with \'new%select{[]|}0\' here", | [b]="allocated with \'new%select{[]|}0\' here", | ||
[ | [g]={{nil,nil,{"allocated with \'new",{"[]",o},"\' here"}}}, | ||
[ | [f]=q, | ||
[ | [e]="allocated with \'new(?:\\[\\]|)\' here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"538ef53c139d",1431620097,"Detect uses of mismatching forms of \'new\' and \'delete\'","Detect uses of mismatching forms of \'new\' and \'delete\'\n\nEmit warning when operand to `delete` is allocated with `new[]` or\noperand to `delete[]` is allocated with `new`.\n\nReviewers: rtrieu, jordan_rose, rsmith\n\nSubscribers: majnemer, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D4661\n\nllvm-svn: 237368"}, | ||
[ | [d]={{Tb,3541,"static void DiagnoseMismatchedNewDelete(Sema &SemaRef, SourceLocation DeleteLoc, const MismatchingNewDeleteDetector &Detector) {\n // ...\n for (const auto *NE : Detector.NewExprs)\n SemaRef.Diag(NE->getExprLoc(), diag::note_allocated_here) << Detector.IsArrayForm;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/default-arguments.cpp"]={"clang/test/CodeGenCXX/default-arguments.cpp:63:10: note: allocated with \'new[]\' here"} | ["clang/test/CodeGenCXX/default-arguments.cpp"]={"clang/test/CodeGenCXX/default-arguments.cpp:63:10: note: allocated with \'new[]\' here"} | ||
| Line 3,918: | Line 3,919: | ||
}, | }, | ||
["note_also_found"]={ | ["note_also_found"]={ | ||
[ | [i]="note_also_found", | ||
[b]="also found", | [b]="also found", | ||
[g]="also found", | [g]="also found", | ||
[f]= | [f]=q, | ||
[e]= | [e]="also found", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[h]={"e29c5cd2398c",1260474663,"Improve the diagnostic when a new declaration conflicts with a using shadow","Improve the diagnostic when a new declaration conflicts with a using shadow\ndeclaration. Rename note_using_decl to note_using, which is possibly less confusing.\nAdd a test for non-class-scope using decl collisions and be sure to note the case\nwe can\'t diagnose yet.\n\nllvm-svn: 91057"}, | |||
[d]={{mc,3645,"void Sema::DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl<ObjCMethodDecl *> &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) {\n // ...\n if (issueDiagnostic) {\n // ...\n for (unsigned I = 1, N = Methods.size(); I != N; ++I) {\n Diag(Methods[I]->getBeginLoc(), diag::note_also_found) << Methods[I]->getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/selector-overload.m"]={"clang/test/SemaObjC/selector-overload.m:22:1: note: also found","clang/test/SemaObjC/selector-overload.m:28:1: note: also found","clang/test/SemaObjC/selector-overload.m:34:1: note: also found","clang/test/SemaObjC/selector-overload.m:40:1: note: also found"} | ["clang/test/SemaObjC/selector-overload.m"]={"clang/test/SemaObjC/selector-overload.m:22:1: note: also found","clang/test/SemaObjC/selector-overload.m:28:1: note: also found","clang/test/SemaObjC/selector-overload.m:34:1: note: also found","clang/test/SemaObjC/selector-overload.m:40:1: note: also found"} | ||
| Line 3,932: | Line 3,933: | ||
}, | }, | ||
["note_ambig_member_ref_object_type"]={ | ["note_ambig_member_ref_object_type"]={ | ||
[ | [i]="note_ambig_member_ref_object_type", | ||
[b]="lookup in the object type %0 refers here", | [b]="lookup in the object type %0 refers here", | ||
[ | [g]="lookup in the object type A refers here", | ||
[ | [f]=q, | ||
[ | [e]="lookup in the object type (.*?) refers here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"b7bfe794129f",1251932376,"Rewrite of our handling of name lookup in C++ member access expressions, e.g.,","Rewrite of our handling of name lookup in C++ member access expressions, e.g.,\n\n x->Base::f\n\nWe no longer try to \"enter\" the context of the type that \"x\" points\nto. Instead, we drag that object type through the parser and pass it\ninto the Sema routines that need to know how to perform lookup within\nmember access expressions.\n\nWe now implement most of the crazy name lookup rules in C++\n[basic.lookup.classref] for non-templated code, including performing\nlookup both in the context of the type referred to by the member\naccess and in the scope of the member access itself and then detecting\nambiguities when the two lookups collide (p1 and p4; p3 and p7 are\nstill TODO). This change also corrects our handling of name lookup\nwithin template arguments of template-ids inside the\nnested-name-specifier (p6; we used to look into the scope of the\nobject expression for them) and fixes PR4703.\n\nI have disabled some tests that involve member access expressions\nwhere the object expression has dependent type, because we don\'t yet\nhave the ability to describe dependent nested-name-specifiers starting\nwith an identifier.\n\nllvm-svn: 80843"}, | ||
[ | [d]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",684,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (AcceptSpec) {\n if (!ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (isAcceptableNestedNameSpecifier(OuterDecl) && OuterDecl->getCanonicalDecl() != SD->getCanonicalDecl() && (!isa<TypeDecl>(OuterDecl) || !isa<TypeDecl>(SD) || !Context.hasSameType(Context.getTypeDeclType(cast<TypeDecl>(OuterDecl)), Context.getTypeDeclType(cast<TypeDecl>(SD))))) {\n // ...\n Diag(SD->getLocation(), diag::note_ambig_member_ref_object_type) << ObjectType;"},{O,609,"bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate, AssumedTemplateKind *ATK, bool AllowTypoCorrection) {\n // ...\n if (S && !ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (FoundOuter.empty()) {\n // ...\n } else if (FoundOuter.isAmbiguous() || !FoundOuter.isSingleResult() || !(OuterTemplate = getAsTemplateNameDecl(FoundOuter.getFoundDecl()))) {\n // ...\n } else if (!Found.isSuppressingDiagnostics()) {\n // - if the name found is a class template, it must refer to the same\n // entity as the one found in the class of the object expression,\n // otherwise the program is ill-formed.\n if (!Found.isSingleResult() || getAsTemplateNameDecl(Found.getFoundDecl())->getCanonicalDecl() != OuterTemplate->getCanonicalDecl()) {\n // ...\n Diag(Found.getRepresentativeDecl()->getLocation(), diag::note_ambig_member_ref_object_type) << ObjectType;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/qual-id-test.cpp"]={"clang/test/SemaCXX/qual-id-test.cpp:9:16: note: lookup in the object type \'A::sub\' refers here"} | ["clang/test/SemaCXX/qual-id-test.cpp"]={"clang/test/SemaCXX/qual-id-test.cpp:9:16: note: lookup in the object type \'A::sub\' refers here"} | ||
| Line 3,946: | Line 3,947: | ||
}, | }, | ||
["note_ambig_member_ref_scope"]={ | ["note_ambig_member_ref_scope"]={ | ||
[ | [i]="note_ambig_member_ref_scope", | ||
[b]="lookup from the current scope refers here", | [b]="lookup from the current scope refers here", | ||
[g]="lookup from the current scope refers here", | [g]="lookup from the current scope refers here", | ||
[f]= | [f]=q, | ||
[e]= | [e]="lookup from the current scope refers here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"b7bfe794129f",1251932376,"Rewrite of our handling of name lookup in C++ member access expressions, e.g.,","Rewrite of our handling of name lookup in C++ member access expressions, e.g.,\n\n x->Base::f\n\nWe no longer try to \"enter\" the context of the type that \"x\" points\nto. Instead, we drag that object type through the parser and pass it\ninto the Sema routines that need to know how to perform lookup within\nmember access expressions.\n\nWe now implement most of the crazy name lookup rules in C++\n[basic.lookup.classref] for non-templated code, including performing\nlookup both in the context of the type referred to by the member\naccess and in the scope of the member access itself and then detecting\nambiguities when the two lookups collide (p1 and p4; p3 and p7 are\nstill TODO). This change also corrects our handling of name lookup\nwithin template arguments of template-ids inside the\nnested-name-specifier (p6; we used to look into the scope of the\nobject expression for them) and fixes PR4703.\n\nI have disabled some tests that involve member access expressions\nwhere the object expression has dependent type, because we don\'t yet\nhave the ability to describe dependent nested-name-specifiers starting\nwith an identifier.\n\nllvm-svn: 80843"}, | |||
[d]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",686,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (AcceptSpec) {\n if (!ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (isAcceptableNestedNameSpecifier(OuterDecl) && OuterDecl->getCanonicalDecl() != SD->getCanonicalDecl() && (!isa<TypeDecl>(OuterDecl) || !isa<TypeDecl>(SD) || !Context.hasSameType(Context.getTypeDeclType(cast<TypeDecl>(OuterDecl)), Context.getTypeDeclType(cast<TypeDecl>(SD))))) {\n // ...\n Diag(OuterDecl->getLocation(), diag::note_ambig_member_ref_scope);"},{O,612,"bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate, AssumedTemplateKind *ATK, bool AllowTypoCorrection) {\n // ...\n if (S && !ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (FoundOuter.empty()) {\n // ...\n } else if (FoundOuter.isAmbiguous() || !FoundOuter.isSingleResult() || !(OuterTemplate = getAsTemplateNameDecl(FoundOuter.getFoundDecl()))) {\n // ...\n } else if (!Found.isSuppressingDiagnostics()) {\n // - if the name found is a class template, it must refer to the same\n // entity as the one found in the class of the object expression,\n // otherwise the program is ill-formed.\n if (!Found.isSingleResult() || getAsTemplateNameDecl(Found.getFoundDecl())->getCanonicalDecl() != OuterTemplate->getCanonicalDecl()) {\n // ...\n Diag(FoundOuter.getFoundDecl()->getLocation(), diag::note_ambig_member_ref_scope);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/qual-id-test.cpp"]={"clang/test/SemaCXX/qual-id-test.cpp:94:25: note: lookup from the current scope refers here"} | ["clang/test/SemaCXX/qual-id-test.cpp"]={"clang/test/SemaCXX/qual-id-test.cpp:94:25: note: lookup from the current scope refers here"} | ||
| Line 3,960: | Line 3,961: | ||
}, | }, | ||
["note_ambiguous_atomic_constraints"]={ | ["note_ambiguous_atomic_constraints"]={ | ||
[ | [i]={{nil,p,"note_ambiguous_atomic_constraints"}}, | ||
[b]={{nil,p,"similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"}}, | [b]={{nil,p,"similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"}}, | ||
[ | [g]={{nil,p,"similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"}}, | ||
[ | [f]=q, | ||
[ | [e]="similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={"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"}, | ||
[ | [d]={{bd,1579,"bool Sema::MaybeEmitAmbiguousAtomicConstraintsDiagnostic(NamedDecl *D1, ArrayRef<const Expr *> AC1, NamedDecl *D2, ArrayRef<const Expr *> AC2) {\n // ...\n Diag(AmbiguousAtomic1->getBeginLoc(), diag::note_ambiguous_atomic_constraints) << AmbiguousAtomic1->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:3:32: note: similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"} | ["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:3:32: note: similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"} | ||
| Line 3,974: | Line 3,975: | ||
}, | }, | ||
["note_ambiguous_atomic_constraints_similar_expression"]={ | ["note_ambiguous_atomic_constraints_similar_expression"]={ | ||
[ | [i]={{nil,p,"note_ambiguous_atomic_constraints_similar_expression"}}, | ||
[b]={{nil,p,"similar constraint expression here"}}, | [b]={{nil,p,"similar constraint expression here"}}, | ||
[ | [g]={{nil,p,"similar constraint expression here"}}, | ||
[ | [f]=q, | ||
[ | [e]="similar constraint expression here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={"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"}, | ||
[ | [d]={{bd,1,"bool Sema::MaybeEmitAmbiguousAtomicConstraintsDiagnostic(NamedDecl *D1, ArrayRef<const Expr *> AC1, NamedDecl *D2, ArrayRef<const Expr *> AC2) {\n // ...\n Diag(AmbiguousAtomic2->getBeginLoc(), diag::note_ambiguous_atomic_constraints_similar_expression) << AmbiguousAtomic2->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:7:32: note: similar constraint expression here"} | ["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:7:32: note: similar constraint expression here"} | ||
| Line 3,988: | Line 3,989: | ||
}, | }, | ||
["note_ambiguous_candidate"]={ | ["note_ambiguous_candidate"]={ | ||
[ | [i]="note_ambiguous_candidate", | ||
[b]="candidate found by name lookup is %q0", | [b]="candidate found by name lookup is %q0", | ||
[ | [g]="candidate found by name lookup is A", | ||
[ | [f]=q, | ||
[ | [e]="candidate found by name lookup is (.*?)", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={U,1237025389,T,S}, | ||
[ | [d]={{gd,2866,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousReference: {\n // ...\n for (auto *D : Result)\n Diag(D->getLocation(), diag::note_ambiguous_candidate) << D;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:14:10: note: candidate found by name lookup is \'B::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:4:10: note: candidate found by name lookup is \'A::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:15:9: note: candidate found by name lookup is \'B::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:5:7: note: candidate found by name lookup is \'A::x\'"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:14:10: note: candidate found by name lookup is \'B::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:4:10: note: candidate found by name lookup is \'A::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:15:9: note: candidate found by name lookup is \'B::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:5:7: note: candidate found by name lookup is \'A::x\'"} | ||
| Line 4,002: | Line 4,003: | ||
}, | }, | ||
["note_ambiguous_inherited_constructor_using"]={ | ["note_ambiguous_inherited_constructor_using"]={ | ||
[ | [i]="note_ambiguous_inherited_constructor_using", | ||
[b]="inherited from base class %0 here", | [b]="inherited from base class %0 here", | ||
[ | [g]="inherited from base class A here", | ||
[ | [f]=q, | ||
[ | [e]="inherited from base class (.*?) here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:","P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:\n\nReplace inheriting constructors implementation with new approach, voted into\nC++ last year as a DR against C++11.\n\nInstead of synthesizing a set of derived class constructors for each inherited\nbase class constructor, we make the constructors of the base class visible to\nconstructor lookup in the derived class, using the normal rules for\nusing-declarations.\n\nFor constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived\nclass that tracks the requisite additional information. We create shadow\nconstructors (not found by name lookup) in the derived class to model the\nactual initialization, and have a new expression node,\nCXXInheritedCtorInitExpr, to model the initialization of a base class from such\na constructor. (This initialization is special because it performs real perfect\nforwarding of arguments.)\n\nIn cases where argument forwarding is not possible (for inalloca calls,\nvariadic calls, and calls with callee parameter cleanup), the shadow inheriting\nconstructor is not emitted and instead we directly emit the initialization code\ninto the caller of the inherited constructor.\n\nNote that this new model is not perfectly compatible with the old model in some\ncorner cases. In particular:\n * if B inherits a private constructor from A, and C uses that constructor to\n construct a B, then we previously required that A befriends B and B\n befriends C, but the new rules require A to befriend C directly, and\n * if a derived class has its own constructors (and so its implicit default\n constructor is suppressed), it may still inherit a default constructor from\n a base class\n\nllvm-svn: 274049"}, | ||
[ | [d]={{Z,7305,"class Sema::InheritedConstructorInfo {\n // ...\n InheritedConstructorInfo(Sema &S, SourceLocation UseLoc, ConstructorUsingShadowDecl *Shadow) : S(S), UseLoc(UseLoc) {\n // ...\n // Find the set of such base class subobjects and check that there\'s a\n // unique constructed subobject.\n for (auto *D : Shadow->redecls()) {\n // ...\n // [class.inhctor.init]p2:\n // If the constructor was inherited from multiple base class subobjects\n // of type B, the program is ill-formed.\n if (!ConstructedBase) {\n // ...\n } else if (ConstructedBase != DConstructedBase && !Shadow->isInvalidDecl()) {\n if (!DiagnosedMultipleConstructedBases) {\n // ...\n S.Diag(ConstructedBaseIntroducer->getLocation(), diag::note_ambiguous_inherited_constructor_using) << ConstructedBase;"},{Z,7310,"class Sema::InheritedConstructorInfo {\n // ...\n InheritedConstructorInfo(Sema &S, SourceLocation UseLoc, ConstructorUsingShadowDecl *Shadow) : S(S), UseLoc(UseLoc) {\n // ...\n // Find the set of such base class subobjects and check that there\'s a\n // unique constructed subobject.\n for (auto *D : Shadow->redecls()) {\n // ...\n // [class.inhctor.init]p2:\n // If the constructor was inherited from multiple base class subobjects\n // of type B, the program is ill-formed.\n if (!ConstructedBase) {\n // ...\n } else if (ConstructedBase != DConstructedBase && !Shadow->isInvalidDecl()) {\n // ...\n S.Diag(D->getIntroducer()->getLocation(), diag::note_ambiguous_inherited_constructor_using) << DConstructedBase;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/special/class.init/class.inhctor.init/p2.cpp"]={"clang/test/CXX/special/class.init/class.inhctor.init/p2.cpp:12:15: note: inherited from base class \'C2\' here","clang/test/CXX/special/class.init/class.inhctor.init/p2.cpp:11:15: note: inherited from base class \'C1\' here"} | ["clang/test/CXX/special/class.init/class.inhctor.init/p2.cpp"]={"clang/test/CXX/special/class.init/class.inhctor.init/p2.cpp:12:15: note: inherited from base class \'C2\' here","clang/test/CXX/special/class.init/class.inhctor.init/p2.cpp:11:15: note: inherited from base class \'C1\' here"} | ||
| Line 4,016: | Line 4,017: | ||
}, | }, | ||
["note_ambiguous_member_found"]={ | ["note_ambiguous_member_found"]={ | ||
[ | [i]="note_ambiguous_member_found", | ||
[b]="member found by ambiguous name lookup", | [b]="member found by ambiguous name lookup", | ||
[g]="member found by ambiguous name lookup", | [g]="member found by ambiguous name lookup", | ||
[f]= | [f]=q, | ||
[e]= | [e]="member found by ambiguous name lookup", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={U,1237025389,T,S}, | |||
[d]={{gd,2807,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousBaseSubobjects: {\n // ...\n Diag((*Found)->getLocation(), diag::note_ambiguous_member_found);"},{gd,2831,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousBaseSubobjectTypes: {\n // ...\n for (CXXBasePaths::paths_iterator Path = Paths->begin(), PathEnd = Paths->end(); Path != PathEnd; ++Path) {\n // ...\n if (DeclsPrinted.insert(D).second) {\n if (const auto *TD = dyn_cast<TypedefNameDecl>(D->getUnderlyingDecl()))\n // ...\n else if (const auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))\n // ...\n else\n Diag(D->getLocation(), diag::note_ambiguous_member_found);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:30:30: note: member found by ambiguous name lookup","clang/test/SemaCXX/lookup-member.cpp:36:30: note: member found by ambiguous name lookup"} | ["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:30:30: note: member found by ambiguous name lookup","clang/test/SemaCXX/lookup-member.cpp:36:30: note: member found by ambiguous name lookup"} | ||
| Line 4,030: | Line 4,031: | ||
}, | }, | ||
["note_ambiguous_member_type_found"]={ | ["note_ambiguous_member_type_found"]={ | ||
[ | [i]={{nil,z,"note_ambiguous_member_type_found"}}, | ||
[b]={{nil, | [b]={{nil,z,"member type %0 found by ambiguous name lookup"}}, | ||
[ | [g]={{nil,z,"member type A found by ambiguous name lookup"}}, | ||
[ | [f]=q, | ||
[ | [e]="member type (.*?) found by ambiguous name lookup", | ||
[ | [c]=o, | ||
[ | [a]={{nil,z,m}}, | ||
[ | [h]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types","Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to support fadd/fsub:\n\nhttps://reviews.llvm.org/D53965\n\nHowever clang atomic builtins fetch add/sub still does not support\nemitting atomicrmw fadd/fsub.\n\nThis patch adds that.\n\nReviewed by: John McCall, Artem Belevich, Matt Arsenault, JF Bastien,\nJames Y Knight, Louis Dionne, Olivier Giroux\n\nDifferential Revision: https://reviews.llvm.org/D71726"}, | ||
[ | [d]={{gd,2825,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousBaseSubobjectTypes: {\n // ...\n for (CXXBasePaths::paths_iterator Path = Paths->begin(), PathEnd = Paths->end(); Path != PathEnd; ++Path) {\n // ...\n if (DeclsPrinted.insert(D).second) {\n if (const auto *TD = dyn_cast<TypedefNameDecl>(D->getUnderlyingDecl()))\n Diag(D->getLocation(), diag::note_ambiguous_member_type_found) << TD->getUnderlyingType();"},{gd,2828,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousBaseSubobjectTypes: {\n // ...\n for (CXXBasePaths::paths_iterator Path = Paths->begin(), PathEnd = Paths->end(); Path != PathEnd; ++Path) {\n // ...\n if (DeclsPrinted.insert(D).second) {\n if (const auto *TD = dyn_cast<TypedefNameDecl>(D->getUnderlyingDecl()))\n // ...\n else if (const auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))\n Diag(D->getLocation(), diag::note_ambiguous_member_type_found) << Context.getTypeDeclType(TD);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/member-name-lookup.cpp"]={"clang/test/SemaCXX/member-name-lookup.cpp:23:8: note: member type \'B::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:30:8: note: member type \'C::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:23:8: note: member type \'B::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:30:8: note: member type \'C::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:74:8: note: member type \'B2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:81:8: note: member type \'C2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:74:8: note: member type \'B2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:81:8: note: member type \'C2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:135:10: note: member type \'HasMemberType1::type\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:139:10: note: member type \'HasMemberType2::type\' found by ambiguous name lookup"} | ["clang/test/SemaCXX/member-name-lookup.cpp"]={"clang/test/SemaCXX/member-name-lookup.cpp:23:8: note: member type \'B::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:30:8: note: member type \'C::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:23:8: note: member type \'B::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:30:8: note: member type \'C::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:74:8: note: member type \'B2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:81:8: note: member type \'C2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:74:8: note: member type \'B2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:81:8: note: member type \'C2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:135:10: note: member type \'HasMemberType1::type\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:139:10: note: member type \'HasMemberType2::type\' found by ambiguous name lookup"} | ||
| Line 4,044: | Line 4,045: | ||
}, | }, | ||
["note_ambiguous_type_conversion"]={ | ["note_ambiguous_type_conversion"]={ | ||
[ | [i]="note_ambiguous_type_conversion", | ||
[b]="because of ambiguity in conversion %diff{of $ to $|between types}0,1", | [b]="because of ambiguity in conversion %diff{of $ to $|between types}0,1", | ||
[ | [g]={{nil,nil,{"because of ambiguity in conversion ",{"of A to B","between types"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="because of ambiguity in conversion (?:of (.*?) to (.*?)|between types)", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"574de2c5a4f0",1255369879,"If built-in operators could not be selected because of ambiguity in","If built-in operators could not be selected because of ambiguity in\nuser-defined type conversions, issue list of ambiguites in addition \nto the diagnostic. So, clang now issues the following:\n\nb.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is \'struct C1\'\n int i = c1->*pmf;\n ~~^\nb.cpp:19:19: note: because of ambiguity in conversion of \'struct C1\' to \'struct E *\'\nb.cpp:5:5: note: candidate function\n operator E*();\n ^\nb.cpp:11:5: note: candidate function\n operator E*();\n ^\n\nllvm-svn: 83862"}, | ||
[ | [d]={{pc,11697,"static void NoteAmbiguousUserConversions(Sema &S, SourceLocation OpLoc, OverloadCandidate *Cand) {\n for (const ImplicitConversionSequence &ICS : Cand->Conversions) {\n // ...\n ICS.DiagnoseAmbiguousConversion(S, OpLoc, S.PDiag(diag::note_ambiguous_type_conversion));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp"]={"clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: note: because of ambiguity in conversion of \'C1\' to \'E *\'"} | ["clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp"]={"clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: note: because of ambiguity in conversion of \'C1\' to \'E *\'"} | ||
| Line 4,058: | Line 4,059: | ||
}, | }, | ||
["note_anonymous_namespace"]={ | ["note_anonymous_namespace"]={ | ||
[ | [i]={{nil,r,"note_anonymous_namespace"}}, | ||
[b]={{nil,r,"anonymous namespace begins here"}}, | [b]={{nil,r,"anonymous namespace begins here"}}, | ||
[ | [g]={{nil,r,"anonymous namespace begins here"}}, | ||
[ | [f]=q, | ||
[ | [e]="anonymous namespace begins here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,r,"Modules Issue"}}, | ||
[ | [h]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"}, | ||
[ | [d]={{"clang/lib/Sema/SemaModule.cpp",790,"/// We have parsed the start of an export declaration, including the \'{\'\n/// (if present).\nDecl *Sema::ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc) {\n // ...\n for (const DeclContext *DC = CurContext; DC; DC = DC->getLexicalParent()) {\n if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) {\n // An export-declaration shall not appear directly or indirectly within\n // an unnamed namespace [...]\n if (ND->isAnonymousNamespace()) {\n // ...\n Diag(ND->getLocation(), diag::note_anonymous_namespace);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/module/module.interface/p3.cpp"]={"clang/test/CXX/module/module.interface/p3.cpp:50:11: note: anonymous namespace begins here"} | ["clang/test/CXX/module/module.interface/p3.cpp"]={"clang/test/CXX/module/module.interface/p3.cpp:50:11: note: anonymous namespace begins here"} | ||
| Line 4,072: | Line 4,073: | ||
}, | }, | ||
["note_arc_bridge"]={ | ["note_arc_bridge"]={ | ||
[ | [i]="note_arc_bridge", | ||
[b]="use __bridge to convert directly (no change in ownership)", | [b]="use __bridge to convert directly (no change in ownership)", | ||
[ | [g]="use __bridge to convert directly (no change in ownership)", | ||
[ | [f]=q, | ||
[ | [e]="use __bridge to convert directly \\(no change in ownership\\)", | ||
[ | [c]=o, | ||
[ | [a]=Dc, | ||
[ | [h]={Ec,1308178962,Fc,Kc}, | ||
[ | [d]={{ob,3933,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from an ARC type to a CF type.\n if (castACTC == ACTC_retainable && isAnyRetainable(exprACTC)) {\n // ...\n if (CreateRule != ACC_plusOne) {\n auto DiagB = (CCK != Sema::CCK_OtherCast) ? S.Diag(noteLoc, diag::note_arc_bridge) : S.Diag(noteLoc, diag::note_arc_cstyle_bridge);"},{ob,3974,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from a CF type to an ARC type.\n if (exprACTC == ACTC_retainable && isAnyRetainable(castACTC)) {\n // ...\n if (CreateRule != ACC_plusOne) {\n auto DiagB = (CCK != Sema::CCK_OtherCast) ? S.Diag(noteLoc, diag::note_arc_bridge) : S.Diag(noteLoc, diag::note_arc_cstyle_bridge);"},{ob,4672,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n // ...\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n // ...\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n // ...\n case OBC_BridgeRetained: {\n // ...\n Diag(BridgeKeywordLoc, diag::note_arc_bridge) << FixItHint::CreateReplacement(BridgeKeywordLoc, \"__bridge\");"},{ob,4716,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n // ...\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n // ...\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n // ...\n } else if (T->isCARCBridgableType() && FromType->isObjCARCBridgableType()) {\n // ...\n case OBC_BridgeTransfer: {\n // ...\n Diag(BridgeKeywordLoc, diag::note_arc_bridge) << FixItHint::CreateReplacement(BridgeKeywordLoc, \"__bridge \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-cf.m"]={"clang/test/SemaObjC/arc-cf.m:18:8: note: use __bridge to convert directly (no change in ownership)"} | ["clang/test/SemaObjC/arc-cf.m"]={"clang/test/SemaObjC/arc-cf.m:18:8: note: use __bridge to convert directly (no change in ownership)"} | ||
| Line 4,086: | Line 4,087: | ||
}, | }, | ||
["note_arc_bridge_retained"]={ | ["note_arc_bridge_retained"]={ | ||
[ | [i]="note_arc_bridge_retained", | ||
[b]="use %select{__bridge_retained|CFBridgingRetain call}1 to make an ARC object available as a +1 %0", | [b]="use %select{__bridge_retained|CFBridgingRetain call}1 to make an ARC object available as a +1 %0", | ||
[ | [g]={{nil,nil,{"use ",{"__bridge_retained","CFBridgingRetain call"}," to make an ARC object available as a +1 A"}}}, | ||
[ | [f]=q, | ||
[ | [e]="use (?:__bridge_retained|CFBridgingRetain call) to make an ARC object available as a \\+1 (.*?)", | ||
[ | [c]=o, | ||
[ | [a]=Dc, | ||
[ | [h]={Ec,1308178962,Fc,Kc}, | ||
[ | [d]={{ob,3986,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from a CF type to an ARC type.\n if (exprACTC == ACTC_retainable && isAnyRetainable(castACTC)) {\n // ...\n if (CreateRule != ACC_plusZero) {\n auto DiagB = (CCK == Sema::CCK_OtherCast && !br) ? S.Diag(noteLoc, diag::note_arc_cstyle_bridge_retained) << castType : S.Diag(br ? castExpr->getExprLoc() : noteLoc, diag::note_arc_bridge_retained) << castType << br;"},{ob,4718,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n // ...\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n // ...\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n // ...\n } else if (T->isCARCBridgableType() && FromType->isObjCARCBridgableType()) {\n // ...\n case OBC_BridgeTransfer: {\n // ...\n Diag(BridgeKeywordLoc, diag::note_arc_bridge_retained) << T << br << FixItHint::CreateReplacement(BridgeKeywordLoc, br ? \"CFBridgingRetain \" : \"__bridge_retained\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ARCMT/nonobjc-to-objc-cast-2.m"]={"clang/test/ARCMT/nonobjc-to-objc-cast-2.m:41:14: note: use CFBridgingRetain call to make an ARC object available as a +1 \'void *\'","clang/test/ARCMT/nonobjc-to-objc-cast-2.m:46:23: note: use CFBridgingRetain call to make an ARC object available as a +1 \'CFStringRef\' (aka \'const struct __CFString *\')","clang/test/ARCMT/nonobjc-to-objc-cast-2.m:61:29: note: use CFBridgingRetain call to make an ARC object available as a +1 \'CFStringRef\' (aka \'const struct __CFString *\')"} | ["clang/test/ARCMT/nonobjc-to-objc-cast-2.m"]={"clang/test/ARCMT/nonobjc-to-objc-cast-2.m:41:14: note: use CFBridgingRetain call to make an ARC object available as a +1 \'void *\'","clang/test/ARCMT/nonobjc-to-objc-cast-2.m:46:23: note: use CFBridgingRetain call to make an ARC object available as a +1 \'CFStringRef\' (aka \'const struct __CFString *\')","clang/test/ARCMT/nonobjc-to-objc-cast-2.m:61:29: note: use CFBridgingRetain call to make an ARC object available as a +1 \'CFStringRef\' (aka \'const struct __CFString *\')"} | ||
| Line 4,100: | Line 4,101: | ||
}, | }, | ||
["note_arc_bridge_transfer"]={ | ["note_arc_bridge_transfer"]={ | ||
[ | [i]="note_arc_bridge_transfer", | ||
[b]="use %select{__bridge_transfer|CFBridgingRelease call}1 to transfer ownership of a +1 %0 into ARC", | [b]="use %select{__bridge_transfer|CFBridgingRelease call}1 to transfer ownership of a +1 %0 into ARC", | ||
[ | [g]={{nil,nil,{"use ",{"__bridge_transfer","CFBridgingRelease call"}," to transfer ownership of a +1 A into ARC"}}}, | ||
[ | [f]=q, | ||
[ | [e]="use (?:__bridge_transfer|CFBridgingRelease call) to transfer ownership of a \\+1 (.*?) into ARC", | ||
[ | [c]=o, | ||
[ | [a]=Dc, | ||
[ | [h]={Ec,1308178962,Fc,Kc}, | ||
[ | [d]={{ob,3946,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from an ARC type to a CF type.\n if (castACTC == ACTC_retainable && isAnyRetainable(exprACTC)) {\n // ...\n if (CreateRule != ACC_plusZero) {\n auto DiagB = (CCK == Sema::CCK_OtherCast && !br) ? S.Diag(noteLoc, diag::note_arc_cstyle_bridge_transfer) << castExprType : S.Diag(br ? castExpr->getExprLoc() : noteLoc, diag::note_arc_bridge_transfer) << castExprType << br;"},{ob,4674,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n // ...\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n // ...\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n // ...\n case OBC_BridgeRetained: {\n // ...\n Diag(BridgeKeywordLoc, diag::note_arc_bridge_transfer) << FromType << br << FixItHint::CreateReplacement(BridgeKeywordLoc, br ? \"CFBridgingRelease \" : \"__bridge_transfer \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-cf.m"]={"clang/test/SemaObjC/arc-cf.m:18:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:19:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:27:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:45:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:46:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC"} | ["clang/test/SemaObjC/arc-cf.m"]={"clang/test/SemaObjC/arc-cf.m:18:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:19:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:27:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:45:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:46:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC"} | ||
| Line 4,114: | Line 4,115: | ||
}, | }, | ||
["note_arc_cstyle_bridge"]={ | ["note_arc_cstyle_bridge"]={ | ||
[ | [i]="note_arc_cstyle_bridge", | ||
[b]="use __bridge with C-style cast to convert directly (no change in ownership)", | [b]="use __bridge with C-style cast to convert directly (no change in ownership)", | ||
[ | [g]="use __bridge with C-style cast to convert directly (no change in ownership)", | ||
[ | [f]=q, | ||
[ | [e]="use __bridge with C\\-style cast to convert directly \\(no change in ownership\\)", | ||
[ | [c]=o, | ||
[ | [a]=Dc, | ||
[ | [h]={"ac2d082f58e6",1361496168,"objective-C arc: Diagnostic can not say to use bridge","objective-C arc: Diagnostic can not say to use bridge\ncasts with c++ named casts. Change notes to say use\nbridge with c-style cast instead. // rdar://12788838\n\nllvm-svn: 175850"}, | ||
[ | [d]={{ob,3934,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from an ARC type to a CF type.\n if (castACTC == ACTC_retainable && isAnyRetainable(exprACTC)) {\n // ...\n if (CreateRule != ACC_plusOne) {\n auto DiagB = (CCK != Sema::CCK_OtherCast) ? S.Diag(noteLoc, diag::note_arc_bridge) : S.Diag(noteLoc, diag::note_arc_cstyle_bridge);"},{ob,3975,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from a CF type to an ARC type.\n if (exprACTC == ACTC_retainable && isAnyRetainable(castACTC)) {\n // ...\n if (CreateRule != ACC_plusOne) {\n auto DiagB = (CCK != Sema::CCK_OtherCast) ? S.Diag(noteLoc, diag::note_arc_bridge) : S.Diag(noteLoc, diag::note_arc_cstyle_bridge);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:30:21: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:60:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:67:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:70:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:89:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:92:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:102:21: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:105:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:108:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:111:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:121:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:124:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:127:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:130:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:133:30: note: use __bridge with C-style cast to convert directly (no change in ownership)"} | ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:30:21: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:60:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:67:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:70:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:89:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:92:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:102:21: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:105:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:108:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:111:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:121:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:124:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:127:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:130:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:133:30: note: use __bridge with C-style cast to convert directly (no change in ownership)"} | ||
| Line 4,128: | Line 4,129: | ||
}, | }, | ||
["note_arc_cstyle_bridge_retained"]={ | ["note_arc_cstyle_bridge_retained"]={ | ||
[ | [i]="note_arc_cstyle_bridge_retained", | ||
[b]="use __bridge_retained with C-style cast to make an ARC object available as a +1 %0", | [b]="use __bridge_retained with C-style cast to make an ARC object available as a +1 %0", | ||
[ | [g]="use __bridge_retained with C-style cast to make an ARC object available as a +1 A", | ||
[ | [f]=q, | ||
[ | [e]="use __bridge_retained with C\\-style cast to make an ARC object available as a \\+1 (.*?)", | ||
[ | [c]=o, | ||
[ | [a]=Dc, | ||
[ | [h]={"ac2d082f58e6",1361496168,"objective-C arc: Diagnostic can not say to use bridge","objective-C arc: Diagnostic can not say to use bridge\ncasts with c++ named casts. Change notes to say use\nbridge with c-style cast instead. // rdar://12788838\n\nllvm-svn: 175850"}, | ||
[ | [d]={{ob,3983,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from a CF type to an ARC type.\n if (exprACTC == ACTC_retainable && isAnyRetainable(castACTC)) {\n // ...\n if (CreateRule != ACC_plusZero) {\n auto DiagB = (CCK == Sema::CCK_OtherCast && !br) ? S.Diag(noteLoc, diag::note_arc_cstyle_bridge_retained) << castType : S.Diag(br ? castExpr->getExprLoc() : noteLoc, diag::note_arc_bridge_retained) << castType << br;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:70:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:121:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:124:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:127:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:130:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:133:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')"} | ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:70:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:121:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:124:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:127:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:130:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:133:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')"} | ||
| Line 4,142: | Line 4,143: | ||
}, | }, | ||
["note_arc_cstyle_bridge_transfer"]={ | ["note_arc_cstyle_bridge_transfer"]={ | ||
[ | [i]="note_arc_cstyle_bridge_transfer", | ||
[b]="use __bridge_transfer with C-style cast to transfer ownership of a +1 %0 into ARC", | [b]="use __bridge_transfer with C-style cast to transfer ownership of a +1 %0 into ARC", | ||
[ | [g]="use __bridge_transfer with C-style cast to transfer ownership of a +1 A into ARC", | ||
[ | [f]=q, | ||
[ | [e]="use __bridge_transfer with C\\-style cast to transfer ownership of a \\+1 (.*?) into ARC", | ||
[ | [c]=o, | ||
[ | [a]=Dc, | ||
[ | [h]={"ac2d082f58e6",1361496168,"objective-C arc: Diagnostic can not say to use bridge","objective-C arc: Diagnostic can not say to use bridge\ncasts with c++ named casts. Change notes to say use\nbridge with c-style cast instead. // rdar://12788838\n\nllvm-svn: 175850"}, | ||
[ | [d]={{ob,3943,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from an ARC type to a CF type.\n if (castACTC == ACTC_retainable && isAnyRetainable(exprACTC)) {\n // ...\n if (CreateRule != ACC_plusZero) {\n auto DiagB = (CCK == Sema::CCK_OtherCast && !br) ? S.Diag(noteLoc, diag::note_arc_cstyle_bridge_transfer) << castExprType : S.Diag(br ? castExpr->getExprLoc() : noteLoc, diag::note_arc_bridge_transfer) << castExprType << br;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:30:21: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFTestingRef\' (aka \'__CFError *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:60:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:67:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFUColor2Ref\' (aka \'__CFUPrimeColor *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:89:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:92:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:102:21: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:105:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:108:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:111:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC"} | ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:30:21: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFTestingRef\' (aka \'__CFError *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:60:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:67:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFUColor2Ref\' (aka \'__CFUPrimeColor *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:89:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:92:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:102:21: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:105:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:108:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:111:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC"} | ||
| Line 4,156: | Line 4,157: | ||
}, | }, | ||
["note_arc_field_with_ownership"]={ | ["note_arc_field_with_ownership"]={ | ||
[ | [i]="note_arc_field_with_ownership", | ||
[b]="field has non-trivial ownership qualification", | [b]="field has non-trivial ownership qualification", | ||
[ | [g]="field has non-trivial ownership qualification", | ||
[ | [f]=q, | ||
[ | [e]="field has non\\-trivial ownership qualification", | ||
[ | [c]=o, | ||
[ | [a]=kd, | ||
[ | [h]={jd,1446008599,id,ed}, | ||
[ | [d]={{kc,492,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ARCFieldWithOwnership:\n // ...\n diag_available_here = diag::note_arc_field_with_ownership;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/arc-system-header.mm"]={"clang/test/SemaObjCXX/Inputs/arc-system-header.h:10:7: note: field has non-trivial ownership qualification"} | ["clang/test/SemaObjCXX/arc-system-header.mm"]={"clang/test/SemaObjCXX/Inputs/arc-system-header.h:10:7: note: field has non-trivial ownership qualification"} | ||
| Line 4,170: | Line 4,171: | ||
}, | }, | ||
["note_arc_forbidden_type"]={ | ["note_arc_forbidden_type"]={ | ||
[ | [i]="note_arc_forbidden_type", | ||
[b]="declaration uses type that is ill-formed in ARC", | [b]="declaration uses type that is ill-formed in ARC", | ||
[ | [g]="declaration uses type that is ill-formed in ARC", | ||
[ | [f]=q, | ||
[ | [e]="declaration uses type that is ill\\-formed in ARC", | ||
[ | [c]=o, | ||
[ | [a]=kd, | ||
[ | [h]={jd,1446008599,id,ed}, | ||
[ | [d]={{kc,470,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ARCForbiddenType:\n // ...\n diag_available_here = diag::note_arc_forbidden_type;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-unavailable-system-function.m"]={"/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:1:6: note: declaration uses type that is ill-formed in ARC"} | ["clang/test/SemaObjC/arc-unavailable-system-function.m"]={"/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:1:6: note: declaration uses type that is ill-formed in ARC"} | ||
| Line 4,184: | Line 4,185: | ||
}, | }, | ||
["note_arc_gained_method_convention"]={ | ["note_arc_gained_method_convention"]={ | ||
[ | [i]="note_arc_gained_method_convention", | ||
[b]="declaration in interface is not in the \'%select{alloc|copy|init|new}0\' family because %select{its result type is not an object pointer|its result type is unrelated to its receiver type}1", | [b]="declaration in interface is not in the \'%select{alloc|copy|init|new}0\' family because %select{its result type is not an object pointer|its result type is unrelated to its receiver type}1", | ||
[ | [g]={{nil,nil,{"declaration in interface is not in the \'",{"alloc","copy","init","new"},"\' family because ",{"its result type is not an object pointer","its result type is unrelated to its receiver type"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="declaration in interface is not in the \'(?:alloc|copy|init|new)\' family because (?:its result type is not an object pointer|its result type is unrelated to its receiver type)", | ||
[ | [c]=o, | ||
[ | [a]="ARC Semantic Issue", | ||
[ | [h]={Ec,1308178962,Fc,Kc}, | ||
[ | [d]={{mc,2531,"/// In ARC, check whether the conventional meanings of the two methods\n/// match. If they don\'t, it\'s a hard error.\nstatic bool checkMethodFamilyMismatch(Sema &S, ObjCMethodDecl *impl, ObjCMethodDecl *decl) {\n // ...\n if (declFamily == OMF_None) {\n // ...\n noteID = diag::note_arc_gained_method_convention;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:202:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer","clang/test/ARCMT/checking.m:205:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer","clang/test/ARCMT/checking.m:206:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer"} | ["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:202:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer","clang/test/ARCMT/checking.m:205:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer","clang/test/ARCMT/checking.m:206:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer"} | ||
| Line 4,198: | Line 4,199: | ||
}, | }, | ||
["note_arc_init_returns_unrelated"]={ | ["note_arc_init_returns_unrelated"]={ | ||
[ | [i]="note_arc_init_returns_unrelated", | ||
[b]="init method must return a type related to its receiver type", | [b]="init method must return a type related to its receiver type", | ||
[g]="init method must return a type related to its receiver type", | [g]="init method must return a type related to its receiver type", | ||
[f]= | [f]=q, | ||
[e]= | [e]="init method must return a type related to its receiver type", | ||
[ | [c]=o, | ||
[ | [a]=kd, | ||
[h]={jd,1446008599,id,ed}, | |||
[d]={{kc,487,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ARCInitReturnsUnrelated:\n // ...\n diag_available_here = diag::note_arc_init_returns_unrelated;"}} | |||
}, | }, | ||
["note_arc_lost_method_convention"]={ | ["note_arc_lost_method_convention"]={ | ||
[ | [i]="note_arc_lost_method_convention", | ||
[b]="declaration in interface", | [b]="declaration in interface", | ||
[g]="declaration in interface", | [g]="declaration in interface", | ||
[f]= | [f]=q, | ||
[e]="ARC Semantic Issue", | [e]="declaration in interface", | ||
[ | [c]=o, | ||
[ | [a]="ARC Semantic Issue", | ||
[h]={Ec,1308178962,Fc,Kc}, | |||
[d]={{mc,2526,"/// In ARC, check whether the conventional meanings of the two methods\n/// match. If they don\'t, it\'s a hard error.\nstatic bool checkMethodFamilyMismatch(Sema &S, ObjCMethodDecl *impl, ObjCMethodDecl *decl) {\n // ...\n unsigned noteID = diag::note_arc_lost_method_convention;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:196:1: note: declaration in interface","clang/test/ARCMT/checking.m:211:1: note: declaration in interface","clang/test/ARCMT/checking.m:218:1: note: declaration in interface","clang/test/ARCMT/checking.m:225:1: note: declaration in interface"} | ["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:196:1: note: declaration in interface","clang/test/ARCMT/checking.m:211:1: note: declaration in interface","clang/test/ARCMT/checking.m:218:1: note: declaration in interface","clang/test/ARCMT/checking.m:225:1: note: declaration in interface"} | ||
| Line 4,223: | Line 4,224: | ||
}, | }, | ||
["note_arc_retain_cycle_owner"]={ | ["note_arc_retain_cycle_owner"]={ | ||
[ | [i]="note_arc_retain_cycle_owner", | ||
[b]="block will be retained by %select{the captured object|an object strongly retained by the captured object}0", | [b]="block will be retained by %select{the captured object|an object strongly retained by the captured object}0", | ||
[ | [g]={{nil,nil,{"block will be retained by ",{"the captured object","an object strongly retained by the captured object"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="block will be retained by (?:the captured object|an object strongly retained by the captured object)", | ||
[ | [c]=o, | ||
[ | [a]="ARC Retain Cycle", | ||
[ | [h]={Ec,1308178962,Fc,Kc}, | ||
[ | [d]={{ac,17475,"static void diagnoseRetainCycle(Sema &S, Expr *capturer, RetainCycleOwner &owner) {\n // ...\n S.Diag(owner.Loc, diag::note_arc_retain_cycle_owner) << owner.Indirect << owner.Range;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/warn-retain-cycle.m"]={"clang/test/SemaObjC/warn-retain-cycle.m:11:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:13:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:16:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:31:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:48:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:49:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:63:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:69:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:71:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:73:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:81:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:93:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:124:4: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:148:19: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:153:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:169:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:173:4: note: block will be retained by the captured object"} | ["clang/test/SemaObjC/warn-retain-cycle.m"]={"clang/test/SemaObjC/warn-retain-cycle.m:11:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:13:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:16:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:31:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:48:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:49:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:63:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:69:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:71:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:73:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:81:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:93:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:124:4: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:148:19: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:153:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:169:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:173:4: note: block will be retained by the captured object"} | ||
| Line 4,237: | Line 4,238: | ||
}, | }, | ||
["note_arc_weak_also_accessed_here"]={ | ["note_arc_weak_also_accessed_here"]={ | ||
[ | [i]="note_arc_weak_also_accessed_here", | ||
[b]="also accessed here", | [b]="also accessed here", | ||
[g]="also accessed here", | [g]="also accessed here", | ||
[f]= | [f]=q, | ||
[e]= | [e]="also accessed here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"d393458c3316",1348870890,"Add a warning (off by default) for repeated use of the same weak property.","Add a warning (off by default) for repeated use of the same weak property.\n\nThe motivating example:\n\nif (self.weakProp)\n use(self.weakProp);\n\nAs with any non-atomic test-then-use, it is possible a weak property to be\nnon-nil at the \'if\', but be deallocated by the time it is used. The correct\nway to write this example is as follows:\n\nid tmp = self.weakProp;\nif (tmp)\n use(tmp);\n\nThe warning is controlled by -Warc-repeated-use-of-receiver, and uses the\nproperty name and base to determine if the same property on the same object\nis being accessed multiple times. In cases where the base is more\ncomplicated than just a single Decl (e.g. \'foo.bar.weakProp\'), it picks a\nDecl for some degree of uniquing and reports the problem under a subflag,\n-Warc-maybe-repeated-use-of-receiver. This gives a way to tune the\naggressiveness of the warning for a particular project.\n\nThe warning is not on by default because it is not flow-sensitive and thus\nmay have a higher-than-acceptable rate of false positives, though it is\nless noisy than -Wreceiver-is-weak. On the other hand, it will not warn\nabout some cases that may be legitimate issues that -Wreceiver-is-weak\nwill catch, and it does not attempt to reason about methods returning weak\nvalues.\n\nEven though this is not a real \"analysis-based\" check I\'ve put the bug\nemission code in AnalysisBasedWarnings for two reasons: (1) to run on\nevery kind of code body (function, method, block, or lambda), and (2) to\nsuggest that it may be enhanced by flow-sensitive analysis in the future.\n\nThe second (smaller) half of this work is to extend it to weak locals\nand weak ivars. This should use most of the same infrastructure.\n\nPart of <rdar://problem/12280249>\n\nllvm-svn: 164854"}, | |||
[d]={{"clang/lib/Sema/AnalysisBasedWarnings.cpp",1512,"static void diagnoseRepeatedUseOfWeak(Sema &S, const sema::FunctionScopeInfo *CurFn, const Decl *D, const ParentMap &PM) {\n // ...\n // Iterate through the sorted problems and emit warnings for each.\n for (const auto &P : UsesByStmt) {\n // ...\n // Print all the other accesses as notes.\n for (const auto &Use : Uses) {\n // ...\n S.Diag(Use.getUseExpr()->getBeginLoc(), diag::note_arc_weak_also_accessed_here) << Use.getUseExpr()->getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-repeated-weak.mm"]={"clang/test/SemaObjC/arc-repeated-weak.mm:24:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:29:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:57:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:68:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:73:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:78:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:83:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:94:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:100:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:105:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:114:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:120:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:123:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:128:12: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:134:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:139:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:145:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:170:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:211:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:213:5: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:220:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:221:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:227:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:228:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:234:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:235:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:241:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:242:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:249:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:250:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:312:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:317:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:322:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:325:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:328:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:376:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:387:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:400:5: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:409:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:414:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:421:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:472:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:476:7: note: also accessed here"} | ["clang/test/SemaObjC/arc-repeated-weak.mm"]={"clang/test/SemaObjC/arc-repeated-weak.mm:24:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:29:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:57:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:68:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:73:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:78:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:83:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:94:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:100:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:105:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:114:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:120:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:123:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:128:12: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:134:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:139:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:145:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:170:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:211:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:213:5: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:220:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:221:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:227:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:228:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:234:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:235:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:241:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:242:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:249:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:250:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:312:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:317:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:322:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:325:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:328:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:376:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:387:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:400:5: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:409:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:414:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:421:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:472:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:476:7: note: also accessed here"} | ||
| Line 4,251: | Line 4,252: | ||
}, | }, | ||
["note_arc_weak_disabled"]={ | ["note_arc_weak_disabled"]={ | ||
[ | [i]="note_arc_weak_disabled", | ||
[b]="declaration uses __weak, but ARC is disabled", | [b]="declaration uses __weak, but ARC is disabled", | ||
[g]="declaration uses __weak, but ARC is disabled", | [g]="declaration uses __weak, but ARC is disabled", | ||
[f]= | [f]=q, | ||
[e]= | [e]="declaration uses __weak, but ARC is disabled", | ||
[ | [c]=o, | ||
[ | [a]=kd, | ||
[h]={jd,1446008599,id,ed}, | |||
[d]={{kc,475,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ForbiddenWeak:\n if (S.getLangOpts().ObjCWeakRuntime)\n diag_available_here = diag::note_arc_weak_disabled;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/mrc-no-weak.m"]={"clang/test/SemaObjC/mrc-no-weak.m:39:13: note: declaration uses __weak, but ARC is disabled","clang/test/SemaObjC/mrc-no-weak.m:39:13: note: declaration uses __weak, but ARC is disabled"} | ["clang/test/SemaObjC/mrc-no-weak.m"]={"clang/test/SemaObjC/mrc-no-weak.m:39:13: note: declaration uses __weak, but ARC is disabled","clang/test/SemaObjC/mrc-no-weak.m:39:13: note: declaration uses __weak, but ARC is disabled"} | ||
| Line 4,265: | Line 4,266: | ||
}, | }, | ||
["note_arc_weak_no_runtime"]={ | ["note_arc_weak_no_runtime"]={ | ||
[ | [i]="note_arc_weak_no_runtime", | ||
[b]="declaration uses __weak, which the current deployment target does not support", | [b]="declaration uses __weak, which the current deployment target does not support", | ||
[g]="declaration uses __weak, which the current deployment target does not support", | [g]="declaration uses __weak, which the current deployment target does not support", | ||
[f]= | [f]=q, | ||
[e]= | [e]="declaration uses __weak, which the current deployment target does not support", | ||
[ | [c]=o, | ||
[ | [a]=kd, | ||
[h]={jd,1446008599,id,ed}, | |||
[d]={{kc,477,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ForbiddenWeak:\n if (S.getLangOpts().ObjCWeakRuntime)\n // ...\n else\n diag_available_here = diag::note_arc_weak_no_runtime;"}} | |||
}, | }, | ||
["note_array_declared_here"]={ | ["note_array_declared_here"]={ | ||
[ | [i]={{nil,p,"note_array_declared_here"}}, | ||
[b]={{nil,p,"array %0 declared here"}}, | [b]={{nil,p,"array %0 declared here"}}, | ||
[ | [g]={{nil,p,"array A declared here"}}, | ||
[ | [f]=q, | ||
[ | [e]="array (.*?) declared here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Qc,1567434909,Pc,md}, | ||
[ | [d]={{ac,17103,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (IsUnboundedArray) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n if (ND)\n DiagRuntimeBehavior(ND->getBeginLoc(), BaseExpr, PDiag(diag::note_array_declared_here) << ND);"},{ac,17200,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (ND)\n DiagRuntimeBehavior(ND->getBeginLoc(), BaseExpr, PDiag(diag::note_array_declared_here) << ND);"},{v,11333,"static void DiagnoseDivisionSizeofPointerOrArray(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc) {\n // ...\n if (LHSTy->isPointerType() && !RHSTy->isPointerType()) {\n // ...\n } else if (const auto *ArrayTy = S.Context.getAsArrayType(LHSTy)) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(LHSArg)) {\n if (const ValueDecl *LHSArgDecl = DRE->getDecl())\n S.Diag(LHSArgDecl->getLocation(), diag::note_array_declared_here) << LHSArgDecl;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/array-bounds-system-header.cpp"]={"clang/test/SemaCXX/array-bounds-system-header.cpp:5:3: note: array \'a\' declared here","clang/test/SemaCXX/array-bounds-system-header.cpp:5:3: note: array \'a\' declared here"} | ["clang/test/SemaCXX/array-bounds-system-header.cpp"]={"clang/test/SemaCXX/array-bounds-system-header.cpp:5:3: note: array \'a\' declared here","clang/test/SemaCXX/array-bounds-system-header.cpp:5:3: note: array \'a\' declared here"} | ||
| Line 4,290: | Line 4,291: | ||
}, | }, | ||
["note_array_init_plain_string_into_char8_t"]={ | ["note_array_init_plain_string_into_char8_t"]={ | ||
[ | [i]={{nil,nb,"note_array_init_plain_string_into_char8_t"}}, | ||
[b]={{nil, | [b]={{nil,nb,"add \'u8\' prefix to form a \'char8_t\' string literal"}}, | ||
[ | [g]={{nil,nb,"add \'u8\' prefix to form a \'char8_t\' string literal"}}, | ||
[ | [f]=q, | ||
[ | [e]="add \'u8\' prefix to form a \'char8_t\' string literal", | ||
[ | [c]=o, | ||
[ | [a]={{nil,nb,m}}, | ||
[ | [h]={"3a8244df6fb8",1525150965,"Implement P0482R2, support for char8_t type.","Implement P0482R2, support for char8_t type.\n\nThis is not yet part of any C++ working draft, and so is controlled by the flag\n-fchar8_t rather than a -std= flag. (The GCC implementation is controlled by a\nflag with the same name.)\n\nThis implementation is experimental, and will be removed or revised\nsubstantially to match the proposal as it makes its way through the C++\ncommittee.\n\nllvm-svn: 331244"}, | ||
[ | [d]={{sb,9600,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_PlainStringIntoUTF8Char:\n // ...\n S.Diag(Args.front()->getBeginLoc(), diag::note_array_init_plain_string_into_char8_t) << FixItHint::CreateInsertion(Args.front()->getBeginLoc(), \"u8\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/char8_t.cpp"]={"clang/test/SemaCXX/char8_t.cpp:9:15: note: add \'u8\' prefix to form a \'char8_t\' string literal"} | ["clang/test/SemaCXX/char8_t.cpp"]={"clang/test/SemaCXX/char8_t.cpp:9:15: note: add \'u8\' prefix to form a \'char8_t\' string literal"} | ||
| Line 4,304: | Line 4,305: | ||
}, | }, | ||
["note_array_size_conversion"]={ | ["note_array_size_conversion"]={ | ||
[ | [i]="note_array_size_conversion", | ||
[b]="conversion to %select{integral|enumeration}0 type %1 declared here", | [b]="conversion to %select{integral|enumeration}0 type %1 declared here", | ||
[ | [g]={{nil,nil,{"conversion to ",{"integral","enumeration"}," type B declared here"}}}, | ||
[ | [f]=q, | ||
[ | [e]="conversion to (?:integral|enumeration) type (.*?) declared here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class","Implement C++ DR299, which allows an implicit conversion from a class\ntype to an integral or enumeration type in the size of an array new\nexpression, e.g.,\n\n new int[ConvertibleToInt(10)];\n\nThis is a GNU and C++0x extension.\n\nllvm-svn: 107229"}, | ||
[ | [d]={{Tb,2166,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n // ...\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n // ...\n if (getLangOpts().CPlusPlus14) {\n // ...\n } else {\n class SizeConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_array_size_conversion) << ConvTy->isEnumeralType() << ConvTy; }"},{Tb,2177,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n // ...\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n // ...\n if (getLangOpts().CPlusPlus14) {\n // ...\n } else {\n class SizeConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_array_size_conversion) << ConvTy->isEnumeralType() << ConvTy; }"}} | ||
}, | }, | ||
["note_asm_input_duplicate_first"]={ | ["note_asm_input_duplicate_first"]={ | ||
[ | [i]="note_asm_input_duplicate_first", | ||
[b]="constraint \'%0\' is already present here", | [b]="constraint \'%0\' is already present here", | ||
[ | [g]="constraint \'A\' is already present here", | ||
[ | [f]=q, | ||
[ | [e]="constraint \'(.*?)\' is already present here", | ||
[ | [c]=o, | ||
[ | [a]="Inline Assembly Issue", | ||
[ | [h]={"8e261be91106",1442846460,"Fix assertion in inline assembler IR gen","Fix assertion in inline assembler IR gen\nSeveral inputs may not refer to one output constraint in inline assembler\ninsertions, clang was failing on assertion on such test case.\n\nllvm-svn: 248158"}, | ||
[ | [d]={{Oc,609,"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 (InputMatchedToOutput[TiedTo] != ~0U) {\n // ...\n targetDiag(NS->getInputExpr(InputMatchedToOutput[TiedTo])->getBeginLoc(), diag::note_asm_input_duplicate_first) << TiedTo;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:291:17: note: constraint \'1\' is already present here"} | ["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:291:17: note: constraint \'1\' is already present here"} | ||
| Line 4,329: | Line 4,330: | ||
}, | }, | ||
["note_asm_missing_constraint_modifier"]={ | ["note_asm_missing_constraint_modifier"]={ | ||
[ | [i]="note_asm_missing_constraint_modifier", | ||
[b]="use constraint modifier \"%0\"", | [b]="use constraint modifier \"%0\"", | ||
[ | [g]="use constraint modifier \"A\"", | ||
[ | [f]=q, | ||
[ | [e]="use constraint modifier \"(.*?)\"", | ||
[ | [c]=o, | ||
[ | [a]="Inline Assembly Issue", | ||
[ | [h]={"987f1864caeb",1408687521,"[AArch64, inline-asm] Improve diagnostic that is printed when the size of a","[AArch64, inline-asm] Improve diagnostic that is printed when the size of a\nvariable that has regiser constraint \"r\" is not 64-bit.\n\nGeneral register operands are output using 64-bit \"x\" register names, regardless\nof the size of the variable, unless the asm operand is prefixed with the \"%w\"\nmodifier. This surprises and confuses many users who aren\'t familiar with\naarch64 inline assembly rules.\n\nWith this commit, a note and fixit hint are printed which tell the users that\nthey need modifier \"%w\" in order to output a \"w\" register instead of an \"x\"\nregister.\n\n<rdar://problem/12764785>\n\nllvm-svn: 216260"}, | ||
[ | [d]={{Oc,554,"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 // Validate constraints and modifiers.\n for (unsigned i = 0, e = Pieces.size(); i != e; ++i) {\n // ...\n if (!Context.getTargetInfo().validateConstraintModifier(Literal->getString(), Piece.getModifier(), Size, SuggestedModifier)) {\n // ...\n if (!SuggestedModifier.empty()) {\n auto B = targetDiag(Piece.getRange().getBegin(), diag::note_asm_missing_constraint_modifier) << SuggestedModifier;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/arm64-inline-asm.c"]={"clang/test/Sema/arm64-inline-asm.c:8:21: note: use constraint modifier \"w\""} | ["clang/test/Sema/arm64-inline-asm.c"]={"clang/test/Sema/arm64-inline-asm.c:8:21: note: use constraint modifier \"w\""} | ||
| Line 4,343: | Line 4,344: | ||
}, | }, | ||
["note_assign_lhs_incomplete"]={ | ["note_assign_lhs_incomplete"]={ | ||
[ | [i]="note_assign_lhs_incomplete", | ||
[b]="type %0 is incomplete", | [b]="type %0 is incomplete", | ||
[ | [g]="type A is incomplete", | ||
[ | [f]=q, | ||
[ | [e]="type (.*?) is incomplete", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"a31efa07ff70",1377722135,"Improve error for assignment to incomplete class.","Improve error for assignment to incomplete class.\n\nPR7681.\n\nllvm-svn: 189510"}, | ||
[ | [d]={{pc,14260,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_No_Viable_Function: {\n // ...\n if (Args[0]->getType()->isRecordType() && Opc >= BO_Assign && Opc <= BO_OrAssign) {\n // ...\n if (Args[0]->getType()->isIncompleteType()) {\n Diag(OpLoc, diag::note_assign_lhs_incomplete) << Args[0]->getType() << Args[0]->getSourceRange() << Args[1]->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:452:12: note: type \'PointerUnion<int *, float *>\' is incomplete"} | ["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:452:12: note: type \'PointerUnion<int *, float *>\' is incomplete"} | ||
| Line 4,357: | Line 4,358: | ||
}, | }, | ||
["note_atomic_constraint_evaluated_to_false"]={ | ["note_atomic_constraint_evaluated_to_false"]={ | ||
[ | [i]={{nil,p,"note_atomic_constraint_evaluated_to_false"}}, | ||
[b]={{nil,p,"%select{and|because}0 \'%1\' evaluated to false"}}, | [b]={{nil,p,"%select{and|because}0 \'%1\' evaluated to false"}}, | ||
[ | [g]={{nil,p,{{"and","because"}," \'B\' evaluated to false"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:and|because) \'(.*?)\' evaluated to false", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Hc,1569403888,Gc,Cc}, | ||
[ | [d]={{bd,1134,"static void diagnoseWellFormedUnsatisfiedConstraintExpr(Sema &S, Expr *SubstExpr, bool First) {\n // ...\n S.Diag(SubstExpr->getSourceRange().getBegin(), diag::note_atomic_constraint_evaluated_to_false) << (int)First << SubstExpr;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp"]={"clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:18:14: note: because \'same_as<int, _Bool>\' evaluated to false","clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:10:19: note: because \'is_same_v<int, _Bool>\' evaluated to false"} | ["clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp"]={"clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:18:14: note: because \'same_as<int, _Bool>\' evaluated to false","clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:10:19: note: because \'is_same_v<int, _Bool>\' evaluated to false"} | ||
| Line 4,371: | Line 4,372: | ||
}, | }, | ||
["note_atomic_constraint_evaluated_to_false_elaborated"]={ | ["note_atomic_constraint_evaluated_to_false_elaborated"]={ | ||
[ | [i]={{nil,p,"note_atomic_constraint_evaluated_to_false_elaborated"}}, | ||
[b]={{nil,p,"%select{and|because}0 \'%1\' (%2 %3 %4) evaluated to false"}}, | [b]={{nil,p,"%select{and|because}0 \'%1\' (%2 %3 %4) evaluated to false"}}, | ||
[ | [g]={{nil,p,{{"and","because"}," \'B\' (C D E) evaluated to false"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:and|because) \'(.*?)\' \\((.*?) (.*?) (.*?)\\) evaluated to false", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Hc,1569403888,Gc,Cc}, | ||
[ | [d]={{bd,1078,"static void diagnoseWellFormedUnsatisfiedConstraintExpr(Sema &S, Expr *SubstExpr, bool First) {\n // ...\n if (BinaryOperator *BO = dyn_cast<BinaryOperator>(SubstExpr)) {\n // ...\n case BO_GE:\n case BO_LE:\n case BO_GT:\n case BO_LT:\n case BO_EQ:\n case BO_NE:\n if (BO->getLHS()->getType()->isIntegerType() && BO->getRHS()->getType()->isIntegerType()) {\n // ...\n if (!SimplifiedLHS.Diag && !SimplifiedRHS.Diag) {\n S.Diag(SubstExpr->getBeginLoc(), diag::note_atomic_constraint_evaluated_to_false_elaborated) << (int)First << SubstExpr << toString(SimplifiedLHS.Val.getInt(), 10) << BinaryOperator::getOpcodeStr(BO->getOpcode()) << toString(SimplifiedRHS.Val.getInt(), 10);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/concepts-PR54629.cpp"]={"clang/test/SemaTemplate/concepts-PR54629.cpp:31:38: note: because \'sizeof (t) < 4\' (4 < 4) evaluated to false","clang/test/SemaTemplate/concepts-PR54629.cpp:36:38: note: because \'sizeof (t) > 4\' (4 > 4) evaluated to false","clang/test/SemaTemplate/concepts-PR54629.cpp:41:38: note: because \'sizeof (t) > 8\' (4 > 8) evaluated to false"} | ["clang/test/SemaTemplate/concepts-PR54629.cpp"]={"clang/test/SemaTemplate/concepts-PR54629.cpp:31:38: note: because \'sizeof (t) < 4\' (4 < 4) evaluated to false","clang/test/SemaTemplate/concepts-PR54629.cpp:36:38: note: because \'sizeof (t) > 4\' (4 > 4) evaluated to false","clang/test/SemaTemplate/concepts-PR54629.cpp:41:38: note: because \'sizeof (t) > 8\' (4 > 8) evaluated to false"} | ||
| Line 4,385: | Line 4,386: | ||
}, | }, | ||
["note_atomic_property_fixup_suggest"]={ | ["note_atomic_property_fixup_suggest"]={ | ||
[ | [i]="note_atomic_property_fixup_suggest", | ||
[b]={{nil, | [b]={{nil,P,"setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic"},{y,nil,"setter and getter must both be synthesized, or both be user defined,or the property must be nonatomic"}}, | ||
[ | [g]={{nil,P,"setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic"},{y,nil,"setter and getter must both be synthesized, or both be user defined,or the property must be nonatomic"}}, | ||
[ | [f]=q, | ||
[ | [e]="setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"9cd57a7061c8",1317944878,"objc: Improve on diagnostic when atomic proeprty is synthesized","objc: Improve on diagnostic when atomic proeprty is synthesized\non one accessor and user-provide with another.\n\nllvm-svn: 141343"}, | ||
[ | [d]={{oc,2240,"void Sema::AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl) {\n // ...\n for (ObjCContainerDecl::PropertyMap::iterator I = PM.begin(), E = PM.end(); I != E; ++I) {\n // ...\n if (const ObjCPropertyImplDecl *PIDecl = IMPDecl->FindPropertyImplDecl(Property->getIdentifier(), Property->getQueryKind())) {\n // ...\n if ((bool)GetterMethod ^ (bool)SetterMethod) {\n // ...\n // fixit stuff.\n if (Property->getLParenLoc().isValid() && !(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic)) {\n // ...\n Diag(Property->getLocation(), diag::note_atomic_property_fixup_suggest) << FixItHint::CreateInsertion(AfterLParen, NonatomicStr);"},{oc,2247,"void Sema::AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl) {\n // ...\n for (ObjCContainerDecl::PropertyMap::iterator I = PM.begin(), E = PM.end(); I != E; ++I) {\n // ...\n if (const ObjCPropertyImplDecl *PIDecl = IMPDecl->FindPropertyImplDecl(Property->getIdentifier(), Property->getQueryKind())) {\n // ...\n if ((bool)GetterMethod ^ (bool)SetterMethod) {\n // ...\n // fixit stuff.\n if (Property->getLParenLoc().isValid() && !(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic)) {\n // ...\n } else if (Property->getLParenLoc().isInvalid()) {\n // ...\n Diag(Property->getLocation(), diag::note_atomic_property_fixup_suggest) << FixItHint::CreateInsertion(startLoc, \"(nonatomic) \");"},{oc,2250,"void Sema::AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl) {\n // ...\n for (ObjCContainerDecl::PropertyMap::iterator I = PM.begin(), E = PM.end(); I != E; ++I) {\n // ...\n if (const ObjCPropertyImplDecl *PIDecl = IMPDecl->FindPropertyImplDecl(Property->getIdentifier(), Property->getQueryKind())) {\n // ...\n if ((bool)GetterMethod ^ (bool)SetterMethod) {\n // ...\n // fixit stuff.\n if (Property->getLParenLoc().isValid() && !(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic)) {\n // ...\n } else if (Property->getLParenLoc().isInvalid()) {\n // ...\n } else\n Diag(MethodLoc, diag::note_atomic_property_fixup_suggest);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/atomic-property-synthesis-rules.m"]={"clang/test/SemaObjC/atomic-property-synthesis-rules.m:110:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:112:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:206:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:208:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:143:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:145:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:217:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:219:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic"} | ["clang/test/SemaObjC/atomic-property-synthesis-rules.m"]={"clang/test/SemaObjC/atomic-property-synthesis-rules.m:110:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:112:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:206:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:208:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:143:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:145:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:217:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:219:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic"} | ||
| Line 4,399: | Line 4,400: | ||
}, | }, | ||
["note_attribute"]={ | ["note_attribute"]={ | ||
[ | [i]="note_attribute", | ||
[b]="attribute is here", | [b]="attribute is here", | ||
[g]="attribute is here", | [g]="attribute is here", | ||
[f]= | [f]=q, | ||
[e]= | [e]="attribute is here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"078d2f89cd6a",1401382220,"Sema: Check dll attributes on static data members","Sema: Check dll attributes on static data members\n\nRedeclarations cannot add a dll attribute and static data members cannot\nbe defined.\n\nllvm-svn: 209825"}, | |||
[d]={{w,7131,"static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, NamedDecl *NewDecl, bool IsSpecialization, bool IsDefinition) {\n // ...\n if (OldImportAttr && !HasNewAttr && (!IsInline || (IsMicrosoftABI && IsTemplate)) && !IsStaticDataMember && !NewDecl->isLocalExternDecl() && !IsQualifiedFriend) {\n if (IsMicrosoftABI && IsDefinition) {\n if (IsSpecialization) {\n // ...\n S.Diag(OldImportAttr->getLocation(), diag::note_attribute);"},{w,14447,"/// FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform\n/// any semantic actions necessary after any initializer has been attached.\nvoid Sema::FinalizeDeclaration(Decl *ThisDecl) {\n // ...\n // Imported static data members cannot be defined out-of-line.\n if (const auto *IA = dyn_cast_or_null<DLLImportAttr>(DLLAttr)) {\n if (VD->isStaticDataMember() && VD->isOutOfLine() && VD->isThisDeclarationADefinition()) {\n // ...\n Diag(IA->getLocation(), diag::note_attribute);"},{w,15936,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n // Verify and clean out per-function state.\n if (Body && (!FD || !FD->isDefaulted())) {\n // ...\n if (FD && FD->hasAttr<NakedAttr>()) {\n for (const Stmt *S : Body->children()) {\n // ...\n if (!isa<AsmStmt>(S) && !isa<NullStmt>(S)) {\n // ...\n Diag(FD->getAttr<NakedAttr>()->getLocation(), diag::note_attribute);"},{Z,6658,"/// Perform propagation of DLL attributes from a derived class to a\n/// templated base class for MS compatibility.\nvoid Sema::propagateDLLAttrToBaseClassTemplate(CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc) {\n // ...\n Diag(ClassAttr->getLocation(), diag::note_attribute);"},{Oc,144,"static bool CheckNakedParmReference(Expr *E, Sema &S) {\n // ...\n while (WorkList.size()) {\n // ...\n if (isa<CXXThisExpr>(E)) {\n // ...\n S.Diag(Func->getAttr<NakedAttr>()->getLocation(), diag::note_attribute);"},{Oc,150,"static bool CheckNakedParmReference(Expr *E, Sema &S) {\n // ...\n while (WorkList.size()) {\n // ...\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {\n if (isa<ParmVarDecl>(DRE->getDecl())) {\n // ...\n S.Diag(Func->getAttr<NakedAttr>()->getLocation(), diag::note_attribute);"},{O,9996,"// 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 (TSK == TSK_ExplicitInstantiationDeclaration && !Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) {\n // Check for dllexport class template instantiation declarations,\n // except for MinGW mode.\n for (const ParsedAttr &AL : Attr) {\n if (AL.getKind() == ParsedAttr::AT_DLLExport) {\n // ...\n Diag(AL.getLoc(), diag::note_attribute);"},{O,10004,"// 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 (TSK == TSK_ExplicitInstantiationDeclaration && !Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) {\n // ...\n if (auto *A = ClassTemplate->getTemplatedDecl()->getAttr<DLLExportAttr>()) {\n // ...\n Diag(A->getLocation(), diag::note_attribute);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/attr-naked.c"]={"clang/test/Sema/attr-naked.c:13:16: note: attribute is here","clang/test/Sema/attr-naked.c:38:16: note: attribute is here","clang/test/Sema/attr-naked.c:45:16: note: attribute is here","clang/test/Sema/attr-naked.c:52:16: note: attribute is here","clang/test/Sema/attr-naked.c:56:16: note: attribute is here","clang/test/Sema/attr-naked.c:60:16: note: attribute is here"} | ["clang/test/Sema/attr-naked.c"]={"clang/test/Sema/attr-naked.c:13:16: note: attribute is here","clang/test/Sema/attr-naked.c:38:16: note: attribute is here","clang/test/Sema/attr-naked.c:45:16: note: attribute is here","clang/test/Sema/attr-naked.c:52:16: note: attribute is here","clang/test/Sema/attr-naked.c:56:16: note: attribute is here","clang/test/Sema/attr-naked.c:60:16: note: attribute is here"} | ||
| Line 4,413: | Line 4,414: | ||
}, | }, | ||
["note_attribute_has_no_effect_on_compile_time_if_here"]={ | ["note_attribute_has_no_effect_on_compile_time_if_here"]={ | ||
[ | [i]={{nil,V,"note_attribute_has_no_effect_on_compile_time_if_here"}}, | ||
[b]={{nil, | [b]={{nil,V,"annotating the \'if %select{constexpr|consteval}0\' statement here"}}, | ||
[ | [g]={{nil,V,{"annotating the \'if ",{"constexpr","consteval"},"\' statement here"}}}, | ||
[ | [f]=q, | ||
[ | [e]="annotating the \'if (?:constexpr|consteval)\' statement here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,V,m}}, | ||
[ | [h]={"3dbcea8b957a",1615397021,"Reland [clang] Check unsupported types in expressions","Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"}, | ||
[ | [d]={{wb,912,"StmtResult Sema::ActOnIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *thenStmt, SourceLocation ElseLoc, Stmt *elseStmt) {\n // ...\n if (ConstevalOrNegatedConsteval || StatementKind == IfStatementKind::Constexpr) {\n auto DiagnoseLikelihood = [&](const Stmt *S) {\n if (const Attr *A = Stmt::getLikelihoodAttr(S)) {\n // ...\n Diags.Report(IfLoc, diag::note_attribute_has_no_effect_on_compile_time_if_here) << ConstevalOrNegatedConsteval << SourceRange(IfLoc, (ConstevalOrNegatedConsteval ? thenStmt->getBeginLoc() : LParenLoc).getLocWithOffset(-1));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:3: note: annotating the \'if consteval\' statement here","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:3: note: annotating the \'if consteval\' statement here"} | ["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:3: note: annotating the \'if consteval\' statement here","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:3: note: annotating the \'if consteval\' statement here"} | ||
| Line 4,427: | Line 4,428: | ||
}, | }, | ||
["note_attribute_has_no_effect_on_infinite_loop_here"]={ | ["note_attribute_has_no_effect_on_infinite_loop_here"]={ | ||
[ | [i]={{nil,z,"note_attribute_has_no_effect_on_infinite_loop_here"}}, | ||
[b]={{nil, | [b]={{nil,z,"annotating the infinite loop here"}}, | ||
[ | [g]={{nil,z,"annotating the infinite loop here"}}, | ||
[ | [f]=q, | ||
[ | [e]="annotating the infinite loop here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,z,m}}, | ||
[ | [h]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types","Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to support fadd/fsub:\n\nhttps://reviews.llvm.org/D53965\n\nHowever clang atomic builtins fetch add/sub still does not support\nemitting atomicrmw fadd/fsub.\n\nThis patch adds that.\n\nReviewed by: John McCall, Artem Belevich, Matt Arsenault, JF Bastien,\nJames Y Knight, Louis Dionne, Olivier Giroux\n\nDifferential Revision: https://reviews.llvm.org/D71726"}, | ||
[ | [d]={{"clang/lib/CodeGen/CGStmt.cpp",937,"void CodeGenFunction::EmitWhileStmt(const WhileStmt &S, ArrayRef<const Attr *> WhileAttrs) {\n // ...\n if (EmitBoolCondBranch) {\n // ...\n } else if (const Attr *A = Stmt::getLikelihoodAttr(S.getBody())) {\n // ...\n CGM.getDiags().Report(S.getWhileLoc(), diag::note_attribute_has_no_effect_on_infinite_loop_here) << SourceRange(S.getWhileLoc(), S.getRParenLoc());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp"]={"clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp:63:3: note: annotating the infinite loop here"} | ["clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp"]={"clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp:63:3: note: annotating the infinite loop here"} | ||
| Line 4,441: | Line 4,442: | ||
}, | }, | ||
["note_attribute_overloadable_prev_overload"]={ | ["note_attribute_overloadable_prev_overload"]={ | ||
[ | [i]="note_attribute_overloadable_prev_overload", | ||
[b]="previous overload of function is here", | [b]="previous overload of function is here", | ||
[ | [g]="previous overload of function is here", | ||
[ | [f]=q, | ||
[ | [e]="previous (?:unmarked |)overload of function is here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={L,1236199783,M,N}, | ||
[ | [d]={{w,3752,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n if (OldOvl != New->hasAttr<OverloadableAttr>() && !Old->isImplicit()) {\n // ...\n if (DiagOld)\n Diag(DiagOld->getLocation(), diag::note_attribute_overloadable_prev_overload) << OldOvl;"},{w,11889,"/// Perform semantic checking of a new function declaration.\n///\n/// Performs semantic analysis of the new function declaration\n/// NewFD. This routine performs all semantic checking that does not\n/// require the actual declarator involved in the declaration, and is\n/// used both for the declaration of functions as they are parsed\n/// (called via ActOnDeclarator) and for the declaration of functions\n/// that have been instantiated via C++ template instantiation (called\n/// via InstantiateDecl).\n///\n/// \\param IsMemberSpecialization whether this new function declaration is\n/// a member specialization (that replaces any definition provided by the\n/// previous declaration).\n///\n/// This sets NewFD->isInvalidDecl() to true if there was an error.\n///\n/// \\returns true if the function declaration is a redeclaration.\nbool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization, bool DeclIsDefn) {\n // ...\n if (Redeclaration) {\n // ...\n } else if (!getLangOpts().CPlusPlus && MayNeedOverloadableChecks && !NewFD->getAttr<OverloadableAttr>()) {\n // ...\n if (OtherUnmarkedIter != Previous.end()) {\n // ...\n Diag((*OtherUnmarkedIter)->getLocation(), diag::note_attribute_overloadable_prev_overload) << false;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/overloadable.c"]={"clang/test/Sema/overloadable.c:7:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:78:35: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:180:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:185:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:185:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:191:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:192:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:192:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:200:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:204:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:217:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:221:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:230:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:233:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:240:6: note: previous unmarked overload of function is here"} | ["clang/test/Sema/overloadable.c"]={"clang/test/Sema/overloadable.c:7:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:78:35: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:180:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:185:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:185:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:191:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:192:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:192:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:200:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:204:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:217:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:221:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:230:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:233:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:240:6: note: previous unmarked overload of function is here"} | ||
| Line 4,455: | Line 4,456: | ||
}, | }, | ||
["note_auto_readonly_iboutlet_fixup_suggest"]={ | ["note_auto_readonly_iboutlet_fixup_suggest"]={ | ||
[ | [i]="note_auto_readonly_iboutlet_fixup_suggest", | ||
[b]="property should be changed to be readwrite", | [b]="property should be changed to be readwrite", | ||
[g]="property should be changed to be readwrite", | [g]="property should be changed to be readwrite", | ||
[f]= | [f]=q, | ||
[e]= | [e]="property should be changed to be readwrite", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"199a9b57a6bb",1337451437,"objective-c: Warn if default synthesizing readonly IBOutlet properties","objective-c: Warn if default synthesizing readonly IBOutlet properties\nand provide a \'fixit\' to change \'readonly\' to \'readwrite\'. \'fixit\'\npart needs little more work. // rdar://11448209\n\nllvm-svn: 157121"}, | |||
[d]={{oc,1165,"/// 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 (Synthesize && (PIkind & ObjCPropertyAttribute::kind_readonly) && property->hasAttr<IBOutletAttr>() && !AtLoc.isValid()) {\n // ...\n if (!ReadWriteProperty) {\n // ...\n if (LocPropertyAttribute(Context, \"readonly\", property->getLParenLoc(), readonlyLoc)) {\n // ...\n Diag(property->getLocation(), diag::note_auto_readonly_iboutlet_fixup_suggest) << FixItHint::CreateReplacement(ReadonlySourceRange, \"readwrite\");"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/iboutlet.m"]={"clang/test/SemaObjC/iboutlet.m:10:66: note: property should be changed to be readwrite","clang/test/SemaObjC/iboutlet.m:12:53: note: property should be changed to be readwrite","clang/test/SemaObjC/iboutlet.m:28:58: note: property should be changed to be readwrite"} | ["clang/test/SemaObjC/iboutlet.m"]={"clang/test/SemaObjC/iboutlet.m:10:66: note: property should be changed to be readwrite","clang/test/SemaObjC/iboutlet.m:12:53: note: property should be changed to be readwrite","clang/test/SemaObjC/iboutlet.m:28:58: note: property should be changed to be readwrite"} | ||
| Line 4,469: | Line 4,470: | ||
}, | }, | ||
["note_availability_specified_here"]={ | ["note_availability_specified_here"]={ | ||
[ | [i]="note_availability_specified_here", | ||
[b]={{nil, | [b]={{nil,D,"%0 has been explicitly marked %select{unavailable|deleted|deprecated}1 here"},{jc,nil,"%0 has been explicitly marked %select{unavailable|deleted|deprecated|partial}1 here"}}, | ||
[ | [g]={{nil,D,{"A has been explicitly marked ",{"unavailable","deleted","deprecated"}," here"}},{jc,nil,{"A has been explicitly marked ",{"unavailable","deleted","deprecated","partial"}," here"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(.*?) has been explicitly marked (?:unavailable|deleted|deprecated) here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"b79ee57080fa",1387409406,"Implemented delayed processing of \'unavailable\' checking, just like with \'deprecated\'.","Implemented delayed processing of \'unavailable\' checking, just like with \'deprecated\'.\n\nFixes <rdar://problem/15584219> and <rdar://problem/12241361>.\n\nThis change looks large, but all it does is reuse and consolidate\nthe delayed diagnostic logic for deprecation warnings with unavailability\nwarnings. By doing so, it showed various inconsistencies between the\ndiagnostics, which were close, but not consistent. It also revealed\nsome missing \"note:\"\'s in the deprecated diagnostics that were showing\nup in the unavailable diagnostics, etc.\n\nThis change also changes the wording of the core deprecation diagnostics.\nInstead of saying \"function has been explicitly marked deprecated\"\nwe now saw \"\'X\' has been been explicitly marked deprecated\". It\nturns out providing a bit more context is useful, and often we\ngot the actual term wrong or it was not very precise\n (e.g., \"function\" instead of \"destructor\"). By just saying the name\nof the thing that is deprecated/deleted/unavailable we define\nthis issue away. This diagnostic can likely be further wordsmithed\nto be shorter.\n\nllvm-svn: 197627"}, | ||
[ | [d]={{kc,337,"/// 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 unsigned diag_available_here = diag::note_availability_specified_here;"},{kc,343,"/// 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 // Matches diag::note_availability_specified_here."},{v,135,"/// Emit a note explaining that this function is deleted.\nvoid Sema::NoteDeletedFunction(FunctionDecl *Decl) {\n // ...\n Diag(Decl->getLocation(), diag::note_availability_specified_here) << Decl << 1;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx0x-delegating-ctors.cpp"]={"clang/test/SemaCXX/cxx0x-delegating-ctors.cpp:46:3: note: \'~deleted_dtor\' has been explicitly marked deleted here"} | ["clang/test/SemaCXX/cxx0x-delegating-ctors.cpp"]={"clang/test/SemaCXX/cxx0x-delegating-ctors.cpp:46:3: note: \'~deleted_dtor\' has been explicitly marked deleted here"} | ||
| Line 4,483: | Line 4,484: | ||
}, | }, | ||
["note_await_ready_no_bool_conversion"]={ | ["note_await_ready_no_bool_conversion"]={ | ||
[ | [i]={{nil,ab,"note_await_ready_no_bool_conversion"}}, | ||
[b]={{nil, | [b]={{nil,ab,"return type of \'await_ready\' is required to be contextually convertible to \'bool\'"}}, | ||
[ | [g]={{nil,ab,"return type of \'await_ready\' is required to be contextually convertible to \'bool\'"}}, | ||
[ | [f]=q, | ||
[ | [e]="return type of \'await_ready\' is required to be contextually convertible to \'bool\'", | ||
[ | [c]=o, | ||
[ | [a]={{nil,ab,"Coroutines Issue"}}, | ||
[ | [h]={"d978e53c6d70",1495995672,"[coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing c...","[coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing conversions.\n\nSummary:\nThe expression `await_ready` is required to be contextually convertible to bool and `await_suspend` must be a prvalue of either `void` or `bool`.\nThis patch adds diagnostics for when those requirements are violated.\n\nIt also correctly performs the contextual conversion to bool on the result of `await_ready`\n\n\n\nReviewers: GorNishanov, rsmith\n\nReviewed By: GorNishanov\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D33625\n\nllvm-svn: 304094"}, | ||
[ | [d]={{"clang/lib/Sema/SemaCoroutine.cpp",408,"/// Build calls to await_ready, await_suspend, and await_resume for a co_await\n/// expression.\n/// The generated AST tries to clean up temporary objects as early as\n/// possible so that they don\'t live across suspension points if possible.\n/// Having temporary objects living across suspension points unnecessarily can\n/// lead to large frame size, and also lead to memory corruptions if the\n/// coroutine frame is destroyed after coming back from suspension. This is done\n/// by wrapping both the await_ready call and the await_suspend call with\n/// ExprWithCleanups. In the end of this function, we also need to explicitly\n/// set cleanup state so that the CoawaitExpr is also wrapped with an\n/// ExprWithCleanups to clean up the awaiter associated with the co_await\n/// expression.\nstatic ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, SourceLocation Loc, Expr *E) {\n // ...\n if (!AwaitReady->getType()->isDependentType()) {\n // ...\n if (Conv.isInvalid()) {\n S.Diag(AwaitReady->getDirectCallee()->getBeginLoc(), diag::note_await_ready_no_bool_conversion);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:1016:3: note: return type of \'await_ready\' is required to be contextually convertible to \'bool\'"} | ["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:1016:3: note: return type of \'await_ready\' is required to be contextually convertible to \'bool\'"} | ||
| Line 4,497: | Line 4,498: | ||
}, | }, | ||
["note_bad_memaccess_silence"]={ | ["note_bad_memaccess_silence"]={ | ||
[ | [i]="note_bad_memaccess_silence", | ||
[b]="explicitly cast the pointer to silence this warning", | [b]="explicitly cast the pointer to silence this warning", | ||
[g]="explicitly cast the pointer to silence this warning", | [g]="explicitly cast the pointer to silence this warning", | ||
[f]= | [f]=q, | ||
[e]= | [e]="explicitly cast the pointer to silence this warning", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"ac6872655bc6",1307082237,"Clean up the \"non-POD memaccess\" stuff some. This adds a properly named","Clean up the \"non-POD memaccess\" stuff some. This adds a properly named\ndiagnostic group to cover the cases where we have definitively bad\nbehavior: dynamic classes.\n\nIt also rips out the existing support for POD-based checking. This\ndidn\'t work well, and triggered too many false positives. I\'m looking\ninto a possibly more principled way to warn on the fundamental buggy\nconstruct here. POD-ness isn\'t the critical aspect anyways, so a clean\nslate is better. This also removes some silliness from the code until\nthe new checks arrive.\n\nllvm-svn: 132534"}, | |||
[d]={{ac,12604,"/// Check for dangerous or invalid arguments to memset().\n///\n/// This issues warnings on known problematic, dangerous or unspecified\n/// arguments to the standard \'memset\', \'memcpy\', \'memmove\', and \'memcmp\'\n/// function calls.\n///\n/// \\param Call The call expression to diagnose.\nvoid Sema::CheckMemaccessArguments(const CallExpr *Call, unsigned BId, IdentifierInfo *FnName) {\n // ...\n for (unsigned ArgIdx = 0; ArgIdx != LastArg; ++ArgIdx) {\n // ...\n DiagRuntimeBehavior(Dest->getExprLoc(), Dest, PDiag(diag::note_bad_memaccess_silence) << FixItHint::CreateInsertion(ArgRange.getBegin(), \"(void*)\"));"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m"]={"clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:34:10: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:36:9: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:37:10: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:38:11: note: explicitly cast the pointer to silence this warning"} | ["clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m"]={"clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:34:10: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:36:9: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:37:10: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:38:11: note: explicitly cast the pointer to silence this warning"} | ||
| Line 4,511: | Line 4,512: | ||
}, | }, | ||
["note_base_class_specified_here"]={ | ["note_base_class_specified_here"]={ | ||
[ | [i]="note_base_class_specified_here", | ||
[b]="base class %0 specified here", | [b]="base class %0 specified here", | ||
[ | [g]="base class A specified here", | ||
[ | [f]=q, | ||
[ | [e]="base class (.*?) specified here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"43a0857631ab",1262823985,"When we typo-correct a base class initializer, point to the base class","When we typo-correct a base class initializer, point to the base class\nspecifier that we corrected to.\n\nllvm-svn: 92878"}, | ||
[ | [d]={{Z,2759,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // ...\n if ((DerivedCSA || BaseCSA) && (!BaseCSA || !DerivedCSA || BaseCSA->getName() != DerivedCSA->getName())) {\n // ...\n Diag(CXXBaseDecl->getLocation(), diag::note_base_class_specified_here) << CXXBaseDecl;"},{Z,4500,"/// Handle a C++ member initializer.\nMemInitResult Sema::BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc) {\n // ...\n if (TemplateTypeTy) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype_auto) {\n // ...\n } else {\n // ...\n if (!TyD) {\n // ...\n if (R.empty() && BaseType.isNull() && (Corr = CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), S, &SS, CCC, CTK_ErrorRecovery, ClassDecl))) {\n if (FieldDecl *Member = Corr.getCorrectionDeclAs<FieldDecl>()) {\n // ...\n } else if (TypeDecl *Type = Corr.getCorrectionDeclAs<TypeDecl>()) {\n // ...\n if (FindBaseInitializer(*this, ClassDecl, Context.getTypeDeclType(Type), DirectBaseSpec, VirtualBaseSpec)) {\n // ...\n Diag(BaseSpec->getBeginLoc(), diag::note_base_class_specified_here) << BaseSpec->getType() << BaseSpec->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/code-seg.cpp"]={"clang/test/SemaCXX/code-seg.cpp:24:40: note: base class \'Base1\' specified here","clang/test/SemaCXX/code-seg.cpp:24:40: note: base class \'Base1\' specified here","clang/test/SemaCXX/code-seg.cpp:25:8: note: base class \'Base2\' specified here","clang/test/SemaCXX/code-seg.cpp:25:8: note: base class \'Base2\' specified here","clang/test/SemaCXX/code-seg.cpp:24:40: note: base class \'Base1\' specified here","clang/test/SemaCXX/code-seg.cpp:25:8: note: base class \'Base2\' specified here"} | ["clang/test/SemaCXX/code-seg.cpp"]={"clang/test/SemaCXX/code-seg.cpp:24:40: note: base class \'Base1\' specified here","clang/test/SemaCXX/code-seg.cpp:24:40: note: base class \'Base1\' specified here","clang/test/SemaCXX/code-seg.cpp:25:8: note: base class \'Base2\' specified here","clang/test/SemaCXX/code-seg.cpp:25:8: note: base class \'Base2\' specified here","clang/test/SemaCXX/code-seg.cpp:24:40: note: base class \'Base1\' specified here","clang/test/SemaCXX/code-seg.cpp:25:8: note: base class \'Base2\' specified here"} | ||
| Line 4,525: | Line 4,526: | ||
}, | }, | ||
["note_bitfield_decl"]={ | ["note_bitfield_decl"]={ | ||
[ | [i]="note_bitfield_decl", | ||
[b]="bit-field is declared here", | [b]="bit-field is declared here", | ||
[ | [g]="bit-field is declared here", | ||
[ | [f]=q, | ||
[ | [e]="bit\\-field is declared here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"3e1e52782604",1260399737,"Reimplement reference initialization (C++ [dcl.init.ref]) using the","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"}, | ||
[ | [d]={{v,16704,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n // ...\n for (const OffsetOfComponent &OC : Components) {\n // ...\n // C99 7.17p3:\n // (If the specified member is a bit-field, the behavior is undefined.)\n //\n // We diagnose this as an error.\n if (MemberDecl->isBitField()) {\n // ...\n Diag(MemberDecl->getLocation(), diag::note_bitfield_decl);"},{sb,9722,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_NonConstLValueReferenceBindingToBitfield: {\n // ...\n if (BitField)\n S.Diag(BitField->getLocation(), diag::note_bitfield_decl);"},{Oc,956,"StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef<Token> AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef<StringRef> Constraints, ArrayRef<StringRef> Clobbers, ArrayRef<Expr *> Exprs, SourceLocation EndLoc) {\n // ...\n for (uint64_t I = 0; I < NumOutputs + NumInputs; ++I) {\n // ...\n if (E->getType()->isBitIntType()) {\n // ...\n } else if (E->refersToBitField()) {\n // ...\n Diag(BitField->getLocation(), diag::note_bitfield_decl);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/references.mm"]={"clang/test/SemaObjCXX/references.mm:70:12: note: bit-field is declared here"} | ["clang/test/SemaObjCXX/references.mm"]={"clang/test/SemaObjCXX/references.mm:70:12: note: bit-field is declared here"} | ||
| Line 4,539: | Line 4,540: | ||
}, | }, | ||
["note_block_var_fixit_add_initialization"]={ | ["note_block_var_fixit_add_initialization"]={ | ||
[ | [i]="note_block_var_fixit_add_initialization", | ||
[b]="did you mean to use __block %0?", | [b]="did you mean to use __block %0?", | ||
[ | [g]="did you mean to use __block A?", | ||
[ | [f]=q, | ||
[ | [e]="did you mean to use __block (.*?)\\?", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"429fadb8e262",1331166170,"improve on diagnostic and provide a fixit hint when","improve on diagnostic and provide a fixit hint when\nan uninitialized block variable is being called inside the\nblock literal. // rdar://10817031\n\nllvm-svn: 152271"}, | ||
[ | [d]={{"clang/lib/Sema/AnalysisBasedWarnings.cpp",776,"static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) {\n // ...\n if (VariableTy->isBlockPointerType() && !VD->hasAttr<BlocksAttr>()) {\n S.Diag(VD->getLocation(), diag::note_block_var_fixit_add_initialization) << VD->getDeclName() << FixItHint::CreateInsertion(VD->getLocation(), \"__block \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/FixIt/fixit-recursive-block.c"]={"clang/test/FixIt/fixit-recursive-block.c:8:12: note: did you mean to use __block \'arc_fail\'?"} | ["clang/test/FixIt/fixit-recursive-block.c"]={"clang/test/FixIt/fixit-recursive-block.c:8:12: note: did you mean to use __block \'arc_fail\'?"} | ||
| Line 4,553: | Line 4,554: | ||
}, | }, | ||
["note_bracket_depth"]={ | ["note_bracket_depth"]={ | ||
[ | [i]="note_bracket_depth", | ||
[b]="use -fbracket-depth=N to increase maximum nesting level", | [b]="use -fbracket-depth=N to increase maximum nesting level", | ||
[ | [g]="use -fbracket-depth=N to increase maximum nesting level", | ||
[ | [f]=q, | ||
[ | [e]="use \\-fbracket\\-depth\\=N to increase maximum nesting level", | ||
[ | [c]=o, | ||
[ | [a]=G, | ||
[ | [h]={"b3a145293dc8",1361498391,"Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,","Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,\nto control the check for the C 5.2.4.1 / C++ [implimits] restriction on nesting\nlevels for parentheses, brackets and braces.\n\nSome code with heavy macro use exceeds the default limit of 256, but we don\'t\nwant to increase it generally to avoid stack overflow on stack-constrained\nsystems.\n\nllvm-svn: 175855"}, | ||
[ | [d]={{"clang/lib/Parse/Parser.cpp",2698,"bool BalancedDelimiterTracker::diagnoseOverflow() {\n // ...\n P.Diag(P.Tok, diag::note_bracket_depth);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/fold_expr_expansion_limit.cpp"]={"clang/test/SemaCXX/fold_expr_expansion_limit.cpp:4:43: note: use -fbracket-depth=N to increase maximum nesting level"} | ["clang/test/SemaCXX/fold_expr_expansion_limit.cpp"]={"clang/test/SemaCXX/fold_expr_expansion_limit.cpp:4:43: note: use -fbracket-depth=N to increase maximum nesting level"} | ||
| Line 4,567: | Line 4,568: | ||
}, | }, | ||
["note_building_builtin_dump_struct_call"]={ | ["note_building_builtin_dump_struct_call"]={ | ||
[ | [i]={{nil,y,"note_building_builtin_dump_struct_call"}}, | ||
[b]={{nil, | [b]={{nil,y,"in call to printing function with arguments \'(%0)\' while dumping struct"}}, | ||
[ | [g]={{nil,y,"in call to printing function with arguments \'(A)\' while dumping struct"}}, | ||
[ | [f]=q, | ||
[ | [e]="in call to printing function with arguments \'\\((.*?)\\)\' while dumping struct", | ||
[ | [c]=o, | ||
[ | [a]={{nil,y,m}}, | ||
[ | [h]={fd,1620530452,Wc,dd}, | ||
[ | [d]={{qc,1009,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::BuildingBuiltinDumpStructCall:\n Diags.Report(Active->PointOfInstantiation, diag::note_building_builtin_dump_struct_call) << convertCallArgsToString(*this, llvm::ArrayRef(Active->CallArgs, Active->NumCallArgs));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/builtin-dump-struct.c"]={"clang/test/Sema/builtin-dump-struct.c:18:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct","clang/test/Sema/builtin-dump-struct.c:19:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct","clang/test/Sema/builtin-dump-struct.c:21:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct"} | ["clang/test/Sema/builtin-dump-struct.c"]={"clang/test/Sema/builtin-dump-struct.c:18:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct","clang/test/Sema/builtin-dump-struct.c:19:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct","clang/test/Sema/builtin-dump-struct.c:21:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct"} | ||
| Line 4,581: | Line 4,582: | ||
}, | }, | ||
["note_called_by"]={ | ["note_called_by"]={ | ||
[ | [i]="note_called_by", | ||
[b]="called by %0", | [b]="called by %0", | ||
[ | [g]="called by A", | ||
[ | [f]=q, | ||
[ | [e]="called by (.*?)", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"6c86e9160d9b",1476911701,"[CUDA] When we emit an error that might have been deferred, also print a callstack.","[CUDA] When we emit an error that might have been deferred, also print a callstack.\n\nSummary:\nPreviously, when you did something not allowed in a host+device function\nand then caused it to be codegen\'ed, we would print out an error telling\nyou that you did something bad, but we wouldn\'t tell you how we decided\nthat the function needed to be codegen\'ed.\n\nThis change causes us to print out a callstack when emitting deferred\nerrors. This is immensely helpful when debugging highly-templated code,\nwhere it\'s often unclear how a function became known-emitted.\n\nWe only print the callstack once per function, after we print the all\ndeferred errors.\n\nThis patch also switches all of our hashtables to using canonical\nFunctionDecls instead of regular FunctionDecls. This prevents a number\nof bugs, some of which are caught by tests added here, in which we\nassume that two FDs for the same function have the same pointer value.\n\nReviewers: rnk\n\nSubscribers: cfe-commits, tra\n\nDifferential Revision: https://reviews.llvm.org/D25704\n\nllvm-svn: 284647"}, | ||
[ | [d]={{"clang/lib/Sema/Sema.cpp",1629,"// Print notes showing how we can reach FD starting from an a priori\n// known-callable function.\nstatic void emitCallStackNotes(Sema &S, const FunctionDecl *FD) {\n // ...\n while (FnIt != S.DeviceKnownEmittedFns.end()) {\n // ...\n DiagnosticBuilder Builder(S.Diags.Report(FnIt->second.Loc, diag::note_called_by));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaSYCL/prohibit-thread-local.cpp"]={"clang/test/SemaSYCL/prohibit-thread-local.cpp:46:48: note: called by \'operator()\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:42:39: note: called by \'kernel_single_task<fake_kernel, (lambda at clang/test/SemaSYCL/prohibit-thread-local.cpp:46:41)>\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:27:3: note: called by \'usage\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:46:48: note: called by \'operator()\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:42:39: note: called by \'kernel_single_task<fake_kernel, (lambda at clang/test/SemaSYCL/prohibit-thread-local.cpp:46:41)>\'"} | ["clang/test/SemaSYCL/prohibit-thread-local.cpp"]={"clang/test/SemaSYCL/prohibit-thread-local.cpp:46:48: note: called by \'operator()\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:42:39: note: called by \'kernel_single_task<fake_kernel, (lambda at clang/test/SemaSYCL/prohibit-thread-local.cpp:46:41)>\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:27:3: note: called by \'usage\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:46:48: note: called by \'operator()\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:42:39: note: called by \'kernel_single_task<fake_kernel, (lambda at clang/test/SemaSYCL/prohibit-thread-local.cpp:46:41)>\'"} | ||
| Line 4,595: | Line 4,596: | ||
}, | }, | ||
["note_called_once_gets_called_twice"]={ | ["note_called_once_gets_called_twice"]={ | ||
[ | [i]={{nil,z,"note_called_once_gets_called_twice"}}, | ||
[b]={{nil, | [b]={{nil,z,"previous call is here%select{; set to nil to indicate it cannot be called afterwards|}0"}}, | ||
[ | [g]={{nil,z,{"previous call is here",{"; set to nil to indicate it cannot be called afterwards",o}}}}, | ||
[ | [f]=q, | ||
[ | [e]="previous call is here(?:; set to nil to indicate it cannot be called afterwards|)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,z,m}}, | ||
[ | [h]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types","Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to support fadd/fsub:\n\nhttps://reviews.llvm.org/D53965\n\nHowever clang atomic builtins fetch add/sub still does not support\nemitting atomicrmw fadd/fsub.\n\nThis patch adds that.\n\nReviewed by: John McCall, Artem Belevich, Matt Arsenault, JF Bastien,\nJames Y Knight, Louis Dionne, Olivier Giroux\n\nDifferential Revision: https://reviews.llvm.org/D71726"}, | ||
[ | [d]={{"clang/lib/Sema/AnalysisBasedWarnings.cpp",1692,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleDoubleCall(const ParmVarDecl *Parameter, const Expr *Call, const Expr *PrevCall, bool IsCompletionHandler, bool Poised) override {\n // ...\n S.Diag(PrevCall->getBeginLoc(), diag::note_called_once_gets_called_twice) << Poised;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/warn-called-once.m"]={"clang/test/SemaObjC/warn-called-once.m:53:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:58:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:63:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:68:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:77:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:83:5: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:91:3: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:114:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:128:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:181:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:187:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:195:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:224:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:239:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:257:7: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:280:5: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:283:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:306:7: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:535:3: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:792:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:797:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:804:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:811:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:818:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:825:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:832:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:862:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:1118:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:1232:5: note: previous call is here"} | ["clang/test/SemaObjC/warn-called-once.m"]={"clang/test/SemaObjC/warn-called-once.m:53:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:58:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:63:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:68:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:77:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:83:5: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:91:3: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:114:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:128:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:181:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:187:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:195:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:224:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:239:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:257:7: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:280:5: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:283:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:306:7: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:535:3: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:792:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:797:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:804:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:811:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:818:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:825:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:832:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:862:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:1118:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:1232:5: note: previous call is here"} | ||
| Line 4,609: | Line 4,610: | ||
}, | }, | ||
["note_callee_decl"]={ | ["note_callee_decl"]={ | ||
[ | [i]="note_callee_decl", | ||
[b]="%0 declared here", | [b]="%0 declared here", | ||
[ | [g]="A declared here", | ||
[ | [f]=q, | ||
[ | [e]="(.*?) declared here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"3bc84ca376a2",1311899082,"Fix an inconsistency in Sema::ConvertArgumentsForCall in that","Fix an inconsistency in Sema::ConvertArgumentsForCall in that\nthe callee note diagnostic was not emitted in the case where\nthere were too few arguments.\n\nllvm-svn: 136437"}, | ||
[ | [d]={{v,6496,"/// 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 // Emit the location of the prototype.\n if (!TC && FDecl && !FDecl->getBuiltinID() && !IsExecConfig)\n Diag(FDecl->getLocation(), diag::note_callee_decl) << FDecl << FDecl->getParametersSourceRange();"},{v,6565,"/// 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 // Emit the location of the prototype.\n if (!TC && FDecl && !FDecl->getBuiltinID() && !IsExecConfig)\n Diag(FDecl->getLocation(), diag::note_callee_decl) << FDecl << FDecl->getParametersSourceRange();"},{v,7363,"/// 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 // Interrupt handlers don\'t save off the VFP regs automatically on ARM,\n // so there\'s some risk when calling out to non-interrupt handler functions\n // that the callee might not preserve them. This is easy to diagnose here,\n // but can be very challenging to debug.\n // Likewise, X86 interrupt handlers may only call routines with attribute\n // no_caller_saved_registers since there is no efficient way to\n // save and restore the non-GPR state.\n if (auto *Caller = getCurFunctionDecl()) {\n if (Caller->hasAttr<ARMInterruptAttr>()) {\n // ...\n if (VFP && (!FDecl || !FDecl->hasAttr<ARMInterruptAttr>())) {\n // ...\n if (FDecl)\n Diag(FDecl->getLocation(), diag::note_callee_decl) << FDecl;"},{v,7402,"/// 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 // Interrupt handlers don\'t save off the VFP regs automatically on ARM,\n // so there\'s some risk when calling out to non-interrupt handler functions\n // that the callee might not preserve them. This is easy to diagnose here,\n // but can be very challenging to debug.\n // Likewise, X86 interrupt handlers may only call routines with attribute\n // no_caller_saved_registers since there is no efficient way to\n // save and restore the non-GPR state.\n if (auto *Caller = getCurFunctionDecl()) {\n // ...\n if (Caller->hasAttr<AnyX86InterruptAttr>() && ((!FDecl || !FDecl->hasAttr<AnyX86NoCallerSavedRegistersAttr>()))) {\n // ...\n if (FDecl)\n Diag(FDecl->getLocation(), diag::note_callee_decl) << FDecl;"},{oc,1549,"/// 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 (ObjCMethodDecl *setterMethod = property->getSetterMethodDecl()) {\n // ...\n if (getLangOpts().CPlusPlus && Synthesize && !CompleteTypeErr && Ivar->getType()->isRecordType()) {\n // ...\n if (property->getPropertyAttributes() & ObjCPropertyAttribute::kind_atomic) {\n // ...\n if (const CXXOperatorCallExpr *CXXCE = dyn_cast_or_null<CXXOperatorCallExpr>(callExpr))\n if (const FunctionDecl *FuncDecl = CXXCE->getDirectCallee())\n if (!FuncDecl->isTrivial())\n if (property->getType()->isReferenceType()) {\n // ...\n Diag(FuncDecl->getBeginLoc(), diag::note_callee_decl) << FuncDecl;"},{"clang/lib/Sema/SemaTemplateDeduction.cpp",5039,"bool Sema::DeduceReturnType(FunctionDecl *FD, SourceLocation Loc, bool Diagnose) {\n // ...\n if (StillUndeduced && Diagnose && !FD->isInvalidDecl()) {\n // ...\n Diag(FD->getLocation(), diag::note_callee_decl) << FD;"}} | ||
}, | }, | ||
["note_callee_static_array"]={ | ["note_callee_static_array"]={ | ||
[ | [i]="note_callee_static_array", | ||
[b]="callee declares array parameter as static here", | [b]="callee declares array parameter as static here", | ||
[g]="callee declares array parameter as static here", | [g]="callee declares array parameter as static here", | ||
[f]= | [f]=q, | ||
[e]= | [e]="callee declares array parameter as static here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"5aa6ecb619bc",1318799852,"Add sema checks for calls to functions taking static array parameters","Add sema checks for calls to functions taking static array parameters\n\nllvm-svn: 142157"}, | |||
[d]={{v,6683,"static void DiagnoseCalleeStaticArrayParam(Sema &S, ParmVarDecl *PVD) {\n // ...\n if (ArrayTypeLoc ATL = TL.getAs<ArrayTypeLoc>())\n S.Diag(PVD->getLocation(), diag::note_callee_static_array) << ATL.getLocalSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:3:15: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:8:21: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here"} | ["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:3:15: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:8:21: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here"} | ||
| Line 4,634: | Line 4,635: | ||
}, | }, | ||
["note_cannot_use_trivial_abi_reason"]={ | ["note_cannot_use_trivial_abi_reason"]={ | ||
[ | [i]={{nil,A,"note_cannot_use_trivial_abi_reason"}}, | ||
[b]={{nil, | [b]={{nil,A,"\'trivial_abi\' is disallowed on %0 because %select{its copy constructors and move constructors are all deleted|it is polymorphic|it has a base of a non-trivial class type|it has a virtual base|it has a __weak field|it has a field of a non-trivial class type}1"}}, | ||
[ | [g]={{nil,A,{"\'trivial_abi\' is disallowed on A because ",{"its copy constructors and move constructors are all deleted","it is polymorphic","it has a base of a non-trivial class type","it has a virtual base","it has a __weak field","it has a field of a non-trivial class type"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="\'trivial_abi\' is disallowed on (.*?) because (?:its copy constructors and move constructors are all deleted|it is polymorphic|it has a base of a non\\-trivial class type|it has a virtual base|it has a __weak field|it has a field of a non\\-trivial class type)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,A,m}}, | ||
[ | [h]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata","[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the new objc_direct attribute, this change adds a new\nattribute that remotes metadata from Protocols that the programmer knows\nisn\'t going to be used at runtime. We simply have the frontend skip\ngenerating any protocol metadata entries (e.g. OBJC_CLASS_NAME,\n_OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol\nmarked with `__attribute__((objc_non_runtime_protocol))`.\n\nThere are a few APIs used to retrieve a protocol at runtime.\n`@protocol(SomeProtocol)` will now error out of the requested protocol\nis marked with attribute. `objc_getProtocol` will return `NULL` which\nis consistent with the behavior of a non-existing protocol.\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D75574"}, | ||
[ | [d]={{Z,10304,"void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl &RD) {\n auto PrintDiagAndRemoveAttr = [&](unsigned N) {\n // No diagnostics if this is a template instantiation.\n if (!isTemplateInstantiation(RD.getTemplateSpecializationKind())) {\n // ...\n Diag(RD.getAttr<TrivialABIAttr>()->getLocation(), diag::note_cannot_use_trivial_abi_reason) << &RD << N;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/attr-trivial-abi.cpp"]={"clang/test/SemaCXX/attr-trivial-abi.cpp:28:23: note: \'trivial_abi\' is disallowed on \'S3\' because it is polymorphic","clang/test/SemaCXX/attr-trivial-abi.cpp:35:18: note: \'trivial_abi\' is disallowed on \'S3_2\' because it is polymorphic","clang/test/SemaCXX/attr-trivial-abi.cpp:38:23: note: \'trivial_abi\' is disallowed on \'S3_3\' because it has a field of a non-trivial class type","clang/test/SemaCXX/attr-trivial-abi.cpp:53:23: note: \'trivial_abi\' is disallowed on \'S3_4\' because it has a field of a non-trivial class type","clang/test/SemaCXX/attr-trivial-abi.cpp:64:23: note: \'trivial_abi\' is disallowed on \'S5\' because it has a virtual base","clang/test/SemaCXX/attr-trivial-abi.cpp:117:23: note: \'trivial_abi\' is disallowed on \'CopyMoveDeleted\' because its copy constructors and move constructors are all deleted","clang/test/SemaCXX/attr-trivial-abi.cpp:127:23: note: \'trivial_abi\' is disallowed on \'S18\' because its copy constructors and move constructors are all deleted","clang/test/SemaCXX/attr-trivial-abi.cpp:152:23: note: \'trivial_abi\' is disallowed on \'S19\' because its copy constructors and move constructors are all deleted"} | ["clang/test/SemaCXX/attr-trivial-abi.cpp"]={"clang/test/SemaCXX/attr-trivial-abi.cpp:28:23: note: \'trivial_abi\' is disallowed on \'S3\' because it is polymorphic","clang/test/SemaCXX/attr-trivial-abi.cpp:35:18: note: \'trivial_abi\' is disallowed on \'S3_2\' because it is polymorphic","clang/test/SemaCXX/attr-trivial-abi.cpp:38:23: note: \'trivial_abi\' is disallowed on \'S3_3\' because it has a field of a non-trivial class type","clang/test/SemaCXX/attr-trivial-abi.cpp:53:23: note: \'trivial_abi\' is disallowed on \'S3_4\' because it has a field of a non-trivial class type","clang/test/SemaCXX/attr-trivial-abi.cpp:64:23: note: \'trivial_abi\' is disallowed on \'S5\' because it has a virtual base","clang/test/SemaCXX/attr-trivial-abi.cpp:117:23: note: \'trivial_abi\' is disallowed on \'CopyMoveDeleted\' because its copy constructors and move constructors are all deleted","clang/test/SemaCXX/attr-trivial-abi.cpp:127:23: note: \'trivial_abi\' is disallowed on \'S18\' because its copy constructors and move constructors are all deleted","clang/test/SemaCXX/attr-trivial-abi.cpp:152:23: note: \'trivial_abi\' is disallowed on \'S19\' because its copy constructors and move constructors are all deleted"} | ||
| Line 4,648: | Line 4,649: | ||
}, | }, | ||
["note_carries_dependency_missing_first_decl"]={ | ["note_carries_dependency_missing_first_decl"]={ | ||
[ | [i]="note_carries_dependency_missing_first_decl", | ||
[b]="declaration missing \'[[carries_dependency]]\' attribute is here", | [b]="declaration missing \'[[carries_dependency]]\' attribute is here", | ||
[ | [g]="declaration missing \'[[carries_dependency]]\' attribute is here", | ||
[ | [f]=q, | ||
[ | [e]="declaration missing \'\\[\\[carries_dependency\\]\\]\' attribute is here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"e233fbfc16fe",1359412965,"Finish semantic analysis for [[carries_dependency]] attribute.","Finish semantic analysis for [[carries_dependency]] attribute.\n\nThis required plumbing through a new flag to determine whether a ParmVarDecl is\nactually a parameter of a function declaration (as opposed to a function\ntypedef etc, where the attribute is prohibited). Weirdly, this attribute (just\nlike [[noreturn]]) cannot be applied to a function type, just to a function\ndeclaration (and its parameters).\n\nllvm-svn: 173726"}, | ||
[ | [d]={{w,3349,"/// mergeParamDeclAttributes - Copy attributes from the old parameter\n/// to the new one.\nstatic void mergeParamDeclAttributes(ParmVarDecl *newDecl, const ParmVarDecl *oldDecl, Sema &S) {\n // ...\n if (CDA && !oldDecl->hasAttr<CarriesDependencyAttr>()) {\n // ...\n S.Diag(FirstVD->getLocation(), diag::note_carries_dependency_missing_first_decl) << 1 /*Param*/;"},{w,4057,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n if (CDA && !Old->hasAttr<CarriesDependencyAttr>()) {\n // ...\n Diag(Old->getFirstDecl()->getLocation(), diag::note_carries_dependency_missing_first_decl) << 0 /*Function*/;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:3:5: note: declaration missing \'[[carries_dependency]]\' attribute is here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:3:10: note: declaration missing \'[[carries_dependency]]\' attribute is here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:7:5: note: declaration missing \'[[carries_dependency]]\' attribute is here"} | ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:3:5: note: declaration missing \'[[carries_dependency]]\' attribute is here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:3:10: note: declaration missing \'[[carries_dependency]]\' attribute is here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:7:5: note: declaration missing \'[[carries_dependency]]\' attribute is here"} | ||
| Line 4,662: | Line 4,663: | ||
}, | }, | ||
["note_cast_operand_to_int"]={ | ["note_cast_operand_to_int"]={ | ||
[ | [i]={{nil,V,"note_cast_operand_to_int"}}, | ||
[b]={{nil, | [b]={{nil,V,"cast one or both operands to int to silence this warning"}}, | ||
[ | [g]={{nil,V,"cast one or both operands to int to silence this warning"}}, | ||
[ | [f]=q, | ||
[ | [e]="cast one or both operands to int to silence this warning", | ||
[ | [c]=o, | ||
[ | [a]={{nil,V,m}}, | ||
[ | [h]={"3dbcea8b957a",1615397021,"Reland [clang] Check unsupported types in expressions","Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"}, | ||
[ | [d]={{ac,15253,"/// Data recursive variant of AnalyzeImplicitConversions. Subexpressions\n/// that should be visited are added to WorkList.\nstatic void AnalyzeImplicitConversions(Sema &S, AnalyzeImplicitConversionsWorkItem Item, llvm::SmallVectorImpl<AnalyzeImplicitConversionsWorkItem> &WorkList) {\n // ...\n if (const auto *BO = dyn_cast<BinaryOperator>(SourceExpr))\n if ((BO->getOpcode() == BO_And || BO->getOpcode() == BO_Or) && BO->getLHS()->isKnownToHaveBooleanValue() && BO->getRHS()->isKnownToHaveBooleanValue() && BO->getLHS()->HasSideEffects(S.Context) && BO->getRHS()->HasSideEffects(S.Context)) {\n // ...\n S.Diag(BO->getBeginLoc(), diag::note_cast_operand_to_int);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-bitwise-or-bool.c"]={"clang/test/Sema/warn-bitwise-or-bool.c:27:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:32:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:35:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:40:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:48:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:52:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:58:8: note: cast one or both operands to int to silence this warning"} | ["clang/test/Sema/warn-bitwise-or-bool.c"]={"clang/test/Sema/warn-bitwise-or-bool.c:27:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:32:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:35:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:40:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:48:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:52:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:58:8: note: cast one or both operands to int to silence this warning"} | ||
| Line 4,676: | Line 4,677: | ||
}, | }, | ||
["note_cast_to_void"]={ | ["note_cast_to_void"]={ | ||
[ | [i]="note_cast_to_void", | ||
[b]="cast expression to void to silence warning", | [b]="cast expression to void to silence warning", | ||
[g]="cast expression to void to silence warning", | [g]="cast expression to void to silence warning", | ||
[f]= | [f]=q, | ||
[e]= | [e]="cast expression to void to silence warning", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"faca2d83b13e",1455839920,"Add -Wcomma warning to Clang.","Add -Wcomma warning to Clang.\n\n-Wcomma will detect and warn on most uses of the builtin comma operator. It\ncurrently whitelists the first and third statements of the for-loop. For other\ncases, the warning can be silenced by casting the first operand of the comma\noperator to void.\n\nDifferential Revision: http://reviews.llvm.org/D3976\n\nllvm-svn: 261278"}, | |||
[d]={{v,14659,"// Look for instances where it is likely the comma operator is confused with\n// another operator. There is an explicit list of acceptable expressions for\n// the left hand side of the comma operator, otherwise emit a warning.\nvoid Sema::DiagnoseCommaOperator(const Expr *LHS, SourceLocation Loc) {\n // ...\n Diag(LHS->getBeginLoc(), diag::note_cast_to_void) << LHS->getSourceRange() << FixItHint::CreateInsertion(LHS->getBeginLoc(), LangOpts.CPlusPlus ? \"static_cast<void>(\" : \"(void)(\") << FixItHint::CreateInsertion(PP.getLocForEndOfToken(LHS->getEndLoc()), \")\");"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-comma-operator.cpp"]={"clang/test/SemaCXX/warn-comma-operator.cpp:46:7: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:57:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:69:15: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:75:15: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:84:3: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:93:8: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:99:12: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:105:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:111:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:117:7: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:123:17: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:3: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:18: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:33: note: cast expression to void to silence warning"} | ["clang/test/SemaCXX/warn-comma-operator.cpp"]={"clang/test/SemaCXX/warn-comma-operator.cpp:46:7: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:57:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:69:15: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:75:15: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:84:3: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:93:8: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:99:12: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:105:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:111:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:117:7: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:123:17: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:3: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:18: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:33: note: cast expression to void to silence warning"} | ||
| Line 4,690: | Line 4,691: | ||
}, | }, | ||
["note_cat_conform_to_noescape_prot"]={ | ["note_cat_conform_to_noescape_prot"]={ | ||
[ | [i]={{nil,nb,"note_cat_conform_to_noescape_prot"}}, | ||
[b]={{nil, | [b]={{nil,nb,"%select{category|class extension}0 conforms to protocol %1 which defines method %2"}}, | ||
[ | [g]={{nil,nb,{{"category","class extension"}," conforms to protocol B which defines method C"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:category|class extension) conforms to protocol (.*?) which defines method (.*?)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,nb,m}}, | ||
[ | [h]={"a6b5e0036128",1532750773,"[Sema][ObjC] Warn when a method declared in a protocol takes a","[Sema][ObjC] Warn when a method declared in a protocol takes a\nnon-escaping parameter but the implementation\'s method takes an escaping\nparameter.\n\nrdar://problem/39548196\n\nDifferential Revision: https://reviews.llvm.org/D49119\n\nllvm-svn: 338189"}, | ||
[ | [d]={{mc,132,"/// Produce additional diagnostics if a category conforms to a protocol that\n/// defines a method taking a non-escaping parameter.\nstatic void diagnoseNoescape(const ParmVarDecl *NewD, const ParmVarDecl *OldD, const ObjCCategoryDecl *CD, const ObjCProtocolDecl *PD, Sema &S) {\n if (!diagnoseNoescape(NewD, OldD, S))\n S.Diag(CD->getLocation(), diag::note_cat_conform_to_noescape_prot) << CD->IsClassExtension() << PD << cast<ObjCMethodDecl>(NewD->getDeclContext());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/noescape.mm"]={"clang/test/SemaObjCXX/noescape.mm:119:12: note: class extension conforms to protocol \'NoescapeProt\' which defines method \'m0:\'"} | ["clang/test/SemaObjCXX/noescape.mm"]={"clang/test/SemaObjCXX/noescape.mm:119:12: note: class extension conforms to protocol \'NoescapeProt\' which defines method \'m0:\'"} | ||
| Line 4,704: | Line 4,705: | ||
}, | }, | ||
["note_cc1_round_trip_generated"]={ | ["note_cc1_round_trip_generated"]={ | ||
[ | [i]={{nil,x,"note_cc1_round_trip_generated"}}, | ||
[b]={{nil, | [b]={{nil,V,"generated arguments #%0 in round-trip: %1"},{x,x,"Generated arguments #%0 in round-trip: %1"}}, | ||
[ | [g]={{nil,V,"generated arguments #A in round-trip: B"},{x,x,"Generated arguments #A in round-trip: B"}}, | ||
[ | [f]=q, | ||
[ | [e]="generated arguments \\#(.*?) in round\\-trip\\: (.*?)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,x,u}}, | ||
[ | [h]={"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"}, | ||
[ | [d]={{"clang/lib/Frontend/CompilerInvocation.cpp",756,"#endif\n // ...\n // The first parse on original arguments succeeded, but second parse of\n // generated arguments failed. Something must be wrong with the generator.\n if (!Success2) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_generated) << 1 << SerializeArgs(GeneratedArgs);"},{"clang/lib/Frontend/CompilerInvocation.cpp",784,"#endif\n // ...\n // If we generated different arguments from what we assume are two\n // semantically equivalent CompilerInvocations, the Generate function may\n // be non-deterministic.\n if (!Equal(GeneratedArgs, ComparisonArgs)) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_generated) << 1 << SerializeArgs(GeneratedArgs);"},{"clang/lib/Frontend/CompilerInvocation.cpp",786,"#endif\n // ...\n // If we generated different arguments from what we assume are two\n // semantically equivalent CompilerInvocations, the Generate function may\n // be non-deterministic.\n if (!Equal(GeneratedArgs, ComparisonArgs)) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_generated) << 2 << SerializeArgs(ComparisonArgs);"}} | ||
}, | }, | ||
["note_cc1_round_trip_original"]={ | ["note_cc1_round_trip_original"]={ | ||
[ | [i]={{nil,x,"note_cc1_round_trip_original"}}, | ||
[b]={{nil, | [b]={{nil,V,"original arguments in round-trip: %0"},{x,x,"Original arguments in round-trip: %0"}}, | ||
[ | [g]={{nil,V,"original arguments in round-trip: A"},{x,x,"Original arguments in round-trip: A"}}, | ||
[ | [f]=q, | ||
[ | [e]="original arguments in round\\-trip\\: (.*?)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,x,u}}, | ||
[ | [h]={"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"}, | ||
[ | [d]={{"clang/lib/Frontend/CompilerInvocation.cpp",728,"#endif\n // ...\n // Run the first parse on the original arguments with the dummy invocation and\n // diagnostics.\n if (!Parse(DummyInvocation, CommandLineArgs, DummyDiags, Argv0) || DummyDiags.getNumWarnings() != 0) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_original) << SerializeArgs(CommandLineArgs);"}} | ||
}, | }, | ||
["note_change_bitfield_sign"]={ | ["note_change_bitfield_sign"]={ | ||
[ | [i]={{nil,ab,"note_change_bitfield_sign"}}, | ||
[b]={{nil, | [b]={{nil,ab,"consider making the bitfield type %select{unsigned|signed}0"}}, | ||
[ | [g]={{nil,ab,{"consider making the bitfield type ",{"unsigned","signed"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="consider making the bitfield type (?:unsigned|signed)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,ab,m}}, | ||
[ | [h]={"329f24d6f6e7",1489514462,"Warn on enum assignment to bitfields that can\'t fit all values","Warn on enum assignment to bitfields that can\'t fit all values\n\nThis adds -Wbitfield-enum-conversion, which warns on implicit\nconversions that happen on bitfield assignment that change the value of\nsome enumerators.\n\nValues of enum type typically take on a very small range of values, so\nthey are frequently stored in bitfields. Unfortunately, there is no\nconvenient way to calculate the minimum number of bits necessary to\nstore all possible values at compile time, so users usually hard code a\nbitwidth that works today and widen it as necessary to pass basic\ntesting and validation. This is very error-prone, and leads to stale\nwidths as enums grow. This warning aims to catch such bugs.\n\nThis would have found two real bugs in clang and two instances of\nquestionable code. See r297680 and r297654 for the full description of\nthe issues.\n\nThis warning is currently disabled by default while we investigate its\nusefulness outside of LLVM.\n\nThe major cause of false positives with this warning is this kind of\nenum:\n enum E { W, X, Y, Z, SENTINEL_LAST };\nThe last enumerator is an invalid value used to validate inputs or size\nan array. Depending on the prevalance of this style of enum across a\ncodebase, this warning may be more or less feasible to deploy. It also\nhas trouble on sentinel values such as ~0U.\n\nReviewers: rsmith, rtrieu, thakis\n\nReviewed By: thakis\n\nSubscribers: hfinkel, voskresensky.vladimir, sashab, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D30923\n\nllvm-svn: 297761"}, | ||
[ | [d]={{ac,14095,"/// Analyzes an attempt to assign the given value to a bitfield.\n///\n/// Returns true if there was something fishy about the attempt.\nstatic bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, SourceLocation InitLoc) {\n // ...\n if (!OriginalInit->EvaluateAsInt(Result, S.Context, Expr::SE_AllowSideEffects)) {\n // The RHS is not constant. If the RHS has an enum type, make sure the\n // bitfield is wide enough to hold all the values of the enum without\n // truncation.\n if (const auto *EnumTy = OriginalInit->getType()->getAs<EnumType>()) {\n // ...\n if (DiagID) {\n // ...\n S.Diag(Bitfield->getTypeSpecStartLoc(), diag::note_change_bitfield_sign) << SignedEnum << TypeRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:12:3: note: consider making the bitfield type unsigned","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:13:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:13:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:14:3: note: consider making the bitfield type unsigned"} | ["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:12:3: note: consider making the bitfield type unsigned","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:13:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:13:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:14:3: note: consider making the bitfield type unsigned"} | ||
| Line 4,740: | Line 4,741: | ||
}, | }, | ||
["note_change_calling_conv_fixit"]={ | ["note_change_calling_conv_fixit"]={ | ||
[ | [i]="note_change_calling_conv_fixit", | ||
[b]="consider defining %0 with the \'%1\' calling convention", | [b]="consider defining %0 with the \'%1\' calling convention", | ||
[ | [g]="consider defining A with the \'B\' calling convention", | ||
[ | [f]=q, | ||
[ | [e]="consider defining (.*?) with the \'(.*?)\' calling convention", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"9f49733c65b0",1462914003,"Add -Wcast-calling-convention to warn when casting away calling conventions","Add -Wcast-calling-convention to warn when casting away calling conventions\n\nSummary:\nThis only warns on casts of the address of a function defined in the\ncurrent TU. In this case, the fix is likely to be local and the warning\nuseful.\n\nHere are some things we could experiment with in the future:\n- Fire on declarations as well as definitions\n- Limit the warning to non-void function prototypes\n- Limit the warning to mismatches of caller and callee cleanup CCs\n\nThis warning is currently off by default while we study its usefulness.\n\nReviewers: thakis, rtrieu\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D17348\n\nllvm-svn: 269116"}, | ||
[ | [d]={{Uc,2188,"/// Diagnose casts that change the calling convention of a pointer to a function\n/// defined in the current TU.\nstatic void DiagnoseCallingConvCast(Sema &Self, const ExprResult &SrcExpr, QualType DstType, SourceRange OpRange) {\n // ...\n Self.Diag(NameLoc, diag::note_change_calling_conv_fixit) << FD << DstCCName << FixItHint::CreateInsertion(NameLoc, CCAttrText);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/callingconv-cast.c"]={"clang/test/Sema/callingconv-cast.c:16:6: note: consider defining \'mismatched\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:16:6: note: consider defining \'mismatched\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:16:6: note: consider defining \'mismatched\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:7:6: note: consider defining \'mismatched_before_winapi\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:19:6: note: consider defining \'mismatched_declaration\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:22:6: note: consider defining \'suggest_fix_first_redecl\' with the \'stdcall\' calling convention"} | ["clang/test/Sema/callingconv-cast.c"]={"clang/test/Sema/callingconv-cast.c:16:6: note: consider defining \'mismatched\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:16:6: note: consider defining \'mismatched\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:16:6: note: consider defining \'mismatched\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:7:6: note: consider defining \'mismatched_before_winapi\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:19:6: note: consider defining \'mismatched_declaration\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:22:6: note: consider defining \'suggest_fix_first_redecl\' with the \'stdcall\' calling convention"} | ||
| Line 4,754: | Line 4,755: | ||
}, | }, | ||
["note_checking_constraints_for_class_spec_id_here"]={ | ["note_checking_constraints_for_class_spec_id_here"]={ | ||
[ | [i]={{nil,p,"note_checking_constraints_for_class_spec_id_here"}}, | ||
[b]={{nil,p,"while checking constraint satisfaction for class template partial specialization \'%0\' required here"}}, | [b]={{nil,p,"while checking constraint satisfaction for class template partial specialization \'%0\' required here"}}, | ||
[ | [g]={{nil,p,"while checking constraint satisfaction for class template partial specialization \'A\' required here"}}, | ||
[ | [f]=q, | ||
[ | [e]="while checking constraint satisfaction for class template partial specialization \'(.*?)\' required here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Hc,1569403888,Gc,Cc}, | ||
[ | [d]={{qc,1036,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n // ...\n else if (isa<TemplateDecl>(Active->Entity))\n // ...\n else if (isa<VarTemplatePartialSpecializationDecl>(Active->Entity))\n // ...\n else if (isa<ClassTemplatePartialSpecializationDecl>(Active->Entity))\n DiagID = diag::note_checking_constraints_for_class_spec_id_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: while checking constraint satisfaction for class template partial specialization \'B<int *>\' required here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: while checking constraint satisfaction for class template partial specialization \'B<int>\' required here"} | ["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: while checking constraint satisfaction for class template partial specialization \'B<int *>\' required here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: while checking constraint satisfaction for class template partial specialization \'B<int>\' required here"} | ||
| Line 4,768: | Line 4,769: | ||
}, | }, | ||
["note_checking_constraints_for_function_here"]={ | ["note_checking_constraints_for_function_here"]={ | ||
[ | [i]={{nil,p,"note_checking_constraints_for_function_here"}}, | ||
[b]={{nil,p,"while checking constraint satisfaction for function \'%0\' required here"}}, | [b]={{nil,p,"while checking constraint satisfaction for function \'%0\' required here"}}, | ||
[ | [g]={{nil,p,"while checking constraint satisfaction for function \'A\' required here"}}, | ||
[ | [f]=q, | ||
[ | [e]="while checking constraint satisfaction for function \'(.*?)\' required here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | ||
[ | [d]={{qc,1039,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n // ...\n else if (isa<TemplateDecl>(Active->Entity))\n // ...\n else if (isa<VarTemplatePartialSpecializationDecl>(Active->Entity))\n // ...\n else if (isa<ClassTemplatePartialSpecializationDecl>(Active->Entity))\n // ...\n else {\n // ...\n DiagID = diag::note_checking_constraints_for_function_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp"]={"clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp:45:20: note: while checking constraint satisfaction for function \'foo\' required here"} | ["clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp"]={"clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp:45:20: note: while checking constraint satisfaction for function \'foo\' required here"} | ||
| Line 4,782: | Line 4,783: | ||
}, | }, | ||
["note_checking_constraints_for_template_id_here"]={ | ["note_checking_constraints_for_template_id_here"]={ | ||
[ | [i]={{nil,p,"note_checking_constraints_for_template_id_here"}}, | ||
[b]={{nil,p,"while checking constraint satisfaction for template \'%0\' required here"}}, | [b]={{nil,p,"while checking constraint satisfaction for template \'%0\' required here"}}, | ||
[ | [g]={{nil,p,"while checking constraint satisfaction for template \'A\' required here"}}, | ||
[ | [f]=q, | ||
[ | [e]="while checking constraint satisfaction for template \'(.*?)\' required here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Hc,1569403888,Gc,Cc}, | ||
[ | [d]={{qc,1032,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n // ...\n else if (isa<TemplateDecl>(Active->Entity))\n DiagID = diag::note_checking_constraints_for_template_id_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:25:3: note: while checking constraint satisfaction for template \'compare<Object *, Object *>\' required here"} | ["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:25:3: note: while checking constraint satisfaction for template \'compare<Object *, Object *>\' required here"} | ||
| Line 4,796: | Line 4,797: | ||
}, | }, | ||
["note_checking_constraints_for_var_spec_id_here"]={ | ["note_checking_constraints_for_var_spec_id_here"]={ | ||
[ | [i]={{nil,p,"note_checking_constraints_for_var_spec_id_here"}}, | ||
[b]={{nil,p,"while checking constraint satisfaction for variable template partial specialization \'%0\' required here"}}, | [b]={{nil,p,"while checking constraint satisfaction for variable template partial specialization \'%0\' required here"}}, | ||
[ | [g]={{nil,p,"while checking constraint satisfaction for variable template partial specialization \'A\' required here"}}, | ||
[ | [f]=q, | ||
[ | [e]="while checking constraint satisfaction for variable template partial specialization \'(.*?)\' required here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Hc,1569403888,Gc,Cc}, | ||
[ | [d]={{qc,1034,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n // ...\n else if (isa<TemplateDecl>(Active->Entity))\n // ...\n else if (isa<VarTemplatePartialSpecializationDecl>(Active->Entity))\n DiagID = diag::note_checking_constraints_for_var_spec_id_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: while checking constraint satisfaction for variable template partial specialization \'v1<int *>\' required here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: while checking constraint satisfaction for variable template partial specialization \'v1<int>\' required here"} | ["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: while checking constraint satisfaction for variable template partial specialization \'v1<int *>\' required here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: while checking constraint satisfaction for variable template partial specialization \'v1<int>\' required here"} | ||
| Line 4,810: | Line 4,811: | ||
}, | }, | ||
["note_class_declared"]={ | ["note_class_declared"]={ | ||
[ | [i]="note_class_declared", | ||
[b]="class is declared here", | [b]="class is declared here", | ||
[g]="class is declared here", | [g]="class is declared here", | ||
[f]= | [f]=q, | ||
[e]= | [e]="class is declared here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"1f626d6fd1ca",1309980245,"objc-arc: Support objc_arc_weak_unavailable on those","objc-arc: Support objc_arc_weak_unavailable on those\nclasses which are incompatible with weak references.\n// rdar://9693477\n\nllvm-svn: 134522"}, | |||
[d]={{mc,4166,"// 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 // ...\n Diag(Super->getLocation(), diag::note_class_declared);"},{mc,4198,"// 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 // ...\n Diag(Super->getLocation(), diag::note_class_declared);"},{Bb,7076,"/// handleObjCOwnershipTypeAttr - Process an objc_ownership\n/// attribute on the specified type.\n///\n/// Returns \'true\' if the attribute was handled.\nstatic bool handleObjCOwnershipTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n // Forbid __weak for class objects marked as\n // objc_arc_weak_reference_unavailable\n if (lifetime == Qualifiers::OCL_Weak) {\n if (const ObjCObjectPointerType *ObjT = type->getAs<ObjCObjectPointerType>()) {\n if (ObjCInterfaceDecl *Class = ObjT->getInterfaceDecl()) {\n if (Class->isArcWeakrefUnavailable()) {\n // ...\n S.Diag(ObjT->getInterfaceDecl()->getLocation(), diag::note_class_declared);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/objc-weak.mm"]={"clang/test/SemaObjCXX/objc-weak.mm:8:12: note: class is declared here","clang/test/SemaObjCXX/objc-weak.mm:8:12: note: class is declared here"} | ["clang/test/SemaObjCXX/objc-weak.mm"]={"clang/test/SemaObjCXX/objc-weak.mm:8:12: note: class is declared here","clang/test/SemaObjCXX/objc-weak.mm:8:12: note: class is declared here"} | ||
| Line 4,824: | Line 4,825: | ||
}, | }, | ||
["note_cocoa_naming_declare_family"]={ | ["note_cocoa_naming_declare_family"]={ | ||
[ | [i]="note_cocoa_naming_declare_family", | ||
[b]="explicitly declare getter %objcinstance0 with \'%1\' to return an \'unowned\' object", | [b]="explicitly declare getter %objcinstance0 with \'%1\' to return an \'unowned\' object", | ||
[ | [g]="explicitly declare getter A with \'B\' to return an \'unowned\' object", | ||
[ | [f]=q, | ||
[ | [e]="explicitly declare getter (.*?) with \'(.*?)\' to return an \'unowned\' object", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"a34d04d35e72",1421449471,"Suggest objc_method_family(none) for a property named -newFoo or similar.","Suggest objc_method_family(none) for a property named -newFoo or similar.\n\nAs mentioned in the previous commit, if a property (declared with @property)\nhas a name that matches a special Objective-C method family, the getter picks\nup that family despite being declared by the property. The most correct way\nto solve this problem is to add the \'objc_method_family\' attribute to the\ngetter with an argument of \'none\', which unfortunately requires an explicit\ndeclaration of the getter.\n\nThis commit adds a note to the existing error (ARC) or warning (MRR) for\nsuch a poorly-named property that suggests the solution; if there\'s already\na declaration of the getter, it even includes a fix-it.\n\nllvm-svn: 226339"}, | ||
[ | [d]={{oc,2304,"void Sema::DiagnoseOwningPropertyGetterSynthesis(const ObjCImplementationDecl *D) {\n // ...\n for (const auto *PID : D->property_impls()) {\n // ...\n if (PD && !PD->hasAttr<NSReturnsNotRetainedAttr>() && !PD->isClassProperty()) {\n // ...\n if (family == OMF_alloc || family == OMF_copy || family == OMF_mutableCopy || family == OMF_new) {\n // ...\n auto noteDiag = Diag(noteLoc, diag::note_cocoa_naming_declare_family) << method->getDeclName() << spelling;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:70:23: note: explicitly declare getter \'-newFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:71:23: note: explicitly declare getter \'-copyBar\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:72:21: note: explicitly declare getter \'-allocBaz\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:74:23: note: explicitly declare getter \'-newDFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:75:23: note: explicitly declare getter \'-copyDBar\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:76:21: note: explicitly declare getter \'-allocDBaz\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:103:33: note: explicitly declare getter \'-newGarply\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:94:1: note: explicitly declare getter \'-newFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:97:1: note: explicitly declare getter \'-newBar\' with \'OBJC_METHOD_FAMILY_NONE\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:100:23: note: explicitly declare getter \'-newBaz\' with \'OBJC_METHOD_FAMILY_NONE\' to return an \'unowned\' object"} | ["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:70:23: note: explicitly declare getter \'-newFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:71:23: note: explicitly declare getter \'-copyBar\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:72:21: note: explicitly declare getter \'-allocBaz\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:74:23: note: explicitly declare getter \'-newDFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:75:23: note: explicitly declare getter \'-copyDBar\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:76:21: note: explicitly declare getter \'-allocDBaz\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:103:33: note: explicitly declare getter \'-newGarply\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:94:1: note: explicitly declare getter \'-newFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:97:1: note: explicitly declare getter \'-newBar\' with \'OBJC_METHOD_FAMILY_NONE\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:100:23: note: explicitly declare getter \'-newBaz\' with \'OBJC_METHOD_FAMILY_NONE\' to return an \'unowned\' object"} | ||
| Line 4,838: | Line 4,839: | ||
}, | }, | ||
["note_collapse_loop_count"]={ | ["note_collapse_loop_count"]={ | ||
[ | [i]="note_collapse_loop_count", | ||
[b]="parameter of the \'collapse\' clause", | [b]="parameter of the \'collapse\' clause", | ||
[g]="parameter of the \'collapse\' clause", | [g]="parameter of the \'collapse\' clause", | ||
[f]= | [f]=q, | ||
[e]="OpenMP Issue", | [e]="parameter of the \'collapse\' clause", | ||
[ | [c]=o, | ||
[ | [a]="OpenMP Issue", | ||
[h]={"7b6bc88c5aaf",1448524239,"[OPENMP 4.5] Fixed rules for \'ordered\' clause.","[OPENMP 4.5] Fixed rules for \'ordered\' clause.\nAccording to OpenMP 4.5 the parameter of \'ordered\' clause must be greater than or equal to the parameter of \'collapse\' clause. Patch adds this rule.\n\nllvm-svn: 254141"}, | |||
[d]={{"clang/lib/Sema/SemaOpenMP.cpp",9607,"/// Called on a for stmt to check itself and nested loops (if any).\n/// \\return Returns 0 if one of the collapsed stmts is not canonical for loop,\n/// number of collapsed loops otherwise.\nstatic unsigned checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Stmt *AStmt, Sema &SemaRef, DSAStackTy &DSA, Sema::VarsWithInheritedDSAType &VarsWithImplicitDSA, OMPLoopBasedDirective::HelperExprs &Built) {\n // ...\n if (OrderedLoopCountExpr) {\n // ...\n if (!OrderedLoopCountExpr->isValueDependent() && OrderedLoopCountExpr->EvaluateAsInt(EVResult, SemaRef.getASTContext())) {\n // ...\n if (Result.getLimitedValue() < NestedLoopCount) {\n // ...\n SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), diag::note_collapse_loop_count) << CollapseLoopCountExpr->getSourceRange();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/OpenMP/for_ordered_clause.cpp"]={"clang/test/OpenMP/for_ordered_clause.cpp:129:37: note: parameter of the \'collapse\' clause","clang/test/OpenMP/for_ordered_clause.cpp:75:37: note: parameter of the \'collapse\' clause"} | ["clang/test/OpenMP/for_ordered_clause.cpp"]={"clang/test/OpenMP/for_ordered_clause.cpp:129:37: note: parameter of the \'collapse\' clause","clang/test/OpenMP/for_ordered_clause.cpp:75:37: note: parameter of the \'collapse\' clause"} | ||
| Line 4,852: | Line 4,853: | ||
}, | }, | ||
["note_comparison_synthesized_at"]={ | ["note_comparison_synthesized_at"]={ | ||
[ | [i]={{nil,p,"note_comparison_synthesized_at"}}, | ||
[b]={{nil,p,"in defaulted %select{<ERROR>|equality|three-way|equality|relational}0 comparison operator for %1 first required here"}}, | [b]={{nil,p,"in defaulted %select{<ERROR>|equality|three-way|equality|relational}0 comparison operator for %1 first required here"}}, | ||
[ | [g]={{nil,p,{"in defaulted ",{"equality","three-way","equality","relational"}," comparison operator for B first required here"}}}, | ||
[ | [f]=q, | ||
[ | [e]="in defaulted (?:equality|three\\-way|equality|relational) comparison operator for (.*?) first required here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={"cafc7416baf7",1575501927,"[c++20] Synthesis of defaulted comparison functions.","[c++20] Synthesis of defaulted comparison functions.\n\nArray members are not yet handled. In addition, defaulted comparisons\ncan\'t yet find comparison operators by unqualified lookup (only by\nmember lookup and ADL). These issues will be fixed in follow-on changes."}, | ||
[ | [d]={{qc,984,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::DefiningSynthesizedFunction: {\n // ...\n if (DFK.isSpecialMember()) {\n // ...\n } else if (DFK.isComparison()) {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_comparison_synthesized_at) << (int)DFK.asComparison() << RecordType;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx20-default-compare.cpp"]={"clang/test/SemaCXX/cxx20-default-compare.cpp:11:43: note: in defaulted equality comparison operator for \'Foo\' first required here","clang/test/SemaCXX/cxx20-default-compare.cpp:14:45: note: in defaulted equality comparison operator for \'Foo\' first required here","clang/test/SemaCXX/cxx20-default-compare.cpp:17:29: note: in defaulted equality comparison operator for \'Foo\' first required here"} | ["clang/test/SemaCXX/cxx20-default-compare.cpp"]={"clang/test/SemaCXX/cxx20-default-compare.cpp:11:43: note: in defaulted equality comparison operator for \'Foo\' first required here","clang/test/SemaCXX/cxx20-default-compare.cpp:14:45: note: in defaulted equality comparison operator for \'Foo\' first required here","clang/test/SemaCXX/cxx20-default-compare.cpp:17:29: note: in defaulted equality comparison operator for \'Foo\' first required here"} | ||
| Line 4,866: | Line 4,867: | ||
}, | }, | ||
["note_compat_assoc"]={ | ["note_compat_assoc"]={ | ||
[ | [i]="note_compat_assoc", | ||
[b]="compatible type %0 specified here", | [b]="compatible type %0 specified here", | ||
[ | [g]="compatible type A specified here", | ||
[ | [f]=q, | ||
[ | [e]="compatible type (.*?) specified here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"91147596414d",1302827748,"C1X: implement generic selections","C1X: implement generic selections\n\nAs an extension, generic selection support has been added for all\nsupported languages. The syntax is the same as for C1X.\n\nllvm-svn: 129554"}, | ||
[ | [d]={{v,1783,"ExprResult Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef<TypeSourceInfo *> Types, ArrayRef<Expr *> Exprs) {\n // ...\n for (unsigned i = 0; i < NumAssocs; ++i) {\n // ...\n if (Types[i]) {\n // ...\n if (Types[i]->getType()->isDependentType()) {\n // ...\n } else {\n // ...\n // C11 6.5.1.1p2 \"No two generic associations in the same generic\n // selection shall specify compatible types.\"\n for (unsigned j = i + 1; j < NumAssocs; ++j)\n if (Types[j] && !Types[j]->getType()->isDependentType() && Context.typesAreCompatible(Types[i]->getType(), Types[j]->getType())) {\n // ...\n Diag(Types[i]->getTypeLoc().getBeginLoc(), diag::note_compat_assoc) << Types[i]->getTypeLoc().getSourceRange() << Types[i]->getType();"},{v,1852,"ExprResult Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef<TypeSourceInfo *> Types, ArrayRef<Expr *> Exprs) {\n // ...\n // C11 6.5.1.1p2 \"The controlling expression of a generic selection shall have\n // type compatible with at most one of the types named in its generic\n // association list.\"\n if (CompatIndices.size() > 1) {\n // ...\n for (unsigned I : CompatIndices) {\n Diag(Types[I]->getTypeLoc().getBeginLoc(), diag::note_compat_assoc) << Types[I]->getTypeLoc().getSourceRange() << Types[I]->getType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/attr-btf_type_tag.c"]={"clang/test/Sema/attr-btf_type_tag.c:31:19: note: compatible type \'int __attribute__((btf_type_tag(\"tag1\")))*\' (aka \'int *\') specified here"} | ["clang/test/Sema/attr-btf_type_tag.c"]={"clang/test/Sema/attr-btf_type_tag.c:31:19: note: compatible type \'int __attribute__((btf_type_tag(\"tag1\")))*\' (aka \'int *\') specified here"} | ||
| Line 4,880: | Line 4,881: | ||
}, | }, | ||
["note_compound_token_split_second_token_here"]={ | ["note_compound_token_split_second_token_here"]={ | ||
[ | [i]={{nil,z,"note_compound_token_split_second_token_here"}}, | ||
[b]={{nil, | [b]={{nil,z,"%select{|second }0%1 token is here"}}, | ||
[ | [g]={{nil,z,{{o,"second "},"B token is here"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:|second )(.*?) token is here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,z,G}}, | ||
[ | [h]={"5c63ae156e96",1597298751,"[OpenMP] Support nested OpenMP context selectors (declare variant)","[OpenMP] Support nested OpenMP context selectors (declare variant)\n\nDue to `omp begin/end declare variant`, OpenMP context selectors can be\nnested. This patch adds initial support for this so we can use it for\ntarget math variants. We should improve the detection of \"equivalent\"\nscores and user conditions, we should also revisit the data structures\nof the OMPTraitInfo object, however, both are not pressing issues right\nnow.\n\nReviewed By: JonChesterfield\n\nDifferential Revision: https://reviews.llvm.org/D85877"}, | ||
[ | [d]={{"clang/lib/Parse/Parser.cpp",246,"void Parser::checkCompoundToken(SourceLocation FirstTokLoc, tok::TokenKind FirstTokKind, CompoundToken Op) {\n // ...\n // If either token is in a macro, we expect both tokens to come from the same\n // macro expansion.\n if ((FirstTokLoc.isMacroID() || SecondTokLoc.isMacroID()) && PP.getSourceManager().getFileID(FirstTokLoc) != PP.getSourceManager().getFileID(SecondTokLoc)) {\n // ...\n Diag(SecondTokLoc, diag::note_compound_token_split_second_token_here) << (FirstTokKind == Tok.getKind()) << Tok.getKind() << SourceRange(SecondTokLoc);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/compound-token-split.cpp"]={"clang/test/Parser/compound-token-split.cpp:15:15: note: \'{\' token is here","clang/test/Parser/compound-token-split.cpp:15:3: note: \')\' token is here","clang/test/Parser/compound-token-split.cpp:29:18: note: \')\' token is here"} | ["clang/test/Parser/compound-token-split.cpp"]={"clang/test/Parser/compound-token-split.cpp:15:15: note: \'{\' token is here","clang/test/Parser/compound-token-split.cpp:15:3: note: \')\' token is here","clang/test/Parser/compound-token-split.cpp:29:18: note: \')\' token is here"} | ||
| Line 4,894: | Line 4,895: | ||
}, | }, | ||
["note_concatenated_string_literal_silence"]={ | ["note_concatenated_string_literal_silence"]={ | ||
[ | [i]={{nil,z,"note_concatenated_string_literal_silence"}}, | ||
[b]={{nil, | [b]={{nil,z,"place parentheses around the string literal to silence warning"}}, | ||
[ | [g]={{nil,z,"place parentheses around the string literal to silence warning"}}, | ||
[ | [f]=q, | ||
[ | [e]="place parentheses around the string literal to silence warning", | ||
[ | [c]=o, | ||
[ | [a]={{nil,z,m}}, | ||
[ | [h]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata","[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the new objc_direct attribute, this change adds a new\nattribute that remotes metadata from Protocols that the programmer knows\nisn\'t going to be used at runtime. We simply have the frontend skip\ngenerating any protocol metadata entries (e.g. OBJC_CLASS_NAME,\n_OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol\nmarked with `__attribute__((objc_non_runtime_protocol))`.\n\nThere are a few APIs used to retrieve a protocol at runtime.\n`@protocol(SomeProtocol)` will now error out of the requested protocol\nis marked with attribute. `objc_getProtocol` will return `NULL` which\nis consistent with the behavior of a non-existing protocol.\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D75574"}, | ||
[ | [d]={{w,14157,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n if (!var->getType()->isStructureType() && var->hasInit() && isa<InitListExpr>(var->getInit())) {\n // ...\n if (NumInits > 2)\n for (unsigned I = 0; I < NumInits; ++I) {\n // ...\n // Diagnose missing comma in string array initialization.\n // Do not warn when all the elements in the initializer are concatenated\n // together. Do not warn for macros too.\n if (NumConcat == 2 && !SL->getBeginLoc().isMacroID()) {\n // ...\n if (OnlyOneMissingComma) {\n // ...\n Diag(SL->getBeginLoc(), diag::note_concatenated_string_literal_silence);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/string-concat.c"]={"clang/test/Sema/string-concat.c:10:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:21:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:29:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:36:24: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:39:65: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:43:72: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:49:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:53:40: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:66:30: note: place parentheses around the string literal to silence warning"} | ["clang/test/Sema/string-concat.c"]={"clang/test/Sema/string-concat.c:10:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:21:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:29:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:36:24: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:39:65: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:43:72: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:49:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:53:40: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:66:30: note: place parentheses around the string literal to silence warning"} | ||
| Line 4,908: | Line 4,909: | ||
}, | }, | ||
["note_concept_specialization_constraint_evaluated_to_false"]={ | ["note_concept_specialization_constraint_evaluated_to_false"]={ | ||
[ | [i]={{nil,p,"note_concept_specialization_constraint_evaluated_to_false"}}, | ||
[b]={{nil,p,"%select{and|because}0 \'%1\' evaluated to false"}}, | [b]={{nil,p,"%select{and|because}0 \'%1\' evaluated to false"}}, | ||
[ | [g]={{nil,p,{{"and","because"}," \'B\' evaluated to false"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:and|because) \'(.*?)\' evaluated to false", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Hc,1569403888,Gc,Cc}, | ||
[ | [d]={{bd,1124,"static void diagnoseWellFormedUnsatisfiedConstraintExpr(Sema &S, Expr *SubstExpr, bool First) {\n // ...\n if (BinaryOperator *BO = dyn_cast<BinaryOperator>(SubstExpr)) {\n // ...\n } else if (auto *CSE = dyn_cast<ConceptSpecializationExpr>(SubstExpr)) {\n if (CSE->getTemplateArgsAsWritten()->NumTemplateArgs == 1) {\n // ...\n } else {\n S.Diag(SubstExpr->getSourceRange().getBegin(), diag::note_concept_specialization_constraint_evaluated_to_false) << (int)First << CSE;"}} | ||
}, | }, | ||
["note_concept_specialization_here"]={ | ["note_concept_specialization_here"]={ | ||
[ | [i]={{nil,p,"note_concept_specialization_here"}}, | ||
[b]={{nil,p,"while checking the satisfaction of concept \'%0\' requested here"}}, | [b]={{nil,p,"while checking the satisfaction of concept \'%0\' requested here"}}, | ||
[ | [g]={{nil,p,"while checking the satisfaction of concept \'A\' requested here"}}, | ||
[ | [f]=q, | ||
[ | [e]="while checking the satisfaction of concept \'(.*?)\' requested here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Qc,1567434909,Pc,md}, | ||
[ | [d]={{qc,1030,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n DiagID = diag::note_concept_specialization_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:15:23: note: while checking the satisfaction of concept \'convertible_to<bool, bool>\' requested here"} | ["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:15:23: note: while checking the satisfaction of concept \'convertible_to<bool, bool>\' requested here"} | ||
| Line 4,933: | Line 4,934: | ||
}, | }, | ||
["note_condition_assign_silence"]={ | ["note_condition_assign_silence"]={ | ||
[ | [i]="note_condition_assign_silence", | ||
[b]="place parentheses around the assignment to silence this warning", | [b]="place parentheses around the assignment to silence this warning", | ||
[g]="place parentheses around the assignment to silence this warning", | [g]="place parentheses around the assignment to silence this warning", | ||
[f]= | [f]=q, | ||
[e]= | [e]="place parentheses around the assignment to silence this warning", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"2bf2d3d0165f",1271261392,"When diagnosing suspicious precedence or assignments, move the fix-it","When diagnosing suspicious precedence or assignments, move the fix-it\nthat adds parentheses from the main diagnostic down to a new\nnote. This way, when the fix-it represents a choice between two\noptions, each of the options is associted with a note. There is no\ndefault option in such cases. For example:\n\n/Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; ==\nwill be\n evaluated first [-Wparentheses]\n if (x & y == 0) {\n ^~~~~~~~\n/Users/dgregor/t.c:2:9: note: place parentheses around the &\nexpression to\n evaluate it first\n if (x & y == 0) {\n ^\n ( )\n/Users/dgregor/t.c:2:9: note: place parentheses around the ==\nexpression to\n silence this warning\n if (x & y == 0) {\n ^\n ( )\n\nllvm-svn: 101249"}, | |||
[d]={{v,20883,"// Diagnose the s/=/==/ and s/\\|=/!=/ typos. Note that adding parentheses\n// will prevent this condition from triggering, which is what we want.\nvoid Sema::DiagnoseAssignmentAsCondition(Expr *E) {\n // ...\n Diag(Loc, diag::note_condition_assign_silence) << FixItHint::CreateInsertion(Open, \"(\") << FixItHint::CreateInsertion(Close, \")\");"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: place parentheses around the assignment to silence this warning","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: place parentheses around the assignment to silence this warning"} | ["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: place parentheses around the assignment to silence this warning","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: place parentheses around the assignment to silence this warning"} | ||
| Line 4,947: | Line 4,948: | ||
}, | }, | ||
["note_condition_assign_to_comparison"]={ | ["note_condition_assign_to_comparison"]={ | ||
[ | [i]="note_condition_assign_to_comparison", | ||
[b]="use \'==\' to turn this assignment into an equality comparison", | [b]="use \'==\' to turn this assignment into an equality comparison", | ||
[ | [g]="use \'==\' to turn this assignment into an equality comparison", | ||
[ | [f]=q, | ||
[ | [e]="use \'\\=\\=\' to turn this assignment into an equality comparison", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"fa1e36d0de87",1262910023,"Improve the fix-its for -Wparentheses to ensure that the fix-it","Improve the fix-its for -Wparentheses to ensure that the fix-it\nsuggestions follow recovery. Additionally, add a note to these\ndiagnostics which suggests a fix-it for changing the behavior to what\nthe user probably meant. Examples:\n\nt.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first\n [-Wparentheses]\n if (i & j == k) {\n ^~~~~~~~\n ( )\nt.cpp:2:9: note: place parentheses around the & expression to evaluate it first\n if (i & j == k) {\n ^\n ( )\n\nt.cpp:14:9: warning: using the result of an assignment as a condition\nwithout\n parentheses [-Wparentheses]\n if (i = f()) {\n ~~^~~~~\n ( )\nt.cpp:14:9: note: use \'==\' to turn this assignment into an equality\ncomparison\n if (i = f()) {\n ^\n ==\n\nllvm-svn: 92975"}, | ||
[ | [d]={{v,20909,"// Diagnose the s/=/==/ and s/\\|=/!=/ typos. Note that adding parentheses\n// will prevent this condition from triggering, which is what we want.\nvoid Sema::DiagnoseAssignmentAsCondition(Expr *E) {\n // ...\n if (IsOrAssign)\n // ...\n else\n Diag(Loc, diag::note_condition_assign_to_comparison) << FixItHint::CreateReplacement(Loc, \"==\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: use \'==\' to turn this assignment into an equality comparison","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: use \'==\' to turn this assignment into an equality comparison"} | ["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: use \'==\' to turn this assignment into an equality comparison","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: use \'==\' to turn this assignment into an equality comparison"} | ||
| Line 4,961: | Line 4,962: | ||
}, | }, | ||
["note_condition_or_assign_to_comparison"]={ | ["note_condition_or_assign_to_comparison"]={ | ||
[ | [i]="note_condition_or_assign_to_comparison", | ||
[b]="use \'!=\' to turn this compound assignment into an inequality comparison", | [b]="use \'!=\' to turn this compound assignment into an inequality comparison", | ||
[ | [g]="use \'!=\' to turn this compound assignment into an inequality comparison", | ||
[ | [f]=q, | ||
[ | [e]="use \'\\!\\=\' to turn this compound assignment into an inequality comparison", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"2d4f64f441ce",1295455808,"Warn about the use of unparenthesized |= in conditionals (which may be","Warn about the use of unparenthesized |= in conditionals (which may be\na typo for !=). Fixes PR9001, from Hans Wennborg!\n\nllvm-svn: 123836"}, | ||
[ | [d]={{v,20886,"// Diagnose the s/=/==/ and s/\\|=/!=/ typos. Note that adding parentheses\n// will prevent this condition from triggering, which is what we want.\nvoid Sema::DiagnoseAssignmentAsCondition(Expr *E) {\n // ...\n if (IsOrAssign)\n Diag(Loc, diag::note_condition_or_assign_to_comparison) << FixItHint::CreateReplacement(Loc, \"!=\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-assignment-condition.cpp"]={"clang/test/SemaCXX/warn-assignment-condition.cpp:101:9: note: use \'!=\' to turn this compound assignment into an inequality comparison","clang/test/SemaCXX/warn-assignment-condition.cpp:105:9: note: use \'!=\' to turn this compound assignment into an inequality comparison"} | ["clang/test/SemaCXX/warn-assignment-condition.cpp"]={"clang/test/SemaCXX/warn-assignment-condition.cpp:101:9: note: use \'!=\' to turn this compound assignment into an inequality comparison","clang/test/SemaCXX/warn-assignment-condition.cpp:105:9: note: use \'!=\' to turn this compound assignment into an inequality comparison"} | ||
| Line 4,975: | Line 4,976: | ||
}, | }, | ||
["note_conflicting_attribute"]={ | ["note_conflicting_attribute"]={ | ||
[ | [i]="note_conflicting_attribute", | ||
[b]="conflicting attribute is here", | [b]="conflicting attribute is here", | ||
[g]="conflicting attribute is here", | [g]="conflicting attribute is here", | ||
[f]= | [f]=q, | ||
[e]= | [e]="conflicting attribute is here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"30e41fb4da68",1418669848,"Warn when attribute \'optnone\' conflicts with attributes on a","Warn when attribute \'optnone\' conflicts with attributes on a\ndifferent declaration of the same function.\n\nllvm-svn: 224256"}, | |||
[d]={{fb,280,"/// Diagnose mutually exclusive attributes when present on a given\n/// declaration. Returns true if diagnosed.\ntemplate <typename AttrTy> static bool checkAttrMutualExclusion(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (const auto *A = D->getAttr<AttrTy>()) {\n // ...\n S.Diag(A->getLocation(), diag::note_conflicting_attribute);"},{fb,292,"template <typename AttrTy> static bool checkAttrMutualExclusion(Sema &S, Decl *D, const Attr &AL) {\n if (const auto *A = D->getAttr<AttrTy>()) {\n // ...\n S.Diag(A->getLocation(), diag::note_conflicting_attribute);"},{fb,2071,"static void handleCPUSpecificAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Ensure we don\'t combine these with themselves, since that causes some\n // confusing behavior.\n if (AL.getParsedKind() == ParsedAttr::AT_CPUDispatch) {\n // ...\n if (const auto *Other = D->getAttr<CPUDispatchAttr>()) {\n // ...\n S.Diag(Other->getLocation(), diag::note_conflicting_attribute);"},{fb,2080,"static void handleCPUSpecificAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Ensure we don\'t combine these with themselves, since that causes some\n // confusing behavior.\n if (AL.getParsedKind() == ParsedAttr::AT_CPUDispatch) {\n // ...\n } else if (AL.getParsedKind() == ParsedAttr::AT_CPUSpecific) {\n // ...\n if (const auto *Other = D->getAttr<CPUSpecificAttr>()) {\n // ...\n S.Diag(Other->getLocation(), diag::note_conflicting_attribute);"},{fb,3621,"static void handleTargetClonesAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // Ensure we don\'t combine these with themselves, since that causes some\n // confusing behavior.\n if (const auto *Other = D->getAttr<TargetClonesAttr>()) {\n // ...\n S.Diag(Other->getLocation(), diag::note_conflicting_attribute);"},{fb,3902,"ErrorAttr *Sema::mergeErrorAttr(Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic) {\n if (const auto *EA = D->getAttr<ErrorAttr>()) {\n // ...\n if (!Match) {\n // ...\n Diag(CI.getLoc(), diag::note_conflicting_attribute);"},{fb,4888,"AlwaysInlineAttr *Sema::mergeAlwaysInlineAttr(Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Ident) {\n if (OptimizeNoneAttr *Optnone = D->getAttr<OptimizeNoneAttr>()) {\n // ...\n Diag(Optnone->getLocation(), diag::note_conflicting_attribute);"},{fb,4944,"MinSizeAttr *Sema::mergeMinSizeAttr(Decl *D, const AttributeCommonInfo &CI) {\n if (OptimizeNoneAttr *Optnone = D->getAttr<OptimizeNoneAttr>()) {\n // ...\n Diag(Optnone->getLocation(), diag::note_conflicting_attribute);"},{fb,4962,"SwiftNameAttr *Sema::mergeSwiftNameAttr(Decl *D, const SwiftNameAttr &SNA, StringRef Name) {\n if (const auto *PrevSNA = D->getAttr<SwiftNameAttr>()) {\n if (PrevSNA->getName() != Name && !PrevSNA->isImplicit()) {\n // ...\n Diag(SNA.getLoc(), diag::note_conflicting_attribute);"},{fb,4974,"OptimizeNoneAttr *Sema::mergeOptimizeNoneAttr(Decl *D, const AttributeCommonInfo &CI) {\n if (AlwaysInlineAttr *Inline = D->getAttr<AlwaysInlineAttr>()) {\n // ...\n Diag(CI.getLoc(), diag::note_conflicting_attribute);"},{fb,4979,"OptimizeNoneAttr *Sema::mergeOptimizeNoneAttr(Decl *D, const AttributeCommonInfo &CI) {\n // ...\n if (MinSizeAttr *MinSize = D->getAttr<MinSizeAttr>()) {\n // ...\n Diag(CI.getLoc(), diag::note_conflicting_attribute);"},{fb,5260,"static void handleLifetimeCategoryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.getKind() == ParsedAttr::AT_Owner) {\n // ...\n if (const auto *OAttr = D->getAttr<OwnerAttr>()) {\n // ...\n if (ExistingDerefType != ParmType.getTypePtrOrNull()) {\n // ...\n S.Diag(OAttr->getLocation(), diag::note_conflicting_attribute);"},{fb,5279,"static void handleLifetimeCategoryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.getKind() == ParsedAttr::AT_Owner) {\n // ...\n } else {\n // ...\n if (const auto *PAttr = D->getAttr<PointerAttr>()) {\n // ...\n if (ExistingDerefType != ParmType.getTypePtrOrNull()) {\n // ...\n S.Diag(PAttr->getLocation(), diag::note_conflicting_attribute);"},{fb,5516,"void Sema::AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI abi) {\n // ...\n if (auto existingAttr = D->getAttr<ParameterABIAttr>()) {\n if (existingAttr->getABI() != abi) {\n // ...\n Diag(existingAttr->getLocation(), diag::note_conflicting_attribute);"},{fb,7113,"HLSLNumThreadsAttr *Sema::mergeHLSLNumThreadsAttr(Decl *D, const AttributeCommonInfo &AL, int X, int Y, int Z) {\n if (HLSLNumThreadsAttr *NT = D->getAttr<HLSLNumThreadsAttr>()) {\n if (NT->getX() != X || NT->getY() != Y || NT->getZ() != Z) {\n // ...\n Diag(AL.getLoc(), diag::note_conflicting_attribute);"},{fb,7210,"HLSLShaderAttr *Sema::mergeHLSLShaderAttr(Decl *D, const AttributeCommonInfo &AL, HLSLShaderAttr::ShaderType ShaderType) {\n if (HLSLShaderAttr *NT = D->getAttr<HLSLShaderAttr>()) {\n if (NT->getType() != ShaderType) {\n // ...\n Diag(AL.getLoc(), diag::note_conflicting_attribute);"},{fb,8654,"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 // ...\n S.Diag(AL.getLoc(), diag::note_conflicting_attribute);"},{wb,931,"StmtResult Sema::ActOnIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *thenStmt, SourceLocation ElseLoc, Stmt *elseStmt) {\n // ...\n if (ConstevalOrNegatedConsteval || StatementKind == IfStatementKind::Constexpr) {\n // ...\n } else {\n // ...\n if (std::get<0>(LHC)) {\n // ...\n Diags.Report(ElseAttr->getLocation(), diag::note_conflicting_attribute) << ElseAttr << ElseAttr->getRange();"},{"clang/lib/Sema/SemaStmtAttr.cpp",254,"template <typename OtherAttr, int DiagIdx> static bool CheckStmtInlineAttr(Sema &SemaRef, const Stmt *OrigSt, const Stmt *CurSt, const AttributeCommonInfo &A) {\n // ...\n for (const auto &Tup : llvm::zip_longest(OrigCEF.getCallExprs(), CEF.getCallExprs())) {\n // If the original call expression already had a callee, we already\n // diagnosed this, so skip it here. We can\'t skip if there isn\'t a 1:1\n // relationship between the two lists of call expressions.\n if (!CanSuppressDiag || !(*std::get<0>(Tup))->getCalleeDecl()) {\n // ...\n if (Callee && (Callee->hasAttr<OtherAttr>() || Callee->hasAttr<FlattenAttr>())) {\n // ...\n SemaRef.Diag(Callee->getBeginLoc(), diag::note_conflicting_attribute);"},{"clang/utils/TableGen/ClangAttrEmitter.cpp",4025,"// Generates the mutual exclusion checks. The checks for parsed attributes are\n// written into OS and the checks for merging declaration attributes are\n// written into MergeOS.\nstatic void GenerateMutualExclusionsChecks(const Record &Attr, const RecordKeeper &Records, raw_ostream &OS, raw_ostream &MergeDeclOS, raw_ostream &MergeStmtOS) {\n // ...\n // If we discovered any decl or stmt attributes to test for, generate the\n // predicates for them now.\n if (!DeclAttrs.empty()) {\n // ...\n for (const std::string &A : DeclAttrs) {\n // ...\n OS << \" S.Diag(A->getLocation(), diag::note_conflicting_attribute);\";"},{"clang/utils/TableGen/ClangAttrEmitter.cpp",4048,"// Generates the mutual exclusion checks. The checks for parsed attributes are\n// written into OS and the checks for merging declaration attributes are\n// written into MergeOS.\nstatic void GenerateMutualExclusionsChecks(const Record &Attr, const RecordKeeper &Records, raw_ostream &OS, raw_ostream &MergeDeclOS, raw_ostream &MergeStmtOS) {\n // ...\n // If we discovered any decl or stmt attributes to test for, generate the\n // predicates for them now.\n if (!DeclAttrs.empty()) {\n // ...\n // Also generate the declaration attribute merging logic if the current\n // attribute is one that can be inheritted on a declaration. It is assumed\n // this code will be executed in the context of a function with parameters:\n // Sema &S, Decl *D, Attr *A and that returns a bool (false on diagnostic,\n // true on success).\n if (Attr.isSubClassOf(\"InheritableAttr\")) {\n // ...\n for (const std::string &A : DeclAttrs) {\n // ...\n MergeDeclOS << \" S.Diag(Second->getLocation(), \"\n << \"diag::note_conflicting_attribute);\\n\";"},{"clang/utils/TableGen/ClangAttrEmitter.cpp",4089,"// Generates the mutual exclusion checks. The checks for parsed attributes are\n// written into OS and the checks for merging declaration attributes are\n// written into MergeOS.\nstatic void GenerateMutualExclusionsChecks(const Record &Attr, const RecordKeeper &Records, raw_ostream &OS, raw_ostream &MergeDeclOS, raw_ostream &MergeStmtOS) {\n // ...\n // Statement attributes are a bit different from declarations. With\n // declarations, each attribute is added to the declaration as it is\n // processed, and so you can look on the Decl * itself to see if there is a\n // conflicting attribute. Statement attributes are processed as a group\n // because AttributedStmt needs to tail-allocate all of the attribute nodes\n // at once. This means we cannot check whether the statement already contains\n // an attribute to check for the conflict. Instead, we need to check whether\n // the given list of semantic attributes contain any conflicts. It is assumed\n // this code will be executed in the context of a function with parameters:\n // Sema &S, const SmallVectorImpl<const Attr *> &C. The code will be within a\n // loop which loops over the container C with a loop variable named A to\n // represent the current attribute to check for conflicts.\n //\n // FIXME: it would be nice not to walk over the list of potential attributes\n // to apply to the statement more than once, but statements typically don\'t\n // have long lists of attributes on them, so re-walking the list should not\n // be an expensive operation.\n if (!StmtAttrs.empty()) {\n // ...\n MergeStmtOS << \" S.Diag(Second->getLocation(), \"\n << \"diag::note_conflicting_attribute);\\n\";"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Sema/mips-interrupt-attr.c"]={"clang/test/Sema/mips-interrupt-attr.c:22:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:24:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:26:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:28:16: note: conflicting attribute is here"} | ["clang/test/Sema/mips-interrupt-attr.c"]={"clang/test/Sema/mips-interrupt-attr.c:22:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:24:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:26:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:28:16: note: conflicting attribute is here"} | ||
| Line 4,989: | Line 4,990: | ||
}, | }, | ||
["note_conflicting_prototype"]={ | ["note_conflicting_prototype"]={ | ||
[ | [i]={{nil,y,"note_conflicting_prototype"}}, | ||
[b]={{nil, | [b]={{nil,y,"conflicting prototype is here"}}, | ||
[ | [g]={{nil,y,"conflicting prototype is here"}}, | ||
[ | [f]=q, | ||
[ | [e]="conflicting prototype is here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,y,m}}, | ||
[ | [h]={fd,1620530452,Wc,dd}, | ||
[ | [d]={{w,4179,"/// 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 // C: Function types need to be compatible, not identical. This handles\n // duplicate function decls like \"void f(int); void f(enum X);\" properly.\n if (!getLangOpts().CPlusPlus) {\n // ...\n // If we are merging two functions where only one of them has a prototype,\n // we may have enough information to decide to issue a diagnostic that the\n // function without a protoype will change behavior in C2x. This handles\n // cases like:\n // void i(); void i(int j);\n // void i(int j); void i();\n // void i(); void i(int j) {}\n // See ActOnFinishFunctionBody() for other cases of the behavior change\n // diagnostic. See GetFullTypeForDeclarator() for handling of a function\n // type without a prototype.\n if (New->hasWrittenPrototype() != Old->hasWrittenPrototype() && !New->isImplicit() && !Old->isImplicit()) {\n // ...\n if (WithProto->getNumParams() != 0) {\n if (WithoutProto->getBuiltinID() == 0 && !WithoutProto->isImplicit()) {\n // ...\n // The reason the one without the prototype will be changing behavior\n // is because of the one with the prototype, so note that so long as\n // it\'s a user-visible declaration. There is one exception to this:\n // when the new declaration is a definition without a prototype, the\n // old declaration with a prototype is not the cause of the issue,\n // and that does not need to be noted because the one with a\n // prototype will not change behavior in C2x.\n if (WithProto->getBuiltinID() == 0 && !WithProto->isImplicit() && !IsWithoutProtoADef)\n Diag(WithProto->getLocation(), diag::note_conflicting_prototype);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/nonnull.m"]={"clang/test/SemaObjC/nonnull.m:63:6: note: conflicting prototype is here"} | ["clang/test/SemaObjC/nonnull.m"]={"clang/test/SemaObjC/nonnull.m:63:6: note: conflicting prototype is here"} | ||
| Line 5,003: | Line 5,004: | ||
}, | }, | ||
["note_conflicting_try_here"]={ | ["note_conflicting_try_here"]={ | ||
[ | [i]="note_conflicting_try_here", | ||
[b]="conflicting %0 here", | [b]="conflicting %0 here", | ||
[ | [g]="conflicting A here", | ||
[ | [f]=q, | ||
[ | [e]="conflicting (.*?) here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[ | [h]={"e71759103e72",1422915331,"SEH: Diagnose use of C++ EH and SEH in the same function","SEH: Diagnose use of C++ EH and SEH in the same function\n\nThis check does not apply when Borland extensions are enabled, as they\nhave a checked in test case indicating that mixed usage of SEH and C++\nis supported.\n\nllvm-svn: 227876"}, | ||
[ | [d]={{wb,4245,"StmtResult Sema::ActOnObjCAtTryStmt(SourceLocation AtLoc, Stmt *Try, MultiStmtArg CatchStmts, Stmt *Finally) {\n // ...\n if (FSI->FirstSEHTryLoc.isValid()) {\n // ...\n Diag(FSI->FirstSEHTryLoc, diag::note_conflicting_try_here) << \"\'__try\'\";"},{wb,4495,"/// ActOnCXXTryBlock - Takes a try compound-statement and a number of\n/// handlers and creates a try statement from them.\nStmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef<Stmt *> Handlers) {\n // ...\n // C++ try is incompatible with SEH __try.\n if (!getLangOpts().Borland && FSI->FirstSEHTryLoc.isValid()) {\n // ...\n Diag(FSI->FirstSEHTryLoc, diag::note_conflicting_try_here) << \"\'__try\'\";"},{wb,4588,"StmtResult Sema::ActOnSEHTryBlock(bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler) {\n // ...\n // SEH __try is incompatible with C++ try. Borland appears to support this,\n // however.\n if (!getLangOpts().Borland) {\n if (FSI->FirstCXXOrObjCTryLoc.isValid()) {\n // ...\n Diag(FSI->FirstCXXOrObjCTryLoc, diag::note_conflicting_try_here) << (FSI->FirstTryType == sema::FunctionScopeInfo::TryLocIsCXX ? \"\'try\'\" : \"\'@try\'\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/exceptions-seh.mm"]={"clang/test/SemaCXX/exceptions-seh.mm:6:3: note: conflicting \'@try\' here","clang/test/SemaCXX/exceptions-seh.mm:17:3: note: conflicting \'__try\' here"} | ["clang/test/SemaCXX/exceptions-seh.mm"]={"clang/test/SemaCXX/exceptions-seh.mm:6:3: note: conflicting \'@try\' here","clang/test/SemaCXX/exceptions-seh.mm:17:3: note: conflicting \'__try\' here"} | ||
| Line 5,017: | Line 5,018: | ||
}, | }, | ||
["note_consteval_address_accessible"]={ | ["note_consteval_address_accessible"]={ | ||
[ | [i]={{nil,A,"note_consteval_address_accessible"}}, | ||
[b]={{nil, | [b]={{nil,A,"%select{pointer|reference}0 to a consteval declaration is not a constant expression"}}, | ||
[ | [g]={{nil,A,{{"pointer","reference"}," to a consteval declaration is not a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:pointer|reference) to a consteval declaration is not a constant expression", | ||
[ | [c]=o, | ||
[ | [a]={{nil,A,u}}, | ||
[ | [h]={"474177c05381",1579695612,"[AST] Improve overflow diagnostics for fixed-point constant evaluation.","[AST] Improve overflow diagnostics for fixed-point constant evaluation.\n\nSummary:\nDiagnostics for overflow were not being produced for fixed-point\nevaluation. This patch refactors a bit of the evaluator and adds\na proper diagnostic for these cases.\n\nReviewers: rjmccall, leonardchan, bjope\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D73188"}, | ||
[ | [d]={{s,2196,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n if (auto *FD = dyn_cast_or_null<FunctionDecl>(BaseVD); FD && FD->isImmediateFunction()) {\n Info.FFDiag(Loc, diag::note_consteval_address_accessible) << !Type->isAnyPointerType();"},{s,2336,"/// Member pointers are constant expressions unless they point to a\n/// non-virtual dllimport member function.\nstatic bool CheckMemberPointerConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const APValue &Value, ConstantExprKind Kind) {\n // ...\n if (FD->isImmediateFunction()) {\n Info.FFDiag(Loc, diag::note_consteval_address_accessible) << /*pointer*/ 0;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:50:20: note: pointer to a consteval declaration is not a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:50:16: note: pointer to a consteval declaration is not a constant expression"} | ["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:50:20: note: pointer to a consteval declaration is not a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:50:16: note: pointer to a consteval declaration is not a constant expression"} | ||
| Line 5,031: | Line 5,032: | ||
}, | }, | ||
["note_constexpr_access_deleted_object"]={ | ["note_constexpr_access_deleted_object"]={ | ||
[ | [i]={{nil,p,"note_constexpr_access_deleted_object"}}, | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 heap allocated object that has been deleted"}}, | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 heap allocated object that has been deleted"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,nc,Db}," heap allocated object that has been deleted"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) heap allocated object that has been deleted", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,4174,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n if (!Alloc) {\n Info.FFDiag(E, diag::note_constexpr_access_deleted_object) << AK;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp"]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:111:5: note: construction of heap allocated object that has been deleted"} | ["clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp"]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:111:5: note: construction of heap allocated object that has been deleted"} | ||
| Line 5,045: | Line 5,046: | ||
}, | }, | ||
["note_constexpr_access_inactive_union_member"]={ | ["note_constexpr_access_inactive_union_member"]={ | ||
[ | [i]="note_constexpr_access_inactive_union_member", | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of}0 member %1 of union with %select{active member %3|no active member}2 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 member %1 of union with %select{active member %3|no active member}2 is not allowed in a constant expression"},{ | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of}0 member %1 of union with %select{active member %3|no active member}2 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 member %1 of union with %select{active member %3|no active member}2 is not allowed in a constant expression"},{D,nil,"%select{read of|assignment to|increment of|decrement of}0 member %1 of union with %select{active member %3|no active member}2 is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,"construction of subobject of",Db}," member B of union with ",{"active member D","no active member"},rb}},{r,r,{{C,I,J,K,db,cb,eb}," member B of union with ",{"active member D","no active member"},rb}},{D,nil,{{C,I,J,K}," member B of union with ",{"active member D","no active member"},rb}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of) member (.*?) of union with (?:active member (.*?)|no active member) is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={sc,1366986990,uc,vc}, | ||
[ | [d]={{s,3824,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n } else if (ObjType->isAnyComplexType()) {\n // ...\n } else if (const FieldDecl *Field = getAsField(Sub.Entries[I])) {\n // ...\n if (RD->isUnion()) {\n // ...\n if (!UnionField || UnionField->getCanonicalDecl() != Field->getCanonicalDecl()) {\n if (I == N - 1 && handler.AccessKind == AK_Construct) {\n // ...\n } else {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_inactive_union_member) << handler.AccessKind << Field << !UnionField << UnionField;"},{mb,84,"static bool CheckActive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_inactive_union_member) << AK << InactiveField << !ActiveField << ActiveField;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp:28:17: note: read of member \'d\' of union with active member \'c\' is not allowed in a constant expression"} | ["clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp:28:17: note: read of member \'d\' of union with active member \'c\' is not allowed in a constant expression"} | ||
| Line 5,059: | Line 5,060: | ||
}, | }, | ||
["note_constexpr_access_mutable"]={ | ["note_constexpr_access_mutable"]={ | ||
[ | [i]={{nil,p,"note_constexpr_access_mutable"}}, | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 mutable member %1 is not allowed in a constant expression"}}, | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 mutable member %1 is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,nc,Db}," mutable member B is not allowed in a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) mutable member (.*?) is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={"2b4fa5348ee1",1569733726,"For P0784R7: compute whether a variable has constant destruction if it","For P0784R7: compute whether a variable has constant destruction if it\nhas a constexpr destructor.\n\nFor constexpr variables, reject if the variable does not have constant\ndestruction. In all cases, do not emit runtime calls to the destructor\nfor variables with constant destruction.\n\nllvm-svn: 373159"}, | ||
[ | [d]={{s,3542,"/// Diagnose an attempt to read from any unreadable field within the specified\n/// type, which might be a class type.\nstatic bool diagnoseMutableFields(EvalInfo &Info, const Expr *E, AccessKinds AK, QualType T) {\n // ...\n for (auto *Field : RD->fields()) {\n // If we\'re actually going to read this field in some way, then it can\'t\n // be mutable. If we\'re in a union, then assigning to a mutable field\n // (even an empty one) can change the active member, so that\'s not OK.\n // FIXME: Add core issue number for the union case.\n if (Field->isMutable() && (RD->isUnion() || isReadByLvalueToRvalueConversion(Field->getType()))) {\n Info.FFDiag(E, diag::note_constexpr_access_mutable, 1) << AK << Field;"},{s,3804,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n } else if (ObjType->isAnyComplexType()) {\n // ...\n } else if (const FieldDecl *Field = getAsField(Sub.Entries[I])) {\n if (Field->isMutable() && !Obj.mayAccessMutableMembers(Info, handler.AccessKind)) {\n Info.FFDiag(E, diag::note_constexpr_access_mutable, 1) << handler.AccessKind << Field;"},{mb,231,"bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_mutable, 1) << AK_Read << Field;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:15:35: note: read of mutable member \'member\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:21:38: note: assignment to mutable member \'member\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:32:13: note: read of mutable member \'hcm\' is not allowed in a constant expression"} | ["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:15:35: note: read of mutable member \'member\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:21:38: note: assignment to mutable member \'member\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:32:13: note: read of mutable member \'hcm\' is not allowed in a constant expression"} | ||
| Line 5,073: | Line 5,074: | ||
}, | }, | ||
["note_constexpr_access_null"]={ | ["note_constexpr_access_null"]={ | ||
[ | [i]="note_constexpr_access_null", | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 dereferenced null pointer is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 dereferenced null pointer is not allowed in a constant expression"},{ | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 dereferenced null pointer is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 dereferenced null pointer is not allowed in a constant expression"},{D,nil,"%select{read of|assignment to|increment of|decrement of}0 dereferenced null pointer is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,nc,Db}," dereferenced null pointer is not allowed in a constant expression"}},{r,r,{{C,I,J,K,db,cb,eb}," dereferenced null pointer is not allowed in a constant expression"}},{D,nil,{{C,I,J,K}," dereferenced null pointer is not allowed in a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) dereferenced null pointer is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={sc,1366986990,uc,vc}, | ||
[ | [d]={{s,1654,"#endif\n // ...\n bool checkNullPointerForFoldAccess(EvalInfo &Info, const Expr *E, AccessKinds AK) {\n return checkNullPointerDiagnosingWith([&Info, E, AK] { Info.FFDiag(E, diag::note_constexpr_access_null) << AK; });"},{s,4009,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (!LVal.Base) {\n Info.FFDiag(E, diag::note_constexpr_access_null) << AK;"},{mb,155,"bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n if (Ptr.isZero()) {\n // ...\n if (Ptr.isField())\n // ...\n else\n S.FFDiag(Src, diag::note_constexpr_access_null) << AK;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/AST/Interp/builtin-functions.cpp"]={"clang/test/AST/Interp/builtin-functions.cpp:19:17: note: read of dereferenced null pointer is not allowed in a constant expression","clang/test/AST/Interp/builtin-functions.cpp:24:17: note: read of dereferenced null pointer is not allowed in a constant expression"} | ["clang/test/AST/Interp/builtin-functions.cpp"]={"clang/test/AST/Interp/builtin-functions.cpp:19:17: note: read of dereferenced null pointer is not allowed in a constant expression","clang/test/AST/Interp/builtin-functions.cpp:24:17: note: read of dereferenced null pointer is not allowed in a constant expression"} | ||
| Line 5,087: | Line 5,088: | ||
}, | }, | ||
["note_constexpr_access_past_end"]={ | ["note_constexpr_access_past_end"]={ | ||
[ | [i]="note_constexpr_access_past_end", | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 dereferenced one-past-the-end pointer is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 dereferenced one-past-the-end pointer is not allowed in a constant expression"},{ | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 dereferenced one-past-the-end pointer is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 dereferenced one-past-the-end pointer is not allowed in a constant expression"},{D,nil,"%select{read of|assignment to|increment of|decrement of}0 dereferenced one-past-the-end pointer is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,nc,Db}," dereferenced one-past-the-end pointer is not allowed in a constant expression"}},{r,r,{{C,I,J,K,db,cb,eb}," dereferenced one-past-the-end pointer is not allowed in a constant expression"}},{D,nil,{{C,I,J,K}," dereferenced one-past-the-end pointer is not allowed in a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) dereferenced one\\-past\\-the\\-end pointer is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={sc,1366986990,uc,vc}, | ||
[ | [d]={{s,3659,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n if (Sub.isOnePastTheEnd() || Sub.isMostDerivedAnUnsizedArray()) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, Sub.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << handler.AccessKind;"},{s,3761,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n if (CAT->getSize().ule(Index)) {\n // Note, it should not be possible to form a pointer with a valid\n // designator which points more than one past the end of the array.\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_access_past_end) << handler.AccessKind;"},{s,3782,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n } else if (ObjType->isAnyComplexType()) {\n // ...\n if (Index > 1) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_access_past_end) << handler.AccessKind;"},{s,4340,"/// Perform an lvalue-to-rvalue conversion on the given glvalue. This\n/// can also be used for \'lvalue-to-lvalue\' conversions for looking up the\n/// glvalue referred to by an entity of reference type.\n///\n/// \\param Info - Information about the ongoing evaluation.\n/// \\param Conv - The expression for which we are performing the conversion.\n/// Used for diagnostics.\n/// \\param Type - The type of the glvalue (before stripping cv-qualifiers in the\n/// case of a non-class type).\n/// \\param LVal - The glvalue on which we are attempting to perform this action.\n/// \\param RVal - The produced value will be placed here.\n/// \\param WantObjectRepresentation - If true, we\'re looking for the object\n/// representation rather than the value, and in particular,\n/// there is no requirement that the result be fully initialized.\nstatic bool handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type, const LValue &LVal, APValue &RVal, bool WantObjectRepresentation = false) {\n // ...\n if (Base && !LVal.getLValueCallIndex() && !Type.isVolatileQualified()) {\n if (const CompoundLiteralExpr *CLE = dyn_cast<CompoundLiteralExpr>(Base)) {\n // ...\n } else if (isa<StringLiteral>(Base) || isa<PredefinedExpr>(Base)) {\n // ...\n if (LVal.Designator.isOnePastTheEnd()) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(Conv, diag::note_constexpr_access_past_end) << AK;"},{s,5661,"/// Check that we can access the notional vptr of an object / determine its\n/// dynamic type.\nstatic bool checkDynamicType(EvalInfo &Info, const Expr *E, const LValue &This, AccessKinds AK, bool Polymorphic) {\n // ...\n if (!Obj.Value) {\n // The object is not usable in constant expressions, so we can\'t inspect\n // its value to see if it\'s in-lifetime or what the active union members\n // are. We can still check for a one-past-the-end lvalue.\n if (This.Designator.isOnePastTheEnd() || This.Designator.isMostDerivedAnUnsizedArray()) {\n Info.FFDiag(E, This.Designator.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << AK;"},{mb,191,"bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_past_end) << AK;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-array-unknown-bound.cpp"]={"clang/test/SemaCXX/constexpr-array-unknown-bound.cpp:5:32: note: read of dereferenced one-past-the-end pointer is not allowed in a constant expression"} | ["clang/test/SemaCXX/constexpr-array-unknown-bound.cpp"]={"clang/test/SemaCXX/constexpr-array-unknown-bound.cpp:5:32: note: read of dereferenced one-past-the-end pointer is not allowed in a constant expression"} | ||
| Line 5,101: | Line 5,102: | ||
}, | }, | ||
["note_constexpr_access_static_temporary"]={ | ["note_constexpr_access_static_temporary"]={ | ||
[ | [i]="note_constexpr_access_static_temporary", | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|reconstruction of|destruction of}0 temporary is not allowed in a constant expression outside the expression that created the temporary"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 temporary is not allowed in a constant expression outside the expression that created the temporary"},{ | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|reconstruction of|destruction of}0 temporary is not allowed in a constant expression outside the expression that created the temporary"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 temporary is not allowed in a constant expression outside the expression that created the temporary"},{D,nil,"%select{read of|assignment to|increment of|decrement of}0 temporary is not allowed in a constant expression outside the expression that created the temporary"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,"reconstruction of",Db}," temporary is not allowed in a constant expression outside the expression that created the temporary"}},{r,r,{{C,I,J,K,db,cb,eb}," temporary is not allowed in a constant expression outside the expression that created the temporary"}},{D,nil,{{C,I,J,K}," temporary is not allowed in a constant expression outside the expression that created the temporary"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|reconstruction of|destruction of) temporary is not allowed in a constant expression outside the expression that created the temporary", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"e6c0144208a4",1370393174,"Model temporary lifetime-extension explicitly in the AST. Use this model to","Model temporary lifetime-extension explicitly in the AST. Use this model to\nhandle temporaries which have been lifetime-extended to static storage duration\nwithin constant expressions. This correctly handles nested lifetime extension\n(through reference members of aggregates in aggregate initializers) but\nnon-constant-expression emission hasn\'t yet been updated to do the same.\n\nllvm-svn: 183283"}, | ||
[ | [d]={{s,4217,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n } else {\n // ...\n if (!Frame) {\n if (const MaterializeTemporaryExpr *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(Base)) {\n // ...\n // C++20 [expr.const]p4: [DR2126]\n // An object or reference is usable in constant expressions if it is\n // - a temporary object of non-volatile const-qualified literal type\n // whose lifetime is extended to that of a variable that is usable\n // in constant expressions\n //\n // C++20 [expr.const]p5:\n // an lvalue-to-rvalue conversion [is not allowed unless it applies to]\n // - a non-volatile glvalue that refers to an object that is usable\n // in constant expressions, or\n // - a non-volatile glvalue of literal type that refers to a\n // non-volatile object whose lifetime began within the evaluation\n // of E;\n //\n // C++11 misses the \'began within the evaluation of e\' check and\n // instead allows all temporaries, including things like:\n // int &&r = 1;\n // int x = ++r;\n // constexpr int k = r;\n // Therefore we use the C++14-onwards rules in C++11 too.\n //\n // Note that temporaries whose lifetimes began while evaluating a\n // variable\'s constructor are not usable while evaluating the\n // corresponding destructor, not even if they\'re of const-qualified\n // types.\n if (!MTE->isUsableInConstantExpressions(Info.Ctx) && !lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_static_temporary, 1) << AK;"},{mb,102,"static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n if (auto ID = Ptr.getDeclID()) {\n // ...\n S.FFDiag(E, diag::note_constexpr_access_static_temporary, 1) << AK;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:40:13: note: read of temporary is not allowed in a constant expression outside the expression that created the temporary"} | ["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:40:13: note: read of temporary is not allowed in a constant expression outside the expression that created the temporary"} | ||
| Line 5,115: | Line 5,116: | ||
}, | }, | ||
["note_constexpr_access_uninit"]={ | ["note_constexpr_access_uninit"]={ | ||
[ | [i]="note_constexpr_access_uninit", | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of}0 %select{object outside its lifetime|uninitialized object}1 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 %select{object outside its lifetime|uninitialized object}1 is not allowed in a constant expression"},{ | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of}0 %select{object outside its lifetime|uninitialized object}1 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 %select{object outside its lifetime|uninitialized object}1 is not allowed in a constant expression"},{D,nil,"%select{read of|assignment to|increment of|decrement of}0 object outside its lifetime is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,"construction of subobject of",Db},gc,{"object outside its lifetime","uninitialized object"},rb}},{r,r,{{C,I,J,K,db,cb,eb},gc,{"object outside its lifetime","uninitialized object"},rb}},{D,nil,{{C,I,J,K}," object outside its lifetime is not allowed in a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of) (?:object outside its lifetime|uninitialized object) is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={sc,1366986990,uc,vc}, | ||
[ | [d]={{s,3679,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // Reading an indeterminate value is undefined, but assigning over one is OK.\n if ((O->isAbsent() && !(handler.AccessKind == AK_Construct && I == N)) || (O->isIndeterminate() && !isValidIndeterminateAccess(handler.AccessKind))) {\n if (!Info.checkingPotentialConstantExpression())\n Info.FFDiag(E, diag::note_constexpr_access_uninit) << handler.AccessKind << O->isIndeterminate();"},{mb,243,"bool CheckInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n if (!S.checkingPotentialConstantExpression()) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_uninit) << AK << /*uninitialized=*/true;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-value-init.cpp"]={ | ["clang/test/SemaCXX/constexpr-value-init.cpp"]={Vc,Vc,Vc,Vc,Vc} | ||
} | } | ||
}, | }, | ||
["note_constexpr_access_unreadable_object"]={ | ["note_constexpr_access_unreadable_object"]={ | ||
[ | [i]={{nil,r,"note_constexpr_access_unreadable_object"}}, | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 object \'%1\' whose value is not known"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 object \'%1\' whose value is not known"}}, | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 object \'%1\' whose value is not known"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 object \'%1\' whose value is not known"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,nc,Db}," object \'B\' whose value is not known"}},{r,r,{{C,I,J,K,db,cb,eb}," object \'B\' whose value is not known"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) object \'(.*?)\' whose value is not known", | ||
[ | [c]=o, | ||
[ | [a]={{nil,r,u}}, | ||
[ | [h]={"7ee4307bd445",1558057565,"Refactor constant evaluation of typeid(T) to track a symbolic type_info","Refactor constant evaluation of typeid(T) to track a symbolic type_info\nobject rather than tracking the originating expression.\n\nThis is groundwork for supporting polymorphic typeid expressions. (Note\nthat this somewhat regresses our support for DR1968, but it turns out\nthat that never actually worked anyway, at least in non-trivial cases.)\n\nllvm-svn: 360974"}, | ||
[ | [d]={{s,4229,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n } else {\n // ...\n if (!Frame) {\n if (const MaterializeTemporaryExpr *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(Base)) {\n // ...\n } else {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_unreadable_object) << AK << Val.getAsString(Info.Ctx, Info.Ctx.getLValueReferenceType(LValType));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/typeid.cpp"]={"clang/test/SemaCXX/typeid.cpp:32:30: note: read of object \'typeid(int).name\' whose value is not known"} | ["clang/test/SemaCXX/typeid.cpp"]={"clang/test/SemaCXX/typeid.cpp:32:30: note: read of object \'typeid(int).name\' whose value is not known"} | ||
| Line 5,143: | Line 5,144: | ||
}, | }, | ||
["note_constexpr_access_unsized_array"]={ | ["note_constexpr_access_unsized_array"]={ | ||
[ | [i]={{nil,E,"note_constexpr_access_unsized_array"}}, | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 element of array without known bound is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 element of array without known bound is not allowed in a constant expression"},{ | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 element of array without known bound is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 element of array without known bound is not allowed in a constant expression"},{D,E,"%select{read of|assignment to|increment of|decrement of}0 pointer to element of array without known bound is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,nc,Db}," element of array without known bound is not allowed in a constant expression"}},{r,r,{{C,I,J,K,db,cb,eb}," element of array without known bound is not allowed in a constant expression"}},{D,E,{{C,I,J,K}," pointer to element of array without known bound is not allowed in a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) element of array without known bound is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]={{nil,E,u}}, | ||
[ | [h]={"2cd56048239f",1503971533,"Improve constant expression evaluation of arrays of unknown bound.","Improve constant expression evaluation of arrays of unknown bound.\n\nThe standard is not clear on how these are supposed to be handled, so we\nconservatively treat as non-constant any cases whose value is unknown or whose\nevaluation might result in undefined behavior.\n\nllvm-svn: 311970"}, | ||
[ | [d]={{s,3660,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n if (Sub.isOnePastTheEnd() || Sub.isMostDerivedAnUnsizedArray()) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, Sub.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << handler.AccessKind;"},{s,5662,"/// Check that we can access the notional vptr of an object / determine its\n/// dynamic type.\nstatic bool checkDynamicType(EvalInfo &Info, const Expr *E, const LValue &This, AccessKinds AK, bool Polymorphic) {\n // ...\n if (!Obj.Value) {\n // The object is not usable in constant expressions, so we can\'t inspect\n // its value to see if it\'s in-lifetime or what the active union members\n // are. We can still check for a one-past-the-end lvalue.\n if (This.Designator.isOnePastTheEnd() || This.Designator.isMostDerivedAnUnsizedArray()) {\n Info.FFDiag(E, This.Designator.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << AK;"}} | ||
}, | }, | ||
["note_constexpr_access_volatile_obj"]={ | ["note_constexpr_access_volatile_obj"]={ | ||
[ | [i]="note_constexpr_access_volatile_obj", | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 volatile %select{temporary|object %2|member %2}1 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>}0 volatile %select{temporary|object %2|member %2}1 is not allowed in a constant expression"},{ | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 volatile %select{temporary|object %2|member %2}1 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>}0 volatile %select{temporary|object %2|member %2}1 is not allowed in a constant expression"},{D,nil,"%select{read of|assignment to|increment of|decrement of}0 volatile %select{temporary|object %2|member %2}1 is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K}," volatile ",{Rc,"object C","member C"},rb}},{r,nil,{{C,I,J,K}," volatile ",{Rc,"object C","member C"},rb}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of) volatile (?:temporary|object (.*?)|member (.*?)) is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={sc,1366986990,uc,vc}, | ||
[ | [d]={{s,3719,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n // If this is our last pass, check that the final object type is OK.\n if (I == N || (I == N - 1 && ObjType->isAnyComplexType())) {\n // Accesses to volatile objects are prohibited.\n if (ObjType.isVolatileQualified() && isFormalAccess(handler.AccessKind)) {\n if (Info.getLangOpts().CPlusPlus) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_volatile_obj, 1) << handler.AccessKind << DiagKind << Decl;"}}, | ||
[j]={ | [j]={ | ||
[ | [Bc]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:328:17: note: read of volatile object \'vi\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:350:17: note: read of volatile object \'vi\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:352:17: note: read of volatile object \'vs\' is not allowed in a constant expression"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_access_volatile_type"]={ | ["note_constexpr_access_volatile_type"]={ | ||
[ | [i]="note_constexpr_access_volatile_type", | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 volatile-qualified type %1 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>}0 volatile-qualified type %1 is not allowed in a constant expression"},{ | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 volatile-qualified type %1 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>}0 volatile-qualified type %1 is not allowed in a constant expression"},{D,nil,"%select{read of|assignment to|increment of|decrement of}0 volatile-qualified type %1 is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K}," volatile-qualified type B is not allowed in a constant expression"}},{r,nil,{{C,I,J,K}," volatile-qualified type B is not allowed in a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of) volatile\\-qualified type (.*?) is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={sc,1366986990,uc,vc}, | ||
[ | [d]={{s,4034,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n // C++11 DR1311: An lvalue-to-rvalue conversion on a volatile-qualified type\n // is not a constant expression (even if the object is non-volatile). We also\n // apply this rule to C++98, in order to conform to the expected \'volatile\'\n // semantics.\n if (isFormalAccess(AK) && LValType.isVolatileQualified()) {\n if (Info.getLangOpts().CPlusPlus)\n Info.FFDiag(E, diag::note_constexpr_access_volatile_type) << AK << LValType;"}}, | ||
[j]={ | [j]={ | ||
[ | [Bc]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:327:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:329:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:349:17: note: read of volatile-qualified type \'volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:351:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:353:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:359:17: note: read of volatile-qualified type \'volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:360:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_alignment_adjust"]={ | ["note_constexpr_alignment_adjust"]={ | ||
[ | [i]={{nil,p,"note_constexpr_alignment_adjust"}}, | ||
[b]={{nil,p,"cannot constant evaluate the result of adjusting alignment to %0"}}, | [b]={{nil,p,"cannot constant evaluate the result of adjusting alignment to %0"}}, | ||
[ | [g]={{nil,p,"cannot constant evaluate the result of adjusting alignment to A"}}, | ||
[ | [f]=q, | ||
[ | [e]="cannot constant evaluate the result of adjusting alignment to (.*?)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | ||
[ | [d]={{s,9287,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_align_up:\n case Builtin::BI__builtin_align_down: {\n // ...\n Info.FFDiag(E->getArg(0), diag::note_constexpr_alignment_adjust) << Alignment;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:176:54: note: cannot constant evaluate the result of adjusting alignment to 64","clang/test/SemaCXX/builtin-align-cxx.cpp:178:34: note: cannot constant evaluate the result of adjusting alignment to 64","clang/test/SemaCXX/builtin-align-cxx.cpp:207:36: note: cannot constant evaluate the result of adjusting alignment to 64","clang/test/SemaCXX/builtin-align-cxx.cpp:228:55: note: cannot constant evaluate the result of adjusting alignment to 64"} | ["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:176:54: note: cannot constant evaluate the result of adjusting alignment to 64","clang/test/SemaCXX/builtin-align-cxx.cpp:178:34: note: cannot constant evaluate the result of adjusting alignment to 64","clang/test/SemaCXX/builtin-align-cxx.cpp:207:36: note: cannot constant evaluate the result of adjusting alignment to 64","clang/test/SemaCXX/builtin-align-cxx.cpp:228:55: note: cannot constant evaluate the result of adjusting alignment to 64"} | ||
| Line 5,196: | Line 5,197: | ||
}, | }, | ||
["note_constexpr_alignment_compute"]={ | ["note_constexpr_alignment_compute"]={ | ||
[ | [i]={{nil,p,"note_constexpr_alignment_compute"}}, | ||
[b]={{nil,p,"cannot constant evaluate whether run-time alignment is at least %0"}}, | [b]={{nil,p,"cannot constant evaluate whether run-time alignment is at least %0"}}, | ||
[ | [g]={{nil,p,"cannot constant evaluate whether run-time alignment is at least A"}}, | ||
[ | [f]=q, | ||
[ | [e]="cannot constant evaluate whether run\\-time alignment is at least (.*?)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | ||
[ | [d]={{s,12026,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_is_aligned: {\n // ...\n if (Src.isLValue()) {\n // ...\n Info.FFDiag(E->getArg(0), diag::note_constexpr_alignment_compute) << Alignment;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:215:37: note: cannot constant evaluate whether run-time alignment is at least 64"} | ["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:215:37: note: cannot constant evaluate whether run-time alignment is at least 64"} | ||
| Line 5,210: | Line 5,211: | ||
}, | }, | ||
["note_constexpr_alignment_too_big"]={ | ["note_constexpr_alignment_too_big"]={ | ||
[ | [i]={{nil,p,"note_constexpr_alignment_too_big"}}, | ||
[b]={{nil,p,"requested alignment must be %0 or less for type %1; %2 is invalid"}}, | [b]={{nil,p,"requested alignment must be %0 or less for type %1; %2 is invalid"}}, | ||
[ | [g]={{nil,p,"requested alignment must be A or less for type B; C is invalid"}}, | ||
[ | [f]=q, | ||
[ | [e]="requested alignment must be (.*?) or less for type (.*?); (.*?) is invalid", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | ||
[ | [d]={{s,9149,"/// Evaluate the value of the alignment argument to __builtin_align_{up,down},\n/// __builtin_is_aligned and __builtin_assume_aligned.\nstatic bool getAlignmentArgument(const Expr *E, QualType ForType, EvalInfo &Info, APSInt &Alignment) {\n // ...\n if (APSInt::compareValues(Alignment, MaxValue) > 0) {\n Info.FFDiag(E, diag::note_constexpr_alignment_too_big) << MaxValue << ForType << Alignment;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:121:36: note: requested alignment must be 32768 or less for type \'short\'; 1048576 is invalid","clang/test/SemaCXX/builtin-align-cxx.cpp:112:34: note: requested alignment must be 2147483648 or less for type \'int\'; 8589934592 is invalid","clang/test/SemaCXX/builtin-align-cxx.cpp:105:36: note: requested alignment must be 128 or less for type \'char\'; 4194304 is invalid"} | ["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:121:36: note: requested alignment must be 32768 or less for type \'short\'; 1048576 is invalid","clang/test/SemaCXX/builtin-align-cxx.cpp:112:34: note: requested alignment must be 2147483648 or less for type \'int\'; 8589934592 is invalid","clang/test/SemaCXX/builtin-align-cxx.cpp:105:36: note: requested alignment must be 128 or less for type \'char\'; 4194304 is invalid"} | ||
| Line 5,224: | Line 5,225: | ||
}, | }, | ||
["note_constexpr_array_index"]={ | ["note_constexpr_array_index"]={ | ||
[ | [i]="note_constexpr_array_index", | ||
[b]="cannot refer to element %0 of %select{array of %2 elements|non-array object}1 in a constant expression", | [b]="cannot refer to element %0 of %select{array of %2 elements|non-array object}1 in a constant expression", | ||
[ | [g]={{nil,ab,{"cannot refer to element A of ",{{"array of C element",{o,"s"}},"non-array object"}," in a constant expression"}},{nil,nil,{"cannot refer to element A of ",{"array of C elements","non-array object"}," in a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="cannot refer to element (.*?) of (?:array of (.*?) element(?:|s)|non\\-array object) in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | ||
[ | [d]={{s,1435,"void SubobjectDesignator::diagnosePointerArithmetic(EvalInfo &Info, const Expr *E, const APSInt &N) {\n // If we\'re complaining, we must be able to statically determine the size of\n // the most derived array.\n if (MostDerivedPathLength == Entries.size() && MostDerivedIsArrayElement)\n Info.CCEDiag(E, diag::note_constexpr_array_index) << N << /*array*/ 0 << static_cast<unsigned>(getMostDerivedArraySize());"},{s,1439,"void SubobjectDesignator::diagnosePointerArithmetic(EvalInfo &Info, const Expr *E, const APSInt &N) {\n // If we\'re complaining, we must be able to statically determine the size of\n // the most derived array.\n if (MostDerivedPathLength == Entries.size() && MostDerivedIsArrayElement)\n // ...\n else\n Info.CCEDiag(E, diag::note_constexpr_array_index) << N << /*non-array*/ 1;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-printing.cpp"]={"clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 12 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 12 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 13 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 14 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 14 elements in a constant expression"} | ["clang/test/SemaCXX/constexpr-printing.cpp"]={"clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 12 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 12 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 13 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 14 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 14 elements in a constant expression"} | ||
| Line 5,238: | Line 5,239: | ||
}, | }, | ||
["note_constexpr_baa_insufficient_alignment"]={ | ["note_constexpr_baa_insufficient_alignment"]={ | ||
[ | [i]="note_constexpr_baa_insufficient_alignment", | ||
[b]="%select{alignment of|offset of the aligned pointer from}0 the base pointee object (%1 %plural{1:byte|:bytes}1) is %select{less than|not a multiple of}0 the asserted %2 %plural{1:byte|:bytes}2", | [b]="%select{alignment of|offset of the aligned pointer from}0 the base pointee object (%1 %plural{1:byte|:bytes}1) is %select{less than|not a multiple of}0 the asserted %2 %plural{1:byte|:bytes}2", | ||
[ | [g]={{nil,nil,{{"alignment of","offset of the aligned pointer from"}," the base pointee object (B ",{"byte","bytes"},") is ",{"less than","not a multiple of"}," the asserted C ",{"byte","bytes"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:alignment of|offset of the aligned pointer from) the base pointee object \\((.*?) (?:byte|bytes)\\) is (?:less than|not a multiple of) the asserted (.*?) (?:byte|bytes)", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"0dd05d4b5936",1412356717,"constexpr evaluation for __builtin_assume_aligned","constexpr evaluation for __builtin_assume_aligned\n\nRichard noted in the review of r217349 that extra handling of\n__builtin_assume_aligned inside of the expression evaluator was needed. He was\nright, and this should address the concerns raised, namely:\n\n 1. The offset argument to __builtin_assume_aligned can have side effects, and\n we need to make sure that all arguments are properly evaluated.\n\n 2. If the alignment assumption does not hold, that introduces undefined\n behavior, and undefined behavior cannot appear inside a constexpr.\n\nand hopefully the diagnostics produced are detailed enough to explain what is\ngoing on.\n\nllvm-svn: 218992"}, | ||
[ | [d]={{s,9231,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_assume_aligned: {\n // ...\n // If there is a base object, then it must have the correct alignment.\n if (OffsetResult.Base) {\n // ...\n if (BaseAlignment < Align) {\n // ...\n CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment) << 0 << (unsigned)BaseAlignment.getQuantity() << (unsigned)Align.getQuantity();"},{s,9244,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_assume_aligned: {\n // ...\n // The offset must also have the correct alignment.\n if (OffsetResult.Offset.alignTo(Align) != OffsetResult.Offset) {\n // ...\n (OffsetResult.Base ? CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment) << 1 : CCEDiag(E->getArg(0), diag::note_constexpr_baa_value_insufficient_alignment)) << (int)OffsetResult.Offset.getQuantity() << (unsigned)Align.getQuantity();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtin-assume-aligned.cpp"]={"clang/test/SemaCXX/builtin-assume-aligned.cpp:16:46: note: alignment of the base pointee object (4 bytes) is less than the asserted 16 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:20:47: note: offset of the aligned pointer from the base pointee object (-2 bytes) is not a multiple of the asserted 4 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:23:47: note: offset of the aligned pointer from the base pointee object (2 bytes) is not a multiple of the asserted 4 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:30:47: note: alignment of the base pointee object (1 byte) is less than the asserted 16 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:35:47: note: offset of the aligned pointer from the base pointee object (2 bytes) is not a multiple of the asserted 16 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:39:47: note: offset of the aligned pointer from the base pointee object (1 byte) is not a multiple of the asserted 16 bytes"} | ["clang/test/SemaCXX/builtin-assume-aligned.cpp"]={"clang/test/SemaCXX/builtin-assume-aligned.cpp:16:46: note: alignment of the base pointee object (4 bytes) is less than the asserted 16 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:20:47: note: offset of the aligned pointer from the base pointee object (-2 bytes) is not a multiple of the asserted 4 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:23:47: note: offset of the aligned pointer from the base pointee object (2 bytes) is not a multiple of the asserted 4 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:30:47: note: alignment of the base pointee object (1 byte) is less than the asserted 16 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:35:47: note: offset of the aligned pointer from the base pointee object (2 bytes) is not a multiple of the asserted 16 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:39:47: note: offset of the aligned pointer from the base pointee object (1 byte) is not a multiple of the asserted 16 bytes"} | ||
| Line 5,252: | Line 5,253: | ||
}, | }, | ||
["note_constexpr_baa_value_insufficient_alignment"]={ | ["note_constexpr_baa_value_insufficient_alignment"]={ | ||
[ | [i]="note_constexpr_baa_value_insufficient_alignment", | ||
[b]="value of the aligned pointer (%0) is not a multiple of the asserted %1 %plural{1:byte|:bytes}1", | [b]="value of the aligned pointer (%0) is not a multiple of the asserted %1 %plural{1:byte|:bytes}1", | ||
[ | [g]={{nil,nil,{"value of the aligned pointer (A) is not a multiple of the asserted B ",{"byte","bytes"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="value of the aligned pointer \\((.*?)\\) is not a multiple of the asserted (.*?) (?:byte|bytes)", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"0dd05d4b5936",1412356717,"constexpr evaluation for __builtin_assume_aligned","constexpr evaluation for __builtin_assume_aligned\n\nRichard noted in the review of r217349 that extra handling of\n__builtin_assume_aligned inside of the expression evaluator was needed. He was\nright, and this should address the concerns raised, namely:\n\n 1. The offset argument to __builtin_assume_aligned can have side effects, and\n we need to make sure that all arguments are properly evaluated.\n\n 2. If the alignment assumption does not hold, that introduces undefined\n behavior, and undefined behavior cannot appear inside a constexpr.\n\nand hopefully the diagnostics produced are detailed enough to explain what is\ngoing on.\n\nllvm-svn: 218992"}, | ||
[ | [d]={{s,9246,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_assume_aligned: {\n // ...\n // The offset must also have the correct alignment.\n if (OffsetResult.Offset.alignTo(Align) != OffsetResult.Offset) {\n // ...\n (OffsetResult.Base ? CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment) << 1 : CCEDiag(E->getArg(0), diag::note_constexpr_baa_value_insufficient_alignment)) << (int)OffsetResult.Offset.getQuantity() << (unsigned)Align.getQuantity();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtin-assume-aligned.cpp"]={"clang/test/SemaCXX/builtin-assume-aligned.cpp:44:47: note: value of the aligned pointer (255) is not a multiple of the asserted 32 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:47:47: note: value of the aligned pointer (250) is not a multiple of the asserted 32 bytes"} | ["clang/test/SemaCXX/builtin-assume-aligned.cpp"]={"clang/test/SemaCXX/builtin-assume-aligned.cpp:44:47: note: value of the aligned pointer (255) is not a multiple of the asserted 32 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:47:47: note: value of the aligned pointer (250) is not a multiple of the asserted 32 bytes"} | ||
| Line 5,266: | Line 5,267: | ||
}, | }, | ||
["note_constexpr_bit_cast_indet_dest"]={ | ["note_constexpr_bit_cast_indet_dest"]={ | ||
[ | [i]={{nil,r,"note_constexpr_bit_cast_indet_dest"}}, | ||
[b]={{nil,r,"indeterminate value can only initialize an object of type \'unsigned char\'%select{, \'char\',|}1 or \'std::byte\'; %0 is invalid"}}, | [b]={{nil,r,"indeterminate value can only initialize an object of type \'unsigned char\'%select{, \'char\',|}1 or \'std::byte\'; %0 is invalid"}}, | ||
[ | [g]={{nil,r,{"indeterminate value can only initialize an object of type \'unsigned char\'",{", \'char\',",o}," or \'std::byte\'; A is invalid"}}}, | ||
[ | [f]=q, | ||
[ | [e]="indeterminate value can only initialize an object of type \'unsigned char\'(?:, \'char\',|) or \'std\\:\\:byte\'; (.*?) is invalid", | ||
[ | [c]=o, | ||
[ | [a]={{nil,r,u}}, | ||
[ | [h]={ld,1562092093,hd,Tc}, | ||
[ | [d]={{s,7142,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n std::optional<APValue> visit(const BuiltinType *T, CharUnits Offset, const EnumType *EnumSugar = nullptr) {\n // ...\n if (!Buffer.readObject(Offset, SizeOf, Bytes)) {\n // ...\n if (!IsStdByte && !IsUChar) {\n // ...\n Info.FFDiag(BCE->getExprLoc(), diag::note_constexpr_bit_cast_indet_dest) << DisplayType << Info.Ctx.getLangOpts().CharIsSigned;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:35:10: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'signed char\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:35:10: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'signed char\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:238:45: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'unsigned long\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:373:30: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'my_byte\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:378:28: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'char\' is invalid"} | ["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:35:10: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'signed char\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:35:10: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'signed char\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:238:45: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'unsigned long\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:373:30: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'my_byte\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:378:28: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'char\' is invalid"} | ||
| Line 5,280: | Line 5,281: | ||
}, | }, | ||
["note_constexpr_bit_cast_invalid_subtype"]={ | ["note_constexpr_bit_cast_invalid_subtype"]={ | ||
[ | [i]={{nil,r,"note_constexpr_bit_cast_invalid_subtype"}}, | ||
[b]={{nil,r,"invalid type %0 is a %select{member|base}1 of %2"}}, | [b]={{nil,r,"invalid type %0 is a %select{member|base}1 of %2"}}, | ||
[ | [g]={{nil,r,{"invalid type A is a ",{"member","base"}," of C"}}}, | ||
[ | [f]=q, | ||
[ | [e]="invalid type (.*?) is a (?:member|base) of (.*?)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,r,u}}, | ||
[ | [h]={ld,1562092093,hd,Tc}, | ||
[ | [d]={{s,7309,"static bool checkBitCastConstexprEligibilityType(SourceLocation Loc, QualType Ty, EvalInfo *Info, const ASTContext &Ctx, bool CheckingDest) {\n // ...\n auto note = [&](int Construct, QualType NoteTy, SourceLocation NoteLoc) {\n if (Info)\n Info->Note(NoteLoc, diag::note_constexpr_bit_cast_invalid_subtype) << NoteTy << Construct << Ty;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:189:5: note: invalid type \'int *\' is a member of \'has_pointer\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:189:5: note: invalid type \'int *\' is a member of \'has_pointer\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:203:5: note: invalid type \'int *\' is a member of \'A\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:208:5: note: invalid type \'A[10]\' is a member of \'B\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:212:14: note: invalid type \'B\' is a base of \'C\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:326:3: note: invalid type \'int vol_mem::*\' is a member of \'mem_ptr\'"} | ["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:189:5: note: invalid type \'int *\' is a member of \'has_pointer\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:189:5: note: invalid type \'int *\' is a member of \'has_pointer\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:203:5: note: invalid type \'int *\' is a member of \'A\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:208:5: note: invalid type \'A[10]\' is a member of \'B\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:212:14: note: invalid type \'B\' is a base of \'C\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:326:3: note: invalid type \'int vol_mem::*\' is a member of \'mem_ptr\'"} | ||
| Line 5,294: | Line 5,295: | ||
}, | }, | ||
["note_constexpr_bit_cast_invalid_type"]={ | ["note_constexpr_bit_cast_invalid_type"]={ | ||
[ | [i]={{nil,r,"note_constexpr_bit_cast_invalid_type"}}, | ||
[b]={{nil,r,"bit_cast %select{from|to}0 a %select{|type with a }1%select{union|pointer|member pointer|volatile|reference}2 %select{type|member}1 is not allowed in a constant expression"}}, | [b]={{nil,r,"bit_cast %select{from|to}0 a %select{|type with a }1%select{union|pointer|member pointer|volatile|reference}2 %select{type|member}1 is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,r,{"bit_cast ",{"from","to"}," a ",{o,"type with a "},{"union","pointer","member pointer","volatile","reference"},gc,{"type","member"},rb}}}, | ||
[ | [f]=q, | ||
[ | [e]="bit_cast (?:from|to) a (?:|type with a )(?:union|pointer|member pointer|volatile|reference) (?:type|member) is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]={{nil,r,u}}, | ||
[ | [h]={ld,1562092093,hd,Tc}, | ||
[ | [d]={{s,7303,"static bool checkBitCastConstexprEligibilityType(SourceLocation Loc, QualType Ty, EvalInfo *Info, const ASTContext &Ctx, bool CheckingDest) {\n // ...\n auto diag = [&](int Reason) {\n if (Info)\n Info->FFDiag(Loc, diag::note_constexpr_bit_cast_invalid_type) << CheckingDest << (Reason == 4) << Reason;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:182:19: note: bit_cast from a union type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:185:19: note: bit_cast to a union type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:194:33: note: bit_cast from a pointer type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:197:33: note: bit_cast to a pointer type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:221:19: note: bit_cast from a pointer type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:306:39: note: bit_cast from a type with a reference member is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:315:23: note: bit_cast from a union type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:330:29: note: bit_cast from a member pointer type is not allowed in a constant expression"} | ["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:182:19: note: bit_cast from a union type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:185:19: note: bit_cast to a union type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:194:33: note: bit_cast from a pointer type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:197:33: note: bit_cast to a pointer type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:221:19: note: bit_cast from a pointer type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:306:39: note: bit_cast from a type with a reference member is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:315:23: note: bit_cast from a union type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:330:29: note: bit_cast from a member pointer type is not allowed in a constant expression"} | ||
| Line 5,308: | Line 5,309: | ||
}, | }, | ||
["note_constexpr_bit_cast_unrepresentable_value"]={ | ["note_constexpr_bit_cast_unrepresentable_value"]={ | ||
[ | [i]={{nil,z,"note_constexpr_bit_cast_unrepresentable_value"}}, | ||
[b]={{nil, | [b]={{nil,z,"value %1 cannot be represented in type %0"}}, | ||
[ | [g]={{nil,z,"value B cannot be represented in type A"}}, | ||
[ | [f]=q, | ||
[ | [e]="value (.*?) cannot be represented in type (.*?)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,z,u}}, | ||
[ | [h]={"9523cf02c22a",1599063797,"[AST] Fix handling of long double and bool in __builtin_bit_cast","[AST] Fix handling of long double and bool in __builtin_bit_cast\n\nOn x86, long double has 6 unused trailing bytes. This patch changes the\nconstant evaluator to treat them as though they were padding bytes, so reading\nfrom them results in an indeterminate value, and nothing is written for them.\nAlso, fix a similar bug with bool, but instead of treating the unused bits as\npadding, enforce that they\'re zero.\n\nDifferential revision: https://reviews.llvm.org/D76323"}, | ||
[ | [d]={{s,7102,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n std::nullopt_t unrepresentableValue(QualType Ty, const APSInt &Val) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unrepresentable_value) << Ty << toString(Val, /*Radix=*/10);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:35:10: note: value 65 cannot be represented in type \'bool\'"} | ["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:35:10: note: value 65 cannot be represented in type \'bool\'"} | ||
| Line 5,322: | Line 5,323: | ||
}, | }, | ||
["note_constexpr_bit_cast_unsupported_bitfield"]={ | ["note_constexpr_bit_cast_unsupported_bitfield"]={ | ||
[ | [i]={{nil,r,"note_constexpr_bit_cast_unsupported_bitfield"}}, | ||
[b]={{nil,r,"constexpr bit_cast involving bit-field is not yet supported"}}, | [b]={{nil,r,"constexpr bit_cast involving bit-field is not yet supported"}}, | ||
[ | [g]={{nil,r,"constexpr bit_cast involving bit-field is not yet supported"}}, | ||
[ | [f]=q, | ||
[ | [e]="constexpr bit_cast involving bit\\-field is not yet supported", | ||
[ | [c]=o, | ||
[ | [a]={{nil,r,u}}, | ||
[ | [h]={ld,1562092093,hd,Tc}, | ||
[ | [d]={{s,7003,"/// Traverse an APValue to produce an BitCastBuffer, emulating how the current\n/// target would represent the value at runtime.\nclass APValueToBufferConverter {\n // ...\n bool visitRecord(const APValue &Val, QualType Ty, CharUnits Offset) {\n // ...\n for (FieldDecl *FD : RD->fields()) {\n if (FD->isBitField()) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_bitfield);"},{s,7211,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n std::optional<APValue> visit(const RecordType *RTy, CharUnits Offset) {\n // ...\n for (FieldDecl *FD : RD->fields()) {\n // FIXME: We don\'t currently support bit-fields. A lot of the logic for\n // this is in CodeGen, so we need to factor it around.\n if (FD->isBitField()) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_bitfield);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:226:15: note: constexpr bit_cast involving bit-field is not yet supported"} | ["clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:226:15: note: constexpr bit_cast involving bit-field is not yet supported"} | ||
| Line 5,336: | Line 5,337: | ||
}, | }, | ||
["note_constexpr_bit_cast_unsupported_type"]={ | ["note_constexpr_bit_cast_unsupported_type"]={ | ||
[ | [i]={{nil,r,"note_constexpr_bit_cast_unsupported_type"}}, | ||
[b]={{nil,r,"constexpr bit_cast involving type %0 is not yet supported"}}, | [b]={{nil,r,"constexpr bit_cast involving type %0 is not yet supported"}}, | ||
[ | [g]={{nil,r,"constexpr bit_cast involving type A is not yet supported"}}, | ||
[ | [f]=q, | ||
[ | [e]="constexpr bit_cast involving type (.*?) is not yet supported", | ||
[ | [c]=o, | ||
[ | [a]={{nil,r,u}}, | ||
[ | [h]={ld,1562092093,hd,Tc}, | ||
[ | [d]={{s,6971,"/// Traverse an APValue to produce an BitCastBuffer, emulating how the current\n/// target would represent the value at runtime.\nclass APValueToBufferConverter {\n // ...\n // Write out Val with type Ty into Buffer starting at Offset.\n bool visit(const APValue &Val, QualType Ty, CharUnits Offset) {\n // ...\n case APValue::Union:\n case APValue::MemberPointer:\n case APValue::AddrLabelDiff: {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_type) << Ty;"},{s,7095,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n // Emit an unsupported bit_cast type error. Sema refuses to build a bit_cast\n // with an invalid type, so anything left is a deficiency on our part (FIXME).\n // Ideally this will be unreachable.\n std::nullopt_t unsupportedType(QualType Ty) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_type) << Ty;"}} | ||
}, | }, | ||
["note_constexpr_body_previous_return"]={ | ["note_constexpr_body_previous_return"]={ | ||
[ | [i]="note_constexpr_body_previous_return", | ||
[b]="previous return statement is here", | [b]="previous return statement is here", | ||
[g]="previous return statement is here", | [g]="previous return statement is here", | ||
[f]= | [f]=q, | ||
[e]= | [e]="previous return statement is here", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"eb3c10c248ac",1317436288,"constexpr: semantic checking for constexpr functions and constructors. Based in","constexpr: semantic checking for constexpr functions and constructors. Based in\npart on patches by Peter Collingbourne.\n\nWe diverge from the C++11 standard in a few areas, mostly related to checking\nconstexpr function declarations, and not just definitions. See WG21 paper\nN3308=11-0078 for details.\n\nFunction invocation substitution is not available in this patch; constexpr\nfunctions cannot yet be used from within constant expressions.\n\nllvm-svn: 140926"}, | |||
[d]={{Z,2403,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (const CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Dcl)) {\n // ...\n } else {\n if (ReturnStmts.empty()) {\n // ...\n } else if (ReturnStmts.size() > 1) {\n // ...\n case Sema::CheckConstexprKind::Diagnose:\n // ...\n for (unsigned I = 0; I < ReturnStmts.size() - 1; ++I)\n SemaRef.Diag(ReturnStmts[I], diag::note_constexpr_body_previous_return);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:128:3: note: previous return statement is here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:217:3: note: previous return statement is here"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:128:3: note: previous return statement is here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:217:3: note: previous return statement is here"} | ||
| Line 5,361: | Line 5,362: | ||
}, | }, | ||
["note_constexpr_call_here"]={ | ["note_constexpr_call_here"]={ | ||
[ | [i]="note_constexpr_call_here", | ||
[b]="in call to \'%0\'", | [b]="in call to \'%0\'", | ||
[ | [g]="in call to \'A\'", | ||
[ | [f]=q, | ||
[ | [e]="in call to \'(.*?)\'", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"f6f003af6a91",1324062367,"C++11 constexpr: Add note stacks containing backtraces if constant evaluation","C++11 constexpr: Add note stacks containing backtraces if constant evaluation\nfails within a call to a constexpr function. Add -fconstexpr-backtrace-limit\nargument to driver and frontend, to control the maximum number of notes so\nproduced (default 10). Fix APValue printing to be able to pretty-print all\nAPValue types, and move the testing for this functionality from a unittest to\na -verify test now that it\'s visible in clang\'s output.\n\nllvm-svn: 146749"}, | ||
[ | [d]={{"clang/lib/AST/Interp/State.cpp",158,"void State::addCallStack(unsigned Limit) {\n // ...\n for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {\n // ...\n addDiag(CallLocation, diag::note_constexpr_call_here) << Out.str();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/crash-lambda-weak-attr.cpp"]={"clang/test/SemaCXX/crash-lambda-weak-attr.cpp:6:15: note: in call to \'[]() {"} | ["clang/test/SemaCXX/crash-lambda-weak-attr.cpp"]={"clang/test/SemaCXX/crash-lambda-weak-attr.cpp:6:15: note: in call to \'[]() {"} | ||
| Line 5,375: | Line 5,376: | ||
}, | }, | ||
["note_constexpr_call_limit_exceeded"]={ | ["note_constexpr_call_limit_exceeded"]={ | ||
[ | [i]="note_constexpr_call_limit_exceeded", | ||
[b]="constexpr evaluation hit maximum call limit", | [b]="constexpr evaluation hit maximum call limit", | ||
[g]="constexpr evaluation hit maximum call limit", | [g]="constexpr evaluation hit maximum call limit", | ||
[f]= | [f]=q, | ||
[e]= | [e]="constexpr evaluation hit maximum call limit", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[h]={"b228a86fcfd1",1329272293,"Implement DR1454. This allows all intermediate results in constant expressions","Implement DR1454. This allows all intermediate results in constant expressions\nto be core constant expressions (including pointers and references to\ntemporaries), and makes constexpr calculations Turing-complete. A Turing machine\nsimulator is included as a testcase.\n\nThis opens up the possibilty of removing CCValue entirely, and removing some\ncopies from the constant evaluator in the process, but that cleanup is not part\nof this change.\n\nllvm-svn: 150557"}, | |||
[d]={{s,1013,"/// EvalInfo - This is a private struct used by the evaluator to capture\n/// information about a subexpression as it is folded. It retains information\n/// about the AST context, but also maintains information about the folded\n/// expression.\n///\n/// If an expression could be evaluated, it is still possible it is not a C\n/// \"integer constant expression\" or constant expression. If not, this struct\n/// captures information about how and why not.\n///\n/// One bit of information passed *into* the request for constant folding\n/// indicates whether the subexpression is \"evaluated\" or not according to C\n/// rules. For example, the RHS of (0 && foo()) is not evaluated. We can\n/// evaluate the expression regardless of what the RHS is, but C only allows\n/// certain things in certain situations.\nclass EvalInfo : public interp::State {\n // ...\n bool CheckCallLimit(SourceLocation Loc) {\n // ...\n if (NextCallIndex == 0) {\n // ...\n FFDiag(Loc, diag::note_constexpr_call_limit_exceeded);"}} | |||
}, | }, | ||
["note_constexpr_calls_suppressed"]={ | ["note_constexpr_calls_suppressed"]={ | ||
[ | [i]="note_constexpr_calls_suppressed", | ||
[b]="(skipping %0 call%s0 in backtrace; use -fconstexpr-backtrace-limit=0 to see all)", | [b]="(skipping %0 call%s0 in backtrace; use -fconstexpr-backtrace-limit=0 to see all)", | ||
[ | [g]="(skipping A callA in backtrace; use -fconstexpr-backtrace-limit=0 to see all)", | ||
[ | [f]=q, | ||
[ | [e]="\\(skipping (.*?) call(.*?) in backtrace; use \\-fconstexpr\\-backtrace\\-limit\\=0 to see all\\)", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"f6f003af6a91",1324062367,"C++11 constexpr: Add note stacks containing backtraces if constant evaluation","C++11 constexpr: Add note stacks containing backtraces if constant evaluation\nfails within a call to a constexpr function. Add -fconstexpr-backtrace-limit\nargument to driver and frontend, to control the maximum number of notes so\nproduced (default 10). Fix APValue printing to be able to pretty-print all\nAPValue types, and move the testing for this functionality from a unittest to\na -verify test now that it\'s visible in clang\'s output.\n\nllvm-svn: 146749"}, | ||
[ | [d]={{"clang/lib/AST/Interp/State.cpp",139,"void State::addCallStack(unsigned Limit) {\n // ...\n for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {\n // ...\n // Skip this call?\n if (CallIdx >= SkipStart && CallIdx < SkipEnd) {\n if (CallIdx == SkipStart) {\n // ...\n addDiag(CallLocation, diag::note_constexpr_calls_suppressed) << unsigned(ActiveCalls - Limit);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/AST/Interp/depth-limit.cpp"]={"clang/test/AST/Interp/depth-limit.cpp:9:10: note: (skipping 90 calls in backtrace; use -fconstexpr-backtrace-limit=0 to see all)"} | ["clang/test/AST/Interp/depth-limit.cpp"]={"clang/test/AST/Interp/depth-limit.cpp:9:10: note: (skipping 90 calls in backtrace; use -fconstexpr-backtrace-limit=0 to see all)"} | ||
| Line 5,400: | Line 5,401: | ||
}, | }, | ||
["note_constexpr_compare_virtual_mem_ptr"]={ | ["note_constexpr_compare_virtual_mem_ptr"]={ | ||
[ | [i]="note_constexpr_compare_virtual_mem_ptr", | ||
[b]="comparison of pointer to virtual member function %0 has unspecified value", | [b]="comparison of pointer to virtual member function %0 has unspecified value", | ||
[ | [g]="comparison of pointer to virtual member function A has unspecified value", | ||
[ | [f]=q, | ||
[ | [e]="comparison of pointer to virtual member function (.*?) has unspecified value", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"7bb0067c06ef",1328060564,"constexpr: add support for comparisons of pointer-to-members.","constexpr: add support for comparisons of pointer-to-members.\n\nllvm-svn: 149463"}, | ||
[ | [d]={{s,13246,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n // Otherwise if either is a pointer to a virtual member function, the\n // result is unspecified.\n if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(LHSValue.getDecl()))\n if (MD->isVirtual())\n Info.CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;"},{s,13249,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(RHSValue.getDecl()))\n if (MD->isVirtual())\n Info.CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constant-expression-cxx11.cpp"]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:1113:20: note: comparison of pointer to virtual member function \'g\' has unspecified value","clang/test/SemaCXX/constant-expression-cxx11.cpp:1114:20: note: comparison of pointer to virtual member function \'g\' has unspecified value"} | ["clang/test/SemaCXX/constant-expression-cxx11.cpp"]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:1113:20: note: comparison of pointer to virtual member function \'g\' has unspecified value","clang/test/SemaCXX/constant-expression-cxx11.cpp:1114:20: note: comparison of pointer to virtual member function \'g\' has unspecified value"} | ||
| Line 5,414: | Line 5,415: | ||
}, | }, | ||
["note_constexpr_conditional_never_const"]={ | ["note_constexpr_conditional_never_const"]={ | ||
[ | [i]="note_constexpr_conditional_never_const", | ||
[b]="both arms of conditional operator are unable to produce a constant expression", | [b]="both arms of conditional operator are unable to produce a constant expression", | ||
[g]="both arms of conditional operator are unable to produce a constant expression", | [g]="both arms of conditional operator are unable to produce a constant expression", | ||
[f]= | [f]=q, | ||
[e]= | [e]="both arms of conditional operator are unable to produce a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[h]={"17100bad0ac1",1329360394,"constexpr tidyups:","constexpr tidyups:\n * Fix bug when determining whether && / || are potential constant expressions\n * Try harder when determining whether ?: is a potential constant expression\n * Produce a diagnostic on sizeof(VLA) to provide a better source location\n\nllvm-svn: 150657"}, | |||
[d]={{s,7429,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n // Check whether a conditional operator with a non-constant condition is a\n // potential constant expression. If neither arm is a potential constant\n // expression, then the conditional operator is not either.\n template <typename ConditionalOperator> void CheckPotentialConstantConditional(const ConditionalOperator *E) {\n // ...\n Error(E, diag::note_constexpr_conditional_never_const);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp:80:52: note: both arms of conditional operator are unable to produce a constant expression"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp:80:52: note: both arms of conditional operator are unable to produce a constant expression"} | ||
| Line 5,428: | Line 5,429: | ||
}, | }, | ||
["note_constexpr_construct_complex_elem"]={ | ["note_constexpr_construct_complex_elem"]={ | ||
[ | [i]={{nil,p,"note_constexpr_construct_complex_elem"}}, | ||
[b]={{nil,p,"construction of individual component of complex number is not yet supported in constant expressions"}}, | [b]={{nil,p,"construction of individual component of complex number is not yet supported in constant expressions"}}, | ||
[ | [g]={{nil,p,"construction of individual component of complex number is not yet supported in constant expressions"}}, | ||
[ | [f]=q, | ||
[ | [e]="construction of individual component of complex number is not yet supported in constant expressions", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={"b542602c5f35",1570063175,"For P0784R7: support placement new-expressions in constant evaluation.","For P0784R7: support placement new-expressions in constant evaluation.\n\nFor now, we restrict this support to use from within the standard\nlibrary implementation, since we\'re required to make parts of the\nstandard library that use placement new work, but not permitted to\nmake uses of placement new from user code work.\n\nllvm-svn: 373547"}, | ||
[ | [d]={{s,9717,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (IsPlacement) {\n // ...\n struct FindObjectHandler {\n // ...\n bool found(APSInt &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_construct_complex_elem);"},{s,9721,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (IsPlacement) {\n // ...\n struct FindObjectHandler {\n // ...\n bool found(APFloat &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_construct_complex_elem);"}} | ||
}, | }, | ||
["note_constexpr_ctor_missing_init"]={ | ["note_constexpr_ctor_missing_init"]={ | ||
[ | [i]="note_constexpr_ctor_missing_init", | ||
[b]="member not initialized by constructor", | [b]="member not initialized by constructor", | ||
[g]="member not initialized by constructor", | [g]="member not initialized by constructor", | ||
[f]= | [f]=q, | ||
[e]= | [e]="member not initialized by constructor", | ||
[ | [c]=o, | ||
[ | [a]=m, | ||
[h]={"eb3c10c248ac",1317436288,"constexpr: semantic checking for constexpr functions and constructors. Based in","constexpr: semantic checking for constexpr functions and constructors. Based in\npart on patches by Peter Collingbourne.\n\nWe diverge from the C++11 standard in a few areas, mostly related to checking\nconstexpr function declarations, and not just definitions. See WG21 paper\nN3308=11-0078 for details.\n\nFunction invocation substitution is not available in this patch; constexpr\nfunctions cannot yet be used from within constant expressions.\n\nllvm-svn: 140926"}, | |||
[d]={{Z,2049,"/// Check that the given field is initialized within a constexpr constructor.\n///\n/// \\param Dcl The constexpr constructor being checked.\n/// \\param Field The field being checked. This may be a member of an anonymous\n/// struct or union nested within the class being checked.\n/// \\param Inits All declarations, including anonymous struct/union members and\n/// indirect members, for which any initialization was provided.\n/// \\param Diagnosed Whether we\'ve emitted the error message yet. Used to attach\n/// multiple notes for different members to the same error.\n/// \\param Kind Whether we\'re diagnosing a constructor as written or determining\n/// whether the formal requirements are satisfied.\n/// \\return \\c false if we\'re checking for validity and the constructor does\n/// not satisfy the requirements on a constexpr constructor.\nstatic bool CheckConstexprCtorInitializer(Sema &SemaRef, const FunctionDecl *Dcl, FieldDecl *Field, llvm::SmallSet<Decl *, 16> &Inits, bool &Diagnosed, Sema::CheckConstexprKind Kind) {\n // ...\n if (!Inits.count(Field)) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n // ...\n SemaRef.Diag(Field->getLocation(), diag::note_constexpr_ctor_missing_init);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:139:7: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:152:12: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:163:14: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:165:5: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:162:11: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:165:5: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:148:3: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:147:7: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:148:3: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:159:3: note: member not initialized by constructor"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:139:7: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:152:12: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:163:14: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:165:5: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:162:11: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:165:5: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:148:3: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:147:7: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:148:3: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:159:3: note: member not initialized by constructor"} | ||
| Line 5,453: | Line 5,454: | ||
}, | }, | ||
["note_constexpr_deallocate_null"]={ | ["note_constexpr_deallocate_null"]={ | ||
[ | [i]={{nil,x,"note_constexpr_deallocate_null"}}, | ||
[b]={{nil, | [b]={{nil,x,"\'std::allocator<...>::deallocate\' used to delete a null pointer"}}, | ||
[ | [g]={{nil,x,"\'std::allocator<...>::deallocate\' used to delete a null pointer"}}, | ||
[ | [f]=q, | ||
[ | [e]="\'std\\:\\:allocator\\<\\.\\.\\.\\>\\:\\:deallocate\' used to delete a null pointer", | ||
[ | [c]=o, | ||
[ | [a]={{nil,x,u}}, | ||
[ | [h]={"a892b0015ed6",1615331091,"PR49465: Disallow constant evaluation of a call to operator delete(nullptr).","PR49465: Disallow constant evaluation of a call to operator delete(nullptr).\n\nThe only time we would consider allowing this is inside a call to\nstd::allocator<T>::deallocate, whose contract does not permit deletion\nof null pointers."}, | ||
[ | [d]={{s,6858,"// Perform a call to \'operator delete\' or \'__builtin_operator_delete\'.\nbool HandleOperatorDeleteCall(EvalInfo &Info, const CallExpr *E) {\n // ...\n // Deleting a null pointer would have no effect, but it\'s not permitted by\n // std::allocator<T>::deallocate\'s contract.\n if (Pointer.isNullPointer()) {\n Info.CCEDiag(E->getExprLoc(), diag::note_constexpr_deallocate_null);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp"]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: \'std::allocator<...>::deallocate\' used to delete a null pointer"} | ["clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp"]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: \'std::allocator<...>::deallocate\' used to delete a null pointer"} | ||
| Line 5,467: | Line 5,468: | ||
}, | }, | ||
["note_constexpr_delete_base_nonvirt_dtor"]={ | ["note_constexpr_delete_base_nonvirt_dtor"]={ | ||
[ | [i]={{nil,p,"note_constexpr_delete_base_nonvirt_dtor"}}, | ||
[b]={{nil,p,"delete of object with dynamic type %1 through pointer to base class type %0 with non-virtual destructor"}}, | [b]={{nil,p,"delete of object with dynamic type %1 through pointer to base class type %0 with non-virtual destructor"}}, | ||
[ | [g]={{nil,p,"delete of object with dynamic type B through pointer to base class type A with non-virtual destructor"}}, | ||
[ | [f]=q, | ||
[ | [e]="delete of object with dynamic type (.*?) through pointer to base class type (.*?) with non\\-virtual destructor", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,15029,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n // For the non-array case, the designator must be empty if the static type\n // does not have a virtual destructor.\n if (!E->isArrayForm() && Pointer.Designator.Entries.size() != 0 && !hasVirtualDestructor(Arg->getType()->getPointeeType())) {\n Info.FFDiag(E, diag::note_constexpr_delete_base_nonvirt_dtor) << Arg->getType()->getPointeeType() << AllocType;"}}, | ||
[j]={ | [j]={ | ||
[ | [zc]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:774:5: note: delete of object with dynamic type \'T\' through pointer to base class type \'S\' with non-virtual destructor"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_delete_not_heap_alloc"]={ | ["note_constexpr_delete_not_heap_alloc"]={ | ||
[ | [i]={{nil,p,"note_constexpr_delete_not_heap_alloc"}}, | ||
[b]={{nil,p,"delete of pointer \'%0\' that does not point to a heap-allocated object"}}, | [b]={{nil,p,"delete of pointer \'%0\' that does not point to a heap-allocated object"}}, | ||
[ | [g]={{nil,p,"delete of pointer \'A\' that does not point to a heap-allocated object"}}, | ||
[ | [f]=q, | ||
[ | [e]="delete of pointer \'(.*?)\' that does not point to a heap\\-allocated object", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,6796,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (!DA) {\n Info.FFDiag(E, diag::note_constexpr_delete_not_heap_alloc) << PointerAsString();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp"]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: delete of pointer \'&no_deallocate_nonalloc\' that does not point to a heap-allocated object"} | ["clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp"]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: delete of pointer \'&no_deallocate_nonalloc\' that does not point to a heap-allocated object"} | ||
| Line 5,495: | Line 5,496: | ||
}, | }, | ||
["note_constexpr_delete_subobject"]={ | ["note_constexpr_delete_subobject"]={ | ||
[ | [i]={{nil,p,"note_constexpr_delete_subobject"}}, | ||
[b]={{nil,p,"delete of pointer%select{ to subobject|}1 \'%0\' %select{|that does not point to complete object}1"}}, | [b]={{nil,p,"delete of pointer%select{ to subobject|}1 \'%0\' %select{|that does not point to complete object}1"}}, | ||
[ | [g]={{nil,p,{"delete of pointer",{" to subobject",o}," \'A\' ",{o,"that does not point to complete object"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="delete of pointer(?: to subobject|) \'(.*?)\' (?:|that does not point to complete object)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,6826,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (Subobject) {\n Info.FFDiag(E, diag::note_constexpr_delete_subobject) << PointerAsString() << Pointer.Designator.isOnePastTheEnd();"}}, | ||
[j]={ | [j]={ | ||
[ | [zc]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:824:7: note: delete of pointer to subobject \'&{*new T[3]#0}[0]\' ","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1034:18: note: delete of pointer to subobject \'&{*new A#0}.n\' ","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1035:18: note: delete of pointer \'&{*new int#0} + 1\' that does not point to complete object","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1036:18: note: delete of pointer to subobject \'&{*new int[3]#0}[1]\' "} | ||
} | } | ||
}, | }, | ||
["note_constexpr_depth_limit_exceeded"]={ | ["note_constexpr_depth_limit_exceeded"]={ | ||
[ | [i]="note_constexpr_depth_limit_exceeded", | ||
[b]="constexpr evaluation exceeded maximum depth of %0 calls", | [b]="constexpr evaluation exceeded maximum depth of %0 calls", | ||
[ | [g]="constexpr evaluation exceeded maximum depth of A calls", | ||
[ | [f]=q, | ||
[ | [e]="constexpr evaluation exceeded maximum depth of (.*?) calls", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"357362d00b04",1323758398,"Add checks and diagnostics for many of the cases which C++11 considers to not","Add checks and diagnostics for many of the cases which C++11 considers to not\nbe constant expressions.\n\nllvm-svn: 146479"}, | ||
[ | [d]={{s,1018,"/// EvalInfo - This is a private struct used by the evaluator to capture\n/// information about a subexpression as it is folded. It retains information\n/// about the AST context, but also maintains information about the folded\n/// expression.\n///\n/// If an expression could be evaluated, it is still possible it is not a C\n/// \"integer constant expression\" or constant expression. If not, this struct\n/// captures information about how and why not.\n///\n/// One bit of information passed *into* the request for constant folding\n/// indicates whether the subexpression is \"evaluated\" or not according to C\n/// rules. For example, the RHS of (0 && foo()) is not evaluated. We can\n/// evaluate the expression regardless of what the RHS is, but C only allows\n/// certain things in certain situations.\nclass EvalInfo : public interp::State {\n // ...\n bool CheckCallLimit(SourceLocation Loc) {\n // ...\n FFDiag(Loc, diag::note_constexpr_depth_limit_exceeded) << getLangOpts().ConstexprCallDepth;"},{mb,348,"bool CheckCallDepth(InterpState &S, CodePtr OpPC) {\n if ((S.Current->getDepth() + 1) > S.getLangOpts().ConstexprCallDepth) {\n S.FFDiag(S.Current->getSource(OpPC), diag::note_constexpr_depth_limit_exceeded) << S.getLangOpts().ConstexprCallDepth;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/AST/Interp/depth-limit.cpp"]={"clang/test/AST/Interp/depth-limit.cpp:9:10: note: constexpr evaluation exceeded maximum depth of 100 calls"} | ["clang/test/AST/Interp/depth-limit.cpp"]={"clang/test/AST/Interp/depth-limit.cpp:9:10: note: constexpr evaluation exceeded maximum depth of 100 calls"} | ||
| Line 5,523: | Line 5,524: | ||
}, | }, | ||
["note_constexpr_destroy_complex_elem"]={ | ["note_constexpr_destroy_complex_elem"]={ | ||
[ | [i]={{nil,p,"note_constexpr_destroy_complex_elem"}}, | ||
[b]={{nil,p,"destruction of individual component of complex number is not yet supported in constant expressions"}}, | [b]={{nil,p,"destruction of individual component of complex number is not yet supported in constant expressions"}}, | ||
[ | [g]={{nil,p,"destruction of individual component of complex number is not yet supported in constant expressions"}}, | ||
[ | [f]=q, | ||
[ | [e]="destruction of individual component of complex number is not yet supported in constant expressions", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={"61422f96653f",1569615876,"For P0784R7: add support for explicit destructor calls and","For P0784R7: add support for explicit destructor calls and\npseudo-destructor calls in constant evaluation.\n\nllvm-svn: 373122"}, | ||
[ | [d]={{s,6671,"struct DestroyObjectHandler {\n // ...\n bool found(APSInt &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_destroy_complex_elem);"},{s,6675,"struct DestroyObjectHandler {\n // ...\n bool found(APFloat &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_destroy_complex_elem);"}} | ||
}, | }, | ||
["note_constexpr_destroy_out_of_lifetime"]={ | ["note_constexpr_destroy_out_of_lifetime"]={ | ||
[ | [i]={{nil,p,"note_constexpr_destroy_out_of_lifetime"}}, | ||
[b]={{nil,p,"destroying object \'%0\' whose lifetime has already ended"}}, | [b]={{nil,p,"destroying object \'%0\' whose lifetime has already ended"}}, | ||
[ | [g]={{nil,p,"destroying object \'A\' whose lifetime has already ended"}}, | ||
[ | [f]=q, | ||
[ | [e]="destroying object \'(.*?)\' whose lifetime has already ended", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,6500,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // Objects can only be destroyed while they\'re within their lifetimes.\n // FIXME: We have no representation for whether an object of type nullptr_t\n // is in its lifetime; it usually doesn\'t matter. Perhaps we should model it\n // as indeterminate instead?\n if (Value.isAbsent() && !T->isNullPtrType()) {\n // ...\n Info.FFDiag(CallLoc, diag::note_constexpr_destroy_out_of_lifetime) << Printable.getAsString(Info.Ctx, Info.Ctx.getLValueReferenceType(T));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/AST/Interp/cxx20.cpp"]={"clang/test/AST/Interp/cxx20.cpp:442:11: note: destroying object \'I\' whose lifetime has already ended"} | ["clang/test/AST/Interp/cxx20.cpp"]={"clang/test/AST/Interp/cxx20.cpp:442:11: note: destroying object \'I\' whose lifetime has already ended"} | ||
| Line 5,548: | Line 5,549: | ||
}, | }, | ||
["note_constexpr_double_delete"]={ | ["note_constexpr_double_delete"]={ | ||
[ | [i]={{nil,p,"note_constexpr_double_delete"}}, | ||
[b]={{nil,p,"delete of pointer that has already been deleted"}}, | [b]={{nil,p,"delete of pointer that has already been deleted"}}, | ||
[ | [g]={{nil,p,"delete of pointer that has already been deleted"}}, | ||
[ | [f]=q, | ||
[ | [e]="delete of pointer that has already been deleted", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,6805,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (!Alloc) {\n Info.FFDiag(E, diag::note_constexpr_double_delete);"},{s,15055,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n if (!Info.HeapAllocs.erase(Pointer.Base.dyn_cast<DynamicAllocLValue>())) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_double_delete);"}}, | ||
[j]={ | [j]={ | ||
[ | [zc]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:917:5: note: delete of pointer that has already been deleted"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_double_destroy"]={ | ["note_constexpr_double_destroy"]={ | ||
[ | [i]={{nil,p,"note_constexpr_double_destroy"}}, | ||
[b]={{nil,p,"destruction of object that is already being destroyed"}}, | [b]={{nil,p,"destruction of object that is already being destroyed"}}, | ||
[ | [g]={{nil,p,"destruction of object that is already being destroyed"}}, | ||
[ | [f]=q, | ||
[ | [e]="destruction of object that is already being destroyed", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,6598,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // ...\n if (!EvalObj.DidInsert) {\n // ...\n Info.FFDiag(CallLoc, diag::note_constexpr_double_destroy);"}}, | ||
[j]={ | [j]={ | ||
[ | [zc]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:921:24: note: destruction of object that is already being destroyed"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_dtor_subobject"]={ | ["note_constexpr_dtor_subobject"]={ | ||
[ | [i]={{nil,p,"note_constexpr_dtor_subobject"}}, | ||
[b]={{nil,p,"%select{data member %1|base class %2}0 declared here"}}, | [b]={{nil,p,"%select{data member %1|base class %2}0 declared here"}}, | ||
[ | [g]={{nil,p,{{"data member B","base class C"}," declared here"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:data member (.*?)|base class (.*?)) declared here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,m}}, | ||
[ | [h]={Qc,1567434909,Pc,md}, | ||
[ | [d]={{Z,1700,"/// Determine whether a destructor cannot be constexpr due to\nstatic bool CheckConstexprDestructorSubobjects(Sema &SemaRef, const CXXDestructorDecl *DD, Sema::CheckConstexprKind Kind) {\n auto Check = [&](SourceLocation Loc, QualType T, const FieldDecl *FD) {\n // ...\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n // ...\n SemaRef.Diag(Loc, diag::note_constexpr_dtor_subobject) << !FD << (FD ? FD->getDeclName() : DeclarationName()) << T;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:61:14: note: base class \'A\' declared here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:65:7: note: data member \'a\' declared here"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:61:14: note: base class \'A\' declared here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:65:7: note: data member \'a\' declared here"} | ||
| Line 5,590: | Line 5,591: | ||
}, | }, | ||
["note_constexpr_dynamic_alloc"]={ | ["note_constexpr_dynamic_alloc"]={ | ||
[ | [i]={{nil,p,"note_constexpr_dynamic_alloc"}}, | ||
[b]={{nil,p,"%select{pointer|reference}0 to %select{|subobject of }1heap-allocated object is not a constant expression"}}, | [b]={{nil,p,"%select{pointer|reference}0 to %select{|subobject of }1heap-allocated object is not a constant expression"}}, | ||
[ | [g]={{nil,p,{{"pointer","reference"}," to ",{o,"subobject of "},"heap-allocated object is not a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:pointer|reference) to (?:|subobject of )heap\\-allocated object is not a constant expression", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,2234,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n if (Base.is<DynamicAllocLValue>()) {\n Info.FFDiag(Loc, diag::note_constexpr_dynamic_alloc) << IsReferenceType << !Designator.Entries.empty();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp"]={"clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp:59:17: note: pointer to heap-allocated object is not a constant expression"} | ["clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp"]={"clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp:59:17: note: pointer to heap-allocated object is not a constant expression"} | ||
| Line 5,604: | Line 5,605: | ||
}, | }, | ||
["note_constexpr_dynamic_alloc_here"]={ | ["note_constexpr_dynamic_alloc_here"]={ | ||
[ | [i]={{nil,p,"note_constexpr_dynamic_alloc_here"}}, | ||
[b]={{nil,p,"heap allocation performed here"}}, | [b]={{nil,p,"heap allocation performed here"}}, | ||
[ | [g]={{nil,p,"heap allocation performed here"}}, | ||
[ | [f]=q, | ||
[ | [e]="heap allocation performed here", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,2130,"static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {\n // ...\n if (VD)\n // ...\n else if (const Expr *E = Base.dyn_cast<const Expr *>())\n // ...\n else if (DynamicAllocLValue DA = Base.dyn_cast<DynamicAllocLValue>()) {\n // FIXME: Produce a note for dangling pointers too.\n if (std::optional<DynAlloc *> Alloc = Info.lookupDynamicAlloc(DA))\n Info.Note((*Alloc)->AllocExpr->getExprLoc(), diag::note_constexpr_dynamic_alloc_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp"]={"clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp:53:32: note: heap allocation performed here"} | ["clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp"]={"clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp:53:32: note: heap allocation performed here"} | ||
| Line 5,618: | Line 5,619: | ||
}, | }, | ||
["note_constexpr_dynamic_cast_to_reference_failed"]={ | ["note_constexpr_dynamic_cast_to_reference_failed"]={ | ||
[ | [i]={{nil,r,"note_constexpr_dynamic_cast_to_reference_failed"}}, | ||
[b]={{nil,r,"reference dynamic_cast failed: %select{static type %1 of operand is a non-public base class of dynamic type %2|dynamic type %2 of operand does not have a base class of type %3|%3 is an ambiguous base class of dynamic type %2 of operand|%3 is a non-public base class of dynamic type %2 of operand}0"}}, | [b]={{nil,r,"reference dynamic_cast failed: %select{static type %1 of operand is a non-public base class of dynamic type %2|dynamic type %2 of operand does not have a base class of type %3|%3 is an ambiguous base class of dynamic type %2 of operand|%3 is a non-public base class of dynamic type %2 of operand}0"}}, | ||
[ | [g]={{nil,r,{"reference dynamic_cast failed: ",{"static type B of operand is a non-public base class of dynamic type C","dynamic type C of operand does not have a base class of type D","D is an ambiguous base class of dynamic type C of operand","D is a non-public base class of dynamic type C of operand"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="reference dynamic_cast failed\\: (?:static type (.*?) of operand is a non\\-public base class of dynamic type (.*?)|dynamic type (.*?) of operand does not have a base class of type (.*?)|(.*?) is an ambiguous base class of dynamic type (.*?) of operand|(.*?) is a non\\-public base class of dynamic type (.*?) of operand)", | ||
[ | [c]=o, | ||
[ | [a]={{nil,r,u}}, | ||
[ | [h]={"7bd54ab58665",1557951741,"[c++20] For P1327R1: support dynamic_cast in constant expression","[c++20] For P1327R1: support dynamic_cast in constant expression\nevaluation.\n\nllvm-svn: 360806"}, | ||
[ | [d]={{s,5926,"/// Apply the given dynamic cast operation on the provided lvalue.\n///\n/// This implements the hard case of dynamic_cast, requiring a \"runtime check\"\n/// to find a suitable target subobject.\nstatic bool HandleDynamicCast(EvalInfo &Info, const ExplicitCastExpr *E, LValue &Ptr) {\n // ...\n auto RuntimeCheckFailed = [&](CXXBasePaths *Paths) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_dynamic_cast_to_reference_failed) << DiagKind << Ptr.Designator.getType(Info.Ctx) << Info.Ctx.getRecordType(DynType->Type) << E->getType().getUnqualifiedType();"}}, | ||
[j]={ | [j]={ | ||
[ | [zc]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:259:24: note: reference dynamic_cast failed: \'A\' is an ambiguous base class of dynamic type \'DynamicCast::G\' of operand","clang/test/SemaCXX/constant-expression-cxx2a.cpp:267:18: note: reference dynamic_cast failed: \'A\' is an ambiguous base class of dynamic type \'DynamicCast::G\' of operand","clang/test/SemaCXX/constant-expression-cxx2a.cpp:274:24: note: reference dynamic_cast failed: static type \'DynamicCast::E\' of operand is a non-public base class of dynamic type \'DynamicCast::G\'","clang/test/SemaCXX/constant-expression-cxx2a.cpp:278:24: note: reference dynamic_cast failed: \'E\' is a non-public base class of dynamic type \'DynamicCast::G\' of operand","clang/test/SemaCXX/constant-expression-cxx2a.cpp:282:32: note: reference dynamic_cast failed: dynamic type \'DynamicCast::G\' of operand does not have a base class of type \'Unrelated\'","clang/test/SemaCXX/constant-expression-cxx2a.cpp:284:32: note: reference dynamic_cast failed: dynamic type \'DynamicCast::G\' of operand does not have a base class of type \'Unrelated\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_dynamic_rounding"]={ | ["note_constexpr_dynamic_rounding"]={ | ||
[ | [i]={{nil,z,"note_constexpr_dynamic_rounding"}}, | ||
[b]={{nil, | [b]={{nil,z,"cannot evaluate this expression if rounding mode is dynamic"}}, | ||
[ | [g]={{nil,z,"cannot evaluate this expression if rounding mode is dynamic"}}, | ||
[ | [f]=q, | ||
[ | [e]="cannot evaluate this expression if rounding mode is dynamic", | ||
[ | [c]=o, | ||
[ | [a]={{nil,z,u}}, | ||
[ | [h]={"6314f412a83d",1600326607,"[FPEnv] Evaluate constant expressions under non-default rounding modes","[FPEnv] Evaluate constant expressions under non-default rounding modes\n\nThe change implements evaluation of constant floating point expressions\nunder non-default rounding modes. The main objective was to support\nevaluation of global variable initializers, where constant rounding mode\nmay be specified by `#pragma STDC FENV_ROUND`.\n\nDifferential Revision: https://reviews.llvm.org/D87822"}, | ||
[ | [d]={{s,2625,"/// Check if the given evaluation result is allowed for constant evaluation.\nstatic bool checkFloatingPointResult(EvalInfo &Info, const Expr *E, APFloat::opStatus St) {\n // ...\n if ((St & APFloat::opInexact) && FPO.getRoundingMode() == llvm::RoundingMode::Dynamic) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_dynamic_rounding);"},{mb,480,"bool CheckFloatResult(InterpState &S, CodePtr OpPC, APFloat::opStatus Status) {\n // ...\n if ((Status & APFloat::opInexact) && FPO.getRoundingMode() == llvm::RoundingMode::Dynamic) {\n // ...\n S.FFDiag(E, diag::note_constexpr_dynamic_rounding);"}} | ||
}, | }, | ||
["note_constexpr_float_arithmetic"]={ | ["note_constexpr_float_arithmetic"]={ | ||
[ | [i]="note_constexpr_float_arithmetic", | ||
[b]="floating point arithmetic produces %select{an infinity|a NaN}0", | [b]="floating point arithmetic produces %select{an infinity|a NaN}0", | ||
[ | [g]={{nil,nil,{"floating point arithmetic produces ",{"an infinity","a NaN"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="floating point arithmetic produces (?:an infinity|a NaN)", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"c8042323e1b2",1328075592,"constexpr: overflow checking for integral and floating-point arithmetic.","constexpr: overflow checking for integral and floating-point arithmetic.\n\nllvm-svn: 149473"}, | ||
[ | [d]={{s,2917,"/// Perform the given binary floating-point operation, in-place, on LHS.\nstatic bool handleFloatFloatBinOp(EvalInfo &Info, const BinaryOperator *E, APFloat &LHS, BinaryOperatorKind Opcode, const APFloat &RHS) {\n // ...\n // [expr.pre]p4:\n // If during the evaluation of an expression, the result is not\n // mathematically defined [...], the behavior is undefined.\n // FIXME: C++ rules require us to not conform to IEEE 754 here.\n if (LHS.isNaN()) {\n Info.CCEDiag(E, diag::note_constexpr_float_arithmetic) << LHS.isNaN();"}}, | ||
[j]={ | [j]={ | ||
[ | [Bc]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:281:30: note: floating point arithmetic produces a NaN","clang/test/CXX/expr/expr.const/p2-0x.cpp:282:30: note: floating point arithmetic produces a NaN","clang/test/CXX/expr/expr.const/p2-0x.cpp:283:30: note: floating point arithmetic produces a NaN"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_float_arithmetic_strict"]={ | ["note_constexpr_float_arithmetic_strict"]={ | ||
[ | [i]={{nil,z,"note_constexpr_float_arithmetic_strict"}}, | ||
[b]={{nil, | [b]={{nil,z,"compile time floating point arithmetic suppressed in strict evaluation modes"}}, | ||
[ | [g]={{nil,z,"compile time floating point arithmetic suppressed in strict evaluation modes"}}, | ||
[ | [f]=q, | ||
[ | [e]="compile time floating point arithmetic suppressed in strict evaluation modes", | ||
[ | [c]=o, | ||
[ | [a]={{nil,z,u}}, | ||
[ | [h]={"2e204e23911b",1601401476,"[clang] Enable support for #pragma STDC FENV_ACCESS","[clang] Enable support for #pragma STDC FENV_ACCESS\n\nReviewers: rjmccall, rsmith, sepavloff\n\nDifferential Revision: https://reviews.llvm.org/D87528"}, | ||
[ | [d]={{s,2633,"/// Check if the given evaluation result is allowed for constant evaluation.\nstatic bool checkFloatingPointResult(EvalInfo &Info, const Expr *E, APFloat::opStatus St) {\n // ...\n if ((St != APFloat::opOK) && (FPO.getRoundingMode() == llvm::RoundingMode::Dynamic || FPO.getExceptionMode() != LangOptions::FPE_Ignore || FPO.getAllowFEnvAccess())) {\n Info.FFDiag(E, diag::note_constexpr_float_arithmetic_strict);"},{s,13037,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isRealFloatingType() && RHSTy->isRealFloatingType()) {\n // ...\n if (!Info.InConstantContext && APFloatCmpResult == APFloat::cmpUnordered && E->getFPFeaturesInEffect(Info.Ctx.getLangOpts()).isFPConstrained()) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_float_arithmetic_strict);"},{mb,488,"bool CheckFloatResult(InterpState &S, CodePtr OpPC, APFloat::opStatus Status) {\n // ...\n if ((Status != APFloat::opOK) && (FPO.getRoundingMode() == llvm::RoundingMode::Dynamic || FPO.getExceptionMode() != LangOptions::FPE_Ignore || FPO.getAllowFEnvAccess())) {\n S.FFDiag(E, diag::note_constexpr_float_arithmetic_strict);"}} | ||
}, | }, | ||
["note_constexpr_function_param_value_unknown"]={ | ["note_constexpr_function_param_value_unknown"]={ | ||
[ | [i]={{nil,A,"note_constexpr_function_param_value_unknown"}}, | ||
[b]={{nil, | [b]={{nil,A,"function parameter %0 with unknown value cannot be used in a constant expression"}}, | ||
[ | [g]={{nil,A,"function parameter A with unknown value cannot be used in a constant expression"}}, | ||
[ | [f]=q, | ||
[ | [e]="function parameter (.*?) with unknown value cannot be used in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]={{nil,A,u}}, | ||
[ | [h]={"00068c452a59",1594250761,"Improve diagnostics for constant evaluation that fails because a","Improve diagnostics for constant evaluation that fails because a\nvariable\'s initializer is not known.\n\nThe hope is that a better diagnostic for this case will reduce the rate\nat which duplicates of non-bug PR41093 are reported."}, | ||
[ | [d]={{s,3323,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (isa<ParmVarDecl>(VD)) {\n // Assume parameters of a potential constant expression are usable in\n // constant expressions.\n if (!Info.checkingPotentialConstantExpression() || !Info.CurrentCall->Callee || !Info.CurrentCall->Callee->Equals(VD->getDeclContext())) {\n if (Info.getLangOpts().CPlusPlus11) {\n Info.FFDiag(E, diag::note_constexpr_function_param_value_unknown) << VD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-vla.cpp"]={"clang/test/SemaCXX/warn-vla.cpp:4:9: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:7:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:10:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:14:9: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:18:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:22:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:25:23: note: function parameter \'n\' with unknown value cannot be used in a constant expression"} | ["clang/test/SemaCXX/warn-vla.cpp"]={"clang/test/SemaCXX/warn-vla.cpp:4:9: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:7:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:10:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:14:9: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:18:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:22:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:25:23: note: function parameter \'n\' with unknown value cannot be used in a constant expression"} | ||
| Line 5,682: | Line 5,683: | ||
}, | }, | ||
["note_constexpr_heap_alloc_limit_exceeded"]={ | ["note_constexpr_heap_alloc_limit_exceeded"]={ | ||
[ | [i]={{nil,p,"note_constexpr_heap_alloc_limit_exceeded"}}, | ||
[b]={{nil,p,"constexpr evaluation hit maximum heap allocation limit"}}, | [b]={{nil,p,"constexpr evaluation hit maximum heap allocation limit"}}, | ||
[ | [g]={{nil,p,"constexpr evaluation hit maximum heap allocation limit"}}, | ||
[ | [f]=q, | ||
[ | [e]="constexpr evaluation hit maximum heap allocation limit", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={Eb,1569547607,Ab,yb}, | ||
[ | [d]={{s,1905,"APValue *EvalInfo::createHeapAlloc(const Expr *E, QualType T, LValue &LV) {\n if (NumHeapAllocs > DynamicAllocLValue::getMaxIndex()) {\n FFDiag(E, diag::note_constexpr_heap_alloc_limit_exceeded);"}} | ||
}, | }, | ||
["note_constexpr_inherited_ctor_call_here"]={ | ["note_constexpr_inherited_ctor_call_here"]={ | ||
[ | [i]="note_constexpr_inherited_ctor_call_here", | ||
[b]="in implicit initialization for inherited constructor of %0", | [b]="in implicit initialization for inherited constructor of %0", | ||
[ | [g]="in implicit initialization for inherited constructor of A", | ||
[ | [f]=q, | ||
[ | [e]="in implicit initialization for inherited constructor of (.*?)", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:","P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:\n\nReplace inheriting constructors implementation with new approach, voted into\nC++ last year as a DR against C++11.\n\nInstead of synthesizing a set of derived class constructors for each inherited\nbase class constructor, we make the constructors of the base class visible to\nconstructor lookup in the derived class, using the normal rules for\nusing-declarations.\n\nFor constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived\nclass that tracks the requisite additional information. We create shadow\nconstructors (not found by name lookup) in the derived class to model the\nactual initialization, and have a new expression node,\nCXXInheritedCtorInitExpr, to model the initialization of a base class from such\na constructor. (This initialization is special because it performs real perfect\nforwarding of arguments.)\n\nIn cases where argument forwarding is not possible (for inalloca calls,\nvariadic calls, and calls with callee parameter cleanup), the shadow inheriting\nconstructor is not emitted and instead we directly emit the initialization code\ninto the caller of the inherited constructor.\n\nNote that this new model is not perfectly compatible with the old model in some\ncorner cases. In particular:\n * if B inherits a private constructor from A, and C uses that constructor to\n construct a B, then we previously required that A befriends B and B\n befriends C, but the new rules require A to befriend C directly, and\n * if a derived class has its own constructors (and so its implicit default\n constructor is suppressed), it may still inherit a default constructor from\n a base class\n\nllvm-svn: 274049"}, | ||
[ | [d]={{"clang/lib/AST/Interp/State.cpp",150,"void State::addCallStack(unsigned Limit) {\n // ...\n for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {\n // ...\n // Use a different note for an inheriting constructor, because from the\n // user\'s perspective it\'s not really a function at all.\n if (const auto *CD = dyn_cast_if_present<CXXConstructorDecl>(F->getCallee()); CD && CD->isInheritingConstructor()) {\n addDiag(CallLocation, diag::note_constexpr_inherited_ctor_call_here) << CD->getParent();"}} | ||
}, | }, | ||
["note_constexpr_invalid_alignment"]={ | ["note_constexpr_invalid_alignment"]={ | ||
[ | [i]={{nil,p,"note_constexpr_invalid_alignment"}}, | ||
[b]={{nil,p,"requested alignment %0 is not a positive power of two"}}, | [b]={{nil,p,"requested alignment %0 is not a positive power of two"}}, | ||
[ | [g]={{nil,p,"requested alignment A is not a positive power of two"}}, | ||
[ | [f]=q, | ||
[ | [e]="requested alignment (.*?) is not a positive power of two", | ||
[ | [c]=o, | ||
[ | [a]={{nil,p,u}}, | ||
[ | [h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | ||
[ | [d]={{s,9143,"/// Evaluate the value of the alignment argument to __builtin_align_{up,down},\n/// __builtin_is_aligned and __builtin_assume_aligned.\nstatic bool getAlignmentArgument(const Expr *E, QualType ForType, EvalInfo &Info, APSInt &Alignment) {\n // ...\n if (Alignment < 0 || !Alignment.isPowerOf2()) {\n Info.FFDiag(E, diag::note_constexpr_invalid_alignment) << Alignment;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:121:36: note: requested alignment -1 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:112:34: note: requested alignment -2 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:105:36: note: requested alignment -3 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:121:36: note: requested alignment 17 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:112:34: note: requested alignment 18 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:105:36: note: requested alignment 19 is not a positive power of two"} | ["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:121:36: note: requested alignment -1 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:112:34: note: requested alignment -2 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:105:36: note: requested alignment -3 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:121:36: note: requested alignment 17 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:112:34: note: requested alignment 18 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:105:36: note: requested alignment 19 is not a positive power of two"} | ||
| Line 5,718: | Line 5,719: | ||
}, | }, | ||
["note_constexpr_invalid_cast"]={ | ["note_constexpr_invalid_cast"]={ | ||
[ | [i]="note_constexpr_invalid_cast", | ||
[b]={{nil, | [b]={{nil,P,"%select{reinterpret_cast|dynamic_cast|%select{this conversion|cast that performs the conversions of a reinterpret_cast}1|cast from %1}0 is not allowed in a constant expression%select{| in C++ standards before C++20||}0"},{y,p,"%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of a reinterpret_cast|cast from %1}0 is not allowed in a constant expression%select{| in C++ standards before C++20||}0"},{r,r,"%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of a reinterpret_cast|cast from %1}0 is not allowed in a constant expression%select{| in C++ standards before C++2a||}0"},{D,nil,"%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of a reinterpret_cast|cast from %1}0 is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,P,{{"reinterpret_cast","dynamic_cast",{{"this conversion","cast that performs the conversions of a reinterpret_cast"}},"cast from B"},rb,{o," in C++ standards before C++20",o,o}}},{y,p,{{"reinterpret_cast","dynamic_cast","cast that performs the conversions of a reinterpret_cast","cast from B"},rb,{o," in C++ standards before C++20",o,o}}},{r,r,{{"reinterpret_cast","dynamic_cast","cast that performs the conversions of a reinterpret_cast","cast from B"},rb,{o," in C++ standards before C++2a",o,o}}},{D,nil,{{"reinterpret_cast","dynamic_cast","cast that performs the conversions of a reinterpret_cast","cast from B"},rb}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:reinterpret_cast|dynamic_cast|(?:this conversion|cast that performs the conversions of a reinterpret_cast)|cast from (.*?)) is not allowed in a constant expression(?:| in C\\+\\+ standards before C\\+\\+20||)", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"6d6ecc34f841",1323693976,"Implement C++11 constant expression cast restrictions.","Implement C++11 constant expression cast restrictions.\n\nllvm-svn: 146371"}, | ||
[ | [d]={{s,7536,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitCXXReinterpretCastExpr(const CXXReinterpretCastExpr *E) {\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 0;"},{s,7541,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitCXXDynamicCastExpr(const CXXDynamicCastExpr *E) {\n if (!Info.Ctx.getLangOpts().CPlusPlus20)\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 1;"},{s,8247,"class LValueExprEvaluator : public LValueExprEvaluatorBase<LValueExprEvaluator> {\n // ...\n bool VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_LValueBitCast:\n this->CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"},{s,8976,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_BitCast:\n case CK_CPointerToObjCPointerCast:\n case CK_BlockPointerToObjCPointerCast:\n case CK_AnyPointerToBlockPointerCast:\n case CK_AddressSpaceConversion:\n // ...\n // Bitcasts to cv void* are static_casts, not reinterpret_casts, so are\n // permitted in constant expressions in C++11. Bitcasts from cv void* are\n // also static_casts, but we disallow them as a resolution to DR1312.\n if (!E->getType()->isVoidPointerType()) {\n // ...\n // 1. We\'ll allow it in std::allocator::allocate, and anything which that\n // calls.\n // 2. HACK 2022-03-28: Work around an issue with libstdc++\'s\n // <source_location> header. Fixed in GCC 12 and later (2022-04-??).\n // We\'ll allow it in the body of std::source_location::current. GCC\'s\n // implementation had a parameter of type `void*`, and casts from\n // that back to `const __impl*` in its body.\n if (VoidPtrCastMaybeOK && (Info.getStdAllocatorCaller(\"allocate\") || IsDeclSourceLocationCurrent(Info.CurrentCall->Callee) || Info.getLangOpts().CPlusPlus26)) {\n // ...\n } else {\n if (SubExpr->getType()->isVoidPointerType()) {\n if (HasValidResult)\n // ...\n else\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 3 << SubExpr->getType();"},{s,8979,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_BitCast:\n case CK_CPointerToObjCPointerCast:\n case CK_BlockPointerToObjCPointerCast:\n case CK_AnyPointerToBlockPointerCast:\n case CK_AddressSpaceConversion:\n // ...\n // Bitcasts to cv void* are static_casts, not reinterpret_casts, so are\n // permitted in constant expressions in C++11. Bitcasts from cv void* are\n // also static_casts, but we disallow them as a resolution to DR1312.\n if (!E->getType()->isVoidPointerType()) {\n // ...\n // 1. We\'ll allow it in std::allocator::allocate, and anything which that\n // calls.\n // 2. HACK 2022-03-28: Work around an issue with libstdc++\'s\n // <source_location> header. Fixed in GCC 12 and later (2022-04-??).\n // We\'ll allow it in the body of std::source_location::current. GCC\'s\n // implementation had a parameter of type `void*`, and casts from\n // that back to `const __impl*` in its body.\n if (VoidPtrCastMaybeOK && (Info.getStdAllocatorCaller(\"allocate\") || IsDeclSourceLocationCurrent(Info.CurrentCall->Callee) || Info.getLangOpts().CPlusPlus26)) {\n // ...\n } else {\n if (SubExpr->getType()->isVoidPointerType()) {\n // ...\n } else\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"},{s,9018,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_IntegralToPointer: {\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"},{s,13795,"/// HandleCast - This is used to evaluate implicit or explicit casts where the\n/// result type is integer.\nbool IntExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_PointerToIntegral: {\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/cast.c"]={"clang/test/Sema/cast.c:3:11: note: this conversion is not allowed in a constant expression"} | ["clang/test/Sema/cast.c"]={"clang/test/Sema/cast.c:3:11: note: this conversion is not allowed in a constant expression"} | ||
| Line 5,732: | Line 5,733: | ||
}, | }, | ||
["note_constexpr_invalid_downcast"]={ | ["note_constexpr_invalid_downcast"]={ | ||
[ | [i]="note_constexpr_invalid_downcast", | ||
[b]="cannot cast object of dynamic type %0 to type %1", | [b]="cannot cast object of dynamic type %0 to type %1", | ||
[ | [g]="cannot cast object of dynamic type A to type B", | ||
[ | [f]=q, | ||
[ | [e]="cannot cast object of dynamic type (.*?) to type (.*?)", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | ||
[ | [d]={{s,4800,"/// HandleBaseToDerivedCast - Apply the given base-to-derived cast operation on\n/// the provided lvalue, which currently refers to the base object.\nstatic bool HandleBaseToDerivedCast(EvalInfo &Info, const CastExpr *E, LValue &Result) {\n // ...\n // Check this cast lands within the final derived-to-base subobject path.\n if (D.MostDerivedPathLength + E->path_size() > D.Entries.size()) {\n Info.CCEDiag(E, diag::note_constexpr_invalid_downcast) << D.MostDerivedType << TargetQT;"},{s,4815,"/// HandleBaseToDerivedCast - Apply the given base-to-derived cast operation on\n/// the provided lvalue, which currently refers to the base object.\nstatic bool HandleBaseToDerivedCast(EvalInfo &Info, const CastExpr *E, LValue &Result) {\n // ...\n if (FinalType->getCanonicalDecl() != TargetType->getCanonicalDecl()) {\n Info.CCEDiag(E, diag::note_constexpr_invalid_downcast) << D.MostDerivedType << TargetQT;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constant-expression-cxx11.cpp"]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:889:25: note: cannot cast object of dynamic type \'const Derived\' to type \'Base2\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:890:25: note: cannot cast object of dynamic type \'const Derived\' to type \'Base\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:894:26: note: cannot cast object of dynamic type \'const Derived\' to type \'Base2\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:895:26: note: cannot cast object of dynamic type \'const Derived\' to type \'Base\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:1135:29: note: cannot cast object of dynamic type \'T<17>\' to type \'T<23>\'"} | ["clang/test/SemaCXX/constant-expression-cxx11.cpp"]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:889:25: note: cannot cast object of dynamic type \'const Derived\' to type \'Base2\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:890:25: note: cannot cast object of dynamic type \'const Derived\' to type \'Base\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:894:26: note: cannot cast object of dynamic type \'const Derived\' to type \'Base2\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:895:26: note: cannot cast object of dynamic type \'const Derived\' to type \'Base\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:1135:29: note: cannot cast object of dynamic type \'T<17>\' to type \'T<23>\'"} | ||
| Line 5,746: | Line 5,747: | ||
}, | }, | ||
["note_constexpr_invalid_function"]={ | ["note_constexpr_invalid_function"]={ | ||
[ | [i]="note_constexpr_invalid_function", | ||
[b]="%select{non-constexpr|undefined}0 %select{function|constructor}1 %2 cannot be used in a constant expression", | [b]="%select{non-constexpr|undefined}0 %select{function|constructor}1 %2 cannot be used in a constant expression", | ||
[ | [g]={{nil,nil,{{"non-constexpr","undefined"},gc,{bc,"constructor"}," C cannot be used in a constant expression"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:non\\-constexpr|undefined) (?:function|constructor) (.*?) cannot be used in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"357362d00b04",1323758398,"Add checks and diagnostics for many of the cases which C++11 considers to not","Add checks and diagnostics for many of the cases which C++11 considers to not\nbe constant expressions.\n\nllvm-svn: 146479"}, | ||
[ | [d]={{s,5557,"/// CheckTrivialDefaultConstructor - Check whether a constructor is a trivial\n/// default constructor. If so, we\'ll fold it whether or not it\'s marked as\n/// constexpr. If it is marked as constexpr, we will never implicitly define it,\n/// so we need special handling.\nstatic bool CheckTrivialDefaultConstructor(EvalInfo &Info, SourceLocation Loc, const CXXConstructorDecl *CD, bool IsValueInitialization) {\n // ...\n // Value-initialization does not call a trivial default constructor, so such a\n // call is a core constant expression whether or not the constructor is\n // constexpr.\n if (!CD->isConstexpr() && !IsValueInitialization) {\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n Info.CCEDiag(Loc, diag::note_constexpr_invalid_function, 1) << /*IsConstexpr*/ 0 << /*IsConstructor*/ 1 << CD;"},{s,5622,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n // ...\n else\n Info.FFDiag(CallLoc, diag::note_constexpr_invalid_function, 1) << DiagDecl->isConstexpr() << (bool)CD << DiagDecl;"},{s,9300,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrchr:\n case Builtin::BIwcschr:\n case Builtin::BImemchr:\n case Builtin::BIwmemchr:\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{s,9408,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BImemcpy:\n case Builtin::BImemmove:\n case Builtin::BIwmemcpy:\n case Builtin::BIwmemmove:\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{s,12285,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrlen:\n case Builtin::BIwcslen:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{s,12310,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrcmp:\n case Builtin::BIwcscmp:\n case Builtin::BIstrncmp:\n case Builtin::BIwcsncmp:\n case Builtin::BImemcmp:\n case Builtin::BIbcmp:\n case Builtin::BIwmemcmp:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{mb,333,"bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {\n // ...\n if (!F->isConstexpr()) {\n // ...\n if (S.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n // ...\n else\n S.FFDiag(Loc, diag::note_constexpr_invalid_function, 1) << DiagDecl->isConstexpr() << (bool)CD << DiagDecl;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx0x-class.cpp"]={"clang/test/SemaCXX/cxx0x-class.cpp:26:33: note: non-constexpr function \'foo\' cannot be used in a constant expression"} | ["clang/test/SemaCXX/cxx0x-class.cpp"]={"clang/test/SemaCXX/cxx0x-class.cpp:26:33: note: non-constexpr function \'foo\' cannot be used in a constant expression"} | ||
| Line 5,760: | Line 5,761: | ||
}, | }, | ||
["note_constexpr_invalid_inhctor"]={ | ["note_constexpr_invalid_inhctor"]={ | ||
[ | [i]="note_constexpr_invalid_inhctor", | ||
[b]="constructor inherited from base class %0 cannot be used in a constant expression; derived class cannot be implicitly initialized", | [b]="constructor inherited from base class %0 cannot be used in a constant expression; derived class cannot be implicitly initialized", | ||
[ | [g]="constructor inherited from base class A cannot be used in a constant expression; derived class cannot be implicitly initialized", | ||
[ | [f]=q, | ||
[ | [e]="constructor inherited from base class (.*?) cannot be used in a constant expression; derived class cannot be implicitly initialized", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:","P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:\n\nReplace inheriting constructors implementation with new approach, voted into\nC++ last year as a DR against C++11.\n\nInstead of synthesizing a set of derived class constructors for each inherited\nbase class constructor, we make the constructors of the base class visible to\nconstructor lookup in the derived class, using the normal rules for\nusing-declarations.\n\nFor constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived\nclass that tracks the requisite additional information. We create shadow\nconstructors (not found by name lookup) in the derived class to model the\nactual initialization, and have a new expression node,\nCXXInheritedCtorInitExpr, to model the initialization of a base class from such\na constructor. (This initialization is special because it performs real perfect\nforwarding of arguments.)\n\nIn cases where argument forwarding is not possible (for inalloca calls,\nvariadic calls, and calls with callee parameter cleanup), the shadow inheriting\nconstructor is not emitted and instead we directly emit the initialization code\ninto the caller of the inherited constructor.\n\nNote that this new model is not perfectly compatible with the old model in some\ncorner cases. In particular:\n * if B inherits a private constructor from A, and C uses that constructor to\n construct a B, then we previously required that A befriends B and B\n befriends C, but the new rules require A to befriend C directly, and\n * if a derived class has its own constructors (and so its implicit default\n constructor is suppressed), it may still inherit a default constructor from\n a base class\n\nllvm-svn: 274049"}, | ||
[ | [d]={{s,5619,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n Info.FFDiag(CallLoc, diag::note_constexpr_invalid_inhctor, 1) << CD->getInheritedConstructor().getConstructor()->getParent();"},{mb,330,"bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {\n // ...\n if (!F->isConstexpr()) {\n // ...\n if (S.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n S.FFDiag(Loc, diag::note_constexpr_invalid_inhctor, 1) << CD->getInheritedConstructor().getConstructor()->getParent();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/special/class.inhctor/p2.cpp"]={"clang/test/CXX/special/class.inhctor/p2.cpp:80:28: note: constructor inherited from base class \'Constexpr\' cannot be used in a constant expression; derived class cannot be implicitly initialized"} | ["clang/test/CXX/special/class.inhctor/p2.cpp"]={"clang/test/CXX/special/class.inhctor/p2.cpp:80:28: note: constructor inherited from base class \'Constexpr\' cannot be used in a constant expression; derived class cannot be implicitly initialized"} | ||
| Line 5,774: | Line 5,775: | ||
}, | }, | ||
["note_constexpr_invalid_template_arg"]={ | ["note_constexpr_invalid_template_arg"]={ | ||
[ | [i]={{nil,z,"note_constexpr_invalid_template_arg"}}, | ||
[b]={{nil, | [b]={{nil,z,"%select{pointer|reference}0 to %select{|subobject of }1%select{type_info object|string literal|temporary object|predefined \'%3\' variable}2 is not allowed in a template argument"}}, | ||
[ | [g]={{nil,z,{{"pointer","reference"}," to ",{o,"subobject of "},{"type_info object","string literal","temporary object","predefined \'D\' variable"}," is not allowed in a template argument"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:pointer|reference) to (?:|subobject of )(?:type_info object|string literal|temporary object|predefined \'(.*?)\' variable) is not allowed in a template argument", | ||
[ | [c]=o, | ||
[ | [a]={{nil,z,u}}, | ||
[ | [h]={"7b3515880c22",1603602504,"For P0732R2, P1907R1: ensure that template parameter objects don\'t refer","For P0732R2, P1907R1: ensure that template parameter objects don\'t refer\nto disallowed objects or have non-constant destruction."}, | ||
[ | [d]={{s,2187,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n // Additional restrictions apply in a template argument. We only enforce the\n // C++20 restrictions here; additional syntactic and semantic restrictions\n // are applied elsewhere.\n if (isTemplateArgument(Kind)) {\n // ...\n if (InvalidBaseKind != -1) {\n Info.FFDiag(Loc, diag::note_constexpr_invalid_template_arg) << IsReferenceType << !Designator.Entries.empty() << InvalidBaseKind << Ident;"},{pc,5989,"/// EvaluateConvertedConstantExpression - Evaluate an Expression\n/// That is a converted constant expression\n/// (which was built with BuildConvertedConstantExpression)\nstatic ExprResult EvaluateConvertedConstantExpression(Sema &S, Expr *E, QualType T, APValue &Value, Sema::CCEKind CCE, bool RequireInt, const APValue &PreNarrowingValue) {\n // ...\n } else if (!Notes.empty() && Notes[0].second.getDiagID() == diag::note_constexpr_invalid_template_arg) {"}} | ||
}, | }, | ||
["note_constexpr_invalid_void_star_cast"]={ | ["note_constexpr_invalid_void_star_cast"]={ | ||
[ | [i]="note_constexpr_invalid_void_star_cast", | ||
[b]="cast from %0 is not allowed in a constant expression %select{in C++ standards before C++2c|because the pointed object type %2 is not similar to the target type %3}1", | [b]="cast from %0 is not allowed in a constant expression %select{in C++ standards before C++2c|because the pointed object type %2 is not similar to the target type %3}1", | ||
[ | [g]={{nil,nil,{"cast from A is not allowed in a constant expression ",{"in C++ standards before C++2c","because the pointed object type C is not similar to the target type D"}}}}, | ||
[ | [f]=q, | ||
[ | [e]="cast from (.*?) is not allowed in a constant expression (?:in C\\+\\+ standards before C\\+\\+2c|because the pointed object type (.*?) is not similar to the target type (.*?))", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"f27afedc6c86",1662843785,"[Clang] Implement P2738R1 - constexpr cast from void*","[Clang] Implement P2738R1 - constexpr cast from void*\n\nReviewed By: #clang-language-wg, erichkeane\n\nDifferential Revision: https://reviews.llvm.org/D153702"}, | ||
[ | [d]={{s,8971,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_BitCast:\n case CK_CPointerToObjCPointerCast:\n case CK_BlockPointerToObjCPointerCast:\n case CK_AnyPointerToBlockPointerCast:\n case CK_AddressSpaceConversion:\n // ...\n // Bitcasts to cv void* are static_casts, not reinterpret_casts, so are\n // permitted in constant expressions in C++11. Bitcasts from cv void* are\n // also static_casts, but we disallow them as a resolution to DR1312.\n if (!E->getType()->isVoidPointerType()) {\n // ...\n // 1. We\'ll allow it in std::allocator::allocate, and anything which that\n // calls.\n // 2. HACK 2022-03-28: Work around an issue with libstdc++\'s\n // <source_location> header. Fixed in GCC 12 and later (2022-04-??).\n // We\'ll allow it in the body of std::source_location::current. GCC\'s\n // implementation had a parameter of type `void*`, and casts from\n // that back to `const __impl*` in its body.\n if (VoidPtrCastMaybeOK && (Info.getStdAllocatorCaller(\"allocate\") || IsDeclSourceLocationCurrent(Info.CurrentCall->Callee) || Info.getLangOpts().CPlusPlus26)) {\n // ...\n } else {\n if (SubExpr->getType()->isVoidPointerType()) {\n if (HasValidResult)\n CCEDiag(E, diag::note_constexpr_invalid_void_star_cast) << SubExpr->getType() << Info.getLangOpts().CPlusPlus26 << Result.Designator.getType(Info.Ctx).getCanonicalType() << E->getType()->getPointeeType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.const/p5-26.cpp"]={"clang/test/CXX/expr/expr.const/p5-26.cpp:12:11: note: cast from \'void *\' is not allowed in a constant expression in C++ standards before C++2c","clang/test/CXX/expr/expr.const/p5-26.cpp:33:27: note: cast from \'void *\' is not allowed in a constant expression in C++ standards before C++2c","clang/test/CXX/expr/expr.const/p5-26.cpp:36:27: note: cast from \'void *\' is not allowed in a constant expression in C++ standards before C++2c"} | ["clang/test/CXX/expr/expr.const/p5-26.cpp"]={"clang/test/CXX/expr/expr.const/p5-26.cpp:12:11: note: cast from \'void *\' is not allowed in a constant expression in C++ standards before C++2c","clang/test/CXX/expr/expr.const/p5-26.cpp:33:27: note: cast from \'void *\' is not allowed in a constant expression in C++ standards before C++2c","clang/test/CXX/expr/expr.const/p5-26.cpp:36:27: note: cast from \'void *\' is not allowed in a constant expression in C++ standards before C++2c"} | ||
| Line 5,799: | Line 5,800: | ||
}, | }, | ||
["note_constexpr_large_shift"]={ | ["note_constexpr_large_shift"]={ | ||
[ | [i]="note_constexpr_large_shift", | ||
[b]="shift count %0 >= width of type %1 (%2 bit%s2)", | [b]="shift count %0 >= width of type %1 (%2 bit%s2)", | ||
[ | [g]="shift count A >= width of type B (C bitC)", | ||
[ | [f]=q, | ||
[ | [e]="shift count (.*?) \\>\\= width of type (.*?) \\((.*?) bit(.*?)\\)", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"fe800031ec14",1327982900,"constexpr: catch a collection of integral undefined behaviors:","constexpr: catch a collection of integral undefined behaviors:\n -INT_MIN and INT_MIN / -1\n Shift by a negative or too large quantity\n Left shift of negative value\n Overflow in left shift\n\nllvm-svn: 149344"}, | ||
[ | [d]={{s,2834,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_left:\n // ...\n if (SA != RHS) {\n Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth();"},{s,2867,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_right:\n // ...\n if (SA != RHS)\n Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth();"},{s,14046,"bool FixedPointExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n case BO_Shl:\n case BO_Shr: {\n // ...\n // Embedded-C 4.1.6.2.2:\n // The right operand must be nonnegative and less than the total number\n // of (nonpadding) bits of the fixed-point operand ...\n if (RHSVal.isNegative())\n // ...\n else if (Amt != RHSVal)\n Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHSVal << E->getType() << ShiftBW;"}}, | ||
[j]={ | [j]={ | ||
[ | [Bc]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:158:28: note: shift count 32 >= width of type \'int\' (32 bits)","clang/test/CXX/expr/expr.const/p2-0x.cpp:174:28: note: shift count 32 >= width of type \'int\' (32 bits)"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_lifetime_ended"]={ | ["note_constexpr_lifetime_ended"]={ | ||
[ | [i]="note_constexpr_lifetime_ended", | ||
[b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 %select{temporary|variable}1 whose %plural{8:storage duration|:lifetime}0 has ended"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 %select{temporary|variable}1 whose lifetime has ended"},{ | [b]={{nil,p,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 %select{temporary|variable}1 whose %plural{8:storage duration|:lifetime}0 has ended"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 %select{temporary|variable}1 whose lifetime has ended"},{D,nil,"%select{read of|assignment to|increment of|decrement of}0 %select{temporary|variable}1 whose lifetime has ended"}}, | ||
[ | [g]={{nil,p,{{C,C,I,J,K,db,cb,eb,nc,Db},gc,{Rc,Zb}," whose ",{"storage duration","lifetime"}," has ended"}},{r,r,{{C,I,J,K,db,cb,eb},gc,{Rc,Zb}," whose lifetime has ended"}},{D,nil,{{C,I,J,K},gc,{Rc,Zb}," whose lifetime has ended"}}}, | ||
[ | [f]=q, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) (?:temporary|variable) whose (?:storage duration|lifetime) has ended", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"b228a86fcfd1",1329272293,"Implement DR1454. This allows all intermediate results in constant expressions","Implement DR1454. This allows all intermediate results in constant expressions\nto be core constant expressions (including pointers and references to\ntemporaries), and makes constexpr calculations Turing-complete. A Turing machine\nsimulator is included as a testcase.\n\nThis opens up the possibilty of removing CCValue entirely, and removing some\ncopies from the constant evaluator in the process, but that cleanup is not part\nof this change.\n\nllvm-svn: 150557"}, | ||
[ | [d]={{s,4019,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (LVal.getLValueCallIndex()) {\n // ...\n if (!Frame) {\n Info.FFDiag(E, diag::note_constexpr_lifetime_ended, 1) << AK << LVal.Base.is<const ValueDecl *>();"},{mb,164,"bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n if (!Ptr.isLive()) {\n // ...\n S.FFDiag(Src, diag::note_constexpr_lifetime_ended, 1) << AK << !IsTemp;"}}, | ||
[j]={ | [j]={ | ||
[ | [zc]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:1199:8: note: destruction of variable whose lifetime has ended","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1205:8: note: destruction of temporary whose lifetime has ended"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_literal_comparison"]={ | ["note_constexpr_literal_comparison"]={ | ||
[ | [i]={{nil,P,"note_constexpr_literal_comparison"}}, | ||
[b]={{nil, | [b]={{nil,P,"comparison of addresses of literals has unspecified value"}}, | ||
[ | [g]={{nil,P,"comparison of addresses of literals has unspecified value"}}, | ||
[ | [f]=q, | ||
[ | [e]="comparison of addresses of literals has unspecified value", | ||
[ | [c]=o, | ||
[ | [a]={{nil,P,u}}, | ||
[ | [h]={"f27afedc6c86",1662843785,"[Clang] Implement P2738R1 - constexpr cast from void*","[Clang] Implement P2738R1 - constexpr cast from void*\n\nReviewed By: #clang-language-wg, erichkeane\n\nDifferential Revision: https://reviews.llvm.org/D153702"}, | ||
[ | [d]={{s,13096,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // It\'s implementation-defined whether distinct literals will have\n // distinct addresses. In clang, the result of such a comparison is\n // unspecified, so it is not a constant expression. However, we do know\n // that the address of a literal will be non-null.\n if ((IsLiteralLValue(LHSValue) || IsLiteralLValue(RHSValue)) && LHSValue.Base && RHSValue.Base)\n return DiagComparison(diag::note_constexpr_literal_comparison);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtins.cpp"]={"clang/test/SemaCXX/builtins.cpp:50:43: note: comparison of addresses of literals has unspecified value"} | ["clang/test/SemaCXX/builtins.cpp"]={"clang/test/SemaCXX/builtins.cpp:50:43: note: comparison of addresses of literals has unspecified value"} | ||
| Line 5,841: | Line 5,842: | ||
}, | }, | ||
["note_constexpr_lshift_discards"]={ | ["note_constexpr_lshift_discards"]={ | ||
[ | [i]="note_constexpr_lshift_discards", | ||
[b]="signed left shift discards bits", | [b]="signed left shift discards bits", | ||
[g]="signed left shift discards bits", | [g]="signed left shift discards bits", | ||
[f]= | [f]=q, | ||
[e]= | [e]="signed left shift discards bits", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[h]={"da7c4ba1af98",1328681693,"Implement the agreed resolution to DR1457: a signed left shift of a 1 bit into","Implement the agreed resolution to DR1457: a signed left shift of a 1 bit into\nthe sign bit doesn\'t have undefined behavior, but a signed left shift of a 1 bit\nout of the sign bit still does. As promised to Howard :)\n\nThe suppression of the potential constant expression checking in system headers\nis also removed, since the problem it was working around is gone.\n\nllvm-svn: 150059"}, | |||
[d]={{s,2844,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_left:\n // ...\n if (SA != RHS) {\n // ...\n } else if (LHS.isSigned() && !Info.getLangOpts().CPlusPlus20) {\n // C++11 [expr.shift]p2: A signed left shift must have a non-negative\n // operand, and must not overflow the corresponding unsigned type.\n // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to\n // E1 x 2^E2 module 2^N.\n if (LHS.isNegative())\n // ...\n else if (LHS.countl_zero() < SA)\n Info.CCEDiag(E, diag::note_constexpr_lshift_discards);"}}, | |||
[j]={ | [j]={ | ||
[ | [Bc]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:166:40: note: signed left shift discards bits","clang/test/CXX/expr/expr.const/p2-0x.cpp:167:51: note: signed left shift discards bits","clang/test/CXX/expr/expr.const/p2-0x.cpp:168:44: note: signed left shift discards bits"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_lshift_of_negative"]={ | ["note_constexpr_lshift_of_negative"]={ | ||
[ | [i]="note_constexpr_lshift_of_negative", | ||
[b]="left shift of negative value %0", | [b]="left shift of negative value %0", | ||
[ | [g]="left shift of negative value A", | ||
[ | [f]=q, | ||
[ | [e]="left shift of negative value (.*?)", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"fe800031ec14",1327982900,"constexpr: catch a collection of integral undefined behaviors:","constexpr: catch a collection of integral undefined behaviors:\n -INT_MIN and INT_MIN / -1\n Shift by a negative or too large quantity\n Left shift of negative value\n Overflow in left shift\n\nllvm-svn: 149344"}, | ||
[ | [d]={{s,2842,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_left:\n // ...\n if (SA != RHS) {\n // ...\n } else if (LHS.isSigned() && !Info.getLangOpts().CPlusPlus20) {\n // C++11 [expr.shift]p2: A signed left shift must have a non-negative\n // operand, and must not overflow the corresponding unsigned type.\n // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to\n // E1 x 2^E2 module 2^N.\n if (LHS.isNegative())\n Info.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS;"}}, | ||
[j]={ | [j]={ | ||
[ | [Bc]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:162:44: note: left shift of negative value -3"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_ltor_incomplete_type"]={ | ["note_constexpr_ltor_incomplete_type"]={ | ||
[ | [i]={{nil,D,"note_constexpr_ltor_incomplete_type"}}, | ||
[b]={{nil, | [b]={{nil,D,"read of incomplete type %0 is not allowed in a constant expression"}}, | ||
[ | [g]={{nil,D,"read of incomplete type A is not allowed in a constant expression"}}, | ||
[ | [f]=q, | ||
[ | [e]="read of incomplete type (.*?) is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]={{nil,D,u}}, | ||
[ | [h]={"147b743602e4",1544633623,"[ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types","[ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types\n\nSummary:\n`memchr` and `memcmp` operate upon the character units of the object\nrepresentation; that is, the `size_t` parameter expresses the number of\ncharacter units. The constant folding implementation is updated in this\npatch to account for multibyte element types in the arrays passed to\n`memchr`/`memcmp` and, in the case of `memcmp`, to account for the\npossibility that the arrays may have differing element types (even when\nthey are byte-sized).\n\nActual inspection of the object representation is not implemented.\nComparisons are done only between elements with the same object size;\nthat is, `memchr` will fail when inspecting at least one character unit\nof a multibyte element. The integer types are assumed to have two\'s\ncomplement representation with 0 for `false`, 1 for `true`, and no\npadding bits.\n\n`memcmp` on multibyte elements will only be able to fold in cases where\nenough elements are equal for the answer to be 0.\n\nVarious tests are added to guard against incorrect folding for cases\nthat miscompile on some system or other prior to this patch. At the same\ntime, the unsigned 32-bit `wchar_t` testing in\n`test/SemaCXX/constexpr-string.cpp` is restored.\n\nReviewers: rsmith, aaron.ballman, hfinkel\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D55510\n\nllvm-svn: 348938"}, | ||
[ | [d]={{s,9340,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_strchr:\n case Builtin::BI__builtin_wcschr:\n case Builtin::BI__builtin_memchr:\n case Builtin::BI__builtin_char_memchr:\n case Builtin::BI__builtin_wmemchr: {\n // ...\n // Pointers to const void may point to objects of incomplete type.\n if (IsRawByte && CharTy->isIncompleteType()) {\n Info.FFDiag(E, diag::note_constexpr_ltor_incomplete_type) << CharTy;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-string.cpp"]={"SemaCXX/constexpr-string.cpp:406:17: note: read of incomplete type \'struct Incomplete\' is not allowed in a constant expression"} | ["clang/test/SemaCXX/constexpr-string.cpp"]={"SemaCXX/constexpr-string.cpp:406:17: note: read of incomplete type \'struct Incomplete\' is not allowed in a constant expression"} | ||
| Line 5,883: | Line 5,884: | ||
}, | }, | ||
["note_constexpr_ltor_non_const_int"]={ | ["note_constexpr_ltor_non_const_int"]={ | ||
[ | [i]="note_constexpr_ltor_non_const_int", | ||
[b]="read of non-const variable %0 is not allowed in a constant expression", | [b]="read of non-const variable %0 is not allowed in a constant expression", | ||
[ | [g]="read of non-const variable A is not allowed in a constant expression", | ||
[ | [f]=q, | ||
[ | [e]="read of non\\-const variable (.*?) is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"f2b681b4d819",1324443886,"constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in","constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in\nconstant expressions.\n\nllvm-svn: 147035"}, | ||
[ | [d]={{s,4129,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n if (!IsConstant) {\n // ...\n if (Info.getLangOpts().CPlusPlus) {\n Info.FFDiag(E, diag::note_constexpr_ltor_non_const_int, 1) << VD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/c99-variable-length-array.cpp"]={"clang/test/SemaCXX/c99-variable-length-array.cpp:43:14: note: read of non-const variable \'value\' is not allowed in a constant expression","clang/test/SemaCXX/c99-variable-length-array.cpp:60:25: note: read of non-const variable \'value\' is not allowed in a constant expression","clang/test/SemaCXX/c99-variable-length-array.cpp:118:16: note: read of non-const variable \'M\' is not allowed in a constant expression"} | ["clang/test/SemaCXX/c99-variable-length-array.cpp"]={"clang/test/SemaCXX/c99-variable-length-array.cpp:43:14: note: read of non-const variable \'value\' is not allowed in a constant expression","clang/test/SemaCXX/c99-variable-length-array.cpp:60:25: note: read of non-const variable \'value\' is not allowed in a constant expression","clang/test/SemaCXX/c99-variable-length-array.cpp:118:16: note: read of non-const variable \'M\' is not allowed in a constant expression"} | ||
| Line 5,897: | Line 5,898: | ||
}, | }, | ||
["note_constexpr_ltor_non_constexpr"]={ | ["note_constexpr_ltor_non_constexpr"]={ | ||
[ | [i]="note_constexpr_ltor_non_constexpr", | ||
[b]="read of non-constexpr variable %0 is not allowed in a constant expression", | [b]="read of non-constexpr variable %0 is not allowed in a constant expression", | ||
[ | [g]="read of non-constexpr variable A is not allowed in a constant expression", | ||
[ | [f]=q, | ||
[ | [e]="read of non\\-constexpr variable (.*?) is not allowed in a constant expression", | ||
[ | [c]=o, | ||
[ | [a]=u, | ||
[ | [h]={"f2b681b4d819",1324443886,"constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in","constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in\nconstant expressions.\n\nllvm-svn: 147035"}, | ||
[ | [d]={{s,3357,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (Init->isValueDependent()) {\n // ...\n if (!Info.checkingPotentialConstantExpression()) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << VD->getType();"},{s,4147,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // Keep evaluating to see what we can do. In particular, we support\n // folding of const floating-point types, in order to make static const\n // data members of such types (supported as an extension) more useful.\n if (Info.getLangOpts().CPlusPlus) {\n Info.CCEDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{s,4158,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // ...\n } else {\n // Never allow reading a non-const value.\n if (Info.getLangOpts().CPlusPlus) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{mb,133,"bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n if (!S.checkingPotentialConstantExpression()) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_ltor_non_constexpr, 1) << VD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:27:4: note: read of non-constexpr variable \'nonconst_np\' is not allowed in a constant expression"} | ["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:27:4: note: read of non-constexpr variable \'nonconst_np\' is not allowed in a constant expression"} | ||
edits